16#include <Frontiere_dis_base.h>
17#include <Discret_Thermique.h>
18#include <Probleme_base.h>
19#include <Conduction.h>
34 terme_diffusif.set_fichier(
"Diffusion_chaleur");
35 terme_diffusif.set_description((Nom)
"Conduction heat transfer rate=Integral(lambda*grad(T)*ndS) [W] if SI units used");
43 param.
ajouter_condition(
"is_read_diffusion",
"The diffusion operator must be read, select negligeable type if you want to neglect it.");
53 Cerr <<
"Reading and typing of the diffusion operator : " << finl;
59 terme_diffusif.associer_diffusivite_pour_pas_de_temps(
milieu().diffusivite());
60 solveur_masse->set_name_of_coefficient_temporel(
"rho_cp_comme_T");
64 else if (mot==
"Traitement_particulier")
66 Cerr <<
"Reading and typing of the Traitement_particulier object : " << finl;
67 Nom type=
"Traitement_particulier_";
82 if (discr ==
"VEFPreP1B")
86 le_traitement_particulier.typer(type);
87 le_traitement_particulier->associer_eqn(*
this);
88 le_traitement_particulier->lire(is);
89 le_traitement_particulier->preparer_calcul_particulier();
94 Cerr <<
"Error while reading Traitement_particulier" << finl;
95 Cerr <<
"A { is expected." << finl;
112 return terme_diffusif.diffusivite();
130 le_solide = un_solide;
153 return terme_diffusif;
156 Cerr <<
"Conduction::operateur("<<i<<
") !! " << finl;
157 Cerr <<
"Equation Conduction has only one operator." << finl;
161 return terme_diffusif;
175 return terme_diffusif;
178 Cerr <<
"Conduction::operateur("<<i<<
") !! " << finl;
179 Cerr <<
"Equation Conduction has only one operator." << finl;
183 return terme_diffusif;
192 Cerr <<
"Conduction equation discretization" << finl;
230 Cerr <<
"You forgot to associate the solid to the problem named " <<
probleme().
le_nom() << finl;
233 return le_solide.valeur();
238 if (motlu ==
"temperature_paroi" || motlu ==
"wall_temperature")
240 if (!temperature_paroi_)
253 if (nom ==
"temperature_paroi" || nom ==
"wall_temperature")
262 if (le_traitement_particulier)
263 if (le_traitement_particulier->has_champ(nom, ref_champ))
271 if (nom ==
"temperature_paroi" || nom ==
"wall_temperature")
277 if (le_traitement_particulier)
278 if (le_traitement_particulier->has_champ(nom))
288 if (nom ==
"temperature_paroi" || nom ==
"wall_temperature")
292 if (((ch_tp.
temps() != la_temperature->temps()) || (ch_tp.
temps() == temps_init)) && ((la_temperature->mon_equation_non_nul())))
300 if (le_traitement_particulier)
301 if (le_traitement_particulier->has_champ(nom, ref_champ))
304 throw std::runtime_error(std::string(
"Field ") + nom.
getString() + std::string(
" not found !"));
312 noms_compris.add(
"TEMPERATURE_PAROI");
313 noms_compris.add(
"WALL_TEMPERATURE");
315 if (opt == DESCRIPTION)
316 Cerr <<
"Conduction : " << noms_compris << finl;
318 nom.add(noms_compris);
320 if (le_traitement_particulier)
321 le_traitement_particulier->get_noms_champs_postraitables(nom, opt);
333 Cerr <<
"A solide medium has not been associated to a Conduction equation"<<finl;
336 return le_solide.valeur();
357 static Motcle domaine =
"Thermique";
365 if (le_traitement_particulier)
366 le_traitement_particulier->post_traitement_particulier();
class Champ_Don_base base class of Given Fields (not calculated)
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
void mettre_a_jour(double temps) override
Time update of the field.
class Champ_base This class is the base of the fields hierarchy.
double temps() const
Returns the time of the field.
Class Conduction: represents the temperature evolution equation.
int nombre_d_operateurs() const override
Returns the number of operators in the equation. For the standard conduction equation this is always ...
void set_param(Param &) const override
void mettre_a_jour(double temps) override
The value of the unknown at the time step has been calculated.
void creer_champ(const Motcle &motlu) override
const Solide & solide() const
Returns the solid medium associated with the equation (const version).
void associer_solide(const Solide &)
Associates the solid medium with the equation.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
virtual const Champ_Don_base & diffusivite_pour_transport() const
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
void associer_milieu_base(const Milieu_base &) override
Associates a physical medium with the equation; the medium is cast to Solide.
int impr(Sortie &os) const override
Prints the diffusive term to an output stream.
virtual const Champ_base & diffusivite_pour_pas_de_temps() const
const Champ_base & get_champ(const Motcle &nom) const override
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
const Motcle & domaine_application() const override
Returns the application domain name of the equation.
const Operateur & operateur(int) const override
Returns the operator at the given index in the equation (const version).
void discretiser() override
Discretises the equation.
const Milieu_base & milieu() const override
Returns the physical medium associated with the equation (const version).
Class Discret_Thermique: base class representing a spatial discretisation applied to thermal problems...
void temperature(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&, int nb_comp=1) const
virtual void t_paroi(const Domaine_dis_base &z, const Domaine_Cl_dis_base &zcl, const Champ_Inc_base &, OWN_PTR(Champ_Fonc_base)&ch) const
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....
virtual void set_param(Param &titi) const override
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
virtual void mettre_a_jour(double temps)
The value of the unknown at the time step has been calculated.
virtual int impr(Sortie &os) const
Prints the equation operators to an output stream, unconditionally.
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
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.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void creer_champ(const Motcle &motlu) override
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual void discretiser()
Discretizes the equation.
Champs_compris champs_compris_
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
Milieu_base This class is the base of the (physical) medium hierarchy.
virtual const Champ_Don_base & conductivite() const
Returns the conductivity of the medium (const version).
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
const std::string & getString() const
An array of character strings (VECT(Nom)).
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.
class Operateur Generic class of the operator hierarchy.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter_condition(const char *condition, const char *message, const char *name=0)
Declare a post-read logical condition that must hold on the parameter values.
void ajouter_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
double temps_init() const
Returns the initial time.
Class Solide: represents a solid medium and its physical properties.
Base class for output streams.