TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Transport_turbulent_GGDH.cpp
1/****************************************************************************
2* Copyright (c) 2024, 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_GGDH.h>
17#include <Param.h>
18#include <Probleme_base.h>
19
20#include <Pb_Multiphase.h>
21#include <TRUSTTrav.h>
22#include <MD_Vector_tools.h>
23
24Implemente_instanciable(Transport_turbulent_GGDH, "Transport_turbulent_GGDH|Transport_turbulent_anisotrope", Transport_turbulent_base);
25
27{
28 return os;
29}
30
32{
33 Param param(que_suis_je());
34 param.ajouter("C_s", &C_s);
35 param.lire_avec_accolades_depuis(is);
36
37 if ((C_s <0) && (dimension == 2)) C_s = 1;
38 if ((C_s <0) && (dimension == 3)) C_s = 1.5;
39
40 return is;
41}
42
44{
45 const DoubleTab& mu0 = eq.diffusivite_pour_transport().passe(), &nu0 = eq.diffusivite_pour_pas_de_temps().passe(), //viscosites moleculaires
46 *alp = sub_type(Pb_Multiphase, pb_.valeur()) ? &pb_->get_champ("alpha").passe() : nullptr; //produit par alpha si Pb_Multiphase
47 int i, nl = nu.dimension(0), n, N = nu.dimension(1), d, db, D = dimension;
48 //par la viscosite turbulente : tenseur de Reynolds, facteur k / eps
49 DoubleTrav Rij(0, N, D, D), k_sur_eps(0, N);
52 visc_turb.reynolds_stress(Rij), visc_turb.k_over_eps(k_sur_eps);
53 //formule pour passer de nu a mu : mu0 / nu0 * C_s * k / eps * <u'i u'_j>
54 for (i = 0; i < nl; i++)
55 for (n = 0; n < N; n++)
56 for (d = 0; d < D; d++)
57 for (db = 0; db < D; db++)
58 nu(i, n, d, db) += (alp ? (*alp)(i, n) : 1) * mu0(i, n) / nu0(i, n) * C_s * std::max(k_sur_eps(i, n) * Rij(i, n, d, db), visc_turb.limiteur() * nu(i, n, d, db));
59}
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 void creer_tableau_distribue(const MD_Vector &, Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
transforme v en un tableau parallele ayant la structure md.
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
classe Pb_Multiphase Cette classe represente un probleme de thermohydraulique multiphase de type "3*N...
Classe de base des flux de sortie.
Definition Sortie.h:52
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
virtual const MD_Vector & get_md_vector() const
Definition TRUSTVect.h:123
classe Transport_turbulent_GGDH Transport turbulent de type GGDH:
virtual 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 reynolds_stress(DoubleTab &R_ij) const =0
virtual void k_over_eps(DoubleTab &k_sur_eps) const =0