16#include <Perte_Charge_Circulaire_VDF_Face.h>
28 Cerr <<
"The direction field must be defined with " <<
dimension <<
" components" << finl;
50 else if (mot ==
"lambda_ortho")
54 Cerr <<
"Reading and interpreting the function " << tmp <<
" ... ";
56 lambda_ortho.setString(tmp);
57 lambda_ortho.addVar(
"Re_tot");
58 lambda_ortho.addVar(
"Re_ortho");
59 lambda_ortho.addVar(
"t");
60 lambda_ortho.addVar(
"x");
62 lambda_ortho.addVar(
"y");
64 lambda_ortho.addVar(
"z");
65 lambda_ortho.parseString();
66 Cerr <<
" Ok" << finl;
76 double& coeff_long,
double& u_l, DoubleVect& av_valeur)
const
80 double dh_ortho = diam_hydr_ortho->valeur_a_compo(pos, 0);
86 v->valeur_a(pos, av_valeur);
91 vcarre += av_valeur[dim] * av_valeur[dim];
92 av_valeur /= sqrt(vcarre);
98 u_l += u[dim] * av_valeur[dim];
100 double u_ortho = sqrt(norme_u * norme_u - u_l * u_l);
107 double Re_l = dh * std::fabs(u_l) / nu;
113 double Re_ortho = dh_ortho * u_ortho / nu;
114 if (Re_ortho < 1e-10)
117 lambda.setVar(0, reynolds);
127 lambda_ortho.setVar(0, reynolds);
128 lambda_ortho.setVar(1, Re_ortho);
129 lambda_ortho.setVar(2, t);
130 lambda_ortho.setVar(3, pos[0]);
132 lambda_ortho.setVar(4, pos[1]);
134 lambda_ortho.setVar(5, pos[2]);
135 double l_ortho = lambda_ortho.eval();
136 double l_long =
lambda.eval();
137 coeff_ortho = l_ortho * u_ortho / 2. / dh_ortho;
138 coeff_long = l_long * std::fabs(u_l) / 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 drop (along a unit vector v and in the plane orthogonal to it).
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
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.
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.
void resize(_SIZE_, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)