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];
classe Champ_Don_base classe de base des Champs donnes (non calcules)
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
void set_val_bord_fluide_multiphase(const bool flag)
virtual int nb_valeurs_temporelles() const
Renvoie le nombre de valeurs temporelles actuellement conservees.
double changer_temps(const double temps) override
Fixe le temps du champ.
DoubleTab & valeurs() override
Renvoie le tableau des valeurs du champ au temps courant.
virtual void associer_eqn(const Equation_base &)
Associe le champ a l'equation dont il represente une inconnue.
const tabs_t & derivees() const
DoubleTab valeur_aux_bords() const override
renvoie la valeur du champ aux faces de bord
virtual DoubleTab & valeurs()=0
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
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
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
Une entree dont la source est une chaine de caracteres.
Class defining operators and methods for all reading operation in an input flow (file,...
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
virtual const Champ_Inc_base & inconnue() const =0
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
classe Fluide_base Cette classe represente un d'un fluide incompressible ainsi que
OWN_PTR(Champ_base) ch_e_int_
Classe Fluide_reel_base Cette classe represente un fluide reel ainsi que.
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
Initialise les parametres du fluide.
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
Effectue une mise a jour en temps du milieu, et donc de ses parametres caracteristiques.
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
Renvoie la masse volumique du milieu.
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_
classe Navier_Stokes_std Cette classe porte les termes de l'equation de la dynamique
class Nom Une chaine de caractere pour nommer les objets de TRUST
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
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.
classe Pb_Multiphase Cette classe represente un probleme de thermohydraulique multiphase de type "3*N...
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
const Schema_Temps_base & schema_temps() const
Renvoie le schema en temps associe au probleme.
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)
Routine de sortie de TRUST dans une region Kokkos.
double temps_courant() const
Renvoie le temps courant.
virtual double temps_futur(int i) const =0
virtual int nb_valeurs_futures() const =0
Classe de base des flux de sortie.
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)