16#include <Modele_turbulence_hyd_Longueur_Melange_VDF.h>
18#include <Domaine_Cl_VDF.h>
19#include <Champ_Face_VDF.h>
20#include <Equation_base.h>
21#include <Probleme_base.h>
22#include <Domaine_VDF.h>
58 const double Kappa = 0.415;
61 double temps = mon_equation_->inconnue().temps();
63 DoubleTab& visco_turb = la_viscosite_turbulente_->valeurs();
64 DoubleVect& k = energie_cinetique_turb_->valeurs();
65 const int nb_elem = domaine_VDF.
nb_elem();
67 const DoubleTab& xp = domaine_VDF.
xp();
69 Sij2_.resize(nb_elem_tot);
73 if (visco_turb.
size() != nb_elem)
75 Cerr <<
"Size error for the array containing the values of the turbulent viscosity." << finl;
79 Debog::verifier(
"Modele_turbulence_hyd_Longueur_Melange_VDF::calculer_viscosite_turbulente visco_turb 0", visco_turb);
81 if (k.
size() != nb_elem)
83 Cerr <<
"Size error for the array containing the values of the turbulent kinetic energy." << finl;
89 for (
int elem = 0; elem < nb_elem; elem++)
93 if (y > (hauteur / 2.))
96 visco_turb(elem) = Kappa * Kappa * y * y * (1. - 2 * y / hauteur) * sqrt(2. *
Sij2_(elem));
97 k(elem) = pow(visco_turb(elem) / (Cmu * y), 2);
100 Debog::verifier(
"Modele_turbulence_hyd_Longueur_Melange_VDF::calculer_viscosite_turbulente visco_turb 1", visco_turb);
102 la_viscosite_turbulente_->changer_temps(temps);
103 return la_viscosite_turbulente_;
108 const DoubleTab& vitesse = mon_equation_->inconnue().valeurs();
123 for (
int elem = 0; elem < nb_elem; elem++)
129 Sij = 0.5 * (duidxj(elem, i, j, 0) + duidxj(elem, j, i, 0));
130 Sij2_(elem) += Sij * Sij;
DoubleTab & calcul_duidxj(const DoubleTab &, DoubleTab &) const
Returns gij at elements from the element velocity (gij represents the partial derivative dui/dxj).
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
static void verifier(const char *const msg, double)
double xp(int num_elem, int k) const
Class defining operators and methods for all reading operation in an input flow (file,...
void mettre_a_jour(double) override
Classe Modele_turbulence_hyd_Longueur_Melange_VDF.
void set_param(Param ¶m) const override
Champ_Fonc_base & calculer_viscosite_turbulente() override
int preparer_calcul() override
Prepares the computation.
Mixing-length turbulence model for the Navier-Stokes equations.
virtual int preparer_calcul()
Prepares the computation.
virtual void set_param(Param &) const
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.
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.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.