TrioCFD 1.9.8
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
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
virtual const Milieu_base & milieu() const =0
virtual void associer_domaine_dis(const Domaine_dis_base &)
Associe le domaine discretise a l'equation.
virtual void associer_pb_base(const Probleme_base &)
S'associe au Probleme passe en parametre.
Sources les_sources
Probleme_base & probleme()
Renvoie le probleme associe a l'equation.
virtual void associer_sch_tps_base(const Schema_Temps_base &)
S'associe au schema_en_temps.
Schema_Temps_base & schema_temps()
Renvoie le schema en temps associe a l'equation.
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
Convection_Diffusion_std & equation()
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
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 Operateur Classe generique de la hierarchie des operateurs.
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)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52
void typer(const Nom &, const Equation_base &)
Type la source en calculant le nom du type necessaire grace aux parametres fournis.
Definition Source.cpp:52
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
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
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
void associer_milieu_base(const Milieu_base &) override
association entre Transport_Fluctuation_Temperature_W et Milieu_base.
void discretiser() override
Discretise l'equation.