16#include <Modele_turbulence_scal_base.h>
17#include <Modele_turbulence_hyd_base.h>
18#include <Turbulence_paroi_scal_base.h>
19#include <Convection_Diffusion_std.h>
20#include <Discretisation_base.h>
21#include <Schema_Temps_base.h>
22#include <Champ_Uniforme.h>
23#include <Probleme_base.h>
24#include <EcrFicPartage.h>
25#include <Domaine_VF.h>
27#include <Dirichlet_paroi_defilante.h>
28#include <Dirichlet_paroi_fixe.h>
61 Cerr <<
"Reading the wall law type " << finl;
66 const RefObjU& modele_turbulence = eqn.
get_modele(TURBULENCE);
70 if (typ !=
"negligeable_scalaire")
73 Cerr <<
"The wall law of type " << typ <<
" chosen for the scalar is not compatible with" << finl;
74 Cerr <<
"the wall law of type " << loi.
que_suis_je() <<
" chosen for the hydraulics" << finl;
75 Cerr <<
"Use the type 'negligeable_scalaire' for the scalar or use a non-negligible wall law" << finl;
76 Cerr <<
"for the hydraulics" << finl;
84 if (discr ==
"VEFPreP1B")
88 if (typ ==
"loi_analytique_scalaire_VDF")
90 Cerr <<
"The scalar wall law of type loi_analytique_scalaire" << finl;
91 Cerr <<
"can only be used with a VEF discretization" << finl;
95 Cerr <<
"and typing: " << typ << finl;
103 return champs_compris_.get_champ(nom);
108 return champs_compris_.
has_champ(nom, ref_champ);
112 return champs_compris_.has_champ(nom);
117 if (opt == DESCRIPTION)
118 Cerr <<
"Turbulence_paroi_scal_base : " << champs_compris_.liste_noms_compris() << finl;
120 nom.add(champs_compris_.liste_noms_compris());
139 Nusselt.
ouvrir(fichier, ios::app);
158 Nom nom_fic = nom_fichier +
"." + extension;
168 fichier.
ouvrir(nom_fic, ios::app);
207 fields[0] =
"dist. carac. (m)";
208 fields[1] =
"Nusselt (local)";
209 fields[2] =
"h (Conv. W/m2/K)";
210 fields[3] =
"Tf cote paroi (K)";
211 fields[4] =
"T face de bord (K)";
212 fields[5] =
"Tparoi equiv.(K)";
231 for (
int n_bord = 0; n_bord < le_dom_dis_->nb_front_Cl(); n_bord++)
233 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
234 const Nom& nom_bord = la_cl->frontiere_dis().le_nom();
250 else if (boundaries_list.size() > 0)
252 err +=
"The boundary named '";
254 err +=
"' is not of type Dirichlet_paroi_fixe or Dirichlet_paroi_defilante.\n";
255 err +=
"So TRUST will not write Nusselt mean values.\n\n";
291 int ndeb, nfin, size0, num_bord;
294 if (boundaries_list.size() != 0)
296 size0 = boundaries_list.size();
300 size0 = le_dom_dis_->nb_front_Cl();
302 DoubleTrav moy_bords(size0 + 1,
nb_fields_+1);
308 for (
int n_bord = 0; n_bord < le_dom_dis_->nb_front_Cl(); n_bord++)
310 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
316 if (boundaries_ == 0 || (boundaries_ == 1 && boundaries_list.
contient(le_bord.
le_nom())))
318 for (
int num_face = ndeb; num_face < nfin; num_face++)
321 double aire = le_dom_dis_->face_surfaces(num_face);
324 moy_bords(0, i) += aire *
tab_(num_face, i);
325 moy_bords(num_bord + 1, i) += aire *
tab_(num_face, i);
342 fichier <<
" \t" << moy_bords(0, i) / moy_bords(0,
nb_fields_);
346 for (
int n_bord = 0; n_bord < le_dom_dis_->nb_front_Cl(); n_bord++)
348 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
352 if (boundaries_ == 0 || (boundaries_ == 1 && boundaries_list.
contient(le_bord.
le_nom())))
357 fichier <<
" \t" << moy_bords(num_bord + 1, i) / moy_bords(num_bord + 1,
nb_fields_);
class Champ_base This class is the base of the fields hierarchy.
bool has_champ(const Motcle &nom, OBS_PTR(FIELD_TYPE)&ref_champ) const
class Cond_lim Generic class used to represent any class
Dirichlet_paroi_defilante Imposes the wall velocity in an equation of type Navier_Stokes.
Dirichlet_paroi_fixe Represents a fixed wall in a Navier-Stokes type equation.
int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::out) override
Opens the file with the given mode and prot parameters. These parameters are the parameters of the st...
Sortie & syncfile() override
Triggers writing to disk of the data accumulated on the different processors since the last call to s...
Class defining operators and methods for all reading operation in an input flow (file,...
class Equation_base The role of an equation is the calculation of one or more fields....
virtual const RefObjU & get_modele(Type_modele type) const
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
int num_premiere_face() const
const Nom & le_nom() const override
Returns the name of the geometric boundary.
Base class for the turbulence model hierarchy for Navier-Stokes equations.
const Turbulence_paroi_base & loi_paroi() const
Base class for scalar turbulence models coupled to a Navier-Stokes convection-diffusion equation.
Convection_Diffusion_std & equation()
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
bool contient(const Nom &nom) const
An array of character strings (VECT(Nom)).
Base class for TRUST objects (Objet_U).
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
static const Nom & nom_du_cas()
Returns a constant reference to the case name. This method is static.
virtual const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
class Probleme_base It is a Probleme_U that is not a coupling.
bool & reprise_effectuee()
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
virtual const Equation_base & equation(int) const =0
static void mp_sum_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
double temps_courant() const
Returns the current time.
Base class for output streams.
const Objet_U & valeur() const
Base class for the hierarchy of wall-law models computing turbulent quantities near walls....
Base class for the hierarchy of scalar wall-law models computing turbulent quantities near walls....
virtual bool use_equivalent_distance() const
Give a boolean indicating if we need to use equivant distance by default we consider that we use the ...
void imprimer_premiere_ligne_nusselt(int, const LIST(Nom)&, const Nom &) const
Writes header line for Nusselt number and heat transfer statistics file.
static void typer_lire_turbulence_paroi_scal(OWN_PTR(Turbulence_paroi_scal_base)&, const Modele_turbulence_scal_base &, Entree &)
Reads the characteristics of the scalar wall law from an input stream.
void creer_champ(const Motcle &motlu) override
const Champ_base & get_champ(const Motcle &nom) const override
void imprimer_nusselt_mean_only(Sortie &, int, const LIST(Nom)&, const Nom &) const
Prints mean Nusselt number and heat transfer statistics to a file for specified boundaries.
void associer_modele(const Modele_turbulence_scal_base &)
Associates a turbulence model to the object.
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
Turbulence_paroi_scal_base()
virtual void compute_nusselt() const =0
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
virtual void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &)=0
void ouvrir_fichier_partage(EcrFicPartage &, const Nom &) const
Opens or creates a print file for Face, d_eq, local Nu, h.