TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Transport_turbulent_Prandtl.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 <Transport_turbulent_Prandtl.h>
17
18#include <Param.h>
19
20Implemente_instanciable(Transport_turbulent_Prandtl, "Transport_turbulent_Prandtl", Transport_turbulent_base);
21// XD type_diffusion_turbulente_multiphase_Prandtl type_diffusion_turbulente_multiphase_deriv Prandtl BRACE Scalar
22// XD_CONT Prandtl model.
23
25{
26 return os;
27}
28
30{
31 Param param(que_suis_je());
32 param.ajouter("Pr_t|Prandtl_turbulent", &prdl_); // XD_ADD_P floattant
33 // XD_CONT Prandtl's model constant. By default it is se to 0.9.
34 param.lire_avec_accolades_depuis(is);
35
36 if (prdl_ < 0.) Process::exit("The turbulent Prandlt's number must be positive !");
37 else Cerr << "Transport_turbulent_Prandtl model used with turbulent Prandlt's number = " << prdl_ << finl;
38
39 return is;
40}
41
42// Modifier_nu modifie mu : alpha et rho font partie du terme
44{
45 const DoubleTab& mu0 = eq.diffusivite_pour_transport().passe(), &nu0 = eq.diffusivite_pour_pas_de_temps().passe(); //viscosites moleculaires
46
47 int nl = nu.dimension(0), N = nu.dimension(1), D = dimension;
48
49 //viscosite cinematique turbulente
50 DoubleTrav nu_t(nl, N);
51 visc_turb.eddy_viscosity(nu_t);
52
53 //formule pour passer de nu a mu : mu0 * sigma_ * nu_t / nu0
54 if (nu.nb_dim() == 2)
55 for (int i = 0; i < nl; i++)
56 for (int n = 0; n < 1; n++) //isotrope
57 nu(i, n) += mu0(i, n) * nu_t(i, n) / nu0(i, n) / prdl_;
58 else if (nu.nb_dim() == 3)
59 for (int i = 0; i < nl; i++)
60 for (int n = 0; n < N; n++)
61 for (int d = 0; d < D; d++) //anisotrope diagonal
62 nu(i, n, d) += mu0(i, n) * nu_t(i, n) / nu0(i, n) / prdl_;
63 else
64 for (int i = 0; i < nl; i++)
65 for (int n = 0; n < N; n++)
66 for (int d = 0; d < D; d++) //anisotrope complet
67 nu(i, n, d, d) += mu0(i, n) * nu_t(i, n) / nu0(i, n) / prdl_;
68}
virtual DoubleTab & passe(int i=1)
Definition Champ_Proto.h:50
classe Convection_Diffusion_std Cette classe est la base des equations modelisant le transport
virtual const Champ_Don_base & diffusivite_pour_transport() const
virtual const Champ_base & diffusivite_pour_pas_de_temps() const
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
static int dimension
Definition Objet_U.h:99
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
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52
int nb_dim() const
Definition TRUSTTab.h:199
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
void modifier_mu(const Convection_Diffusion_std &eq, const Viscosite_turbulente_base &visc_turb, DoubleTab &nu) const override
classe Transport_turbulent_base correlations decrivant l'effet de la turbulence dans une autre equati...
classe Viscosite_turbulente_base correlations de viscosite turbulente decrivant le tenseur de Reynold...
virtual void eddy_viscosity(DoubleTab &nu_t) const =0