16#include <Fluide_Quasi_Compressible.h>
17#include <Loi_Etat_GR_base.h>
18#include <Champ_Uniforme.h>
52 le_fluide->inco_chaleur().
nommer(
"enthalpie");
54 const DoubleTab& tab_H = le_fluide->inco_chaleur().valeurs();
55 const DoubleTab& tab_rho = le_fluide->masse_volumique().valeurs();
57 DoubleTab& tab_T = temperature_->valeurs();
59 double Pth = le_fluide->pression_th();
66 tab_Cp.ref(le_fluide->capacite_calorifique().valeurs());
83 DoubleTab& tab_TH = le_fluide->inco_chaleur().valeurs();
84 double Pth = le_fluide->pression_th();
85 DoubleTab& tab_rho = le_fluide->masse_volumique().valeurs();
89 if (le_fluide->inco_chaleur().le_nom() ==
"enthalpie")
91 for (som=0 ; som<n ; som++)
96 for (som=0 ; som<n ; som++)
102 Cerr<<
"FIN Loi_Etat_GR_base::initialiser_H Pth = "<<Pth<<
" H = "<<tab_TH(0,0)<<finl;
110 const DoubleTab& tab_H = le_fluide->inco_chaleur().valeurs();
112 DoubleTab& tab_T = temperature_->valeurs();
113 double Pth = le_fluide->pression_th();
114 for (i=0 ; i<n ; i++)
131 if (
R==-1) res = 1./(
DT_DH(P,h));
142 double Pth = le_fluide->pression_th();
143 const DoubleTab& tab_h = le_fluide->inco_chaleur().valeurs();
153 const DoubleTab& tab_mu = mu.
valeurs();
155 DoubleTab& tab_lambda = lambda.
valeurs();
157 int i, n=tab_lambda.
size();
162 for (i=0 ; i<n ; i++) tab_lambda(i,0) = tab_mu(0,0) *
tab_Cp(i) /
Pr_;
166 for (i=0 ; i<n ; i++) tab_lambda(i,0) = tab_mu(i,0) *
tab_Cp(i) /
Pr_;
174 Cerr<<
"Loi_Etat_GR_base::De_DP non accede normalement"<<finl;
181 Cerr<<
"Loi_Etat_GR_base::De_DP non accede normalement"<<finl;
194 double P = le_fluide->pression_th();
197 while (std::fabs(acc)>1e-8 && i<1000)
203 if (std::fabs(acc)>1e-8)
205 Cerr<<
"Problem in the pressure inversion: nb_iter="<<i<<finl;
206 Cerr<<
" Pth="<<P<<
" H="<<H<<
" rho="<<rho<<finl;
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
Class defining operators and methods for all reading operation in an input flow (file,...
Base state law class for real gases, defining a dilatable fluid with the equations of state: rho = rh...
void calculer_Cp() override
Computes Cp using the PolyCp_ polynomial.
void initialiser_inco_ch() override
Initialises the enthalpy unknown.
double De_DT(double, double) const override
virtual double calculer_temperature(double, double)=0
double De_DP(double, double) const override
void calculer_lambda() override
Computes the conductivity divided by Cp: equivalent to k*dT/dh for using enthalpy in the diffusion op...
void calculer_masse_volumique() override
Recomputes the density (masse volumique).
double calculer_H(double, double) const override=0
For ideal gases: does nothing. For real gases: must recompute enthalpy from pressure and temperature.
double inverser_Pth(double, double) override
Computes the thermodynamic pressure from enthalpy and density by Newton iteration.
double Cp_calc(double, double) const
Computes Cp as a function of physical quantities P and h. Cp = dh/dT = de/dT - 1/rho^2 * drho/dT.
void remplir_T() override
Fills the temperature array from the enthalpy unknown.
const Nom type_fluide() const override
Returns the type of fluid associated.
void initialiser() override
Initialises the state law by computing Pth.
virtual double DT_DH(double, double) const =0
double Drho_DP(double, double) const override=0
Base class for the state law hierarchy defining a dilatable fluid.
virtual void calculer_masse_volumique()
Recomputes the density (masse volumique).
class Nom: a character string for naming TRUST objects.
virtual void nommer(const Nom &)
Assigns a name to the Objet_U. Virtual method to override.
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.
static void abort()
Abort routine for TRUST on a fatal error.
Base class for output streams.
_SIZE_ dimension(int d) const