TrioCFD 1.9.9_beta
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"); //needed for the computation of the turbulent viscosity
37 pb_->creer_champ("distance_paroi_globale"); // wall distance required
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 //set to 0 for components beyond k.dimension(1) (e.g. vapor in 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
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
@ REQUIRED
Definition Param.h:115
static void abort()
Abort routine for TRUST on a fatal error.
Definition Process.cpp:573
Base class for output streams.
Definition Sortie.h:52
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
Turbulent viscosity correlations describing the Reynolds stress tensor R_{ij} = - <u'_i u'_j>.
Mixing-length turbulent diffusivity model with identical mixing length and velocity for both 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