16#include <Perte_Charge_Anisotrope_VEF_P1NC.h>
18#include <Equation_base.h>
40 Cerr <<
"The direction field must be defined with " <<
dimension <<
" components" << finl;
55 if (mot==
"lambda_ortho")
59 Cerr <<
"Reading and parsing the function " << tmp <<
" ... ";
61 lambda_ortho.setString(tmp);
62 lambda_ortho.addVar(
"Re");
63 lambda_ortho.addVar(
"t");
64 lambda_ortho.addVar(
"x");
66 lambda_ortho.addVar(
"y");
68 lambda_ortho.addVar(
"z");
69 lambda_ortho.parseString();
70 Cerr <<
" Ok" << finl;
86 double t,
double norme_u,
double dh,
double nu,
double reynolds,
double& coeff_ortho,
double& coeff_long,
double& u_l, DoubleVect& v_valeur)
const
99 lambda_ortho.setVar(0,reynolds);
100 lambda_ortho.setVar(1,t);
101 lambda_ortho.setVar(2,pos[0]);
103 lambda_ortho.setVar(3,pos[1]);
105 lambda_ortho.setVar(4,pos[2]);
106 double l_ortho=lambda_ortho.eval();
111 v->valeur_a(pos,v_valeur);
113 vcarre+=v_valeur[dim]*v_valeur[dim];
114 v_valeur/=sqrt(vcarre);
118 scal+=u[dim]*v_valeur[dim];
126 coeff_ortho=l_ortho*norme_u/2./dh;
127 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.
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 this vector).
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 computation of the pressure drop at a given location.
Factorizes the common functionality of several pressure drop operators in VEF, velocity at faces.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
virtual void set_param(Param ¶m) const override
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.