TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_Thermal_cut_cell.cpp
1/****************************************************************************
2* Copyright (c) 2023, 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 <IJK_Thermal_cut_cell.h>
17#include <Probleme_FTD_IJK_cut_cell.h>
18#include <Cut_cell_tools.h>
19#include <Probleme_FTD_IJK.h>
20#include <DebogIJK.h>
21#include <IJK_Navier_Stokes_tools.h>
22#include <IJK_Navier_Stokes_tools_cut_cell.h>
23#include <Cut_cell_tools.h>
24#include <Cut_cell_convection_auxiliaire.h>
25#include <Cut_cell_diffusion_auxiliaire.h>
26#include <OpConvQuickIJKScalar_cut_cell.h>
27#include <Cut_cell_diffusion_flux_interface.h>
28
29Implemente_instanciable_sans_constructeur( IJK_Thermal_cut_cell, "IJK_Thermal_cut_cell", IJK_Thermal_base ) ;
30
31IJK_Thermal_cut_cell::IJK_Thermal_cut_cell()
32{
34 conserv_energy_global_=0; // Note : doit etre zero sinon la rustine est appliquee
35
36 cut_cell_conv_scheme_.scheme = CUT_CELL_SCHEMA_CONVECTION::QUICK_OU_CENTRE2_STENCIL;
37
38
39 temperature_ = std::make_shared<Cut_field_double>();
40 div_coeff_grad_T_volume_ = std::make_shared<Cut_field_double>();
41 d_temperature_ = std::make_shared<Cut_field_double>();
42}
43
45{
46
48
49 os<< " type_T_source " << type_T_source_ << "\n";
50
52 os<< " lambda_variable \n";
54 os<< " conserv_energy_global \n";
55
56
57 os<< " convection_auxiliaire " << convective_correction_;
58
59 os<< " diffusion_auxiliaire " << diffusive_correction_;
60
61 os<< " \n}";
62 return os;
63}
64
66{
68 return is;
69}
70
72{
74 param.ajouter_flag("postraiter_champs_intermediaires", &postraiter_champs_intermediaires_);
75
76 param.ajouter_flag("deactivate_diffusion_interface", &deactivate_diffusion_interface_);
77
78 param.ajouter_flag("runge_kutta_fluxes_convection", &runge_kutta_fluxes_convection_);
79 param.ajouter_flag("runge_kutta_fluxes_diffusion", &runge_kutta_fluxes_diffusion_);
80 param.ajouter_flag("runge_kutta_fluxes_pas_de_correction_convection", &runge_kutta_fluxes_pas_de_correction_convection_);
81 param.ajouter_flag("runge_kutta_fluxes_pas_de_correction_diffusion", &runge_kutta_fluxes_pas_de_correction_diffusion_);
82
83 param.ajouter("runge_kutta_restriction_leniency_convection", &runge_kutta_restriction_leniency_convection_);
84 param.ajouter("runge_kutta_restriction_leniency_diffusion", &runge_kutta_restriction_leniency_diffusion_);
85
86 param.ajouter("convection_auxiliaire", &convective_correction_, Param::REQUIRED);
87 param.ajouter("diffusion_auxiliaire", &diffusive_correction_, Param::REQUIRED);
88
89 param.ajouter("cut_cell_schema_convection", (int*)&cut_cell_conv_scheme_.scheme);
90 param.dictionnaire("quick_ou_centre2_stencil", (int)CUT_CELL_SCHEMA_CONVECTION::QUICK_OU_CENTRE2_STENCIL);
91 param.dictionnaire("quick_ou_centre2_perpendicular_distance", (int)CUT_CELL_SCHEMA_CONVECTION::QUICK_OU_CENTRE2_PERPENDICULAR_DISTANCE);
92 param.dictionnaire("quick_ou_lineaire2_stencil", (int)CUT_CELL_SCHEMA_CONVECTION::QUICK_OU_LINEAIRE2_STENCIL);
93 param.dictionnaire("quick_ou_lineaire2_perpendicular_distance", (int)CUT_CELL_SCHEMA_CONVECTION::QUICK_OU_LINEAIRE2_PERPENDICULAR_DISTANCE);
94 param.dictionnaire("quick_ou_amont_stencil", (int)CUT_CELL_SCHEMA_CONVECTION::QUICK_OU_AMONT_STENCIL);
95 param.dictionnaire("quick_ou_amont_perpendicular_distance", (int)CUT_CELL_SCHEMA_CONVECTION::QUICK_OU_AMONT_PERPENDICULAR_DISTANCE);
96 param.dictionnaire("centre2", (int)CUT_CELL_SCHEMA_CONVECTION::CENTRE2);
97 param.dictionnaire("lineaire2", (int)CUT_CELL_SCHEMA_CONVECTION::LINEAIRE2);
98 param.dictionnaire("amont", (int)CUT_CELL_SCHEMA_CONVECTION::AMONT);
99
100 param.ajouter("methode_flux_interface", (int*)&methode_flux_interface_);
101 param.dictionnaire("non_initialise", (int)METHODE_FLUX_INTERFACE::NON_INITIALISE);
102 param.dictionnaire("interp_pure", (int)METHODE_FLUX_INTERFACE::INTERP_PURE);
103 param.dictionnaire("interp_pure_no_jump", (int)METHODE_FLUX_INTERFACE::INTERP_PURE_NO_JUMP);
104 param.dictionnaire("interp_cut_cell", (int)METHODE_FLUX_INTERFACE::INTERP_CUT_CELL);
105 param.dictionnaire("interp_cut_cell_no_jump", (int)METHODE_FLUX_INTERFACE::INTERP_CUT_CELL_NO_JUMP);
106
107 param.ajouter("verbosite", &verbosite_);
108}
109
111{
112 Cout << que_suis_je() << "::initialize()" << finl;
113
114 // Cut-cell variables
115 ref_ijk_ft_cut_cell_ = ref_cast(Probleme_FTD_IJK_cut_cell, ref_ijk_ft_.valeur());
116
117 Cut_field_double& cut_field_temperature = static_cast<Cut_field_double&>(*temperature_);
118 cut_field_temperature.allocate_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, ghost_cells_); // Overrides the allocate in IJK_Thermal_base::initialize
119
121 {
122 allocate_velocity_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), current_fluxes_conv_, splitting, 2);
123 allocate_velocity_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), RK3_F_fluxes_conv_, splitting, 2);
124 }
125
127 {
128 allocate_velocity_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), current_fluxes_diff_, splitting, 2);
129 allocate_velocity_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), RK3_F_fluxes_diff_, splitting, 2);
130 }
131
132 cellule_rk_restreint_conv_.allocate_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, ghost_cells_);
133 cellule_rk_restreint_diff_.allocate_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, ghost_cells_);
134
136 {
137 temperature_post_dying_.allocate_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, 2);
138 temperature_post_regular_.allocate_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, 2);
139 temperature_post_convection_.allocate_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, 2);
140 temperature_post_diff_regular_.allocate_persistant(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, 2);
141 }
142
143 cut_cell_flux_diffusion_[0].associer_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
144 cut_cell_flux_diffusion_[1].associer_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
145 cut_cell_flux_diffusion_[2].associer_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
146 cut_cell_flux_convection_[0].associer_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
147 cut_cell_flux_convection_[1].associer_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
148 cut_cell_flux_convection_[2].associer_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
149
150
152 lambda_.allocate(splitting, Domaine_IJK::ELEM, 1);
153
154 temperature_ft_.allocate(ref_ijk_ft_cut_cell_->get_domaine_ft(), Domaine_IJK::ELEM, 4);
155
156 for (int next_time = 0; next_time < 2; next_time++)
157 {
158 flux_interface_ft_scalar_old_.allocate(ref_ijk_ft_cut_cell_->get_domaine_ft(), Domaine_IJK::ELEM, 2);
159 flux_interface_ns_scalar_old_.allocate(ref_ijk_ft_cut_cell_->get_domaine(), Domaine_IJK::ELEM, 2);
160 flux_interface_ft_scalar_next_.allocate(ref_ijk_ft_cut_cell_->get_domaine_ft(), Domaine_IJK::ELEM, 2);
161 flux_interface_ns_scalar_next_.allocate(ref_ijk_ft_cut_cell_->get_domaine(), Domaine_IJK::ELEM, 2);
166 }
167 flux_interface_efficace_scalar_.associer_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
168
169 convective_correction_.initialise(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
170 diffusive_correction_.initialise(*ref_ijk_ft_cut_cell_->get_cut_cell_disc());
172
173 Cut_field_double& cut_field_div_coeff_grad_T_volume = static_cast<Cut_field_double&>(*div_coeff_grad_T_volume_);
174 cut_field_div_coeff_grad_T_volume.allocate_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, 2);
175
176 Cut_field_double& cut_field_d_temperature = static_cast<Cut_field_double&>(*d_temperature_);
177 cut_field_d_temperature.allocate_ephemere(*ref_ijk_ft_cut_cell_->get_cut_cell_disc(), splitting, Domaine_IJK::ELEM, 2); // Overrides the allocate in IJK_Thermal_base::initialize
178
179
181 {
182 temperature_diffusion_op_.typer("OpDiffIJKScalar_cut_cell_double");
183 temperature_diffusion_op_.initialize(splitting);
184 temperature_diffusion_op_->set_uniform_lambda_liquid(lambda_liquid_);
185 temperature_diffusion_op_->set_uniform_lambda_vapour(lambda_vapour_);
187 }
188
190 {
191 temperature_convection_op_.typer("OpConvQuickIJKScalar_cut_cell_double");
192 temperature_convection_op_.initialize(splitting);
193 }
194
195 if (fichier_reprise_temperature_ == "??") // si on ne fait pas une reprise on initialise V
196 {
197 if (expression_T_init_ != "??")
198 {
200 }
201 else
202 {
203 Cerr << "Please provide initial conditions for temperature, either by an expression or a field for restart. "
204 << "You should consider using either fichier_reprise_temperature or expression_T_init keywords. " << finl;
206 }
207 }
208
209 // Already allocated if rho_cp_post
210 if (!rho_cp_post_)
211 rho_cp_.allocate(splitting, Domaine_IJK::ELEM, 2);
212
213 // Compute initial energy :
215 {
216 Cerr << "conserv_energy_global_ is used." << finl;
218 }
220 {
221 rho_cp_T_.allocate(splitting, Domaine_IJK::ELEM, 2);
222 div_rho_cp_T_.allocate(splitting, Domaine_IJK::ELEM, 0);
223 }
224 Cout << "End of " << que_suis_je() << "::initialize()" << finl;
225}
226
228{
229 //IJK_Thermal_base::update_thermal_properties();
230 const IJK_Field_double& indic = ref_ijk_ft_cut_cell_->get_interface().I();
231 // Nombre de mailles du domaine NS :
232 const int nx = indic.ni();
233 const int ny = indic.nj();
234 const int nz = indic.nk();
235 const double rho_l = ref_ijk_ft_cut_cell_->milieu_ijk().get_rho_liquid();
236 const double rho_v = ref_ijk_ft_cut_cell_->milieu_ijk().get_rho_vapour();
237 for (int k=0; k < nz ; k++)
238 for (int j=0; j< ny; j++)
239 for (int i=0; i < nx; i++)
240 {
241 double chi_l = indic(i,j,k);
242 rho_cp_(i,j,k) = rho_l * cp_liquid_ * chi_l + rho_v * cp_vapour_ * (1.- chi_l);
243 lambda_(i,j,k) = lambda_liquid_ * chi_l + (1.- chi_l) * lambda_vapour_ ;
244 }
245
246 lambda_.echange_espace_virtuel(lambda_.ghost());
247 rho_cp_.echange_espace_virtuel(rho_cp_.ghost());
248}
249
251{
252 Cut_field_double& cut_field_temperature = static_cast<Cut_field_double&>(*temperature_);
253
254 if (cut_field_temperature.get_cut_cell_disc().get_n_tot() == 0)
255 {
257 }
258 else
259 {
260 Cout << "Temperature initialization from expression \nTini = " << expression_T_init_ << finl;
261 cut_field_temperature.set_field_data(expression_T_init_, ref_ijk_ft_->get_interface().I(), 0.);
262 }
263}
264
266{
267 Cut_field_double& cut_field_temperature = static_cast<Cut_field_double&>(*temperature_);
268
269 if (cut_field_temperature.get_cut_cell_disc().get_n_tot() == 0)
270 {
272 }
273 else
274 {
275 Cout << "Temperature initialization from expression \nTini = " << expression_T_init_ << finl;
276 cut_field_temperature.set_field_data(expression_T_init_, ref_ijk_ft_->get_interface().In(), 0.);
277 }
278}
279
280void IJK_Thermal_cut_cell::perform_thermal_step(double total_timestep, int flag_rk, int rk_step)
281{
283 ref_cast(OpDiffIJKScalar_cut_cell_double, temperature_diffusion_op_.valeur()).initialise_cut_cell(false, cut_cell_flux_diffusion_, ref_ijk_ft_cut_cell_->treatment_count(), ref_ijk_ft_cut_cell_->new_treatment());
285 ref_cast(OpConvQuickIJKScalar_cut_cell_double, temperature_convection_op_.valeur()).initialise_cut_cell(cut_cell_conv_scheme_, false, cut_cell_flux_convection_, ref_ijk_ft_cut_cell_->treatment_count(), ref_ijk_ft_cut_cell_->new_treatment());
286
287 double fractional_timestep = (flag_rk) ? compute_fractionnal_timestep_rk3(total_timestep, rk_step) : total_timestep;
288
289 if (debug_)
290 Cerr << "Thermal Euler time-step" << finl;
291
292 Cut_field_double& cut_field_temperature = static_cast<Cut_field_double&>(*temperature_);
293 Cut_field_double& cut_field_d_temperature = static_cast<Cut_field_double&>(*d_temperature_);
294
295 CutCell_GlobalInfo ene_ini;
296 CutCell_GlobalInfo d_ene_Conv;
297 CutCell_GlobalInfo ene_postconv_switch;
298 CutCell_GlobalInfo ene_postconv_dying;
299 CutCell_GlobalInfo ene_postconv_small_nascent;
300 CutCell_GlobalInfo d_ene_Diffu;
301 CutCell_GlobalInfo ene_postdiff_regular;
302 CutCell_GlobalInfo ene_postdiff_dying;
303 CutCell_GlobalInfo ene_postdiff_small;
304
305 const Cut_cell_FT_Disc& cut_cell_disc = cut_field_temperature.get_cut_cell_disc();
306
307
309 {
310 current_fluxes_conv_.set_to_uniform_value(0);
311 if (rk_step == 0)
312 {
313 RK3_F_fluxes_conv_.set_to_uniform_value(0);
314 }
315 current_fluxes_conv_.echange_espace_virtuel(1);
316 RK3_F_fluxes_conv_.echange_espace_virtuel(1);
317 }
318
320 {
321 current_fluxes_diff_.set_to_uniform_value(0);
322 if (rk_step == 0)
323 {
324 RK3_F_fluxes_diff_.set_to_uniform_value(0);
325 }
326 current_fluxes_diff_.echange_espace_virtuel(1);
327 RK3_F_fluxes_diff_.echange_espace_virtuel(1);
328 }
329
330
331
332
334
335 const Cut_field_vector3_double& cut_field_total_velocity = ref_ijk_ft_cut_cell_->get_cut_field_velocity();
336
337 const double current_time = ref_ijk_ft_cut_cell_->schema_temps_ijk().get_current_time();
338
339 // Toujours necessaire, ou presque
340 calculer_flux_interface_old(methode_flux_interface_, lambda_liquid_, lambda_vapour_, interfacial_temperature_, interfacial_phin_ai_, cut_field_temperature, ref_ijk_ft_cut_cell_->get_cut_cell_facettes_interpolation(), flux_interface_ft_scalar_old_);
341
342 // Calcul du flux interface sur le domaine NS :
343 ref_ijk_ft_cut_cell_->eq_ns().redistrib_from_ft_elem().redistribute(flux_interface_ft_scalar_old_, flux_interface_ns_scalar_old_);
344 flux_interface_ns_scalar_old_.echange_espace_virtuel(flux_interface_ns_scalar_old_.ghost());
345
347 {
348 convective_correction_.calcule_valeur_remplissage(fractional_timestep, lambda_liquid_, lambda_vapour_, flux_interface_ns_scalar_old_, interfacial_temperature_, temperature_ft_, cut_field_total_velocity, cut_field_temperature);
349 }
350
351
352 ene_ini = cut_field_temperature.compute_global_energy_cut_cell(0, get_rhocp_l(), get_rhocp_v());
353
354 if (verbosite_ >= 7)
355 print_Tmin_Tmax_cut_cell(cut_field_temperature, 0, current_time, "Temperature Min/Max au debut du pas de temps");
356
358 {
359 diffusive_correction_.compute_flux_dying_cells(cut_field_total_velocity, cut_field_temperature);
360 }
361
363 {
364 convective_correction_.compute_flux_dying_cells(cut_field_total_velocity, cut_field_temperature);
365 convective_correction_.compute_flux_small_nascent_cells(cut_field_total_velocity, cut_field_temperature);
366 }
367
369 {
370 set_rk_restreint(rk_step, runge_kutta_restriction_leniency_convection_, cut_cell_disc, cellule_rk_restreint_conv_);
372 }
373
374 compute_temperature_convection_cut_cell(cut_field_total_velocity, cut_field_d_temperature);
375 d_ene_Conv = cut_field_d_temperature.compute_d_global_energy_cut_cell(0);
376
377 euler_explicit_update_cut_cell_transport(fractional_timestep, cut_field_d_temperature, cut_field_temperature);
378 cut_field_temperature.echange_espace_virtuel(temperature_->ghost());
379
381 {
382 temperature_post_regular_.copy_from(cut_field_temperature);
383 }
384
385 ene_postconv_switch = cut_field_temperature.compute_global_energy_cut_cell(1, get_rhocp_l(), get_rhocp_v());
386
387 if (verbosite_ >= 7)
388 print_Tmin_Tmax_cut_cell(cut_field_temperature, 1, current_time, "Temperature Min/Max apres la convection principale");
389
391 {
393 {
394 current_fluxes_conv_.set_to_uniform_value(0);
395 }
396
397 convective_correction_.add_dying_cells(cut_field_total_velocity, cut_field_temperature, runge_kutta_fluxes_convection_, current_fluxes_conv_);
398 cut_field_temperature.echange_espace_virtuel(temperature_->ghost());
399 }
400
402 {
403 temperature_post_dying_.copy_from(cut_field_temperature);
404 }
405 ene_postconv_dying = cut_field_temperature.compute_global_energy_cut_cell(1, get_rhocp_l(), get_rhocp_v());
406
407 if (verbosite_ >= 7)
408 print_Tmin_Tmax_cut_cell(cut_field_temperature, 1, current_time, "Temperature Min/Max apres la convection des cellules mourrantes");
409
411 {
412 convective_correction_.add_small_nascent_cells(cut_field_total_velocity, cut_field_temperature, runge_kutta_fluxes_convection_, current_fluxes_conv_);
414 cut_field_temperature.remplir_tableau_pure_cellules_diphasiques(true /* next time */);
415 cut_field_temperature.echange_espace_virtuel(temperature_->ghost());
416 }
417
419 {
420 temperature_post_convection_.copy_from(cut_field_temperature);
421 }
422
423 if (!diff_temperature_negligible_ && (!diffusive_correction_.deactivate_correction_petites_cellules_diffusion_))
424 {
425 diffusive_correction_.calcule_valeur_remplissage(fractional_timestep, lambda_liquid_, lambda_vapour_, flux_interface_ns_scalar_old_, interfacial_temperature_, temperature_ft_, cut_field_total_velocity, cut_field_temperature);
426 }
427 ene_postconv_small_nascent = cut_field_temperature.compute_global_energy_cut_cell(1, get_rhocp_l(), get_rhocp_v());
428
429 if (verbosite_ >= 7)
430 print_Tmin_Tmax_cut_cell(cut_field_temperature, 1, current_time, "Temperature Min/Max apres la convection des cellules naissantes");
431
433 {
434 add_flux_times_vol_over_dt_surface(fractional_timestep, current_fluxes_conv_, RK3_F_fluxes_conv_);
435 }
436
437
438 if (!diff_temperature_negligible_ && (!diffusive_correction_.deactivate_correction_petites_cellules_diffusion_))
439 {
440 diffusive_correction_.compute_flux_small_nascent_cells(cut_field_total_velocity, cut_field_temperature);
441 }
442
444 {
445 calculer_flux_interface_next(methode_flux_interface_, lambda_liquid_, lambda_vapour_, interfacial_temperature_, interfacial_phin_ai_, cut_field_temperature, ref_ijk_ft_cut_cell_->get_cut_cell_facettes_interpolation(), flux_interface_ft_scalar_next_);
446
447 // Calcul du flux interface sur le domaine NS :
448 ref_ijk_ft_->eq_ns().redistrib_from_ft_elem().redistribute(flux_interface_ft_scalar_next_, flux_interface_ns_scalar_next_);
450
452 }
453 else
454 {
455 //Cerr << "Warning: The diffusion at the interface is not activated." << finl;
456 }
457
459 {
460 set_rk_restreint(rk_step, runge_kutta_restriction_leniency_diffusion_, cut_cell_disc, cellule_rk_restreint_diff_);
462 }
463
465 d_ene_Diffu = cut_field_d_temperature.compute_d_global_energy_cut_cell(1);
466
467 euler_explicit_update_cut_cell_notransport(fractional_timestep, true, cut_field_d_temperature, cut_field_temperature);
468
469 cut_field_temperature.echange_espace_virtuel(temperature_->ghost());
470
472 {
473 temperature_post_diff_regular_.copy_from(cut_field_temperature);
474 }
475 ene_postdiff_regular = cut_field_temperature.compute_global_energy_cut_cell(1, get_rhocp_l(), get_rhocp_v());
476
477 if (verbosite_ >= 7)
478 print_Tmin_Tmax_cut_cell(cut_field_temperature, 1, current_time, "Temperature Min/Max apres la diffusion principale");
479
481 {
483 {
484 current_fluxes_diff_.set_to_uniform_value(0);
485 }
486
487 diffusive_correction_.add_dying_cells(cut_field_total_velocity, cut_field_temperature, runge_kutta_fluxes_diffusion_, current_fluxes_diff_);
488 cut_field_temperature.echange_espace_virtuel(temperature_->ghost());
489 }
490
491 ene_postdiff_dying = cut_field_temperature.compute_global_energy_cut_cell(1, get_rhocp_l(), get_rhocp_v());
492
493 if (verbosite_ >= 7)
494 print_Tmin_Tmax_cut_cell(cut_field_temperature, 1, current_time, "Temperature Min/Max apres la diffusion des cellules mourrantes");
495
496 if (!diff_temperature_negligible_ && (!diffusive_correction_.deactivate_correction_petites_cellules_diffusion_))
497 {
498 diffusive_correction_.add_small_nascent_cells(cut_field_total_velocity, cut_field_temperature, runge_kutta_fluxes_diffusion_, current_fluxes_diff_);
500 cut_field_temperature.remplir_tableau_pure_cellules_diphasiques(true /* next time */);
501 cut_field_temperature.echange_espace_virtuel(temperature_->ghost());
502 }
503
504 ene_postdiff_small = cut_field_temperature.compute_global_energy_cut_cell(1, get_rhocp_l(), get_rhocp_v());
505
506 Cerr.precision(16);
507 if (verbosite_ >= 5)
508 {
509 Cerr << "dT_budget, overall time: " << current_time << " dT_conv: " << d_ene_Conv.overall << " dT_diff: " << d_ene_Diffu.overall << finl;
510 }
511 if (verbosite_ >= 6)
512 {
513 Cerr << "dT_budget, overall_l time: " << current_time << " dT_conv: " << d_ene_Conv.overall_l << " dT_diff: " << d_ene_Diffu.overall_l << finl;
514 Cerr << "dT_budget, overall_v time: " << current_time << " dT_conv: " << d_ene_Conv.overall_v << " dT_diff: " << d_ene_Diffu.overall_v << finl;
515 Cerr << "dT_budget, pure.......... time: " << current_time << " dT_conv: " << d_ene_Conv.pure << " dT_diff: " << d_ene_Diffu.pure << finl;
516 Cerr << "dT_budget, diph_l........ time: " << current_time << " dT_conv: " << d_ene_Conv.diph_l << " dT_diff: " << d_ene_Diffu.diph_l << finl;
517 Cerr << "dT_budget, diph_v........ time: " << current_time << " dT_conv: " << d_ene_Conv.diph_v << " dT_diff: " << d_ene_Diffu.diph_v << finl;
518 Cerr << "dT_budget, diph_small.... time: " << current_time << " dT_conv: " << d_ene_Conv.diph_small << " dT_diff: " << d_ene_Diffu.diph_small << finl;
519 Cerr << "dT_budget, diph_regular.. time: " << current_time << " dT_conv: " << d_ene_Conv.diph_regular << " dT_diff: " << d_ene_Diffu.diph_regular << finl;
520 Cerr << "dT_budget, diph_nascent.. time: " << current_time << " dT_conv: " << d_ene_Conv.diph_nascent << " dT_diff: " << d_ene_Diffu.diph_nascent << finl;
521 Cerr << "dT_budget, diph_dying.... time: " << current_time << " dT_conv: " << d_ene_Conv.diph_dying << " dT_diff: " << d_ene_Diffu.diph_dying << finl;
522 }
523
524 if (verbosite_ >= 1)
525 {
526 Cerr << "T_Budget, overall time: " << current_time << " initial: " << ene_ini.overall << " post_conv_dying: " << ene_postconv_dying.overall << " post_conv_switch: " << ene_postconv_switch.overall << " post_conv_small_nascent: " << ene_postconv_small_nascent.overall << " post_diff_regular: " << ene_postdiff_regular.overall << " post_diff_dying: " << ene_postdiff_dying.overall << " post_diff_small: " << ene_postdiff_small.overall << finl;
527 }
528 if (verbosite_ >= 3)
529 {
530 Cerr << "T_Budget, overall_l time: " << current_time << " initial: " << ene_ini.overall_l << " post_conv_switch: " << ene_postconv_switch.overall_l << " post_conv_dying: " << ene_postconv_dying.overall_l << " post_conv_small_nascent: " << ene_postconv_small_nascent.overall_l << " post_diff_regular: " << ene_postdiff_regular.overall_l << " post_diff_dying: " << ene_postdiff_dying.overall_l << " post_diff_small: " << ene_postdiff_small.overall_l << finl;
531 Cerr << "T_Budget, overall_v time: " << current_time << " initial: " << ene_ini.overall_v << " post_conv_switch: " << ene_postconv_switch.overall_v << " post_conv_dying: " << ene_postconv_dying.overall_v << " post_conv_small_nascent: " << ene_postconv_small_nascent.overall_v << " post_diff_regular: " << ene_postdiff_regular.overall_v << " post_diff_dying: " << ene_postdiff_dying.overall_v << " post_diff_small: " << ene_postdiff_small.overall_v << finl;
532 Cerr << "T_Budget, pure.......... time: " << current_time << " initial: " << ene_ini.pure << " post_conv_switch: " << ene_postconv_switch.pure << " post_conv_dying: " << ene_postconv_dying.pure << " post_conv_small_nascent: " << ene_postconv_small_nascent.pure << " post_diff_regular: " << ene_postdiff_regular.pure << " post_diff_dying: " << ene_postdiff_dying.pure << " post_diff_small: " << ene_postdiff_small.pure << finl;
533 Cerr << "T_Budget, diph_l........ time: " << current_time << " initial: " << ene_ini.diph_l << " post_conv_switch: " << ene_postconv_switch.diph_l << " post_conv_dying: " << ene_postconv_dying.diph_l << " post_conv_small_nascent: " << ene_postconv_small_nascent.diph_l << " post_diff_regular: " << ene_postdiff_regular.diph_l << " post_diff_dying: " << ene_postdiff_dying.diph_l << " post_diff_small: " << ene_postdiff_small.diph_l << finl;
534 Cerr << "T_Budget, diph_v........ time: " << current_time << " initial: " << ene_ini.diph_v << " post_conv_switch: " << ene_postconv_switch.diph_v << " post_conv_dying: " << ene_postconv_dying.diph_v << " post_conv_small_nascent: " << ene_postconv_small_nascent.diph_v << " post_diff_regular: " << ene_postdiff_regular.diph_v << " post_diff_dying: " << ene_postdiff_dying.diph_v << " post_diff_small: " << ene_postdiff_small.diph_v << finl;
535 Cerr << "T_Budget, diph_small.... time: " << current_time << " initial: " << ene_ini.diph_small << " post_conv_switch: " << ene_postconv_switch.diph_small << " post_conv_dying: " << ene_postconv_dying.diph_small << " post_conv_small_nascent: " << ene_postconv_small_nascent.diph_small << " post_diff_regular: " << ene_postdiff_regular.diph_small << " post_diff_dying: " << ene_postdiff_dying.diph_small << " post_diff_small: " << ene_postdiff_small.diph_small << finl;
536 Cerr << "T_Budget, diph_regular.. time: " << current_time << " initial: " << ene_ini.diph_regular << " post_conv_switch: " << ene_postconv_switch.diph_regular << " post_conv_dying: " << ene_postconv_dying.diph_regular << " post_conv_small_nascent: " << ene_postconv_small_nascent.diph_regular << " post_diff_regular: " << ene_postdiff_regular.diph_regular << " post_diff_dying: " << ene_postdiff_dying.diph_regular << " post_diff_small: " << ene_postdiff_small.diph_regular << finl;
537 Cerr << "T_Budget, diph_nascent.. time: " << current_time << " initial: " << ene_ini.diph_nascent << " post_conv_switch: " << ene_postconv_switch.diph_nascent << " post_conv_dying: " << ene_postconv_dying.diph_nascent << " post_conv_small_nascent: " << ene_postconv_small_nascent.diph_nascent << " post_diff_regular: " << ene_postdiff_regular.diph_nascent << " post_diff_dying: " << ene_postdiff_dying.diph_nascent << " post_diff_small: " << ene_postdiff_small.diph_nascent << finl;
538 Cerr << "T_Budget, diph_dying.... time: " << current_time << " initial: " << ene_ini.diph_dying << " post_conv_switch: " << ene_postconv_switch.diph_dying << " post_conv_dying: " << ene_postconv_dying.diph_dying << " post_conv_small_nascent: " << ene_postconv_small_nascent.diph_dying << " post_diff_regular: " << ene_postdiff_regular.diph_dying << " post_diff_dying: " << ene_postdiff_dying.diph_dying << " post_diff_small: " << ene_postdiff_small.diph_dying << finl;
539 }
540
541 print_Tmin_Tmax_cut_cell(cut_field_temperature, 1, current_time, "");
542
544 {
545 add_flux_times_vol_over_dt_surface(fractional_timestep, current_fluxes_diff_, RK3_F_fluxes_diff_);
546 }
547
548
549
550}
551
552void IJK_Thermal_cut_cell::euler_time_step(const double timestep)
553{
554 perform_thermal_step(timestep, 0, 0);
555}
556
557void IJK_Thermal_cut_cell::rk3_sub_step(const int rk_step, const double total_timestep,
558 const double time)
559{
560 Cut_field_double& cut_field_temperature = static_cast<Cut_field_double&>(*temperature_);
561
562 if (debug_)
563 Cerr << "Thermal Runge-Kutta3 time-step" << finl;
564
565 perform_thermal_step(total_timestep, 1, rk_step);
566
567 if (verbosite_ >= 7)
568 print_Tmin_Tmax_cut_cell(cut_field_temperature, 1, time, "Temperature Min/Max apres etape Runge-Kutta (= etat final)");
569}
570
571void IJK_Thermal_cut_cell::sauvegarder_temperature(Nom& lata_name, int idx, const int& stop)
572{
575 dumplata_scalar_cut_cell(true, lata_name, Nom("TEMPERATURE_") + Nom(idx) , temperature_, 0 /*we store a 0 */);
576 if (stop)
577 latastep_reprise_ = latastep_reprise_ini_ + ref_ijk_ft_->schema_temps_ijk().get_tstep() + 1;
578}
579
580
581void cut_cell_reinit_streamObj(std::ostringstream& streamObj, const double& param)
582{
583 streamObj.str("");
584 streamObj.clear();
585 streamObj << (double) param;
586}
587
588void IJK_Thermal_cut_cell::compute_temperature_convection_cut_cell(const Cut_field_vector3_double& cut_field_total_velocity, Cut_field_double& cut_field_d_temperature)
589{
590 const Cut_field_double& cut_field_temperature = static_cast<const Cut_field_double&>(*temperature_);
591
592 //static Stat_Counter_Id cnt_conv_temp = //statistiques().new_counter(1, "FT convection rho");
593 //statistiques().begin_count(cnt_conv_temp);
595 {
596 cut_field_d_temperature.set_to_uniform_value(0);
597 u_T_convective_volume_.data() = 0;
598 }
599 else
600 {
601 temperature_convection_op_->calculer(cut_field_temperature,
602 cut_field_total_velocity[0],
603 cut_field_total_velocity[1],
604 cut_field_total_velocity[2],
605 cut_field_d_temperature);
606 cut_field_d_temperature.divide_by_scalar(vol_, vol_);
607 }
608 //statistiques().end_count(cnt_conv_temp);
609 DebogIJK::verifier("op_conv(rho)", cut_field_d_temperature);
610 return;
611}
612
613
615{
616 const Cut_field_double& cut_field_temperature = static_cast<const Cut_field_double&>(*temperature_);
617 Cut_field_double& cut_field_div_coeff_grad_T_volume = static_cast<Cut_field_double&>(*div_coeff_grad_T_volume_);
618 Cut_field_double& cut_field_d_temperature = static_cast<Cut_field_double&>(*d_temperature_);
619
620
621 lambda_.echange_espace_virtuel(lambda_.ghost());
622 DebogIJK::verifier("lambda", lambda_);
623
625
627 {
628 const double T_paroi_impose_kmin = boundary_conditions_.get_temperature_kmin();
629 double lambda_de_t_paroi_kmin = lambda_liquid_;
630 // calculer ici div(lambda*grad(T))*volume)
631 calculer_flux_thermique_bord(*temperature_, lambda_de_t_paroi_kmin,
632 T_paroi_impose_kmin, boundary_flux_kmin_, 0 /* boundary kmin */);
633 }
635 {
636 const double flux_paroi_impose_kmin = boundary_conditions_.get_flux_kmin();
638 flux_paroi_impose_kmin, boundary_flux_kmin_, 0 /* boundary kmin */);
639 }
640 else
641 {
642 // Perio... not needed. The flux on the "boundary" (in that case , it's not truely a boundary) will be computed as inside...
643 }
645 {
646 const double T_paroi_impose_kmax = boundary_conditions_.get_temperature_kmax();
647 double lambda_de_t_paroi_kmax = lambda_liquid_;
648 //TODO: calculer ici div(lambda*grad(T))*volume)
649 calculer_flux_thermique_bord(*temperature_, lambda_de_t_paroi_kmax,
650 T_paroi_impose_kmax, boundary_flux_kmax_, 1 /* boundary kmax */);
651 }
653 {
654 const double flux_paroi_impose_kmax = boundary_conditions_.get_flux_kmax();
656 flux_paroi_impose_kmax, boundary_flux_kmax_, 1 /* boundary kmax */);
657 // Cerr << "not coded yet" << finl;
658 // Process::exit();
659 }
660 else
661 {
662 // Perio... not needed. The flux on the "boundary" (in that case , it's not truely a boundary) will be computed as inside...
663 }
664 temperature_->echange_espace_virtuel(temperature_->ghost());
666
668 {
669 cut_field_d_temperature.set_to_uniform_value(0);
670 }
671 else
672 {
673 // Performance counters:
674 //static Stat_Counter_Id cnt_diff_temp = //statistiques().new_counter(1, "FT diffusion temperature");
675 //statistiques().begin_count(cnt_diff_temp);
676 /*
677 * Correct the diffusive fluxes here or in the operator ?
678 */
679 temperature_diffusion_op_->calculer(cut_field_temperature,
680 cut_field_d_temperature, // On utilise directement cut_field_d_temperature, sans passer par div_coeff_grad_T_volume_
683
684 ajout_flux_interface_a_divergence(flux_interface_efficace_scalar_, cut_field_d_temperature);
685
686 // On copie cut_field_d_temperature dans cut_field_div_coeff_grad_T_volume.
687 // Cela ne sert a rien a part conserver le comportement historique de ces champs.
688 cut_field_div_coeff_grad_T_volume.copy_from(cut_field_d_temperature);
689
690 const double rho_l = ref_ijk_ft_cut_cell_->milieu_ijk().get_rho_liquid();
691 const double rho_v = ref_ijk_ft_cut_cell_->milieu_ijk().get_rho_vapour();
692 cut_field_d_temperature.divide_by_scalar(rho_l*cp_liquid_*vol_, rho_v*cp_vapour_*vol_);
693
694 //statistiques().end_count(cnt_diff_temp);
695 DebogIJK::verifier("div_coeff_grad_T_volume_", *div_coeff_grad_T_volume_);
696 }
697}
698
699void IJK_Thermal_cut_cell::print_Tmin_Tmax_cut_cell(const Cut_field_double& cut_field_temperature, bool next, double current_time, const std::string& heading)
700{
701 CutCell_GlobalInfo Tmin = cut_field_temperature.compute_min_cut_cell(next);
702 CutCell_GlobalInfo Tmax = cut_field_temperature.compute_max_cut_cell(next);
703 if (verbosite_ >= 7)
704 {
705 Cerr << heading << finl;
706 }
707 if (verbosite_ >= 2)
708 {
709 Cerr << "T_MinMax, overall time: " << current_time << " Tmin: " << Tmin.overall << " Tmax: " << Tmax.overall << finl;
710 }
711 if (verbosite_ >= 4)
712 {
713 Cerr << "T_MinMax, overall_l time: " << current_time << " Tmin: " << Tmin.overall_l << " Tmax: " << Tmax.overall_l << finl;
714 Cerr << "T_MinMax, overall_v time: " << current_time << " Tmin: " << Tmin.overall_v << " Tmax: " << Tmax.overall_v << finl;
715 Cerr << "T_MinMax, pure.......... time: " << current_time << " Tmin: " << Tmin.pure << " Tmax: " << Tmax.pure << finl;
716 Cerr << "T_MinMax, diph_l........ time: " << current_time << " Tmin: " << Tmin.diph_l << " Tmax: " << Tmax.diph_l << finl;
717 Cerr << "T_MinMax, diph_v........ time: " << current_time << " Tmin: " << Tmin.diph_v << " Tmax: " << Tmax.diph_v << finl;
718 Cerr << "T_MinMax, diph_small.... time: " << current_time << " Tmin: " << Tmin.diph_small << " Tmax: " << Tmax.diph_small << finl;
719 Cerr << "T_MinMax, diph_regular.. time: " << current_time << " Tmin: " << Tmin.diph_regular << " Tmax: " << Tmax.diph_regular << finl;
720 Cerr << "T_MinMax, diph_nascent.. time: " << current_time << " Tmin: " << Tmin.diph_nascent << " Tmax: " << Tmax.diph_nascent << finl;
721 Cerr << "T_MinMax, diph_dying.... time: " << current_time << " Tmin: " << Tmin.diph_dying << " Tmax: " << Tmax.diph_dying << finl;
722 }
723 if (verbosite_ >= 10)
724 {
725 Cerr << "Location T_MinMax, overall_l time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.overall_l) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.overall_l) << finl;
726 Cerr << "Location T_MinMax, overall_v time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.overall_v) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.overall_v) << finl;
727 Cerr << "Location T_MinMax, pure.......... time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.pure) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.pure) << finl;
728 Cerr << "Location T_MinMax, diph_l........ time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.diph_l) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.diph_l) << finl;
729 Cerr << "Location T_MinMax, diph_v........ time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.diph_v) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.diph_v) << finl;
730 Cerr << "Location T_MinMax, diph_small.... time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.diph_small) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.diph_small) << finl;
731 Cerr << "Location T_MinMax, diph_regular.. time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.diph_regular) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.diph_regular) << finl;
732 Cerr << "Location T_MinMax, diph_nascent.. time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.diph_nascent) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.diph_nascent) << finl;
733 Cerr << "Location T_MinMax, diph_dying.... time: " << current_time << " Tmin: " << cut_field_temperature.get_value_location(Tmin.diph_dying) << " Tmax: " << cut_field_temperature.get_value_location(Tmax.diph_dying) << finl;
734 }
735}
736
738{
740 Cout << "Reading initial temperature field T" << rank_ << " from file " << fichier_reprise_temperature_ << " timestep= " << timestep_reprise_temperature_ << finl;
741 const Nom& geom_name = geom.le_nom();
742 lire_dans_lata_cut_cell(true, fichier_reprise_temperature_, timestep_reprise_temperature_, geom_name, Nom("TEMPERATURE_") + Nom(rank_reprise_temperature_),
743 temperature_); // fonction qui lit un champ a partir d'un lata .
744 temperature_->echange_espace_virtuel(temperature_->ghost()); // It is essential to fill the EV because the first call to convection needs them.
745}
746
747void IJK_Thermal_cut_cell::compute_interfacial_temperature2(ArrOfDouble& interfacial_temperature,
748 ArrOfDouble& flux_normal_interp)
749{
750 const int nb_facettes = ref_ijk_ft_->get_interface().maillage_ft_ijk().nb_facettes();
751 interfacial_temperature.resize_array(nb_facettes);
752 flux_normal_interp.resize_array(nb_facettes);
753
754 // Peut-etre que des facettes virtuelles ont ete ajoutees, mais je pense que le nombre de facettes reeles n'a pas change.
755 // Mise-a-jour des tableaux pour cette eventualite :
756 interfacial_temperature_.resize(nb_facettes);
757 interfacial_phin_ai_.resize(nb_facettes);
758 ref_ijk_ft_->get_interface().maillage_ft_ijk().desc_facettes().echange_espace_virtuel(interfacial_temperature_);
759 ref_ijk_ft_->get_interface().maillage_ft_ijk().desc_facettes().echange_espace_virtuel(interfacial_phin_ai_);
760
761 int dimension_temp = interfacial_temperature_.dimension(0);
762 assert(interfacial_phin_ai_.dimension(0) == dimension_temp);
763 if ((dimension_temp == 0) || (deactivate_diffusion_interface_))
764 {
765 // Fields not already computed; write zero
766 for (int fa7 = 0; fa7 < nb_facettes; fa7++)
767 {
768 interfacial_temperature(fa7) = 0.;
769 flux_normal_interp(fa7) = 0.;
770 }
771 }
772 else if (dimension_temp == nb_facettes)
773 {
774 for (int fa7 = 0; fa7 < nb_facettes; fa7++)
775 {
776 interfacial_temperature(fa7) = interfacial_temperature_(fa7);
777 flux_normal_interp(fa7) = interfacial_phin_ai_(fa7);
778 }
779 }
780 else
781 {
782 Cerr << "IJK_Thermal_cut_cell::compute_interfacial_temperature2: Unexpected discrepancy in the number of facets." << finl;
784 }
785}
786
CutCell_GlobalInfo compute_d_global_energy_cut_cell(bool next) const
void echange_espace_virtuel(int ghost)
Definition Cut_field.cpp:29
void divide_by_scalar(_TYPE_ scalar_l, _TYPE_ scalar_v)
CutCell_GlobalInfo compute_min_cut_cell(bool next) const
const Cut_cell_FT_Disc & get_cut_cell_disc() const
Definition Cut_field.h:78
void allocate_ephemere(Cut_cell_FT_Disc &cut_cell_disc, const Domaine_IJK &splitting, Domaine_IJK::Localisation loc, int ghost_size, int additional_k_layers=0, int nb_compo=1, bool external_storage=false, int monofluide=0, double rov=0., double rol=0., int use_inv_rho_in_pressure_solver=0)
Definition Cut_field.h:86
void remplir_tableau_pure_cellules_diphasiques(bool next_time)
void allocate_persistant(Cut_cell_FT_Disc &cut_cell_disc, const Domaine_IJK &splitting, Domaine_IJK::Localisation loc, int ghost_size, int additional_k_layers=0, int nb_compo=1, bool external_storage=false, int monofluide=0, double rov=0., double rol=0., int use_inv_rho_in_pressure_solver=0)
Definition Cut_field.h:80
void set_to_uniform_value(_TYPE_ valeur)
CutCell_GlobalInfo compute_max_cut_cell(bool next) const
void copy_from(const Cut_field_template< _TYPE_, _TYPE_ARRAY_ > &data)
void set_field_data(const Nom &parser_expression_of_x_y_z_and_t, const IJK_Field_template< _TYPE_, _TYPE_ARRAY_ > &input_f, const double current_time)
void echange_diph_vers_pure_cellules_finalement_pures()
CutCell_GlobalInfo compute_global_energy_cut_cell(bool next, double constant_l, double constant_v) const
Nom get_value_location(_TYPE_ T) const
static void verifier(const char *msg, const IJK_Field_float &)
Definition DebogIJK.cpp:117
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
IJK_Field_double rho_cp_
std::shared_ptr< IJK_Field_double > div_coeff_grad_T_volume_
Operateur_IJK_elem_conv temperature_convection_op_
IJK_Field_double temperature_ft_
IJK_Field_double u_T_convective_volume_
virtual void compute_temperature_init()
Operateur_IJK_elem_diff temperature_diffusion_op_
IJK_Field_double rho_cp_T_
virtual void initialize(const Domaine_IJK &splitting)
IJK_Field_local_double boundary_flux_kmax_
IJK_Field_local_double boundary_flux_kmin_
virtual void set_param(Param &param) const override
double get_rhocp_v() const
Boundary_Conditions_Thermique boundary_conditions_
virtual void recompute_temperature_init()
double get_rhocp_l() const
int imposer_flux_thermique_bord(const IJK_Field_double &temperature, const double flux_paroi_impose, IJK_Field_local_double &flux_bord, const bool bord_kmax)
std::shared_ptr< IJK_Field_double > d_temperature_
int calculer_flux_thermique_bord(const IJK_Field_double &temperature, const double lambda_de_t_paroi, const double T_paroi_impose, IJK_Field_local_double &flux_bord, const bool bord_kmax)
std::shared_ptr< IJK_Field_double > temperature_
FixedVector< Cut_cell_double, 3 > cut_cell_flux_convection_
void compute_interfacial_temperature2(ArrOfDouble &interfacial_temperature, ArrOfDouble &flux_normal_interp) override
void compute_temperature_init() override
Cut_field_vector3_double current_fluxes_diff_
IJK_Field_double flux_interface_ft_scalar_old_
void recompute_temperature_init() override
void sauvegarder_temperature(Nom &lata_name, int idx, const int &stop=0) override
Cut_field_double temperature_post_convection_
FixedVector< Cut_cell_double, 3 > cut_cell_flux_diffusion_
bool runge_kutta_fluxes_pas_de_correction_convection_
void euler_time_step(const double timestep) override
IJK_Field_double flux_interface_ns_scalar_next_
void set_param(Param &param) const override
Cut_cell_diffusion_auxiliaire diffusive_correction_
Cut_field_int cellule_rk_restreint_conv_
DoubleTabFT_cut_cell_scalar flux_interface_efficace_scalar_
Cut_field_vector3_double RK3_F_fluxes_diff_
void print_Tmin_Tmax_cut_cell(const Cut_field_double &cut_field_temperature, bool next, double current_time, const std::string &heading)
void lire_temperature(const Domaine_IJK &splitting) override
Cut_field_double temperature_post_dying_
Cut_field_double temperature_post_regular_
Cut_field_int cellule_rk_restreint_diff_
void perform_thermal_step(double total_timestep, int flag_rk, int rk_step)
void add_temperature_diffusion() override
void update_thermal_properties() override
METHODE_FLUX_INTERFACE methode_flux_interface_
void initialize(const Domaine_IJK &splitting) override
Cut_cell_conv_scheme cut_cell_conv_scheme_
void compute_temperature_convection_cut_cell(const Cut_field_vector3_double &cut_field_total_velocity, Cut_field_double &cut_field_d_temperature)
Cut_field_double temperature_post_diff_regular_
void rk3_sub_step(const int rk_step, const double total_timestep, const double time) override
Cut_field_vector3_double RK3_F_fluxes_conv_
IJK_Field_double flux_interface_ns_scalar_old_
IJK_Field_double div_rho_cp_T_
IJK_Field_double flux_interface_ft_scalar_next_
Cut_cell_convection_auxiliaire convective_correction_
Cut_field_vector3_double current_fluxes_conv_
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_flag(const char *keyword, const bool *value)
Register a boolean flag whose mere presence switches it to true.
Definition Param.cpp:474
void dictionnaire(const char *option_name, int value)
Add an (option name, integer value) entry to the dictionary attached to a previously registered integ...
Definition Param.cpp:293
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
Definition Param.cpp:364
@ REQUIRED
Definition Param.h:115
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52
void resize_array(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)