16#include <Discretisation_base.h>
17#include <Schema_Temps_base.h>
18#include <Fluide_reel_base.h>
19#include <Pb_Multiphase.h>
20#include <Equation_base.h>
21#include <Probleme_base.h>
22#include <Domaine_VF.h>
23#include <TPPI_tools.h>
54 Cerr <<
"Medium discretization." << finl;
62 Process::exit(
"Incompressible fluid :: NOT YET PORTED TO ENTHALPY EQUATION (BUG DEDANS) ! TODO FIXME !!");
72 EChaine str(
Nom(
"Champ_Uniforme 1 ") + val_rho);
78 dis.
discretiser_champ(
"champ_elem", domaine_dis,
"masse_volumique",
"kg/m^3", 1, nc, temps, rho_inc);
82 dis.
discretiser_champ(
"champ_elem", domaine_dis,
"energie_interne",
"J/kg", 1, nc, temps, ei_inc);
85 dis.
discretiser_champ(
"champ_elem", domaine_dis,
"enthalpie",
"J/kg", 1, nc, temps, h_ou_T_inc);
87 dis.
discretiser_champ(
"champ_elem", domaine_dis,
"temperature",
"C", 1, nc, temps, h_ou_T_inc);
91 dis.
discretiser_champ(
"champ_elem", domaine_dis,
"viscosite_dynamique",
"kg/m/s", 1, temps, ch_mu_);
98 dis.
discretiser_champ(
"champ_elem", domaine_dis,
"rho_cp_elem",
"J/m^3/K", 1, temps, ch_rho_Cp_elem_);
101 for (
auto &pch : { &ch_rho_, &ch_e_int_, &
ch_h_ou_T_ })
130 ch_h_ou_T.associer_eqn(eqn);
131 ch_h_ou_T.resize_val_bord();
132 ch_h_ou_T.set_val_bord_fluide_multiphase(
true);
140 ch_h_ou_T.changer_temps(temps);
142 ch_Cp_->initialiser(temps);
143 ch_mu_->initialiser(temps);
144 ch_nu_->initialiser(temps);
156 Cerr <<
"The defined fluid_reel with T_ref = " <<
T_ref_ <<
" and P_ref = " <<
P_ref_ <<
" is equivalent to :" << finl;
157 Cerr <<
"fluide_incompressible" << finl;
159 Cerr <<
" rho champ_uniforme 1 " << ch_rho_->valeurs()(0, 0) << finl;
160 Cerr <<
" cp champ_uniforme 1 " <<
ch_Cp_->valeurs()(0, 0) << finl;
161 Cerr <<
" lambda champ_uniforme 1 " <<
ch_lambda_->valeurs()(0, 0) << finl;
162 Cerr <<
" mu champ_uniforme 1 " << ch_mu_->valeurs()(0, 0) << finl;
163 Cerr <<
" beta_th champ_uniforme 1 " <<
ch_beta_th_->valeurs()(0, 0) << finl;
171 ch_g_->initialiser(temps);
185 ch_rho_->changer_temps(t);
186 ch_e_int_->changer_temps(t);
190 ch_rho_->mettre_a_jour(t);
191 ch_e_int_->mettre_a_jour(t);
201 ch_mu_->mettre_a_jour(t);
212 const DoubleTab& temp_ou_enthalp = ch_T_ou_h.
valeurs(), &pres = ch_p.valeurs();
214 DoubleTab& tab_Cp =
ch_Cp_->valeurs(), &tab_mu = ch_mu_->valeurs(),
224 MLoiSpanD spans_interne;
225 MLoiSpanD_h spans_interne_h;
228 spans_interne = { { Loi_en_T::CP, tab_Cp.
get_span_tot() }, { Loi_en_T::MU, tab_mu.get_span_tot() },
229 { Loi_en_T::LAMBDA, tab_lambda.get_span_tot() }, { Loi_en_T::BETA, tab_beta.get_span_tot() }
232 spans_interne_h = { { Loi_en_h::CP, tab_Cp.
get_span_tot() }, { Loi_en_h::MU, tab_mu.get_span_tot() },
233 { Loi_en_h::LAMBDA, tab_lambda.get_span_tot() }, { Loi_en_h::BETA, tab_beta.get_span_tot() }
240 assert(pres.line_size() == 1 && tab_Cp.
line_size() == 1 && tab_mu.line_size() == 1 && tab_lambda.line_size() == 1 && tab_beta.line_size() == 1);
241 const int n_comp = temp_ou_enthalp.
line_size();
246 spans_input = { {
"temperature", temp_ou_enthalp.
get_span_tot() }, {
"pressure", pres.get_span_tot() } };
251 spans_input = { {
"enthalpie", temp_ou_enthalp.
get_span_tot() }, {
"pressure", pres.get_span_tot() } };
256 for (
int i = 0; i < Ni; i++)
258 tab_nu(i) = tab_mu(i) / tab_rho(!cR * i);
259 tab_alpha(i) = tab_lambda(i) / tab_rho(!cR * i) / tab_Cp(i);
260 tab_alpha_fois_rho(i) = tab_lambda(i) / tab_Cp(i);
261 tab_rCp(i) = tab_rho(!cR * i) * tab_Cp(i);
272 int ok = 1, zero = 0, nl = ch_e_int_->valeurs().dimension_tot(0);
276 double vmin = DBL_MAX, vmax = -DBL_MAX;
278 vmin = std::min(vmin, vals(i, j)), vmax = std::max(vmax, vals(i, j));
282 Cerr <<
" *** WARNING <<< " <<
que_suis_je() <<
" >>> VALUES OUT OF RANGE *** : Variable : " << i_r.first <<
" , min/max : ( "
283 << vmin <<
" , " << vmax <<
" ) & limits ( " << i_r.second[0] <<
" , " << i_r.second[1] <<
" )" << finl;
291 ch_rho_->abortTimeStep();
292 ch_e_int_->abortTimeStep();
302 std::vector<Champ_Inc_base *> vch = { sub_type(
Champ_Inc_base, ch_rho_.valeur()) ?& ref_cast(
Champ_Inc_base, ch_rho_.valeur()) :
nullptr,
305 for (
auto &&pch : vch)
310 pch->futur(i) = pch->valeurs();
329 DoubleTab& dT_h = ch_h.
derivees()[
"temperature"], &dT_e = ch_e.
derivees()[
"temperature"];
333 VectorD H_REF_(Ni), dTH_(Ni), bH_REF_(Nb), bdTH_(Nb);
334 MLoiSpanD spans_interne = { { Loi_en_T::H, SpanD(H_REF_) }, { Loi_en_T::H_DT, SpanD(dTH_) } };
335 MLoiSpanD spans_bord = { { Loi_en_T::H, SpanD(bH_REF_) }, { Loi_en_T::H_DT, SpanD(bdTH_) } };
336 _compute_all_pb_multiphase_(spans_interne, spans_bord);
343 for (
int i = 0; i < Ni; i++)
345 val_h(i) = H_REF_[i] + dTH_[i] * (T(i, n) -
T_ref_);
351 for (
int i = 0; i < Nb; i++)
353 bval_h(i) = bH_REF_[i] + bdTH_[i] * (bT(i, n) -
T_ref_);
354 bval_e(i) = bval_h(i);
365 DoubleTab& val_temp = ch_temp.
valeurs(), &bval_temp = ch_temp.
val_bord();
372 DoubleTab& dh_T = ch_temp.
derivees()[
"enthalpie"], &dh_e = ch_e.
derivees()[
"enthalpie"];
376 VectorD T_REF_(Ni), Cp_(Ni), bT_REF_(Nb), bCp_(Nb);
377 MLoiSpanD_h spans_interne = { { Loi_en_h::T, SpanD(T_REF_) }, { Loi_en_h::CP, SpanD(Cp_) } };
378 MLoiSpanD_h spans_bord = { { Loi_en_h::T, SpanD(bT_REF_) }, { Loi_en_h::CP, SpanD(bCp_) } };
386 for (
int i = 0; i < Ni; i++)
388 val_temp(i,n) = T_REF_[i] + (( enth(i,n) -
h_ref_ ) / Cp_[i] - 273.15);
390 dh_T(i) = 1. / Cp_[i];
394 for (
int i = 0; i < Nb; i++)
396 bval_temp(i,n) = bT_REF_[i] + (( benth(i,n) -
h_ref_ ) / bCp_[i] - 273.15);
397 bval_e(i) = benth(i);
404 const DoubleTab& T = ch_T.
valeurs(), &p = ch_p.valeurs(), &bT = ch_T.
valeur_aux_bords(), &bp = ch_p.valeur_aux_bords();
415 const int n_comp = T.line_size(), zero = 0, Ni = val_h.
dimension_tot(0), Nb = bval_h.dimension_tot(0), n = std::max(
id_composite_, zero), m = p.line_size() == T.line_size() ? n : 0;
417 if (m != 0)
Process::exit(
"Fluide_reel_base currently supports single-component pressure field ! Call the 911 !");
419 DoubleTab& dT_rho = ch_rho.
derivees()[
"temperature"], &dp_rho = ch_rho.
derivees()[
"pression"];
420 DoubleTab& dT_h = ch_h.
derivees()[
"temperature"], &dp_h = ch_h.
derivees()[
"pression"];
421 DoubleTab& dT_e = ch_e.
derivees()[
"temperature"], &dp_e = ch_e.
derivees()[
"pression"];
430 MSpanD spans_input = { {
"temperature", T.get_span_tot() }, {
"pressure", p.get_span_tot() }, {
"bord_temperature", bT.get_span_tot() }, {
"bord_pressure", bp.get_span_tot() } };
431 MLoiSpanD spans_interne = { }, spans_bord = { };
434 spans_interne.insert( { Loi_en_T::RHO, val_rho.
get_span_tot() });
435 spans_interne.insert( { Loi_en_T::RHO_DP, dp_rho.get_span_tot() });
436 spans_interne.insert( { Loi_en_T::RHO_DT, dT_rho.
get_span_tot() });
437 spans_bord.insert( { Loi_en_T::RHO, bval_rho.get_span_tot() });
440 spans_interne.insert( { Loi_en_T::H, val_h.
get_span_tot() });
441 spans_interne.insert( { Loi_en_T::H_DP, dp_h.get_span_tot() });
442 spans_interne.insert( { Loi_en_T::H_DT, dT_h.
get_span_tot() });
443 spans_bord.insert( { Loi_en_T::H, bval_h.get_span_tot() });
448 for (
int i = 0; i < Ni; i++)
450 val_e(i) = val_h(i) - p(i, m) / val_rho(i);
451 dp_e(i) = dp_h(i) - 1. / val_rho(i) + p(i, m) * dp_rho(i) / std::pow(val_rho(i) , 2);
452 dT_e(i) = dT_h(i) + p(i, m) * dT_rho(i) / std::pow(val_rho(i) , 2);
455 for (
int i = 0; i < Nb; i++) bval_e(i) = bval_h(i) - bp(i, m) / bval_rho(i);
463 const DoubleTab& enth = ch_enth.
valeurs(), &p = ch_p.valeurs(),
470 DoubleTab& val_temp = ch_temp.
valeurs(), &bval_temp = ch_temp.
val_bord();
476 Nb = bval_temp.dimension_tot(0), n = std::max(
id_composite_, zero),
477 m = p.line_size() == enth.
line_size() ? n : 0;
479 if (m != 0)
Process::exit(
"Fluide_reel_base currently supports single-component pressure field ! Call the 911 !");
481 DoubleTab& dh_rho = ch_rho.
derivees()[
"enthalpie"], &dp_rho = ch_rho.
derivees()[
"pression"];
482 DoubleTab& dh_T = ch_temp.
derivees()[
"enthalpie"], &dp_T = ch_temp.
derivees()[
"pression"];
483 DoubleTab& dh_e = ch_e.
derivees()[
"enthalpie"], &dp_e = ch_e.
derivees()[
"pression"];
492 MSpanD spans_input = { {
"enthalpie", enth.
get_span_tot() }, {
"pressure", p.get_span_tot() }, {
"bord_enthalpie", benth.get_span_tot() }, {
"bord_pressure", bp.get_span_tot() } };
493 MLoiSpanD_h spans_interne = { }, spans_bord = { };
496 spans_interne.insert( { Loi_en_h::RHO, val_rho.
get_span_tot() });
497 spans_interne.insert( { Loi_en_h::RHO_DP, dp_rho.get_span_tot() });
498 spans_interne.insert( { Loi_en_h::RHO_DH, dh_rho.
get_span_tot() });
499 spans_bord.insert( { Loi_en_h::RHO, bval_rho.get_span_tot() });
502 spans_interne.insert( { Loi_en_h::T, val_temp.
get_span_tot() });
503 spans_interne.insert( { Loi_en_h::T_DP, dp_T.get_span_tot() });
504 spans_interne.insert( { Loi_en_h::T_DH, dh_T.
get_span_tot() });
505 spans_bord.insert( { Loi_en_h::T, bval_temp.get_span_tot() });
510 for (
int i = 0; i < Ni; i++)
512 val_e(i) = enth(i, n) - p(i, m) / val_rho(i);
513 dp_e(i) = - 1. / val_rho(i) + p(i, m) * dp_rho(i) / std::pow(val_rho(i) , 2);
514 dh_e(i) = 1.0 + p(i, m) * dh_rho(i) / std::pow(val_rho(i) , 2);
517 for (
int i = 0; i < Nb; i++) bval_e(i) = benth(i, n) - bp(i, m) / bval_rho(i);
527void Fluide_reel_base::_compute_CPMLB_pb_multiphase_(MLoiSpanD prop)
const
529 assert((
int )prop.size() == 4);
530 SpanD CP = prop.at(Loi_en_T::CP), M = prop.at(Loi_en_T::MU), L = prop.at(Loi_en_T::LAMBDA), B = prop.at(Loi_en_T::BETA);
537void Fluide_reel_base::_compute_all_pb_multiphase_(MLoiSpanD inter, MLoiSpanD bord)
const
539 assert((
int )inter.size() == 2 && (
int )bord.size() == 2);
540 SpanD H = inter.at(Loi_en_T::H), dTH = inter.at(Loi_en_T::H_DT), bH = bord.at(Loi_en_T::H), bdTH = bord.at(Loi_en_T::H_DT);
550 assert((
int )prop.size() == 4);
551 SpanD CP = prop.at(Loi_en_h::CP), M = prop.at(Loi_en_h::MU), L = prop.at(Loi_en_h::LAMBDA), B = prop.at(Loi_en_h::BETA);
560 assert((
int )inter.size() == 2 && (
int )bord.size() == 2);
561 SpanD T = inter.at(Loi_en_h::T), CP = inter.at(Loi_en_h::CP),
562 bT = bord.at(Loi_en_h::T), bCp = bord.at(Loi_en_h::CP);
578 assert((
int )prop.size() == 4);
579 const SpanD T = input.at(
"temperature"), P = input.at(
"pressure");
582 SpanD CP = prop.at(Loi_en_T::CP), M = prop.at(Loi_en_T::MU), L = prop.at(Loi_en_T::LAMBDA), B = prop.at(Loi_en_T::BETA);
583 assert((
int )T.size() == ncomp * (
int )CP.size() && (
int )T.size() == ncomp * (
int )P.size());
584 assert((
int )T.size() == ncomp * (
int )B.size() && (
int )T.size() == ncomp * (
int )P.size());
585 assert((
int )T.size() == ncomp * (
int )M.size() && (
int )T.size() == ncomp * (
int )P.size());
586 assert((
int )T.size() == ncomp * (
int )L.size() && (
int )T.size() == ncomp * (
int )P.size());
589 cp_(T, P, CP, ncomp,
id);
590 mu_(T, P, M, ncomp,
id);
592 beta_(T, P, B, ncomp,
id);
597 assert( (
int )input.size() == 4 && (
int )inter.size() == 6 && (
int )bord.size() == 2);
599 const SpanD T = input.at(
"temperature"), P = input.at(
"pressure"), bT = input.at(
"bord_temperature"), bP = input.at(
"bord_pressure");
601 SpanD R = inter.at(Loi_en_T::RHO), dP = inter.at(Loi_en_T::RHO_DP), dT = inter.at(Loi_en_T::RHO_DT),
602 H = inter.at(Loi_en_T::H), dPH = inter.at(Loi_en_T::H_DP), dTH = inter.at(Loi_en_T::H_DT);
604 SpanD bR = bord.at(Loi_en_T::RHO), bH = bord.at(Loi_en_T::H);
606 assert((
int )bT.size() == ncomp * (
int )bP.size() && (
int )bT.size() == ncomp * (
int )bR.size());
607 assert((
int )bT.size() == ncomp * (
int )bP.size() && (
int )bT.size() == ncomp * (
int )bH.size());
608 assert((
int )T.size() == ncomp * (
int )P.size() && (
int )T.size() == ncomp * (
int )R.size());
609 assert((
int )T.size() == ncomp * (
int )P.size() && (
int )T.size() == ncomp * (
int )dP.size());
610 assert((
int )T.size() == ncomp * (
int )P.size() && (
int )T.size() == ncomp * (
int )dT.size());
611 assert((
int )T.size() == ncomp * (
int )P.size() && (
int )T.size() == ncomp * (
int )H.size());
612 assert((
int )T.size() == ncomp * (
int )P.size() && (
int )T.size() == ncomp * (
int )dPH.size());
613 assert((
int )T.size() == ncomp * (
int )P.size() && (
int )T.size() == ncomp * (
int )dTH.size());
616 rho_(bT, bP, bR, ncomp,
id);
617 h_(bT, bP, bH, ncomp,
id);
619 rho_(T, P, R, ncomp,
id);
622 h_(T, P, H, ncomp,
id);
623 dP_h_(T, P, dPH, ncomp,
id);
624 dT_h_(T, P, dTH, ncomp,
id);
630 assert((
int )prop.size() == 4);
631 const SpanD H = input.at(
"enthalpie"), P = input.at(
"pressure");
634 SpanD CP = prop.at(Loi_en_h::CP), M = prop.at(Loi_en_h::MU), L = prop.at(Loi_en_h::LAMBDA), B = prop.at(Loi_en_h::BETA);
635 assert((
int )H.size() == ncomp * (
int )CP.size() && (
int )H.size() == ncomp * (
int )P.size());
636 assert((
int )H.size() == ncomp * (
int )B.size() && (
int )H.size() == ncomp * (
int )P.size());
637 assert((
int )H.size() == ncomp * (
int )M.size() && (
int )H.size() == ncomp * (
int )P.size());
638 assert((
int )H.size() == ncomp * (
int )L.size() && (
int )H.size() == ncomp * (
int )P.size());
641 cp_h_(H, P, CP, ncomp,
id);
642 mu_h_(H, P, M, ncomp,
id);
649 assert( (
int )input.size() == 4 && (
int )inter.size() == 6 && (
int )bord.size() == 2);
651 const SpanD H = input.at(
"enthalpie"), P = input.at(
"pressure"), bH = input.at(
"bord_enthalpie"), bP = input.at(
"bord_pressure");
653 SpanD R = inter.at(Loi_en_h::RHO), dP = inter.at(Loi_en_h::RHO_DP), dH = inter.at(Loi_en_h::RHO_DH),
654 T = inter.at(Loi_en_h::T), dPT = inter.at(Loi_en_h::T_DP), dHT = inter.at(Loi_en_h::T_DH);
656 SpanD bR = bord.at(Loi_en_h::RHO), bT = bord.at(Loi_en_h::T);
658 assert((
int )bH.size() == ncomp * (
int )bP.size() && (
int )bH.size() == ncomp * (
int )bR.size());
659 assert((
int )bH.size() == ncomp * (
int )bP.size() && (
int )bH.size() == ncomp * (
int )bT.size());
660 assert((
int )H.size() == ncomp * (
int )P.size() && (
int )H.size() == ncomp * (
int )R.size());
661 assert((
int )H.size() == ncomp * (
int )P.size() && (
int )H.size() == ncomp * (
int )dP.size());
662 assert((
int )H.size() == ncomp * (
int )P.size() && (
int )H.size() == ncomp * (
int )dH.size());
663 assert((
int )H.size() == ncomp * (
int )P.size() && (
int )H.size() == ncomp * (
int )T.size());
664 assert((
int )H.size() == ncomp * (
int )P.size() && (
int )H.size() == ncomp * (
int )dPT.size());
665 assert((
int )H.size() == ncomp * (
int )P.size() && (
int )H.size() == ncomp * (
int )dHT.size());
668 rho_h_(bH, bP, bR, ncomp,
id);
669 T_(bH, bP, bT, ncomp,
id);
672 rho_h_(H, P, R, ncomp,
id);
675 T_(H, P, T, ncomp,
id);
676 dP_T_(H, P, dPT, ncomp,
id);
677 dh_T_(H, P, dHT, ncomp,
id);
689 const SpanD dp_h = ref_cast(
Champ_Inc_base, z_fld_->ch_h_ou_T_.valeur()).derivees()[
"pression"].get_span_tot();
690 assert((
int )dX_dP_h.size() == (
int )dX_dh_P.size() && (
int )dX_dP_h.size() == (
int )dp_h.size() && (
int )dX_dP.size() == (
int )dp_h.size());
691 for (
int i = 0; i < (int) dX_dP_h.size(); i++)
692 dX_dP[i] = dX_dP_h[i] + dp_h[i] * dX_dh_P[i];
697 const SpanD dT_h = ref_cast(
Champ_Inc_base, z_fld_->ch_h_ou_T_.valeur()).derivees()[
"temperature"].get_span_tot();
698 assert((
int )dX_dP_h.size() == (
int )dT_h.size() && (
int )dX_dh_P.size() == (
int )dT_h.size() && (
int )dX_dT.size() == (
int )dT_h.size() );
699 for (
int i = 0; i < (int) dX_dP_h.size(); i++)
700 dX_dT[i] = dT_h[i] * dX_dh_P[i];
708 const SpanD dp_h = ref_cast(
Champ_Inc_base, z_fld_->ch_h_ou_T_.valeur()).derivees()[
"pression"].get_span_tot();
709 const SpanD dT_h = ref_cast(
Champ_Inc_base, z_fld_->ch_h_ou_T_.valeur()).derivees()[
"temperature"].get_span_tot();
710 assert((
int )dX_dP_T.size() == (
int )dX_dT_P.size() && (
int )dX_dP_T.size() == (
int )dp_h.size() && (
int )dX_dP.size() == (
int )dp_h.size());
711 for (
int i = 0; i < (int) dX_dP_T.size(); i++)
712 dX_dP[i] = dX_dP_T[i] - dp_h[i] / dT_h[i] * dX_dT_P[i];
717 const SpanD dT_h = ref_cast(
Champ_Inc_base, z_fld_->ch_h_ou_T_.valeur()).derivees()[
"temperature"].get_span_tot();
718 assert((
int )dX_dP_T.size() == (
int )dT_h.size() && (
int )dX_dT_P.size() == (
int )dT_h.size() && (
int )dX_dh.size() == (
int )dT_h.size() );
719 for (
int i = 0; i < (int) dX_dP_T.size(); i++)
720 dX_dh[i] = dX_dT_P[i] / dT_h[i];
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 set_val_bord_fluide_multiphase(const bool flag)
virtual int nb_valeurs_temporelles() const
Returns the number of temporal values currently kept.
double changer_temps(const double temps) override
Sets the time of the field.
DoubleTab & valeurs() override
Returns the array of field values at the current time.
virtual void associer_eqn(const Equation_base &)
Associates the field with the equation of which it represents an unknown.
const tabs_t & derivees() const
DoubleTab valeur_aux_bords() const override
Returns the field value at the boundary faces.
virtual DoubleTab & valeurs()=0
class Discretisation_base This class represents a spatial discretization scheme, which
void nommer_completer_champ_physique(const Domaine_dis_base &domaine_vdf, const Nom &nom_champ, const Nom &unite, Champ_base &champ, const Probleme_base &pbi) const
void discretiser_champ(const Motcle &directive, const Domaine_dis_base &z, const Nom &nom, const Nom &unite, int nb_comp, int nb_pas_dt, double temps, OWN_PTR(Champ_Inc_base)&champ, const Nom &sous_type=NOM_VIDE) const
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
An input stream whose source is a character string.
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 const Champ_Inc_base & inconnue() const =0
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
Base class for an incompressible fluid and its properties:
OWN_PTR(Champ_base) ch_e_int_
Represents a real fluid and its physical properties:
void calculate_fluid_properties_incompressible()
virtual void dh_T_(const SpanD h, const SpanD P, SpanD dT_H, int ncomp=1, int id=0) const =0
int check_unknown_range() const override
double _lambda_h_(const double h, const double P) const
virtual void dh_rho_h_(const SpanD h, const SpanD P, SpanD dT_R, int ncomp=1, int id=0) const =0
void calculate_fluid_properties_enthalpie()
virtual void lambda_(const SpanD T, const SpanD P, SpanD L, int ncomp=1, int id=0) const =0
virtual void T_(const SpanD h, const SpanD P, SpanD H, int ncomp=1, int id=0) const =0
virtual void compute_CPMLB_pb_multiphase_(const MSpanD, MLoiSpanD, int ncomp=1, int id=0) const
int is_incompressible() const override
double _mu_h_(const double h, const double P) const
double _rho_(const double T, const double P) const
void _compute_CPMLB_pb_multiphase_h_(MLoiSpanD_h) const
virtual std::map< std::string, std::array< double, 2 > > unknown_range() const
double _beta_(const double T, const double P) const
void calculate_fluid_properties_enthalpie_incompressible()
void preparer_calcul() override
virtual void cp_(const SpanD T, const SpanD P, SpanD CP, int ncomp=1, int id=0) const =0
virtual void dT_h_(const SpanD T, const SpanD P, SpanD dT_H, int ncomp=1, int id=0) const =0
int initialiser(const double temps) override
Initializes the fluid parameters.
double _h_(const double T, const double P) const
virtual void rho_h_(const SpanD h, const SpanD P, SpanD R, int ncomp=1, int id=0) const =0
void calculate_fluid_properties()
virtual void lambda_h_(const SpanD h, const SpanD P, SpanD L, int ncomp=1, int id=0) const =0
double _cp_(const double T, const double P) const
double _beta_h_(const double h, const double P) const
virtual void h_(const SpanD T, const SpanD P, SpanD H, int ncomp=1, int id=0) const =0
virtual void dP_h_(const SpanD T, const SpanD P, SpanD dP_H, int ncomp=1, int id=0) const =0
virtual void cp_h_(const SpanD h, const SpanD P, SpanD CP, int ncomp=1, int id=0) const =0
void mettre_a_jour(double temps) override
Performs a time update of the medium and therefore of its characteristic parameters.
virtual void dP_rho_h_(const SpanD h, const SpanD P, SpanD dP_R, int ncomp=1, int id=0) const =0
double _lambda_(const double T, const double P) const
double _cp_h_(const double h, const double P) const
virtual void beta_(const SpanD T, const SpanD P, SpanD B, int ncomp=1, int id=0) const =0
double _dT_h_(const double T, const double P) const
virtual void mu_h_(const SpanD h, const SpanD P, SpanD M, int ncomp=1, int id=0) const =0
virtual void dP_T_(const SpanD h, const SpanD P, SpanD dP_H, int ncomp=1, int id=0) const =0
virtual void mu_(const SpanD T, const SpanD P, SpanD M, int ncomp=1, int id=0) const =0
void _compute_all_pb_multiphase_h_(MLoiSpanD_h, MLoiSpanD_h) const
virtual void dT_rho_(const SpanD T, const SpanD P, SpanD dT_R, int ncomp=1, int id=0) const =0
void discretiser(const Probleme_base &pb, const Discretisation_base &dis) override
double _mu_(const double T, const double P) const
double _rho_h_(const double h, const double P) const
bool initTimeStep(double dt) override
virtual void compute_all_pb_multiphase_h_(const MSpanD, MLoiSpanD_h, MLoiSpanD_h, int ncomp=1, int id=0) const
virtual void compute_CPMLB_pb_multiphase_h_(const MSpanD, MLoiSpanD_h, int ncomp=1, int id=0) const
virtual std::map< std::string, std::array< double, 2 > > unknown_range_h() const
virtual void compute_all_pb_multiphase_(const MSpanD, MLoiSpanD, MLoiSpanD, int ncomp=1, int id=0) const
virtual void rho_(const SpanD T, const SpanD P, SpanD R, int ncomp=1, int id=0) const =0
void set_param(Param ¶m) const override
virtual void beta_h_(const SpanD h, const SpanD P, SpanD B, int ncomp=1, int id=0) const =0
virtual void dP_rho_(const SpanD T, const SpanD P, SpanD dP_R, int ncomp=1, int id=0) const =0
double _T_(const double h, const double P) const
void abortTimeStep() override
void discretiser_porosite(const Probleme_base &pb, const Discretisation_base &dis)
virtual const Equation_base & equation(const std::string &nom_inc) const
virtual void abortTimeStep()
virtual void update_rho_cp(double temps)
int initialiser_porosite(const double temps)
void discretiser_diametre_hydro(const Probleme_base &pb, const Discretisation_base &dis)
virtual const Champ_base & masse_volumique() const
Returns the mass density of the medium (const version).
virtual void set_additional_params(Param ¶m) const
Champs_compris champs_compris_
void mettre_a_jour_porosite(double temps)
std::map< std::string, const Equation_base * > equation_
Navier_Stokes_std This class carries the terms of the momentum equation.
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.
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.
Multiphase thermohydraulics problem of type "3*N equations":
class Probleme_base It is a Probleme_U that is not a coupling.
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
virtual const Equation_base & equation(int) const =0
static double mp_min(double)
static double mp_max(double)
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
double temps_courant() const
Returns the current time.
virtual double temps_futur(int i) const =0
virtual int nb_valeurs_futures() const =0
Base class for output streams.
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension_tot(int) const override
_SIZE_ dimension(int d) const
Span_ get_span_tot() override
void dX_dT_P(const SpanD dX_dP_h, const SpanD dX_dh_P, SpanD dX_dT)
void dX_dP_T(const SpanD dX_dP_h, const SpanD dX_dh_P, SpanD dX_dP)
void dX_dh_P(const SpanD dX_dP_T, const SpanD dX_dT_P, SpanD dX_dh)
void dX_dP_h(const SpanD dX_dP_T, const SpanD dX_dT_P, SpanD dX_dP)