TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Viscosite_turbulente_l_melange.cpp
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#include <Viscosite_turbulente_l_melange.h>
17
18#include <Pb_Multiphase.h>
19#include <Domaine_VF.h>
20#include <Motcle.h>
21#include <Noms.h>
22
23Implemente_instanciable(Viscosite_turbulente_l_melange, "Viscosite_turbulente_l_melange", Viscosite_turbulente_base);
24// XD type_diffusion_turbulente_multiphase_l_melange type_diffusion_turbulente_multiphase_deriv l_melange BRACE not_set
25
27
29{
30 Param param(que_suis_je());
31 param.ajouter("l_melange", &l_melange_, Param::REQUIRED); // XD_ADD_P floattant
32 // XD_CONT not_set
33 param.lire_avec_accolades_depuis(is);
34 Cerr << "l_melange = " << l_melange_ << finl ;
35
36 pb_->creer_champ("taux_cisaillement"); //On en aura besoin pour le calcul de la viscosite turbulente
37 pb_->creer_champ("distance_paroi_globale"); // Besoin de distance a la paroi
38
39 return is ;
40}
41
43{
44 const DoubleTab& tc = pb_->get_champ("taux_cisaillement").valeurs(),
45 &y_elem = ref_cast(Domaine_VF, pb_->domaine_dis()).y_elem();
46 assert(nu_t.dimension_tot(0) == tc.dimension_tot(0) && tc.dimension(1) <= nu_t.dimension(1));
47 //on met 0 pour les composantes au-dela de k.dimension(1) (ex. : vapeur dans Pb_Multiphase)
48 for (int i = 0; i < nu_t.dimension_tot(0); i++)
49 for (int n = 0; n < nu_t.dimension(1); n++)
50 nu_t(i, n) = n < 1 ? tc(i, n) * l_melange_ * y_elem(i) * l_melange_ * y_elem(i) : 0; // Does weird things when non zero on gas phase. Is this the real problem ?
51// nu_t(i, n) = n < tc.dimension(1) ? tc(i, n) * l_melange_ * y_elem(i) : 0; Old version
52}
53
55{
56 abort(); //TBD
57}
58
59void Viscosite_turbulente_l_melange::k_over_eps(DoubleTab& k_sur_eps) const
60{
61 abort(); //TBD
62}
63
64void Viscosite_turbulente_l_melange::eps(DoubleTab& k_sur_eps) const
65{
66 abort(); //TBD
67}
class Domaine_VF
Definition Domaine_VF.h:44
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
@ REQUIRED
Definition Param.h:115
static void abort()
Routine de sortie de Trio-U sur une erreur abort().
Definition Process.cpp:570
Classe de base des flux de sortie.
Definition Sortie.h:52
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
classe Viscosite_turbulente_base correlations de viscosite turbulente decrivant le tenseur de Reynold...
Diffusivite turbulente a longueur de melange et vitesse de melange identique pour les deux phases.
void reynolds_stress(DoubleTab &R_ij) const override
void k_over_eps(DoubleTab &k_sur_eps) const override
void eps(DoubleTab &eps) const override
void eddy_viscosity(DoubleTab &nu_t) const override