TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Op_Dift_Multiphase_proto.h
1/****************************************************************************
2* Copyright (c) 2025, 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#ifndef Op_Dift_Multiphase_proto_included
17#define Op_Dift_Multiphase_proto_included
18
19#include <Viscosite_turbulente_base.h>
20#include <Transport_turbulent_base.h>
21#include <Correlation_base.h>
22#include <Champs_compris.h>
23#include <TRUST_Ref.h>
24#include <vector>
25
27class Champ_Fonc_base;
28class Probleme_base;
29class Equation_base;
30
32{
33private:
34 void ajout_champs_(const bool /* is_face */);
35 void creer_champ_(const Motcle& , const bool /* is_face */);
36 void completer_(const Operateur_Diff_base&, const bool /* is_face */);
37 void mettre_a_jour_(const double, const bool /* is_face */);
38
39public:
40 void associer_proto(const Probleme_base&, Champs_compris& );
41
42 inline const Correlation_base& correlation() const { return corr_ ; }
43
44 void ajout_champs_proto_face() { ajout_champs_(true); }
45 void ajout_champs_proto_elem() { ajout_champs_(false); }
46
47 void get_noms_champs_postraitables_proto(const Nom& , Noms& nom, Option opt) const;
48
49 void creer_champ_proto_face(const Motcle& motlu) { creer_champ_(motlu, true); }
50 void creer_champ_proto_elem(const Motcle& motlu) { creer_champ_(motlu, false); }
51
52 void completer_proto_face(const Operateur_Diff_base& op) { completer_(op, true); }
53 void completer_proto_elem(const Operateur_Diff_base& op) { completer_(op, false); }
54
55 void mettre_a_jour_proto_face(const double temps) { mettre_a_jour_(temps, true); }
56 void mettre_a_jour_proto_elem(const double temps) { mettre_a_jour_(temps, false); }
57
58 inline DoubleTab& viscosite_turbulente() { return nu_ou_lambda_turb_; }
59 inline DoubleTab& diffusivite_turbulente() { return nu_ou_lambda_turb_; }
60
61 // remplissage par la correlation : ICI c'est NU_T ET PAS MU_T => m2/s et pas kg/ms
63 {
64 ref_cast(Viscosite_turbulente_base, corr_.valeur()).eddy_viscosity(nu_ou_lambda_turb_);
65 }
66
67 // remplissage par la correlation : ICI c'est LAMBDA_T ET PAS ALPHA_T => W/mK et pas m2/s
69 {
70 ref_cast(Transport_turbulent_base, corr_.valeur()).modifier_mu(eq, visc_turb, nu_ou_lambda_turb_);
71 }
72
73protected:
74 bool is_pbm_ = true;
75 DoubleTab nu_ou_lambda_turb_; // comme le nom dit
76 OWN_PTR(Correlation_base) corr_; // correlation de viscosite/transport turbulente
80 OBS_PTR(Champs_compris) le_chmp_compris_;
81};
82
83#endif /* Op_Dift_Multiphase_proto_included */
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
classe Convection_Diffusion_std Cette classe est la base des equations modelisant le transport
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Un tableau d'objets de la classe Motcle.
Definition Motcle.h:63
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
void associer_proto(const Probleme_base &, Champs_compris &)
void mettre_a_jour_proto_elem(const double temps)
OWN_PTR(Correlation_base) corr_
void creer_champ_proto_elem(const Motcle &motlu)
void completer_proto_elem(const Operateur_Diff_base &op)
void mettre_a_jour_proto_face(const double temps)
void completer_proto_face(const Operateur_Diff_base &op)
void get_noms_champs_postraitables_proto(const Nom &, Noms &nom, Option opt) const
void call_compute_diff_turb(const Convection_Diffusion_std &eq, const Viscosite_turbulente_base &visc_turb)
std::vector< OWN_PTR(Champ_Fonc_base)> nu_ou_lambda_turb_post_
OBS_PTR(Probleme_base) pbm_
std::vector< OWN_PTR(Champ_Fonc_base)> mu_ou_alpha_turb_post_
void creer_champ_proto_face(const Motcle &motlu)
OBS_PTR(Champs_compris) le_chmp_compris_
const Correlation_base & correlation() const
classe Operateur_Diff_base Cette classe est la base de la hierarchie des operateurs representant
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
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...