16#include <Fluide_Dilatable_base.h>
17#include <Loi_Etat_TPPI_QC_base.h>
18#include <Champ_Uniforme.h>
19#include <Domaine_VF.h>
32 if (!vec_press_filled_) init_vec_press();
35void Loi_Etat_TPPI_QC_base::init_vec_press()
37 const double Pth = le_fluide->pression_th();
38 vec_press_.resize(le_fluide->inco_chaleur().valeurs().dimension(0));
39 for (
auto &itr : vec_press_) itr = Pth;
40 vec_press_filled_ =
true;
54 if (!vec_press_filled_) init_vec_press();
55 const DoubleTab& tab_ICh = le_fluide->inco_chaleur().valeurs();
56 SpanD temp_span = tab_ICh.
get_span(), p_span = SpanD(vec_press_);
60 DoubleTab& tab_mu = mu.
valeurs();
67 DoubleTab& tab_lambda = lambda.
valeurs();
68 TPPI_->tppi_get_lambda_pT(p_span, temp_span, tab_lambda.
get_span());
73 DoubleTab& tab_alpha = alpha.
valeurs();
74 const DoubleTab& tab_rho = le_fluide->masse_volumique().valeurs();
76 const bool isVDF = (alpha.
que_suis_je() ==
"Champ_Fonc_P0_VDF") ? true :
false;
79 for (
int i = 0; i < tab_alpha.
dimension(0); i++)
80 tab_alpha(i, 0) = tab_lambda(i, 0) / (tab_rho(i, 0) *
Cp_);
83 const IntTab& elem_faces = ref_cast(
Domaine_VF, le_fluide->vitesse().domaine_dis_base()).elem_faces();
85 for (
int i = 0; i < tab_alpha.
dimension(0); i++)
88 for (
int face = 0; face < nfe; face++)
89 rhoelem += tab_rho(elem_faces(i, face), 0);
91 tab_alpha(i, 0) = tab_lambda(i, 0) / (rhoelem *
Cp_);
99 if (!vec_press_filled_) init_vec_press();
100 const DoubleTab& tab_ICh = le_fluide->inco_chaleur().valeurs();
101 DoubleTab& tab_rho = le_fluide->masse_volumique().valeurs();
102 SpanD temp_span = tab_ICh.
get_span(), p_span = SpanD(vec_press_), rho_span =
tab_rho_np1.get_span();
103 TPPI_->tppi_get_rho_pT(p_span, temp_span, rho_span);
class Champ_Don_base base class of Given Fields (not calculated)
void mettre_a_jour(double temps) override
Time update.
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,...
void preparer_calcul() override
Prepares the fluid for computation by filling temperature and computing density.
void calculer_masse_volumique() override
Recomputes the density (masse volumique).
void calculer_Cp() override
Computes Cp. Does nothing: Cp is constant.
void preparer_calcul() override
Prepares the fluid for computation by filling temperature and computing density.
std::shared_ptr< TPPI > TPPI_
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.
Base class for output streams.
_SIZE_ dimension(int d) const
Span_ get_span() override
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")