16#include <Champ_Generique_Tparoi_VEF.h>
17#include <Probleme_base.h>
20#include <Domaine_VEF.h>
21#include <Domaine_Cl_VEF.h>
22#include <Equation_base.h>
23#include <Modele_turbulence_scal_base.h>
24#include <Neumann_paroi.h>
25#include <Neumann_homogene.h>
26#include <Discretisation_base.h>
27#include <Synonyme_info.h>
70 espace_stockage = espace_stockage_fonc;
73 return espace_stockage;
95 espace_stockage = espace_stockage_fonc;
97 DoubleTab& valeurs_espace = espace_stockage->
valeurs();
98 const DoubleTab& source_so_val = source.
valeurs();
99 const DoubleTab& inconnue = source_so_val;
100 valeurs_espace = source_so_val;
105 const RefObjU& modele_turbulence = my_eqn.
get_modele(TURBULENCE);
116 const IntTab& elem_faces = domaine_VEF.
elem_faces();
117 const DoubleVect& vol = domaine_VEF.
volumes();
118 const IntTab& face_voisins = domaine_VEF.
face_voisins();
122 DoubleVect le_mauvais_gradient(nb_dim_pb);
124 for (
int n_bord=0; n_bord<nb_front; n_bord++)
151 ToDo_Kokkos(
"boundary");
152 for (
int ind_face=num1; ind_face<num2; ind_face++)
158 le_mauvais_gradient=0.;
159 int num_face = le_bord.
num_face(ind_face);
160 int elem1 = face_voisins(num_face,0);
161 if (elem1==-1) elem1 = face_voisins(num_face,1);
165 for (
int i=0; i<nb_faces_elem; i++)
167 int j = elem_faces(elem1,i);
170 double surface_pond = 0.;
171 for (
int kk=0; kk<nb_dim_pb; kk++)
172 surface_pond -= (face_normale(j,kk)*domaine_VEF.
oriente_normale(j,elem1)*face_normale(num_face,kk)*
173 domaine_VEF.
oriente_normale(num_face,elem1))/(surface_face*surface_face);
174 Tf+=inconnue(j)*surface_pond;
177 for(
int kk=0; kk<nb_dim_pb; kk++)
178 le_mauvais_gradient(kk)+=inconnue(j)*face_normale(j,kk)*domaine_VEF.
oriente_normale(j,elem1);
180 le_mauvais_gradient/=vol(elem1);
182 double mauvais_gradient=0;
183 for(
int kk=0; kk<nb_dim_pb; kk++)
184 mauvais_gradient+=le_mauvais_gradient(kk)*face_normale(num_face,kk)/surface_face;
194 valeurs_espace(num_face)=Tf-mauvais_gradient*d_equiv(ind_face)*(-domaine_VEF.
oriente_normale(num_face,elem1));
200 DoubleTab& espace_valeurs = espace_stockage->
valeurs();
203 return espace_stockage;
210 motcles[0] =
"composantes";
211 int rang = motcles.
search(query);
218 int nb_comp = source_compos.size();
240 Nom nom_post_source, nom_champ_source;
242 nom_champ_source = nom[0];
243 nom_post_source =
"Tparoi_";
244 nom_post_source += nom_champ_source;
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Base class of generic fields having other generic fields as source. The use of the class methods reli...
const Noms get_property(const Motcle &query) const override
Returns the requested property.
virtual OWN_PTR(Champ_Fonc_base) &creer_espace_stockage(const Nature_du_champ &nature
virtual const Champ_Generique_base & get_source(int i) const
const Motcle get_directive_pour_discr() const override
Returns the directive (champ_elem, champ_sommets, champ_face or pression) to launch the discretizatio...
const Discretisation_base & get_discretisation() const override
Returns the discretization associated with the problem.
const Domaine_dis_base & get_ref_domaine_dis_base() const override
Returns a ref to the discretized domain on which the storage space will be evaluated.
virtual const int nb_comp
class Champ_Generique_Tparoi_VEF
const Champ_base & get_champ_without_evaluation(OWN_PTR(Champ_base)&espace_stockage) const override
void nommer_source() override
const Noms get_property(const Motcle &query) const override
Returns the requested property.
const Champ_base & get_champ(OWN_PTR(Champ_base)&espace_stockage) const override
virtual const Noms get_property(const Motcle &query) const
Returns the requested property.
virtual const Champ_base & get_champ(OWN_PTR(Champ_base) &espace_stockage) const =0
virtual const Champ_base & get_champ_without_evaluation(OWN_PTR(Champ_base)&espace_stockage) const =0
void nommer(const Nom &nom) override
Assigns a name to the Objet_U. Virtual method to override.
virtual DoubleTab & valeurs()=0
class Champ_base This class is the base of the fields hierarchy.
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
class Cond_lim Generic class used to represent any class
class Discretisation_base This class represents a spatial discretization scheme, which
void discretiser_champ(const Motcle &directive, const Domaine_dis_base &z, const Nom &nom, const Nom &unite, int nb_comp, int nb_pas_dt, double temps, OWN_PTR(Champ_Inc_base)&champ, const Nom &sous_type=NOM_VIDE) const
int nb_faces_elem(int=0) const
Returns the number of faces of type i of the geometric elements that make up the domain.
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
virtual const DoubleVect & face_surfaces() const
virtual double face_normales(int face, int comp) const
double volumes(int i) const
int elem_faces(int i, int j) const
Returns the index of the i-th face of element num_elem; the face numbering convention is.
int oriente_normale(int f, int e) const
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
const Domaine & domaine() const
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
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
virtual Nature_du_champ nature_du_champ() const
int num_face(const int) const
Base class for scalar turbulence models coupled to a Navier-Stokes convection-diffusion equation.
const Turbulence_paroi_scal_base & loi_paroi() const
Returns the scalar wall-law turbulence model (const version).
A character string (Nom) in uppercase.
An array of Motcle objects.
int search(const Motcle &t) const
Classe Neumann_homogene This class is the base class of the hierarchy of homogeneous Neumann-type bou...
Classe Neumann_paroi This boundary condition corresponds to an imposed flux for the.
class Nom: a character string for naming TRUST objects.
An array of character strings (VECT(Nom)).
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.
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.
Base class for output streams.
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
const Objet_U & valeur() const
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 ...
const DoubleVects & equivalent_distance() const
const int & get_flag_calcul_ldp_en_flux_impose() const