16#include <Traitement_particulier_NS_Profils.h>
17#include <LecFicDistribueBin.h>
18#include <EcrFicCollecteBin.h>
19#include <Modele_turbulence_hyd_base.h>
20#include <Navier_Stokes_std.h>
53 Motcle accouverte =
"{" , accfermee =
"}" ;
56 if (motbidon == accouverte)
59 les_mots[0] =
"const_profile";
60 les_mots[1] =
"num_probes";
61 les_mots[2] =
"dt_output";
62 les_mots[3] =
"stats";
63 les_mots[4] =
"profil_nu_t";
64 les_mots[5] =
"reprise";
65 les_mots[6] =
"reprise_nu_t";
66 les_mots[7] =
"homog_dir";
68 while(motlu != accfermee)
70 int rang=les_mots.
search(motlu);
78 else if((motlu==
"y")||(motlu==
"Y"))
dir_profil = 1;
79 else if((motlu==
"z")||(motlu==
"Z"))
dir_profil = 2;
82 Cerr <<
"Wrong value for direction of profile !" << finl;
85 Cerr <<
"Profiles at constant " << motlu << finl;
94 Cerr <<
"Error in Traitement_particulier_NS_Profils::lire" << finl;
95 Cerr <<
"Wrong value for number of probes (" <<
n_probes <<
") :" << finl;
96 Cerr <<
"There must be at least one profile !" << finl;
103 Cerr <<
" Probe_" << i+1 <<
" = " <<
positions(i) << finl;
113 Cerr <<
"Spatial average parameters read..." << finl;
124 Cerr <<
"Reading time statitics parameters..." << finl;
126 Cerr <<
"Time interval for output : " <<
dt_post_stat << finl;
134 Cerr <<
"User asked for statistics on eddy-viscosity..." << finl;
135 const RefObjU& modele_turbulence = mon_equation->get_modele(TURBULENCE);
138 Cerr <<
"Statistics for eddy-viscosity : OK !" << finl;
141 Cerr <<
"User asked for eddy-viscosity profile," << finl;
142 Cerr <<
"but is not defined in laminar case !" << finl;
143 Cerr <<
"Please check the problem type..." << finl;
152 Cerr <<
"The time statistics file is : " <<
fich_repr_u << finl;
160 Cerr <<
"Continuing statistics on eddy-viscosity : OK!" << finl;
167 if((motlu==
"x")||(motlu==
"X"))
homo_dir = 0;
168 else if((motlu==
"y")||(motlu==
"Y"))
homo_dir = 1;
169 else if((motlu==
"z")||(motlu==
"Z"))
homo_dir = 2;
172 Cerr <<
"Wrong value for homogeneous direction !" << finl;
175 Cerr <<
"Homogeneous direction : " << motlu << finl;
187 if (motlu != accfermee)
189 Cerr <<
"Error while reading in Traitement_particulier_NS_Profils::lire" << finl;
190 Cerr <<
"We were expecting a }" << finl;
196 Cerr <<
"Error while reading in Traitement_particulier_NS_Profils" << finl;
197 Cerr <<
"We were expecting a {" << finl;
203 Cerr <<
"User asked for time statistics :" << finl;
204 Cerr <<
"To do so, you also need to specify the parameters for space statistics," << finl;
205 Cerr <<
"since it is used for the time stats.." << finl;
210 Cerr <<
"User asked for time statistics on nu_t :" << finl;
211 Cerr <<
"to do so, you also need to request the computation of space statistics," << finl;
212 Cerr <<
"since it is necessary for computing the temporal stats." << finl;
273 double tps = mon_equation->inconnue().temps();
301 for(num_prof=0; num_prof<
n_probes; num_prof++)
303 ficu >>
Nxy(num_prof) >>
Nyy(num_prof) >>
Nzy(num_prof) >>
Nuv(num_prof);
304 for (j=0; j<
Nxy(num_prof); j++)
309 for (j=0; j<
Nyy(num_prof); j++)
314 for (j=0; j<
Nzy(num_prof); j++)
319 for (j=0; j<
Nuv(num_prof); j++)
324 Cerr <<
"ti=" << ti << finl;
326 Cerr <<
"chc_ti=" << chc_ti <<
" chc_temps_deb=" << chc_temps_deb << finl;
327 if (chc_ti!=chc_temps_deb)
331 Cerr <<
"problem resuming velocity stats!!" << finl;
332 Cerr <<
"The requested start time for stats " <<
temps_deb << finl;
333 Cerr <<
"is less than the start time of the saved stats!" << ti << finl;
340 Cerr <<
"Restarting velocity stats computation from t=" <<
temps_deb <<
"s" << finl;
352 Cerr <<
"The time at which you want to start stats has already been passed!!" << finl;
359 Cerr <<
"Continuing velocity stats computation, started at t=" << ti <<
"s" << finl;
367 Cerr <<
"Stats computation has not started yet" << finl;
372 Cerr <<
"You must provide the file to resume the stats!!" << finl;
385 for(num_prof=0; num_prof<
n_probes; num_prof++)
387 ficu >>
Nuv(num_prof);
388 for (j=0; j<
Nuv(num_prof); j++)
394 Cerr <<
"Problem : the nut stats and velocity stats are misaligned!!" << finl;
397 Cerr <<
"ti2=" << ti2 << finl;
399 Cerr <<
"chc_ti2=" << chc_ti2 <<
" chc_temps_deb=" << chc_temps_deb << finl;
400 if (chc_ti2!=chc_temps_deb)
404 Cerr <<
"problem resuming nu_t stats!!" << finl;
405 Cerr <<
"The requested start time for stats " <<
temps_deb << finl;
406 Cerr <<
"is less than the start time of the saved stats!" << ti << finl;
413 Cerr <<
"Restarting nu_t stats computation from t=" <<
temps_deb <<
"s" << finl;
419 Cerr <<
"The time at which you want to start stats has already been passed!" << finl;
426 Cerr <<
"Continuing nu_t stats computation, started at t=" << ti <<
"s" << finl;
434 Cerr <<
"Stats computation has not started yet" << finl;
439 Cerr <<
"You must provide the file to resume the stats!" << finl;
447 Cerr <<
"No stats computation started!" << finl;
448 Cerr <<
"No resumption of u_moy_temp, u_et_temp and teta_moy_temp" << finl;
454 double tps = mon_equation->inconnue().temps();
457 Cerr <<
"In Traitement_particulier_NS_canal::sauver_stat!!" << finl;
461 Nom fich_sauv_u =
"u_moy_temp_";
463 fich_sauv_u+=
".sauv";
469 ficu << temps << finl;
471 for(num_prof=0; num_prof<
n_probes; num_prof++)
473 ficu <<
Nxy(num_prof) <<
Nyy(num_prof) <<
Nzy(num_prof) <<
Nuv(num_prof) << finl;
474 for (j=0; j<
Nxy(num_prof); j++)
479 for (j=0; j<
Nyy(num_prof); j++)
484 for (j=0; j<
Nzy(num_prof); j++)
489 for (j=0; j<
Nuv(num_prof); j++)
493 Cerr <<
"Saving u_moy_temp at t=" << tps << finl;
494 Cerr <<
"Start of stats computation at t=" <<
temps_deb <<
" to note for stats resumption!" << finl;
498 Nom fich_sauv_nut =
"nut_temp_";
499 fich_sauv_nut+=temps;
500 fich_sauv_nut+=
".sauv";
503 ficu2 << temps << finl;
504 for(num_prof=0; num_prof<
n_probes; num_prof++)
506 ficu2 <<
Nuv(num_prof) << finl;
507 for (j=0; j<
Nuv(num_prof); j++)
511 Cerr <<
"Saving nu_t_temp at t=" << tps << finl;
512 Cerr <<
"Start of stats computation at t=" <<
temps_deb <<
" to note for stats resumption!" << finl;
Writing to a file in binary format. This class implements the operators and virtual methods of the SF...
Class defining operators and methods for all reading operation in an input flow (file,...
Reading from a file in binary format.
Base class for the turbulence model hierarchy for Navier-Stokes equations.
A character string (Nom) in uppercase.
An array of Motcle objects.
int search(const Motcle &t) const
class Nom: a character string for naming TRUST objects.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
const Objet_U & valeur() const
class Trait_part_NS_Profils_VDF
Entree & lire(Entree &) override
void sauver_stat() const override
void reprendre_stat() override
virtual void init_calcul_moyenne()=0
void preparer_calcul_particulier() override
Traitement_particulier_NS_base Derives from Support_Champ_Masse_Volumique: use of rho.