16#include <Convection_Diffusion_Chaleur_Fluide_Dilatable_base.h>
17#include <EcritureLectureSpecial.h>
18#include <Fluide_Dilatable_base.h>
19#include <Neumann_sortie_libre.h>
20#include <Navier_Stokes_std.h>
21#include <Probleme_base.h>
22#include <Discret_Thyd.h>
23#include <TRUST_2_PDI.h>
38 terme_convectif.set_description((Nom)
"Convective heat transfer rate=Integral(-rho*cp*T*u*ndS) [W] if SI units used");
40 terme_diffusif.set_description((Nom)
"Conduction heat transfer rate=Integral(lambda*grad(T)*ndS) [W] if SI units used");
42 if (le_fluide->type_fluide()==
"Gaz_Reel") l_inco_ch->nommer(
"enthalpie");
56 return vitessetransportante;
62 Cerr <<
"Energy equation discretization " << finl;
64 if (le_fluide->type_fluide()==
"Gaz_Reel") l_inco_ch->add_synonymous(
"enthalpie");
67 Cerr <<
"Convection_Diffusion_Chaleur_Fluide_Dilatable_base::discretiser() ok" << finl;
83 statistics().begin_count(STD_COUNTERS::ajouter_blocs,statistics().get_last_opened_counter_level()+1);
89 Matrice_Morse *mat = matrices.count(nom_inco) ? matrices.at(nom_inco) :
nullptr;
92 statistics().end_count(STD_COUNTERS::ajouter_blocs);
101 Nom pth(
"pression_thermo");
117 Nom ident_Pth(
"pression_thermo");
122 ident_Pth +=
Nom(temps,
"%e");
123 os << ident_Pth<<finl;
124 os <<
"constante"<<finl;
125 os << le_fluide->pression_th();
127 Cerr <<
"Saving thermodynamic pressure at time : " <<
Nom(temps,
"%e") << finl;
147 if (le_fluide->type_fluide() !=
"Gaz_Parfait") l_inco_ch->
nommer(
"enthalpie");
149 Nom ident_Pth(
"pression_thermo");
160 ident_Pth +=
Nom(temps,
probleme().reprise_format_temps());
164 avancer_fichier_with_syno(is,ident_Pth,field_tag_syno);
168 avancer_fichier(is, ident_Pth);
171 le_fluide->set_pression_th(pth);
187 Conds_lim& condlims=zcl_modif_->les_conditions_limites();
188 int nb=condlims.size();
191 for (
int i=0; i<nb; i++)
193 DoubleTab& T=condlims[i]->champ_front().valeurs();
210 static Motcle domaine =
"Thermique_H";
211 if (le_fluide->type_fluide()==
"Gaz_Parfait") domaine =
"Thermique";
class Champ_base This class is the base of the fields hierarchy.
double temps() const
Returns the time of the field.
class Conds_lim This class represents a vector of boundary conditions.
void set_modifier_val_imp(int)
Sets the modifier_val_imp flag for all boundary conditions in the vector.
Particular case of Convection_Diffusion_std for a quasi-dilatable fluid when the transported scalar i...
void discretiser() override
Discretizes the equation.
const Champ_base & diffusivite_pour_pas_de_temps() const override
int reprendre(Entree &) override
Resumes computation from an input stream.
void assembler(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &resu) override
std::vector< YAML_data > data_a_sauvegarder() const override
for PDI IO: retrieve name and type and dimensions of the thermo pressure
DoubleTab & derivee_en_temps_inco(DoubleTab &) override
Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources...
int sauvegarder(Sortie &) const override
Saves an Objet_U to an output stream. Virtual method to override.
const Champ_base & vitesse_pour_transport() const override
const Motcle & domaine_application() const override
Returns the name of the equation's application domain.
int preparer_calcul() override
Everything that does not depend on other possible problems.
void assembler_blocs_avec_inertie(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl) override
int remplir_cl_modifiee()
Fills the modified boundary condition domain with 1 everywhere on the boundary.
DoubleTab & derivee_en_temps_inco_sans_solveur_masse_impl(Convection_Diffusion_Fluide_Dilatable_base &eqn, DoubleTab &derivee, const bool is_expl)
Returns the time derivative of the equation's unknown.
public_for_cuda void assembler_impl(Convection_Diffusion_Fluide_Dilatable_base &eqn, Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
void assembler_blocs(Convection_Diffusion_Fluide_Dilatable_base &eqn, matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl)
Base class for convection-diffusion equations for a dilatable fluid.
const Milieu_base & milieu() const override
const Champ_Inc_base & inconnue() const override
Operateur_Diff terme_diffusif
Operateur_Conv terme_convectif
void temperature(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&, int nb_comp=1) const
class Discret_Thyd This class is the base class representing a discretization
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
static int is_ecriture_special(int &special, int &a_faire)
Indicates whether the special format was requested in active writing by xyz save.
Class defining operators and methods for all reading operation in an input flow (file,...
int reprendre(Entree &) override
We resume the unknown from an input stream.
virtual std::vector< YAML_data > data_a_sauvegarder() const
for PDI IO: retrieve name, type and dimensions of the data to save/restore. This has to be overrode f...
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
Nom create_polymacfamily_syno(const Nom &field_tag) const
Create a synonym of a field name in order to ensure backward compatibility with old names of the Poly...
virtual int preparer_calcul()
Everything that does not depend on other possible problems.
virtual void modifier_pour_Cl(Matrice_Morse &mat_morse, DoubleTab &secmem) const
int sauvegarder(Sortie &) const override
We save the unknown, then the source terms to an output stream.
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.
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.
const Nom & le_nom() const override
Returns the name of the field.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
virtual const Champ_Don_base & diffusivite() const
Returns the diffusivity of the medium (const version).
A character string (Nom) in uppercase.
Navier_Stokes_std This class carries the terms of the momentum equation.
virtual const Champ_Inc_base & rho_la_vitesse() const
Neumann_sortie_libre This class represents an open boundary without imposed velocity.
class Nom: a character string for naming TRUST objects.
const std::string & getString() const
virtual void nommer(const Nom &)
Assigns a name to the Objet_U. Virtual method to override.
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 Probleme_base It is a Probleme_U that is not a coupling.
const Domaine & domaine() const
Returns the domain associated with the problem.
virtual const Equation_base & equation(int) const =0
double temps_courant() const
Returns the current time.
virtual void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const Equation_base &eqn, const tabs_t &semi_impl={}) const
Base class for output streams.
TRUST_2_PDI Encapsulation of PDI methods (library used for IO operations). See the website pdi....
void read(const std::string &name, void *data)
static int is_PDI_checkpoint()
static int is_PDI_restart()
void TRUST_start_sharing(const std::string &name, const void *data)
YAML_data class: collection of all needed information for data to save/restore in order to write the ...