TrioCFD 1.9.8
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 class_generic 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}
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
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
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
const Discretisation_base & discretisation() const
Renvoie la discretisation associee a l'equation.
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Renvoie le domaine des conditions aux limite discretisee associee a l'equation.
Probleme_base & probleme()
Renvoie le probleme associe a l'equation.
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'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
Reprise d'un Objet_U sur un flot d'entree Methode a surcharger.
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
int sauvegarder(Sortie &) const override
Sauvegarde d'un Objet_U sur un flot de sortie Methode a surcharger.
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 &)
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
classe Objet_U Cette classe est la classe de base des Objets de TRUST
Definition Objet_U.h:73
friend class Entree
Definition Objet_U.h:76
friend class Sortie
Definition Objet_U.h:75
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 const Nom & le_nom() const
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
Definition Objet_U.cpp:319
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
virtual const Equation_base & equation(int) const =0
Classe de base des flux de sortie.
Definition Sortie.h:52