TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Transport_Fluctuation_Temperature_W_Bas_Re.cpp
1/****************************************************************************
2* Copyright (c) 2019, 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_Fluctuation_Temperature_W_Bas_Re.h>
17#include <Modele_turbulence_scal_Fluctuation_Temperature_W_Bas_Re.h>
18#include <Les_Pb_Turb.h>
19#include <Param.h>
20
21Implemente_instanciable(Transport_Fluctuation_Temperature_W_Bas_Re,"Transport_Fluctuation_Temperature_W_Bas_Re",Transport_Fluctuation_Temperature_W);
22
23// printOn et readOn
24
26{
27 return s << que_suis_je() << "\n";
28}
29
30/*! @brief cf Transport_Fluctuation_Temperature_W::readOn(is)
31 *
32 */
34{
36 if (les_sources.est_vide())
37 {
38 // Ajout automatique du terme source
39 Source t;
40 Source& so=les_sources.add(t);
41 const Probleme_base& pb = probleme();
42 Cerr << "Construction and typing for the source term of the Transport_Fluctuation_Temperature_W_Bas_Re transport equation." << finl;
43 if (sub_type(Pb_Thermohydraulique_Turbulent,pb))
44 {
45 Nom typ = "Source_Transport_Fluctuation_Temperature_W_Bas_Re";
46 so.typer(typ,*this);
47 }
48 else
49 {
50 Cerr << "A problem of type " <<que_suis_je()<<" cannot be considered "<<finl;
51 Cerr << "with a Transport_Fluctuation_Temperature_W_Bas_Re equation." <<finl;
53 }
54 so->associer_eqn(*this);
55 }
56 return is;
57}
58
63
65{
66 if (mot=="diffusion")
67 {
68 Cerr << "Reading and typing of the diffusion operator : " << finl;
69 is >> terme_diffusif;
70 return 1;
71 }
72 else
74}
75
76/*! @brief surcharge de la methode d'Equation_base.
77 *
78 * renvoie le ieme operateur.
79 *
80 */
82{
83 assert(i>=0);
84 assert(i<nombre_d_operateurs());
85
86 switch(i)
87 {
88 case 0:
89 {
90 return terme_diffusif;
91 }
92 case 1:
93 {
94 return terme_convectif;
95 }
96 default :
97 {
98 Cerr << "Error for Transport_Fluctuation_Temperature_W_Bas_Re::operateur(int i)" << finl;
99 Cerr << "Transport_Fluctuation_Temperature_W_Bas_Re has " << nombre_d_operateurs() <<" operators "<<finl;
100 Cerr << "and you are trying to access the " << i <<" th one."<< finl;
102 }
103 }
104 return terme_diffusif;
105}
106
107/*! @brief surcharge de la methode d'Equation_base.
108 *
109 * renvoie le ieme operateur.
110 *
111 */
113{
114 assert(i>=0);
115 assert(i<nombre_d_operateurs());
116
117 switch(i)
118 {
119 case 0:
120 {
121 return terme_diffusif;
122 }
123 case 1:
124 {
125 return terme_convectif;
126 }
127 default :
128 {
129 Cerr << "Error for Transport_Fluctuation_Temperature_W_Bas_Re::operateur(int i)" << finl;
130 Cerr << "Transport_Fluctuation_Temperature_W_Bas_Re has " << nombre_d_operateurs() <<" operators "<<finl;
131 Cerr << "and you are trying to access the " << i <<" th one."<< finl;
133 }
134 }
135 return terme_diffusif;
136}
137
148
149
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Equation_base The role of an equation is the calculation of one or more fields....
virtual const Milieu_base & milieu() const =0
virtual void associer_domaine_dis(const Domaine_dis_base &)
Associates the discretized domain with the equation.
virtual void associer_pb_base(const Probleme_base &)
Associates with the Problem passed as parameter.
Sources les_sources
Probleme_base & probleme()
Returns the problem associated with the equation.
virtual void associer_sch_tps_base(const Schema_Temps_base &)
Associates the time scheme with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
Convection_Diffusion_std & equation()
A character string (Nom) in uppercase.
Definition Motcle.h:26
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
class Operateur Generic class of the operator hierarchy.
Definition Operateur.h:39
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52
void typer(const Nom &, const Equation_base &)
Types the source by computing the required type name from the provided parameters.
Definition Source.cpp:52
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void associer_modele_turbulence(const Modele_turbulence_scal_Fluctuation_Temperature_W_Bas_Re &)
const Operateur & operateur(int) const override
surcharge de la methode d'Equation_base.
int nombre_d_operateurs() const override
surcharge de la methode d'Equation_base.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void associer_milieu_base(const Milieu_base &) override
association entre Transport_Fluctuation_Temperature_W et Milieu_base.
void discretiser() override
Discretizes the equation.