16#include <Perte_Charge_Anisotrope_VDF_Face.h>
28 Cerr <<
"The direction field must be defined with " <<
dimension <<
" components" << finl;
43 if (mot ==
"lambda_ortho")
47 Cerr <<
"Reading and interpreting the function " << tmp <<
" ... ";
49 lambda_ortho.setString(tmp);
50 lambda_ortho.addVar(
"Re");
51 lambda_ortho.addVar(
"t");
52 lambda_ortho.addVar(
"x");
54 lambda_ortho.addVar(
"y");
56 lambda_ortho.addVar(
"z");
57 lambda_ortho.parseString();
58 Cerr <<
" Ok" << finl;
66 double& coeff_long,
double& u_l, DoubleVect& v_valeur)
const
70 lambda.setVar(0, reynolds);
79 lambda_ortho.setVar(0, reynolds);
80 lambda_ortho.setVar(1, t);
81 lambda_ortho.setVar(2, pos[0]);
83 lambda_ortho.setVar(3, pos[1]);
85 lambda_ortho.setVar(4, pos[2]);
86 double l_ortho = lambda_ortho.eval();
91 v->valeur_a(pos, v_valeur);
93 vcarre += v_valeur[dim] * v_valeur[dim];
94 v_valeur /= sqrt(vcarre);
98 scal += u[dim] * v_valeur[dim];
106 coeff_ortho = l_ortho * norme_u / 2. / dh;
107 coeff_long =
lambda.eval() * norme_u / 2. / dh;
Class defining operators and methods for all reading operation in an input flow (file,...
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
virtual void set_param(Param &) const
virtual int lire_motcle_non_standard(const Motcle &motlu, Entree &is)
Reads non-simple-type parameters of an Objet_U from an input stream.
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 Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
void ajouter_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
Anisotropic pressure loss (along a unit vector v and in the plane orthogonal to that vector).
void set_param(Param &titi) const override
void coeffs_perte_charge(const DoubleVect &u, const DoubleVect &pos, double t, double norme_u, double dh, double nu, double reynolds, double &coeff_ortho, double &coeff_long, double &u_l, DoubleVect &v_valeur) const override
Implements the effective pressure loss computation for a given location.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
Factorizes the functionalities of several pressure drop terms in VEF, velocity at faces.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.