16#include <Convection_Diffusion_Chaleur_QC.h>
17#include <Fluide_Quasi_Compressible.h>
18#include <Op_Conv_negligeable.h>
19#include <Frontiere_dis_base.h>
20#include <Navier_Stokes_std.h>
21#include <Probleme_base.h>
22#include <Discret_Thyd.h>
42 Cerr<<
"Reading of data for a "<<
que_suis_je()<<
" equation"<<finl;
48 if (std::isfinite(
TMIN_) && std::isfinite(
TMAX_))
50 Cerr <<
"TMIN and TMAX are specified in the " <<
que_suis_je() <<
" equation." << finl;
52 else if (std::isfinite(
TMIN_) || std::isfinite(
TMAX_))
54 Cerr <<
"Error: You have defined only TMIN or TMAX in your datafile (equation " <<
que_suis_je() <<
")"<< finl;
55 Cerr <<
" You should specify both!!" << finl;
62void Convection_Diffusion_Chaleur_QC ::mettre_a_jour(
double temps)
66 if (std::isfinite(
TMIN_) && std::isfinite(
TMAX_))
69 const int n = T.size_array();
70 const double eps = std::numeric_limits<double>::epsilon();
72 for (
int i = 0; i < n; i++)
75 if (std::abs(T(i)) < eps)
92 if (mot==
"convection")
97 Cerr <<
"Source term creation of the energy equation :"<< finl;
100 Nom type_so =
"Source_QC_Chaleur_";
102 if (disc==
"VEFPreP1B") disc =
"VEF";
105 so->associer_eqn(*
this);
106 Cerr<<so->que_suis_je()<<finl;
107 Cerr <<
"Typing of the convection operator : ";
110 else if (mot==
"mode_calcul_convection")
114 Cerr<<
" The option "<<mot<<
" must be indicated before the convection operator."<<finl;
115 Cerr<<
" Please modify your data set."<<finl;
120 modes[1]=
"divuT_moins_Tdivu";
121 modes[2]=
"divrhouT_moins_Tdivrhou";
127 Cerr <<
"WARNING! This mode is not supported anymore." << finl;
131 Cerr<<
" Allowed keywords for option mode_calcul_convection are :"<<finl;
171 DoubleTab Div_on_pressure_nodes(pression);
178 DoubleTab Div_on_temperature_nodes(
inconnue().valeurs());
180 ref_cast_non_const(
Fluide_Quasi_Compressible,le_fluide.valeur()).divu_discvit(Div_on_pressure_nodes,Div_on_temperature_nodes);
182 for (
int i=0 ; i<nsom ; i++) Div(i)=Div_on_temperature_nodes(i);
185 Div = Div_on_pressure_nodes;
DoubleTab & valeurs() override
Returns the array of field values at the current time.
class Champ_base This class is the base of the fields hierarchy.
Particular case of Convection_Diffusion_std for a quasi-dilatable fluid when the transported scalar i...
const Champ_base & vitesse_pour_transport() const override
int preparer_calcul() override
Everything that does not depend on other possible problems.
int remplir_cl_modifiee()
Fills the modified boundary condition domain with 1 everywhere on the boundary.
Particular case of Convection_Diffusion_Chaleur_Fluide_Dilatable_base for a quasi-compressible fluid,...
int preparer_calcul() override
Everything that does not depend on other possible problems.
void set_param(Param &titi) const override
Convection_Diffusion_Chaleur_QC()
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
const Champ_base & vitesse_pour_transport() const override
void calculer_div_u_ou_div_rhou(DoubleTab &res) const override
void calculer_div_rho_u_impl(DoubleTab &res, const Convection_Diffusion_Fluide_Dilatable_base &eqn) const
const Champ_Inc_base & inconnue() const override
const Operateur & operateur(int) const override
Returns the operator at the given index: returns terme_diffusif if i = 0,.
Operateur_Conv terme_convectif
Class defining operators and methods for all reading operation in an input flow (file,...
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.
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.
Fluide_Quasi_Compressible class This class represents a quasi-compressible fluid,.
A character string (Nom) in uppercase.
An array of Motcle objects.
int search(const Motcle &t) const
Navier_Stokes_std This class carries the terms of the momentum equation.
const Champ_Inc_base & inconnue() const override
Returns the velocity (unknown field of the equation) (const version).
Operateur_Div & operateur_divergence()
Returns the divergence operator associated with the equation.
Champ_Inc_base & pression()
class Nom: a character string for naming TRUST objects.
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.
Classe Op_Conv_negligeable This class represents a negligible convection operator.
DoubleTab & calculer(const DoubleTab &, DoubleTab &) const override
Initializes the array passed as parameter with the contribution of the operator.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
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.
class Probleme_base It is a Probleme_U that is not a coupling.
virtual const Equation_base & equation(int) const =0
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
Source Generic class of the source term hierarchy. A Source object can.
void typer_direct(const Nom &)
_SIZE_ dimension_tot(int) const override
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")