16#include <Convection_Diffusion_Temperature_FT_Disc.h>
17#include <Convection_Diffusion_Concentration.h>
18#include <Transport_Interfaces_FT_Disc.h>
19#include <Triple_Line_Model_FT_Disc.h>
20#include <Dirichlet_paroi_defilante.h>
21#include <Probleme_FT_Disc_gen.h>
22#include <Dirichlet_paroi_fixe.h>
23#include <Constituant.h>
24#include <TRUST_List.h>
56 la_chimie_ = ref_cast(
Chimie, ob);
67 Noms noms_eq, noms_eq_maj;
69 for (
auto &itr : noms_eq) noms_eq_maj.add(
Motcle(itr));
76 if (read_mc !=
"SOLVED_EQUATIONS")
78 Cerr <<
"Error in Probleme_FT_Disc_gen::lire_solved_equations !!! We expected reading the SOLVED_EQUATIONS bloc instead of " << read_mc <<
" !!!" << finl;
79 Cerr <<
"Fix your data file !!!" << finl;
86 Cerr <<
"Error in Probleme_FT_Disc_gen::lire_solved_equations !!! We expected { instead of " << read_mc <<
" !!!" << finl;
87 Cerr <<
"Fix your data file !!!" << finl;
91 std::vector<Nom> eq_types, eq_name;
93 for (is >> read_mc; read_mc !=
"}"; is >> read_mc)
95 if (noms_eq_maj.
rang(read_mc) == -1 || (!read_mc.
contient(
"_FT") && !read_mc.
debute_par(
"CONVECTION_DIFFUSION_CONCENTRATION") && !read_mc.
debute_par(
"CONVECTION_DIFFUSION_TEMPERATURE")))
97 Cerr <<
"Error in Probleme_FT_Disc_gen::lire_solved_equations !!! The equation " << read_mc <<
" could not be used with a problem of type " <<
que_suis_je() <<
" !!!" << finl;
98 Cerr <<
"You can only use the following equations :" << finl;
99 for (
auto &itr : noms_eq_maj)
100 if (itr.contient(
"_FT") || itr.debute_par(
"CONVECTION_DIFFUSION_CONCENTRATION") || itr.debute_par(
"CONVECTION_DIFFUSION_TEMPERATURE"))
101 Cerr <<
" - " << itr << finl;
105 eq_types.push_back(read_mc);
107 eq_name.push_back(nom_eq);
110 if (eq_types.size() != eq_name.size())
112 Cerr <<
"Error in Probleme_FT_Disc_gen::lire_solved_equations !!! The number of strings read in the bloc SOLVED_EQUATIONS is not correct !!!" << finl;
113 Cerr <<
"Fix your data file !!!" << finl;
119 for (
int i = 0; i < static_cast<int>(eq_types.size()); i++)
120 if (eq_types[i] ==
"NAVIER_STOKES_FT_DISC")
124 for (
int i = 0; i < static_cast<int>(eq_types.size()); i++)
125 if (eq_types[i].debute_par(
"TRANSPORT_INTERFACES"))
129 for (
int i = 0; i < static_cast<int>(eq_types.size()); i++)
130 if (eq_types[i] !=
"NAVIER_STOKES_FT_DISC" && !eq_types[i].debute_par(
"TRANSPORT_INTERFACES"))
168 bool needs_constituant =
false;
170 auto& list_stl = equations_.get_stl_list();
171 for (
auto& itr : list_stl)
174 needs_constituant =
true;
178 const int nb_milieu = needs_constituant ? 2 : 1;
181 for (
int i = 0; i < nb_milieu; i++)
195 equations_(0)->milieu().discretiser((*
this), la_discretisation_.valeur());
197 if (needs_constituant)
198 for (
auto& itr : equations_.get_stl_list())
201 itr->milieu().discretiser((*
this), la_discretisation_.valeur());
210 if (dernier_mot ==
"TRIPLE_LINE_MODEL_FT_DISC")
213 tcl_.associer_pb(*
this);
223 equations_.dernier().typer(eq_type);
228 Cerr <<
"Equation " << eq_type <<
" added to the list and renamed to : " << eq_name <<
" ..." << finl;
241 const int is_constituant = sub_type(
Constituant, un_milieu);
242 for (
int i = 0; i < n; i++)
246 if ((is_conv_diff && is_constituant) || (!is_conv_diff && !is_constituant))
256 for (i = 0; i < n; i++)
259 if (eq->
le_nom() == un_nom)
264 Cerr <<
"Erreur dans Probleme_FT_Disc_gen::get_equation_by_name : " << un_nom <<
" n'est pas le nom d'une equation !!" << finl;
265 Cerr <<
"Les equations du problemes sont les suivantes :" << finl;
266 for (i = 0; i < n; i++)
278 for (i = 0; i < n; i++)
286 Cerr <<
"Erreur dans Probleme_FT_Disc_gen::getset_equation_by_name : " << un_nom <<
" n'est pas le nom d'une equation !!" << finl;
287 Cerr <<
"Les equations du problemes sont les suivantes :" << finl;
288 for (i = 0; i < n; i++)
299 for (
int i = 0; i < n; i++)
312 Cerr <<
"Erreur dans Probleme_FT_Disc_gen::equation_interfaces : Le probleme ne contient pas d'equation Transport_Interfaces_FT_Disc de nom " << un_nom << finl;
313 Cerr <<
"Liste des equations du probleme:" << finl;
314 for (
int i = 0; i < n; i++)
329 for (
int i = 0; i < n; i++)
342 Cerr <<
"Erreur dans Probleme_FT_Disc_gen::equation_hydraulique : Le probleme ne contient pas d'equation Navier_Stokes_FT_Disc de nom " << un_nom << finl;
343 Cerr <<
"Liste des equations du probleme:" << finl;
344 for (
int i = 0; i < n; i++)
362 dt = std::min(dt, la_chimie_->calculer_pas_de_temps());
373 for (
int i = 2; i < nb_eqn; i++)
383 la_chimie_->mettre_a_jour(temps);
410 la_chimie_->discretiser(*
this);
411 la_chimie_->completer(*
this);
415 if (tcl_.is_activated() || tcl_.reinjection_tcl()) tcl_.completer();
422 if (
tcl().is_activated())
Represents the constituent(s) of a fluid.
Convection_Diffusion_Concentration Special case of Convection_Diffusion_std.
Class defining operators and methods for all reading operation in an input flow (file,...
class Equation_base The role of an equation is the calculation of one or more fields....
const Nom & le_nom() const override
Returns the name of the equation.
virtual void associer_milieu_equation()
virtual void associer_milieu_base(const Milieu_base &)=0
void nommer(const Nom &nom) override
Method called when the object instance is created in the data file (Interprete::ajouter).
virtual void associer_pb_base(const Probleme_base &)
Associates with the Problem passed as parameter.
virtual void mettre_a_jour(double temps)
The value of the unknown at the time step has been calculated.
virtual void associer_sch_tps_base(const Schema_Temps_base &)
Associates the time scheme with the equation.
Milieu_base This class is the base of the (physical) medium hierarchy.
A character string (Nom) in uppercase.
int debute_par(const char *const n) const override
class Nom: a character string for naming TRUST objects.
bool contient(const Nom &nom) const
virtual int debute_par(const char *const n) const
Nom & majuscule()
Converts the name to uppercase. Only letters 'a'-'z' are modified.
An array of character strings (VECT(Nom)).
int rang(const char *const ch) const
Base class for TRUST objects (Objet_U).
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Pb_Fluide_base This class provides a base class for.
void completer() override
Completes the equations associated with the problem.
OWN_PTR(Modele_rayo_transp) mod_rayo_transp_
virtual const Transport_Interfaces_FT_Disc & equation_interfaces(const Motcle &nom) const
virtual bool updateGivenFields() override
WARNING:
void mettre_a_jour(double temps) override
Performs a time update of the problem.
Equation_base & getset_equation_by_name(const Nom &le_nom) override
(B. Math): Virtual method added for problems having several equations of the same type (Probleme_FT_D...
int nombre_d_equations() const override
void update_geometrical_quantities(double temps)
virtual const Navier_Stokes_FT_Disc & equation_hydraulique(const Motcle &nom) const
void preparer_calcul() override
Prepares the computation: initializes the medium parameters and prepares the computation of each equa...
void lire_solved_equations(Entree &is) override
void typer_lire_milieu(Entree &is) override
void associer_milieu_base(const Milieu_base &milieu) override
Verifie que le milieu est de type Fluide_Diphasique et associe le milieu aux equations.
double calculer_pas_de_temps() const override
Computes the value of the next time step for the problem.
Entree & lire_equations(Entree &is, Motcle &dernier_mot) override
Reading of the equations of the problem.
void update_composite_variables(double temps)
void add_FT_equation(const Nom &, const Nom &)
const Equation_base & equation(int i) const override
const Equation_base & get_equation_by_name(const Nom &le_nom) const override
(B. Math): Virtual method added for problems having several equations of the same type (Probleme_FT_D...
int associer_(Objet_U &ob) override
override Objet_U::associer_(Objet_U& ob) Associates different objects with the problem by checking
void completer() override
Completes the equations associated with the problem.
const Triple_Line_Model_FT_Disc & tcl() const
virtual Entree & lire_equations(Entree &is, Motcle &dernier_mot)
Reading of the equations of the problem.
virtual void discretiser_equations()
int associer_(Objet_U &) override
override Objet_U::associer_(Objet_U& ob) Associates different objects with the problem by checking
bool updateGivenFields() override
WARNING:
virtual void preparer_calcul()
Prepares the computation: initializes the medium parameters and prepares the computation of each equa...
virtual double calculer_pas_de_temps() const
Computes the value of the next time step for the problem.
Postraitements les_postraitements_
virtual void mettre_a_jour(double temps)
Performs a time update of the problem.
std::vector< OWN_PTR(Milieu_base)> le_milieu_
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
static double mp_min(double)
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
double temps_courant() const
Returns the current time.
Base class for output streams.
int preparer_calcul_anticipated()
void completer_maillage_et_changer_temps(double temps)
void mettre_a_jour_hors_deplacement(double temps, const bool update_statio=true, const bool update_indic=true)
bool injecter_supprimer_interfaces(double temps)
void compute_TCL_fluxes_in_all_boundary_cells()
static int les_sous_types(const Nom &, Noms &sous_types)
Returns the names of the subtypes for a parent type identified by name.