16#include <Loi_Paroi_Nu_Impose_VEF.h>
17#include <Champ_Uniforme.h>
18#include <Domaine_Cl_VEF.h>
19#include <Dirichlet_paroi_fixe.h>
20#include <Dirichlet_paroi_defilante.h>
22#include <Neumann_paroi.h>
23#include <Fluide_base.h>
24#include <Fluide_Quasi_Compressible.h>
25#include <Convection_Diffusion_std.h>
26#include <Modele_turbulence_scal_base.h>
27#include <Probleme_base.h>
28#include <EcrFicPartage.h>
30#include <Modifier_pour_fluide_dilatable.h>
51 les_mots[0] =
"nusselt";
52 les_mots[1] =
"diam_hydr";
56 Motcle motlu, accolade_fermee=
"}", accolade_ouverte=
"{";
58 assert(motlu==accolade_ouverte);
60 if(motlu == accolade_ouverte)
65 while (motlu != accolade_fermee)
67 int rang=les_mots.search(motlu);
75 Cerr <<
"Lecture et interpretation de la fonction " << tmp <<
" ... ";
93 Cerr <<
"Mot cle \"" << motlu <<
"\" non compris lors de la lecture d'un "
103 Cerr <<
"Il faut definir l'expression nusselt(Re,Pr)" << finl;
107 if (diam_hydr->nb_comp()!=1)
109 Cerr <<
"Il faut definir le champ diam_hydr a une composante" << finl;
125 const IntTab& face_voisins = domaine_VEF.
face_voisins();
131 const DoubleTab& xv=domaine_VEF.
xv() ;
132 const IntTab& elem_faces = domaine_VEF.
elem_faces();
137 const DoubleTab& tab_visco = ch_visco_cin.
valeurs();
143 visco = std::max(tab_visco(0,0),DMINFLOAT);
148 if ((!l_unif) && (local_min_vect(tab_visco)<DMINFLOAT))
151 Cerr <<
"In Loi_Paroi_Nu_Impose_VEF::calculer_scal : visco = " << tab_visco.
local_min_vect() <<
" <= 0 ? " << finl;
156 bool dh_constant=sub_type(
Champ_Uniforme,diam_hydr.valeur())?
true:
false;
157 double dh_valeur=diam_hydr->valeurs()(0,0);
162 DoubleTab alpha_t = diffusivite_turb.
valeurs();
165 for (
int n_bord=0; n_bord<domaine_VEF.
nb_front_Cl(); n_bord++)
172 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
175 || (sub_type(
Symetrie,la_cl.valeur())) )
179 for (
int ind_face=0; ind_face<size; ind_face++)
181 int num_face = le_bord.
num_face(ind_face);
182 elem = face_voisins(num_face,0);
184 elem = face_voisins(num_face,1);
188 d_visco = tab_visco[elem];
192 d_alpha = alpha.
valeurs()(0,0);
196 d_alpha = alpha.
valeurs()(elem);
198 d_alpha = alpha.
valeurs()(elem,0);
200 double Pr = d_visco/d_alpha;
206 for (
int nfa=0; nfa<domaine_VEF.
domaine().nb_faces_elem(); nfa++)
209 int face = elem_faces(elem,nfa);
211 v[dim] += vitesse(face,dim);
216 v[dim] /= Compte_face ;
223 pos[i]=xv(num_face,i);
228 dh_valeur=diam_hydr->valeur_a_compo(pos,0);
231 double Re=Ud*dh_valeur/d_visco;
240 equivalent_distance_[n_bord](ind_face) = (d_alpha+alpha_t(elem))/d_alpha*dh_valeur/(Nu+DMINFLOAT);
252 const IntTab& face_voisins = domaine_VEF.
face_voisins();
260 const DoubleTab& conductivite_turbulente = mon_modele_turb_scal->conductivite_turbulente().valeurs();
265 bool dh_constant=sub_type(
Champ_Uniforme,diam_hydr.valeur())?
true:
false;
266 double dh_valeur=diam_hydr->valeurs()(0,0);
269 for (
int n_bord=0; n_bord<domaine_VEF.
nb_front_Cl(); n_bord++)
271 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
274 || (sub_type(
Symetrie,la_cl.valeur())) )
283 Nusselt <<
"Bord " << le_bord.
le_nom() << finl;
288 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" << finl;
289 Nusselt <<
"\tFace a\t\t\t\t|" << finl;
290 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" << finl;
291 Nusselt <<
"X\t\t| Y\t\t\t| dist. carac. (m)\t| Nusselt (local)\t| h (Conv. W/m2/K)\t| Tf cote paroi (K)\t| T face de bord (K)\t| Tparoi equiv.(K) " << finl;
292 Nusselt <<
"----------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------" << finl;
296 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" << finl;
297 Nusselt <<
"\tFace a\t\t\t\t\t\t\t|" << finl;
298 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" << finl;
299 Nusselt <<
"X\t\t| Y\t\t\t| Z\t\t\t| dist. carac. (m)\t| Nusselt (local)\t| h (Conv. W/m2/K)\t| Tf cote paroi (K)\t| T face de bord (K)\t| Tparoi equiv.(K)" << finl;
300 Nusselt <<
"----------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------" << finl;
307 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------" << finl;
308 Nusselt <<
"\tFace a\t\t\t\t|" << finl;
309 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------" << finl;
310 Nusselt <<
"X\t\t| Y\t\t\t| dist. carac. (m)\t| Nusselt (local)\t| h (Conv. W/m2/K)\t| Tf cote paroi (K)" << finl;
311 Nusselt <<
"----------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------" << finl;
315 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------------------------------" << finl;
316 Nusselt <<
"\tFace a\t\t\t\t\t\t\t|" << finl;
317 Nusselt <<
"----------------------------------------------------------------------------------------------------------------------------------------------------------------" << finl;
318 Nusselt <<
"X\t\t| Y\t\t\t| Z\t\t\t| dist. carac. (m)\t| Nusselt (local)\t| h (Conv. W/m2/K)\t| Tf cote paroi (K)" << finl;
319 Nusselt <<
"----------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------" << finl;
326 for (
int num_face=ndeb; num_face<nfin; num_face++)
330 pos[i]=domaine_VEF.
xv(num_face,i);
334 dh_valeur=diam_hydr->valeur_a_compo(pos,0);
336 double x=domaine_VEF.
xv(num_face,0);
337 double y=domaine_VEF.
xv(num_face,1);
338 double lambda,lambda_t;
339 elem = face_voisins(num_face,0);
341 elem = face_voisins(num_face,1);
343 lambda = conductivite.
valeurs()(0,0);
347 lambda = conductivite.
valeurs()(elem);
349 lambda = conductivite.
valeurs()(elem,0);
352 lambda_t=conductivite_turbulente(elem);
354 Nusselt << x <<
"\t| " << y;
357 double z=domaine_VEF.
xv(num_face,2);
358 Nusselt << x <<
"\t| " << y <<
"\t| " << z;
367 for (
int i=0; i<nb_faces_elem; i++)
369 if ( (j=domaine_VEF.
elem_faces(elem,i)) != num_face )
374 domaine_VEF.
oriente_normale(num_face,elem))/(surface_face*surface_face);
375 tfluide+=temperature(j)*surface_pond;
385 double tparoi = temperature(num_face);
386 double flux = la_cl_neum.
flux_impose(num_face-ndeb);
387 double tparoi_equiv = tfluide+flux/lambda*d_equiv;
388 Nusselt <<
"\t| " << d_equiv <<
"\t| " << (lambda+lambda_t)/lambda*dh_valeur/d_equiv <<
"\t| " << (lambda+lambda_t)/d_equiv <<
"\t| " << tfluide <<
"\t| " << tparoi <<
"\t| " << tparoi_equiv << finl;
393 Nusselt <<
"\t| " << d_equiv <<
"\t| " << (lambda+lambda_t)/lambda*dh_valeur/d_equiv <<
"\t| " << (lambda+lambda_t)/d_equiv <<
"\t| " << tfluide << finl;
400 Nusselt << finl << finl;
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
DoubleTab & valeurs() override
Returns the array of field values at the current time.
class Cond_lim Generic class used to represent any class
Convection_Diffusion_std This class is the base for equations modelling the transport.
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 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 xv(int num_face, int k) 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 premiere_face_int() const
A face is internal if and only if it separates two elements.
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
const Domaine & domaine() const
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 Milieu_base & milieu() const =0
virtual const Champ_Inc_base & inconnue() const =0
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.
virtual int nb_comp() const
Base class for an incompressible fluid and its properties:
const Champ_Don_base & viscosite_cinematique() const
int num_premiere_face() const
int num_face(const int) const
const Nom & le_nom() const override
Returns the name of the geometric boundary.
classe Loi_Paroi_Nu_Impose_VEF
int calculer_scal(Champ_Fonc_base &) override
void imprimer_nusselt(Sortie &) const override
virtual const Champ_Don_base & conductivite() const
Returns the conductivity of the medium (const version).
virtual const Champ_Don_base & diffusivite() const
Returns the diffusivity of the medium (const version).
Classe Neumann_paroi This boundary condition corresponds to an imposed flux for the.
virtual double flux_impose(int i) const
Returns the value of the imposed flux on the i-th component of the field representing the flux at the...
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.
virtual const Equation_base & equation(int) const =0
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.
Base class for output streams.
Symetrie On symmetry faces, the following properties hold:
_TYPE_ local_min_vect(Mp_vect_options opt=VECT_REAL_ITEMS) const
DoubleVects equivalent_distance_
const DoubleVects & equivalent_distance() const
void ouvrir_fichier_partage(EcrFicPartage &, const Nom &) const
Opens or creates a print file for Face, d_eq, local Nu, h.