TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Modele_Fonc_Realisable_base.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 <Modele_Fonc_Realisable_base.h>
17#include <Equation_base.h>
18#include <Probleme_base.h>
19#include<Discretisation_base.h>
20
21
22Implemente_base(Modele_Fonc_Realisable_base,"Modele_Fonc_Realisable_base",Objet_U);
23
24// XD Modele_Fonc_Realisable_base objet_u Modele_Fonc_Realisable_base BRACE Base class for Functions necessary to
25// XD_CONT Realizable K-Epsilon Turbulence Model
26
27// printOn et readOn
28
30{
31 return s << que_suis_je() << " " << le_nom();;
32}
33
35{
36 return is;
37}
38
43
45{
46 Motcle typ, nom1("Modele_");
47 is >> typ;
48
49 nom1 += typ;
50 {
51 nom1 += "_";
52 Cerr << nom1 << finl;
53 Nom discr = eqn.discretisation().que_suis_je();
54 if (discr == "VEFPreP1B")
55 discr = "VEF";
56 nom1 += discr;
57 }
58
59 mod.typer(nom1);
60 mod->associer_eqn(eqn);
61 mod->associer(eqn.domaine_dis(), eqn.domaine_Cl_dis());
62 if (mod->has_seconde_equation())
63 {
66 }
67 mod->associer_pb(eqn.probleme());
68 is >> mod.valeur();
69}
70
72{
73 Cerr << "Modele_Fonc_Realisable_base::associer_pb" << finl;
74 eq_hydraulique = pb.equation(0);
75}
76
78{
79 mon_equation = eqn;
80}
81
83{
84 ma_seconde_equation = eqn;
85}
86
88{
89 const Discretisation_base& dis=mon_equation->discretisation();
90 double temps=0;
91
92 dis.discretiser_champ("champ_elem", mon_equation->domaine_dis(),"distance_paroi","m",1,temps,BR_wall_length_);
93 champs_compris_.ajoute_champ(BR_wall_length_);
94
95 Cerr << "Discretisation du modele K Espilon Realisable terminee" << finl;
96}
97
98
103
104
106{
107 return 0;
108}
109
111{
112 return 0;
113}
114
118
120{
121 return 0;
122}
123
128
130{
131 return champs_compris_.has_champ(nom, ref_champ);
132}
133
135{
136 return champs_compris_.has_champ(nom);
137}
138
140{
141 return champs_compris_.get_champ(nom);
142}
143
145{
146 if (opt == DESCRIPTION)
147 Cerr << "Modele_Fonc_Realisable_base : " << champs_compris_.liste_noms_compris() << finl;
148 else
149 nom.add(champs_compris_.liste_noms_compris());
150}
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Discretisation_base This class represents a spatial discretization scheme, which
void discretiser_champ(const Motcle &directive, const Domaine_dis_base &z, const Nom &nom, const Nom &unite, int nb_comp, int nb_pas_dt, double temps, OWN_PTR(Champ_Inc_base)&champ, const Nom &sous_type=NOM_VIDE) const
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....
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
const Equation_base & seconde_equation() const
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
virtual void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &)=0
int reprendre(Entree &) override
Restores an Objet_U from an input stream. Virtual method to override.
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
int sauvegarder(Sortie &) const override
Saves an Objet_U to an output stream. Virtual method to override.
virtual void associer_eqn_2(const Equation_base &)
virtual void associer_pb(const Probleme_base &)
const Champ_base & get_champ(const Motcle &nom) const override
static void typer_lire_Modele_Fonc_Realisable(OWN_PTR(Modele_Fonc_Realisable_base)&, const Equation_base &, Entree &is)
OWN_PTR(Champ_Fonc_base) BR_wall_length_
OBS_PTR(Equation_base) ma_seconde_equation
void creer_champ(const Motcle &motlu) override
void associer_eqn(const Equation_base &)
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68
friend class Entree
Definition Objet_U.h:71
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 const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Definition Objet_U.cpp:317
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
class Probleme_base It is a Probleme_U that is not a coupling.
virtual const Equation_base & equation(int) const =0
Base class for output streams.
Definition Sortie.h:52