TrioCFD 1.9.9_beta
TrioCFD documentation
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 // filled by the correlation: HERE it is NU_T NOT MU_T => m2/s not kg/ms
63 {
64 ref_cast(Viscosite_turbulente_base, corr_.valeur()).eddy_viscosity(nu_ou_lambda_turb_);
65 }
66
67 // filled by the correlation: HERE it is LAMBDA_T NOT ALPHA_T => W/mK not 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_; // as the name suggests
76 OWN_PTR(Correlation_base) corr_; // turbulent viscosity/transport correlation
80 OBS_PTR(Champs_compris) le_chmp_compris_;
81};
82
83#endif /* Op_Dift_Multiphase_proto_included */
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Convection_Diffusion_std This class is the base for equations modelling the transport.
class Equation_base The role of an equation is the calculation of one or more fields....
A character string (Nom) in uppercase.
Definition Motcle.h:26
An array of Motcle objects.
Definition Motcle.h:63
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (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
Operateur_Diff_base This class is the base of the hierarchy of operators representing.
class Probleme_base It is a Probleme_U that is not a coupling.
Correlations describing the effect of turbulence in another equation (thermal, turbulent quantities,...
Turbulent viscosity correlations describing the Reynolds stress tensor R_{ij} = - <u'_i u'_j>.