TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Fluide_reel_base.cpp
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
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>
24#include <EChaine.h>
25#include <cfloat>
26#include <cmath>
27
28Implemente_base_sans_constructeur(Fluide_reel_base, "Fluide_reel_base", Fluide_base);
29
30Sortie& Fluide_reel_base::printOn(Sortie& os) const { return os; }
32{
34
35 if ((T_ref_ >= 0) && (h_ref_ >= 0)) Process::exit(que_suis_je() + ": T_ref and h_ref MUST NOT be both specified!");
36
37 if (P_ref_ >= 0)
38 if (T_ref_ < 0 && h_ref_ < 0)
39 Process::exit(que_suis_je() + ": T_ref/P_ref or h_ref/P_ref MUST both be specified!");
40
41 return is;
42}
43
45{
46 param.ajouter("T_ref", &T_ref_);
47 param.ajouter("P_ref", &P_ref_);
48 param.ajouter("H_ref", &h_ref_);
50}
51
53{
54 Cerr << "Medium discretization." << finl;
55
56 const Domaine_dis_base& domaine_dis = pb.equation(0).domaine_dis();
57 const double temps = pb.schema_temps().temps_courant();
58
59 res_en_T_ = sub_type(Pb_Multiphase,pb) ? ref_cast(Pb_Multiphase,pb).resolution_en_T() : true;
60
62 Process::exit("Incompressible fluid :: NOT YET PORTED TO ENTHALPY EQUATION (BUG DEDANS) ! TODO FIXME !!");
63
64 /* masse volumique, energie interne, enthalpie : champ_inc */
65 OWN_PTR(Champ_Inc_base) rho_inc, ei_inc, h_ou_T_inc;
66 int nc = pb.equation(0).inconnue().nb_valeurs_temporelles();
67 if (is_incompressible()) /* cas incompressible -> rho champ uniforme */
68 {
69 Nom val_rho;
70 val_rho = res_en_T_ ? Nom(_rho_(T_ref_, P_ref_)) : Nom(_rho_h_(h_ref_, P_ref_) /* point-to-point */);
71
72 EChaine str(Nom("Champ_Uniforme 1 ") + val_rho);
73 str >> ch_rho_;
74 dis.nommer_completer_champ_physique(domaine_dis, "masse_volumique", "kg/m^3", ch_rho_, pb);
75 }
76 else
77 {
78 dis.discretiser_champ("champ_elem", domaine_dis, "masse_volumique", "kg/m^3", 1, nc, temps, rho_inc);
79 ch_rho_ = rho_inc;
80 }
81
82 dis.discretiser_champ("champ_elem", domaine_dis, "energie_interne", "J/kg", 1, nc, temps, ei_inc);
83
84 if (res_en_T_)
85 dis.discretiser_champ("champ_elem", domaine_dis, "enthalpie", "J/kg", 1, nc, temps, h_ou_T_inc);
86 else
87 dis.discretiser_champ("champ_elem", domaine_dis, "temperature", "C", 1, nc, temps, h_ou_T_inc);
88
89 ch_e_int_ = ei_inc, ch_h_ou_T_ = h_ou_T_inc;
90
91 dis.discretiser_champ("champ_elem", domaine_dis, "viscosite_dynamique", "kg/m/s", 1, temps, ch_mu_);
92 dis.discretiser_champ("champ_elem", domaine_dis, "viscosite_cinematique", "m2/s", 1, temps, ch_nu_);
93 dis.discretiser_champ("champ_elem", domaine_dis, "diffusivite", "m2/s", 1, temps, ch_alpha_);
94 dis.discretiser_champ("champ_elem", domaine_dis, "ch_alpha_fois_rho_", "kg/m/s", 1, temps, ch_alpha_fois_rho_);
95 dis.discretiser_champ("champ_elem", domaine_dis, "conductivite", "W/m/K", 1, temps, ch_lambda_);
96 dis.discretiser_champ("champ_elem", domaine_dis, "capacite_calorifique", "J/kg/K", 1, temps, ch_Cp_);
97 dis.discretiser_champ("champ_elem", domaine_dis, "dilatabilite", "K-1", 1, temps, ch_beta_th_);
98 dis.discretiser_champ("champ_elem", domaine_dis, "rho_cp_elem", "J/m^3/K", 1, temps, ch_rho_Cp_elem_);
99 dis.discretiser_champ("temperature", domaine_dis, "rho_cp_comme_T", "J/m^3/K", 1, temps, ch_rho_Cp_comme_T_);
100
101 for (auto &pch : { &ch_rho_, &ch_e_int_, &ch_h_ou_T_ })
102 champs_compris_.ajoute_champ(pch->valeur());
103
104 for (OWN_PTR(Champ_Don_base) * ch_don : { &ch_mu_, &ch_nu_, &ch_alpha_, &ch_alpha_fois_rho_, &ch_lambda_, &ch_Cp_, &ch_beta_th_ })
105 champs_compris_.ajoute_champ(ch_don->valeur());
106
107 for (Champ_Fonc_base * ch_fonc : { &(ch_rho_Cp_elem_.valeur()), &(ch_rho_Cp_comme_T_.valeur()) })
108 champs_compris_.ajoute_champ(*ch_fonc);
109
110 if (id_composite_ == -1)
111 {
114 }
115}
116
117int Fluide_reel_base::initialiser(const double temps)
118{
119 const Equation_base& eqn = res_en_T_ ? equation("temperature") : equation("enthalpie");
120 Champ_Inc_base *pch_rho = sub_type(Champ_Inc_base, ch_rho_.valeur()) ? &ref_cast(Champ_Inc_base, ch_rho_.valeur()) : nullptr;
121 Champ_Inc_base& ch_e = ref_cast(Champ_Inc_base, ch_e_int_.valeur()), &ch_h_ou_T = ref_cast(Champ_Inc_base, ch_h_ou_T_.valeur());
122
123 if (pch_rho)
124 {
125 pch_rho->associer_eqn(eqn);
126 pch_rho->resize_val_bord();
127 pch_rho->set_val_bord_fluide_multiphase(true);
128 }
129
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);
133
134 ch_e.associer_eqn(eqn);
135 ch_e.resize_val_bord();
137
138 // XXX Elie Saikali : utile pour cas reprise !
139 ch_e.changer_temps(temps);
140 ch_h_ou_T.changer_temps(temps);
141
142 ch_Cp_->initialiser(temps);
143 ch_mu_->initialiser(temps);
144 ch_nu_->initialiser(temps);
145 ch_alpha_->initialiser(temps);
146 ch_alpha_fois_rho_->initialiser(temps);
147 ch_lambda_->initialiser(temps);
148 ch_beta_th_->initialiser(temps);
149 ch_rho_Cp_comme_T_->initialiser(temps);
150
151 t_init_ = temps;
152
153 if (is_incompressible())
154 {
155 mettre_a_jour(temps); // ne depend pas de p et T : on peut terminer l'initialisation
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;
158 Cerr << "{" << 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;
164 Cerr << "}" << finl;
165 }
166
167 if (id_composite_ == -1)
169
170 if (id_composite_ < 0 && ch_g_)
171 ch_g_->initialiser(temps);
172
173 return 1;
174}
175
177
179{
180 double tp = ref_cast(Champ_Inc_base, ch_e_int_.valeur()).temps(); //pour savoir si on va tourner la roue
181
182 // XXX Elie Saikali : cas reprise car ch_rho_, ch_e_int_ et ch_h_ou_T_ pas dans les .sauvs !
183 if (t > ch_rho_->temps() && first_maj_)
184 {
185 ch_rho_->changer_temps(t);
186 ch_e_int_->changer_temps(t);
187 ch_h_ou_T_->changer_temps(t);
188 }
189
190 ch_rho_->mettre_a_jour(t);
191 ch_e_int_->mettre_a_jour(t);
192 ch_h_ou_T_->mettre_a_jour(t);
193
194 // on calcule les props (EOS)
195 if (res_en_T_)
197 else
199
200 ch_Cp_->mettre_a_jour(t);
201 ch_mu_->mettre_a_jour(t);
202 ch_lambda_->mettre_a_jour(t);
203 ch_nu_->mettre_a_jour(t);
204 ch_alpha_->mettre_a_jour(t);
205 ch_alpha_fois_rho_->mettre_a_jour(t);
206 ch_beta_th_->mettre_a_jour(t);
208
209 const Champ_Inc_base& ch_T_ou_h = res_en_T_ ? equation("temperature").inconnue() : equation("enthalpie").inconnue(),
210 &ch_p = ref_cast(Navier_Stokes_std, equation("vitesse")).pression();
211
212 const DoubleTab& temp_ou_enthalp = ch_T_ou_h.valeurs(), &pres = ch_p.valeurs();
213
214 DoubleTab& tab_Cp = ch_Cp_->valeurs(), &tab_mu = ch_mu_->valeurs(),
215 &tab_lambda = ch_lambda_->valeurs(), &tab_alpha_fois_rho = ch_alpha_fois_rho_->valeurs(),
216 &tab_nu = ch_nu_->valeurs(), &tab_alpha = ch_alpha_->valeurs(),
217 &tab_beta = ch_beta_th_->valeurs(), &tab_rCp = ch_rho_Cp_comme_T_->valeurs();
218
219 const DoubleTab& tab_rho = masse_volumique().valeurs();
220
221 int Ni = ch_mu_->valeurs().dimension_tot(0), cR = tab_rho.dimension_tot(0) == 1;
222 if (t > tp || first_maj_)
223 {
224 MLoiSpanD spans_interne;
225 MLoiSpanD_h spans_interne_h;
226
227 if (res_en_T_)
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() }
230 };
231 else
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() }
234 };
235
236 if (is_incompressible())
237 res_en_T_ ? _compute_CPMLB_pb_multiphase_(spans_interne) : _compute_CPMLB_pb_multiphase_h_(spans_interne_h);
238 else
239 {
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(); /* on a temp(xx,id_composite_) */
242 MSpanD spans_input;
243
244 if (res_en_T_)
245 {
246 spans_input = { { "temperature", temp_ou_enthalp.get_span_tot() }, { "pressure", pres.get_span_tot() } };
247 compute_CPMLB_pb_multiphase_(spans_input, spans_interne, n_comp, id_composite_);
248 }
249 else
250 {
251 spans_input = { { "enthalpie", temp_ou_enthalp.get_span_tot() }, { "pressure", pres.get_span_tot() } };
252 compute_CPMLB_pb_multiphase_h_(spans_input, spans_interne_h, n_comp, id_composite_);
253 }
254 }
255
256 for (int i = 0; i < Ni; i++) // fill values
257 {
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);
262 }
263 }
264 first_maj_ = 0;
266}
267
269{
270 if (is_incompressible()) return 1;
271
272 int ok = 1, zero = 0, nl = ch_e_int_->valeurs().dimension_tot(0); //on n'impose pas de contraintes aux lignes correspondant a des variables auxiliaires (eg pressions aux faces dans PolyMAC_HFV)
273 for (auto &&i_r : res_en_T_ ? unknown_range() : unknown_range_h())
274 {
275 const DoubleTab& vals = i_r.first == "pression" ? ref_cast(Navier_Stokes_std, equation("vitesse")).pression().valeurs() : equation(i_r.first).inconnue().valeurs();
276 double vmin = DBL_MAX, vmax = -DBL_MAX;
277 for (int i = 0, j = std::min(std::max(id_composite_, zero), vals.dimension(1) - 1); i < nl; i++)
278 vmin = std::min(vmin, vals(i, j)), vmax = std::max(vmax, vals(i, j));
279 ok &= Process::mp_min(vmin) >= i_r.second[0] && Process::mp_max(vmax) <= i_r.second[1];
280
281 if (!ok)
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;
284 }
285 return ok;
286}
287
289{
291 ch_rho_->abortTimeStep();
292 ch_e_int_->abortTimeStep();
293 ch_h_ou_T_->abortTimeStep();
294}
295
297{
298 if (!equation_.size()) return true; //pas d'equation associee -> ???
299 const Schema_Temps_base& sch = equation_.begin()->second->schema_temps(); //on recupere le schema en temps par la 1ere equation
300
301 /* champs dont on doit creer des cases */
302 std::vector<Champ_Inc_base *> vch = { sub_type(Champ_Inc_base, ch_rho_.valeur()) ?& ref_cast(Champ_Inc_base, ch_rho_.valeur()) : nullptr,
303 &ref_cast(Champ_Inc_base, ch_e_int_.valeur()), &ref_cast(Champ_Inc_base, ch_h_ou_T_.valeur())
304 };
305 for (auto &&pch : vch)
306 if (pch)
307 for (int i = 1; i <= sch.nb_valeurs_futures(); i++)
308 {
309 pch->changer_temps_futur(sch.temps_futur(i), i);
310 pch->futur(i) = pch->valeurs();
311 }
312 return true;
313}
314
316{
317 assert (is_incompressible() && res_en_T_);
318 const Champ_Inc_base& ch_T = equation("temperature").inconnue();
319 const DoubleTab& T = ch_T.valeurs(), &bT = ch_T.valeur_aux_bords();
320
321 Champ_Inc_base& ch_h = ref_cast_non_const(Champ_Inc_base, ch_h_ou_T_.valeur());
322 DoubleTab& val_h = ch_h.valeurs(), &bval_h = ch_h.val_bord();
323
324 Champ_Inc_base& ch_e = ref_cast(Champ_Inc_base, ch_e_int_.valeur());
325 DoubleTab& val_e = ch_e.valeurs(), &bval_e = ch_e.val_bord();
326
327 const int zero = 0, Ni = val_h.dimension_tot(0), Nb = bval_h.dimension_tot(0), n = std::max(id_composite_, zero);
328
329 DoubleTab& dT_h = ch_h.derivees()["temperature"], &dT_e = ch_e.derivees()["temperature"];
330 dT_h.resize(Ni, 1);
331 dT_e.resize(Ni, 1);
332
333 VectorD H_REF_(Ni), dTH_(Ni), bH_REF_(Nb), bdTH_(Nb); // Je suis desole ...
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);
337
338 /*
339 * On rempli h et e
340 * En incompressible, on suppose e = h = h*ref + cp * (T -T_ref)
341 * On a aussi cp = dh / dT
342 */
343 for (int i = 0; i < Ni; i++) /* interne */
344 {
345 val_h(i) = H_REF_[i] + dTH_[i] * (T(i, n) - T_ref_);
346 val_e(i) = val_h(i);
347 dT_h(i) = dTH_[i]; /* la seule derivee en incompressible */
348 dT_e(i) = dT_h(i);
349 }
350
351 for (int i = 0; i < Nb; i++) /* bord */
352 {
353 bval_h(i) = bH_REF_[i] + bdTH_[i] * (bT(i, n) - T_ref_);
354 bval_e(i) = bval_h(i);
355 }
356}
357
359{
360 assert (is_incompressible() && !res_en_T_) ;
361 const Champ_Inc_base& ch_enth = equation("enthalpie").inconnue();
362 const DoubleTab& enth = ch_enth.valeurs(), &benth = ch_enth.valeur_aux_bords();
363
364 Champ_Inc_base& ch_temp = ref_cast_non_const(Champ_Inc_base, ch_h_ou_T_.valeur());
365 DoubleTab& val_temp = ch_temp.valeurs(), &bval_temp = ch_temp.val_bord();
366
367 Champ_Inc_base& ch_e = ref_cast(Champ_Inc_base, ch_e_int_.valeur());
368 DoubleTab& val_e = ch_e.valeurs(), &bval_e = ch_e.val_bord();
369
370 const int zero = 0, Ni = val_temp.dimension_tot(0), Nb = bval_temp.dimension_tot(0), n = std::max(id_composite_, zero);
371
372 DoubleTab& dh_T = ch_temp.derivees()["enthalpie"], &dh_e = ch_e.derivees()["enthalpie"];
373 dh_T.resize(Ni, 1);
374 dh_e.resize(Ni, 1);
375
376 VectorD T_REF_(Ni), Cp_(Ni), bT_REF_(Nb), bCp_(Nb); // Je suis desole ...
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_) } };
379 _compute_all_pb_multiphase_h_(spans_interne, spans_bord);
380
381 /*
382 * On rempli T et e
383 * En incompressible, on suppose e = h
384 * T = ( h - h_ref ) / cp + T_ref
385 */
386 for (int i = 0; i < Ni; i++) /* interne */
387 {
388 val_temp(i,n) = T_REF_[i] + (( enth(i,n) - h_ref_ ) / Cp_[i] - 273.15);
389 val_e(i) = enth(i);
390 dh_T(i) = 1. / Cp_[i]; /* la seule derivee en incompressible */
391 dh_e(i) = 1.;
392 }
393
394 for (int i = 0; i < Nb; i++) /* bord */
395 {
396 bval_temp(i,n) = bT_REF_[i] + (( benth(i,n) - h_ref_ ) / bCp_[i] - 273.15);
397 bval_e(i) = benth(i);
398 }
399}
400
402{
403 const Champ_Inc_base& ch_T = equation("temperature").inconnue(), &ch_p = ref_cast(Navier_Stokes_std, equation("vitesse")).pression();
404 const DoubleTab& T = ch_T.valeurs(), &p = ch_p.valeurs(), &bT = ch_T.valeur_aux_bords(), &bp = ch_p.valeur_aux_bords();
405
406 Champ_Inc_base& ch_rho = ref_cast_non_const(Champ_Inc_base, ch_rho_.valeur());
407 DoubleTab& val_rho = ch_rho.valeurs(), &bval_rho = ch_rho.val_bord();
408
409 Champ_Inc_base& ch_h = ref_cast_non_const(Champ_Inc_base, ch_h_ou_T_.valeur());
410 DoubleTab& val_h = ch_h.valeurs(), &bval_h = ch_h.val_bord();
411
412 Champ_Inc_base& ch_e = ref_cast(Champ_Inc_base, ch_e_int_.valeur());
413 DoubleTab& val_e = ch_e.valeurs(), &bval_e = ch_e.val_bord();
414
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;
416
417 if (m != 0) Process::exit("Fluide_reel_base currently supports single-component pressure field ! Call the 911 !");
418
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"];
422
423 dT_rho.resize(Ni,1);
424 dp_rho.resize(Ni,1);
425 dT_h.resize(Ni, 1);
426 dp_h.resize(Ni, 1);
427 dT_e.resize(Ni, 1);
428 dp_e.resize(Ni, 1);
429
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 = { };
432
433 // pour rho
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() });
438
439 // pour h
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() });
444
445 compute_all_pb_multiphase_(spans_input, spans_interne, spans_bord, n_comp, n);
446
447 // energie_interne
448 for (int i = 0; i < Ni; i++) /* interne */
449 {
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);
453 }
454
455 for (int i = 0; i < Nb; i++) bval_e(i) = bval_h(i) - bp(i, m) / bval_rho(i); /* bord */
456}
457
459{
460 const Champ_Inc_base& ch_enth = equation("enthalpie").inconnue(),
461 &ch_p = ref_cast(Navier_Stokes_std, equation("vitesse")).pression();
462
463 const DoubleTab& enth = ch_enth.valeurs(), &p = ch_p.valeurs(),
464 &benth = ch_enth.valeur_aux_bords(), &bp = ch_p.valeur_aux_bords();
465
466 Champ_Inc_base& ch_rho = ref_cast_non_const(Champ_Inc_base, ch_rho_.valeur());
467 DoubleTab& val_rho = ch_rho.valeurs(), &bval_rho = ch_rho.val_bord();
468
469 Champ_Inc_base& ch_temp = ref_cast_non_const(Champ_Inc_base, ch_h_ou_T_.valeur());
470 DoubleTab& val_temp = ch_temp.valeurs(), &bval_temp = ch_temp.val_bord();
471
472 Champ_Inc_base& ch_e = ref_cast(Champ_Inc_base, ch_e_int_.valeur());
473 DoubleTab& val_e = ch_e.valeurs(), &bval_e = ch_e.val_bord();
474
475 const int n_comp = enth.line_size(), zero = 0, Ni = val_temp.dimension_tot(0),
476 Nb = bval_temp.dimension_tot(0), n = std::max(id_composite_, zero),
477 m = p.line_size() == enth.line_size() ? n : 0;
478
479 if (m != 0) Process::exit("Fluide_reel_base currently supports single-component pressure field ! Call the 911 !");
480
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"];
484
485 dh_rho.resize(Ni,1);
486 dp_rho.resize(Ni,1);
487 dh_T.resize(Ni, 1);
488 dp_T.resize(Ni, 1);
489 dh_e.resize(Ni, 1);
490 dp_e.resize(Ni, 1);
491
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 = { };
494
495 // pour rho
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() });
500
501 // pour h
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() });
506
507 compute_all_pb_multiphase_h_(spans_input, spans_interne, spans_bord, n_comp, n);
508
509 // energie_interne
510 for (int i = 0; i < Ni; i++) /* interne */
511 {
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);
515 }
516
517 for (int i = 0; i < Nb; i++) bval_e(i) = benth(i, n) - bp(i, m) / bval_rho(i); /* bord */
518}
519
520/*
521 * *********************
522 * Pour l'incompressible
523 * *********************
524 */
525
526/* Lois en T */
527void Fluide_reel_base::_compute_CPMLB_pb_multiphase_(MLoiSpanD prop) const
528{
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);
531 _cp_(T_ref_, P_ref_, CP);
532 _mu_(T_ref_, P_ref_, M);
534 _beta_(T_ref_, P_ref_, B);
535}
536
537void Fluide_reel_base::_compute_all_pb_multiphase_(MLoiSpanD inter, MLoiSpanD bord) const
538{
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);
541 _h_(T_ref_, P_ref_, H);
542 _h_(T_ref_, P_ref_, bH);
543 _dT_h_(T_ref_, P_ref_, dTH);
544 _dT_h_(T_ref_, P_ref_, bdTH);
545}
546
547/* Lois en h */
549{
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);
552 _cp_h_(h_ref_, P_ref_, CP);
553 _mu_h_(h_ref_, P_ref_, M);
556}
557
558void Fluide_reel_base::_compute_all_pb_multiphase_h_(MLoiSpanD_h inter, MLoiSpanD_h bord) const
559{
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);
563 _T_(h_ref_, P_ref_, T);
564 _T_(h_ref_, P_ref_, bT);
565 _cp_h_(h_ref_, P_ref_, bCp);
566 _cp_h_(h_ref_, P_ref_, CP);
567}
568
569/*
570 * *****************
571 * Pour compressible
572 * *****************
573 */
574
575/* Lois en T */
576void Fluide_reel_base::compute_CPMLB_pb_multiphase_(const MSpanD input, MLoiSpanD prop, int ncomp, int id) const
577{
578 assert((int )prop.size() == 4);
579 const SpanD T = input.at("temperature"), P = input.at("pressure");
580
581 // BEEM
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());
587
588 // BOOM
589 cp_(T, P, CP, ncomp, id);
590 mu_(T, P, M, ncomp, id);
591 lambda_(T, P, L, ncomp, id);
592 beta_(T, P, B, ncomp, id);
593}
594
595void Fluide_reel_base::compute_all_pb_multiphase_(const MSpanD input, MLoiSpanD inter, MLoiSpanD bord, int ncomp, int id) const
596{
597 assert( (int )input.size() == 4 && (int )inter.size() == 6 && (int )bord.size() == 2);
598
599 const SpanD T = input.at("temperature"), P = input.at("pressure"), bT = input.at("bord_temperature"), bP = input.at("bord_pressure");
600
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);
603
604 SpanD bR = bord.at(Loi_en_T::RHO), bH = bord.at(Loi_en_T::H);
605
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());
614
615 // bord
616 rho_(bT, bP, bR, ncomp, id);
617 h_(bT, bP, bH, ncomp, id);
618 // interne
619 rho_(T, P, R, ncomp, id);
620 dP_rho_(T, P, dP, ncomp, id);
621 dT_rho_(T, P, dT, 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);
625}
626
627/* Lois en h */
628void Fluide_reel_base::compute_CPMLB_pb_multiphase_h_(const MSpanD input, MLoiSpanD_h prop, int ncomp, int id) const
629{
630 assert((int )prop.size() == 4);
631 const SpanD H = input.at("enthalpie"), P = input.at("pressure");
632
633 // BEEM
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());
639
640 // BOOM
641 cp_h_(H, P, CP, ncomp, id);
642 mu_h_(H, P, M, ncomp, id);
643 lambda_h_(H, P, L, ncomp, id);
644 beta_h_(H, P, B, ncomp, id);
645}
646
647void Fluide_reel_base::compute_all_pb_multiphase_h_(const MSpanD input, MLoiSpanD_h inter, MLoiSpanD_h bord, int ncomp, int id) const
648{
649 assert( (int )input.size() == 4 && (int )inter.size() == 6 && (int )bord.size() == 2);
650
651 const SpanD H = input.at("enthalpie"), P = input.at("pressure"), bH = input.at("bord_enthalpie"), bP = input.at("bord_pressure");
652
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);
655
656 SpanD bR = bord.at(Loi_en_h::RHO), bT = bord.at(Loi_en_h::T);
657
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());
666
667 // bord
668 rho_h_(bH, bP, bR, ncomp, id);
669 T_(bH, bP, bT, ncomp, id);
670
671 // interne
672 rho_h_(H, P, R, ncomp, id);
673 dP_rho_h_(H, P, dP, ncomp, id);
674 dh_rho_h_(H, P, dH, 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);
678}
679
680/*
681 * CONVERTER CLASS METHODS
682 */
683
684/*
685 * Methodes utiles pour convertir les derivees en h a T (pour Pb_Multiphase).
686 */
687void Fluide_reel_base::H_to_T::dX_dP_T(const SpanD dX_dP_h, const SpanD dX_dh_P, SpanD dX_dP)
688{
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];
693}
694
695void Fluide_reel_base::H_to_T::dX_dT_P(const SpanD dX_dP_h, const SpanD dX_dh_P, SpanD dX_dT )
696{
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];
701}
702
703/*
704 * Methodes utiles pour convertir les derivees en T a h (pour Pb_Multiphase).
705 */
706void Fluide_reel_base::T_to_H::dX_dP_h(const SpanD dX_dP_T, const SpanD dX_dT_P, SpanD dX_dP)
707{
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];
713}
714
715void Fluide_reel_base::T_to_H::dX_dh_P(const SpanD dX_dP_T, const SpanD dX_dT_P, SpanD dX_dh)
716{
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];
721}
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
Classe Champ_Inc_base.
void set_val_bord_fluide_multiphase(const bool flag)
DoubleTab & val_bord()
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.
Definition EChaine.h:31
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
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
Definition Fluide_base.h:38
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
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 &param) 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 &param) 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
Definition Nom.h:31
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
Definition Param.cpp:364
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)
Definition Process.cpp:386
static double mp_max(double)
Definition Process.cpp:376
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
class Schema_Temps_base
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.
Definition Sortie.h:52
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
int line_size() const
Definition TRUSTVect.tpp:67
Span_ get_span_tot() override
Definition TRUSTVect.h:182
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)