17#include <Pb_Cahn_Hilliard_Navier_Stokes.h>
18#include <Schema_Cahn_Hilliard_Navier_Stokes.h>
47 assert((i == 0) || (i == 1));
48 if (nb_equations == 2 && i == 0)
49 return eq_navier_stokes;
51 return eq_cahn_hilliard;
56 assert((i == 0) || (i == 1));
57 if (nb_equations == 2 && i == 0)
58 return eq_navier_stokes;
60 return eq_cahn_hilliard;
71 Cerr <<
"Reading of the equations" << finl;
72 bool already_read =
true;
73 if (mot ==
"correlations")
78 for (
int i = 0; i < nb_eq; i++)
82 if (mot.debute_par(
"Navier_Stokes"))
84 Cout <<
"[Pb_Cahn_Hilliard_Navier_Stokes]: the selected Navier-Stokes equations is " << mot << finl;
86 eq_navier_stokes.typer(mot);
87 eq_navier_stokes->associer_pb_base(*
this);
88 eq_navier_stokes->associer_milieu_base(
le_milieu_[0]);
90 eq_navier_stokes->associer_sch_tps_base(schema_convection);
91 eq_navier_stokes->associer_domaine_dis(
domaine_dis());
92 eq_navier_stokes->discretiser();
93 is >> eq_navier_stokes.valeur();
94 eq_navier_stokes->associer_milieu_equation();
100 already_read =
false;
105 Cout <<
"[Pb_Cahn_Hilliard_Navier_Stokes]: adding capillary force in Navier-Stokes equation"<< finl;
107 Source& ref_force_capillaire = eq_navier_stokes->sources().add(force_capillaire);
108 ref_force_capillaire.
typer(
"Source_Force_Capillaire", eq_navier_stokes);
109 ref_force_capillaire->associer_eqn(eq_navier_stokes);
112 Cout <<
"[Pb_Cahn_Hilliard_Navier_Stokes]: adding gravity force in Navier-Stokes equation"<< finl;
114 Source& ref_force_gravite = eq_navier_stokes->sources().add(force_gravite);
117 ref_force_gravite.
typer(
"Gravite", eq_navier_stokes);
121 ref_force_gravite.
typer(
"Source_Force_Boussinesq", eq_navier_stokes);
123 ref_force_gravite->associer_eqn(eq_navier_stokes);
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....
A character string (Nom) in uppercase.
: class Navier_Stokes_Variable_Density
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.
: class Pb_Cahn_Hilliard_Navier_Stokes
const Equation_base & equation(int) const override
Entree & lire_equations(Entree &is, Motcle &mot) override
Reading of the equations of the problem.
int nombre_d_equations() const override
Pb_Fluide_base This class provides a base class for.
virtual Entree & lire_correlations(Entree &is)
Entree & read_optional_equations(Entree &is, Motcle &mot)
std::vector< OWN_PTR(Milieu_base)> le_milieu_
virtual const Milieu_base & milieu() const
Returns the physical medium associated with the problem (const version).
const Domaine_dis_base & domaine_dis() const
Returns the discretized domain associated with the problem (const version).
virtual Equation_base & getset_equation_by_name(const Nom &)
(B. Math): Virtual method added for problems having several equations of the same type (Probleme_FT_D...
: class Schema_CH_NS_Partitionne
Base class for output streams.
Source Generic class of the source term hierarchy. A Source object can.
void typer(const Nom &, const Equation_base &)
Types the source by computing the required type name from the provided parameters.