TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Source_Transport_K_Omega_VDF_Elem_base.cpp
1/****************************************************************************
2* Copyright (c) 2023, 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 <Pb_Hydraulique_Concentration_Turbulent.h>
17#include <Pb_Thermohydraulique_Turbulent.h>
18#include <Source_Transport_K_Omega_VDF_Elem_base.h>
19#include <Modele_turbulence_hyd_K_Omega.h>
20#include <Champ_Uniforme.h>
21#include <Fluide_base.h>
22#include <Domaine_Cl_VDF.h>
23#include <Constituant.h>
24#include <Champ_Face_VDF.h>
25#include <Debog.h>
26
27Implemente_base_sans_constructeur(Source_Transport_K_Omega_VDF_Elem_base,
28 "Source_Transport_K_Omega_VDF_Elem_base",
30
32
34
35// cAlan : mutualisable
37{
38 le_dom_VDF = ref_cast(Domaine_VDF, domaine_dis);
39 le_dom_Cl_VDF = ref_cast(Domaine_Cl_VDF,domaine_Cl_dis);
40}
41
43
44DoubleTab& Source_Transport_K_Omega_VDF_Elem_base::calculer(DoubleTab& resu) const
45{
46 resu = 0.;
47 return ajouter(resu);
48}
49
51{
52 const Domaine_VDF& domain_VDF = le_dom_VDF.valeur();
53 const Domaine_Cl_VDF& dom_Cl_VDF = le_dom_Cl_VDF.valeur();
54 const DoubleTab& visco_turb = get_visc_turb(); // voir les classes filles
55 const DoubleTab& vit = eq_hydraulique->inconnue().valeurs();
56 Champ_Face_VDF& ch_vit = ref_cast_non_const(Champ_Face_VDF, eq_hydraulique->inconnue());
57
59 if (turbulence_model->is_SST_or_BSL())
61
62 DoubleVect& production_k_elem = ref_cast_non_const(DoubleVect,production_k_elem_->valeurs()); // Ajout d'un espace virtuel au tableau P
63 const bool& deactivate_production_limiter = turbulence_model->get_expert_mode().get_deactivate_production_limiter();
64 const double& cst_production_limiter = turbulence_model->get_expert_mode().get_cst_production_limiter();
65 calculer_terme_production(ch_vit, visco_turb, vit, production_k_elem,deactivate_production_limiter,cst_production_limiter); // voir les classes filles
66
67 fill_resu(production_k_elem, resu);
69 if (turbulence_model->is_SST())
70 {
71 if (turbulence_model->get_expert_mode().get_menter_version()
72 == Menter_version::ORIGINAL_1994)
73 {
74 compute_enstrophy(domain_VDF,
75 dom_Cl_VDF,
76 vit,
77 ch_vit,
78 ref_cast_non_const(Navier_Stokes_Turbulent, eq_hydraulique.valeur()),
79 ref_cast_non_const(DoubleTab, turbulence_model->get_enstrophy()));
80 }
81 else
82 {
83 compute_strain_invariant(domain_VDF, dom_Cl_VDF, vit, ch_vit,
84 ref_cast_non_const(Navier_Stokes_Turbulent,
85 eq_hydraulique.valeur()),
86 ref_cast_non_const(DoubleTab,
87 turbulence_model->get_strain_invariant()));
88 }
89 }
90 const Transport_K_Omega_base& eqn_K_Omega = ref_cast(Transport_K_Omega_base,equation());
91 eqn_K_Omega.raise_control_k_omega_flag();
92
93 return resu;
94}
class Champ_Face_VDF Cette classe sert a representer un champ vectoriel dont on ne calcule
class Domaine_Cl_VDF
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
class Domaine_VDF
Definition Domaine_VDF.h:64
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
classe Navier_Stokes_Turbulent Cette classe represente l'equation de la dynamique pour un fluide
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 Probleme_base C'est un Probleme_U qui n'est pas un couplage.
Classe de base des flux de sortie.
Definition Sortie.h:52
void associer_domaines(const Domaine_dis_base &, const Domaine_Cl_dis_base &) override
virtual void calculer_terme_production(const Champ_Face_VDF &, const DoubleTab &, const DoubleTab &, DoubleVect &, const bool &deactivate_production_limiter=false, const double &cst_production_limiter=0.) const
virtual const DoubleTab & get_visc_turb() const
virtual void fill_resu(const DoubleVect &, DoubleTab &) const
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42
virtual DoubleTab & ajouter(DoubleTab &) const
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
void compute_strain_invariant(const Domaine_VDF &, const Domaine_Cl_VDF &, const DoubleTab &velocity, Champ_Face_VDF &ch_vit, Navier_Stokes_Turbulent &ns_turb, DoubleTab &strain_invariant) const
void compute_enstrophy(const Domaine_VDF &, const Domaine_Cl_VDF &, const DoubleTab &velocity, Champ_Face_VDF &ch_vit, Navier_Stokes_Turbulent &ns_turb, DoubleTab &enstrophy) const
Classe Transport_K_Omega_base Classe de base pour les equations.
void associer_pb_proto(const Probleme_base &)
Entree & readOn_proto(Entree &, const Nom &)