TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Convection_diffusion_turbulence_multiphase.cpp
1/****************************************************************************
2* Copyright (c) 2021, 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 <Convection_diffusion_turbulence_multiphase.h>
17#include <Pb_Multiphase.h>
18#include <Discret_Thyd.h>
19#include <Domaine_VF.h>
20#include <Domaine.h>
21#include <Avanc.h>
22#include <Debog.h>
23#include <Frontiere_dis_base.h>
24#include <EcritureLectureSpecial.h>
25#include <Champ_Uniforme.h>
26#include <Matrice_Morse.h>
27#include <Navier_Stokes_std.h>
28#include <TRUSTTrav.h>
29#include <Neumann_sortie_libre.h>
30#include <Op_Conv_negligeable.h>
31#include <Param.h>
32#include <Schema_Implicite_base.h>
33#include <SETS.h>
34#include <EChaine.h>
35#include <Scalaire_impose_paroi.h>
36#include <Echange_global_impose.h>
37
38#define old_forme
39
40Implemente_base(Convection_diffusion_turbulence_multiphase,"Convection_diffusion_turbulence_multiphase",Convection_Diffusion_std);
41
42/*! @brief Simple appel a: Convection_Diffusion_std::printOn(Sortie&)
43 *
44 * @param (Sortie& is) un flot de sortie
45 * @return (Sortie&) le flot de sortie modifie
46 */
48{
50}
51
52/*! @brief Verifie si l'equation a une inconnue et un fluide associe et appelle Convection_Diffusion_std::readOn(Entree&).
53 *
54 * @param (Entree& is) un flot d'entree
55 * @return (Entree& is) le flot d'entree modifie
56 */
58{
59 assert(l_inco_ch);
60 assert(le_fluide);
62 return is;
63}
64
66{
67 Convection_Diffusion_std::completer(); // en fait c'est Equation_base::completer() mais on sais pas un jour ...
68
69 const Domaine_dis_base& zdis = domaine_dis();
70 if (zdis.que_suis_je().debute_par("Domaine_VDF"))
71 {
72 // initialiser l'operateur grad SI VDF
73 Op_Grad_.associer_eqn(*this);
74 Op_Grad_.typer();
75 Op_Grad_.l_op_base().associer_eqn(*this);
77 const Champ_Inc_base& inco = inconnue();
78 Op_Grad_->associer(zdis, zcl, inco);
79 }
80}
81
82/*! @brief Associe un milieu physique a l'equation, le milieu est en fait caste en Fluide_base ou en Fluide_Ostwald.
83 *
84 * @param (Milieu_base& un_milieu)
85 * @throws les proprietes physiques du fluide ne sont pas toutes specifiees
86 */
88{
89 le_fluide = ref_cast(Fluide_base,un_milieu);
90}
91
92/*! @brief Renvoie le milieu physique de l'equation.
93 *
94 * (un Fluide_base upcaste en Milieu_base)
95 * (version const)
96 *
97 * @return (Milieu_base&) le Fluide_base upcaste en Milieu_base
98 */
100{
101 return le_fluide.valeur();
102}
103
104
105/*! @brief Renvoie le milieu physique de l'equation.
106 *
107 * (un Fluide_base upcaste en Milieu_base)
108 *
109 * @return (Milieu_base&) le Fluide_base upcaste en Milieu_base
110 */
112{
113 return le_fluide.valeur();
114}
115
116/*! @brief Impression des flux sur les bords sur un flot de sortie.
117 *
118 * Appelle Equation_base::impr(Sortie&)
119 *
120 * @param (Sortie& os) un flot de sortie
121 * @return (int) code de retour propage
122 */
127
128/*! @brief Renvoie le nom du domaine d'application de l'equation.
129 *
130 * Ici "Turbulence".
131 *
132 * @return (Motcle&) le nom du domaine d'application de l'equation
133 */
135{
136 static Motcle mot("Turbulence");
137 return mot;
138}
Class Champ_Inc_base.
Convection_Diffusion_std This class is the base for equations modelling the transport.
classe Convection_diffusion_turbulence_multiphase Equation de transport des quantites turbulentes (k,...
int impr(Sortie &os) const override
Impression des flux sur les bords sur un flot de sortie.
const Milieu_base & milieu() const override
Renvoie le milieu physique de l'equation.
void completer() override
Completes the construction (initialization) of objects associated with the equation.
void associer_milieu_base(const Milieu_base &) override
Associe un milieu physique a l'equation, le milieu est en fait caste en Fluide_base ou en Fluide_Ostw...
const Champ_Inc_base & inconnue() const override
Renvoie le champ inconnue representant l'inconnue (k, omega, epsilon, tau) (version const).
const Motcle & domaine_application() const override
Renvoie le nom du domaine d'application de l'equation.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
virtual int impr(Sortie &os) const
Prints the equation operators to an output stream, unconditionally.
virtual void completer()
Completes the construction (initialization) of objects associated with the equation.
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
Base class for an incompressible fluid and its properties:
Definition Fluide_base.h:36
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
A character string (Nom) in uppercase.
Definition Motcle.h:26
virtual int debute_par(const char *const n) const
Definition Nom.cpp:314
friend class Sortie
Definition Objet_U.h:70
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
Base class for output streams.
Definition Sortie.h:52