TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_Thermal_base.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 <Schema_Euler_explicite_IJK.h>
17#include <IJK_Ghost_Fluid_tools.h>
18#include <Corrige_flux_FT_base.h>
19#include <IJK_Thermal_base.h>
20#include <IJK_Field_vector.h>
21#include <Probleme_FTD_IJK.h>
22#include <IJK_Bubble_tools.h>
23#include <Cut_cell_tools.h>
24#include <Schema_RK3_IJK.h>
25#include <IJK_switch_FT.h>
26#include <Postprocessing_IJK.h>
27#include <Option_IJK.h>
28#include <DebogIJK.h>
29#include <Param.h>
30
31Implemente_base_sans_constructeur( IJK_Thermal_base, "IJK_Thermal_base", Objet_U ) ;
32
33/********************************************
34 * Methods inherited from Objet_U
35 ********************************************/
36
37IJK_Thermal_base::IJK_Thermal_base()
38{
39 temperature_ = std::make_shared<IJK_Field_double>();
40 RK3_F_temperature_ = std::make_shared<IJK_Field_double>();
41 div_coeff_grad_T_volume_ = std::make_shared<IJK_Field_double>();
42 d_temperature_ = std::make_shared<IJK_Field_double>();
43
44 thermal_words_ = Motcles(5);
45 {
46 thermal_words_[0] = "subresolution";
47 thermal_words_[1] = "multiplesubresolutions";
48 thermal_words_[2] = "onefluid";
49 thermal_words_[3] = "onefluidenergy";
50 thermal_words_[4] = "cut_cell";
51 }
52 lata_suffix_ = Motcles(5);
53 {
54 lata_suffix_[0] = "SUBRES_";
55 lata_suffix_[1] = "MSUBRES_";
56 lata_suffix_[2] = "OF_";
57 lata_suffix_[3] = "OFE_";
58 lata_suffix_[4] = "CUT_CELL_";
59 }
60}
61
63{
64 Cerr << "Read and Cast OWN_PTR(IJK_Thermal_base) => type : ";
65 Nom prefix = "IJK_Thermal_";
66
67 Motcles thermal_words = Motcles(5);
68 {
69 thermal_words[0] = "subresolution";
70 thermal_words[1] = "multiplesubresolutions";
71 thermal_words[2] = "onefluid";
72 thermal_words[3] = "onefluidenergy";
73 thermal_words[4] = "cut_cell";
74 }
75 Motcles lata_suffix = Motcles(5);
76 {
77 lata_suffix[0] = "SUBRES_";
78 lata_suffix[1] = "MSUBRES_";
79 lata_suffix[2] = "OF_";
80 lata_suffix[3] = "OFE_";
81 lata_suffix[4] = "CUT_CELL_";
82 }
83
84 Motcle word;
85 is >> word;
86 if (word.debute_par(prefix))
87 word = Motcle((word.getString()).substr(prefix.getString().length()));
88
89 Nom type = "";
90 const int thermal_rank = thermal_words.search(word);
91 type += prefix;
92
93 switch(thermal_rank)
94 {
95 case 0:
96 {
97 type += "Subresolution";
98 break;
99 }
100 case 1:
101 {
102 type += "Multiple_Subresolutions";
103 break;
104 }
105 case 2:
106 {
107 type += "Onefluid";
108 break;
109 }
110 case 3:
111 {
112 type += "Onefluid_Energy";
113 break;
114 }
115 case 4:
116 {
117 type += "Cut_cell";
118 break;
119 }
120 default:
121 {
122 Cerr << "ERROR : Thermal problems that are already implemented are:" << finl;
123 Cerr << thermal_words << finl;
124 abort();
125 }
126 }
127 eq.typer(type);
128 Cerr << type << " ... " << finl;
129 eq->get_thermal_rank() = thermal_rank;
130 eq->get_thermal_problem_type() = thermal_words[thermal_rank];
131 is >> eq.valeur(); // Call the readOn
132}
133
134// X_D thermique listobj thermique -1 thermique_bloc 1 to add energy equation resolution if needed
135// X_D thermique_bloc interprete nul 1 not_set
137{
138 /*
139 * Parse the datafile
140 */
141 Param param(que_suis_je());
142 set_param(param);
143 param.lire_avec_accolades(is);
144 Cout << "IJK_Thermal_base::readOn : Parameters summary. " << finl;
145 printOn(Cout);
146 return is;
147}
148
150{
152}
153
155{
156 param.ajouter("fo", &fo_); // X_D_ADD_P floattant not_set
157 param.ajouter("expression_T_init", &expression_T_init_); // X_D_ADD_P chaine Expression of initial temperature (parser of x,y,z)
158 param.ajouter("boundary_conditions", &boundary_conditions_, Param::REQUIRED); // X_D_ADD_P bloc_lecture boundary conditions
159 param.ajouter("type_T_source", &type_T_source_); // X_D_ADD_P chaine(into=["dabiri","patch_dabiri","unweighted_dabiri"]) source term
160 param.ajouter("expression_source_temperature", &expression_source_temperature_); // X_D_ADD_P chaine source terms
161 param.ajouter_flag("lambda_variable", &lambda_variable_);
162 param.ajouter_flag("wall_flux", &wall_flux_); // X_D_ADD_P rien not_set
163 param.ajouter("kl_source", &kl_);
164 param.ajouter("kv_source", &kv_);
165 param.ajouter("T0l_source", &T0l_);
166 param.ajouter("T0v_source", &T0v_);
167 param.ajouter("fichier_reprise_temperature", &fichier_reprise_temperature_);
168 param.ajouter("timestep_reprise_temperature", &timestep_reprise_temperature_);
169 param.ajouter("rank_reprise_temperature", &rank_reprise_temperature_);
170 param.ajouter("latastep_reprise", &latastep_reprise_ini_);
171 param.ajouter_flag("conv_temperature_negligible", &conv_temperature_negligible_); // X_D_ADD_P rien neglect temperature convection
172 param.ajouter_flag("diff_temperature_negligible", &diff_temperature_negligible_); // X_D_ADD_P rien neglect temperature diffusion
173 param.ajouter("temperature_diffusion_op", &temperature_diffusion_op_);
174 param.ajouter("temperature_convection_op", &temperature_convection_op_);
175 param.ajouter("expression_T_ana", &expression_T_ana_); // X_D_ADD_P chaine Analytical expression T=f(x,y,z,t) for post-processing only
176 param.ajouter("calculate_local_energy", &calculate_local_energy_);
177 param.ajouter("upstream_temperature", &upstream_temperature_);
178 param.ajouter("nb_diam_upstream", &nb_diam_upstream_);
179 param.ajouter("side_temperature", &side_temperature_);
180 param.ajouter("stencil_side", &stencil_side_);
181 param.ajouter("n_iter_distance", &n_iter_distance_);
182 param.ajouter_flag("ghost_fluid", &ghost_fluid_);
183 param.ajouter_flag("spherical_exact", &spherical_exact_);
184 param.ajouter_flag("debug", &debug_);
185 param.ajouter_flag("compute_eulerian_compo", &compute_eulerian_compo_);
186
187 param.ajouter_flag("store_flux_operators_for_energy_balance", &store_flux_operators_for_energy_balance_);
188 param.ajouter_flag("disable_relative_velocity_energy_balance", &disable_relative_velocity_energy_balance_);
189
190 param.ajouter_flag("use_bubbles_velocities_from_interface", &use_bubbles_velocities_from_interface_);
191 param.ajouter_flag("use_bubbles_velocities_from_barycentres", &use_bubbles_velocities_from_barycentres_);
192
193 param.ajouter_flag("smooth_grad_T_elem", &smooth_grad_T_elem_);
194 param.ajouter("smoothing_numbers", &smoothing_numbers_);
195 param.ajouter_flag("smoothing_remove_normal_compo", &smoothing_remove_normal_compo_);
196 param.ajouter_flag("smoothing_use_unique_phase", &smoothing_use_unique_phase_);
197
198 param.ajouter_flag("gfm_vapour_liquid_vapour", &gfm_vapour_liquid_vapour_);
199 param.ajouter("gfm_smooth_factor", &gfm_smooth_factor_);
200 param.ajouter_flag("avoid_gfm_parallel_calls", &avoid_gfm_parallel_calls_);
201 // param.ajouter_flag("gfm_recompute_field_ini", &gfm_recompute_field_ini_);
202 // param.ajouter_flag("gfm_zero_neighbour_value_mean", &gfm_zero_neighbour_value_mean_);
203 param.ajouter("type_temperature_convection_form", &type_temperature_convection_form_);
204 param.dictionnaire("non conservative",1);
205 param.dictionnaire("conservative",2);
206 param.ajouter_flag("conserv_energy_global", &conserv_energy_global_);
207}
208
209/********************************************
210 * Public methods
211 ********************************************/
212
214{
215 if (!le_fluide_)
216 {
217 Cerr << "You forgot to associate a fluid to the problem named " << ref_ijk_ft_->le_nom() << finl;
219 }
220 return le_fluide_.valeur();
221}
222
224{
225 if (!le_fluide_)
226 {
227 Cerr << "You forgot to associate a fluid to the equation named " << ref_ijk_ft_->le_nom() << finl;
229 }
230 return le_fluide_.valeur();
231}
232
233void IJK_Thermal_base::associer_milieu_base(const Milieu_base& un_milieu, const int& idth)
234{
235 if (sub_type(Fluide_Diphasique_IJK, un_milieu))
236 {
237 const Milieu_base& un_fluide = ref_cast(Milieu_base, un_milieu);
238 le_fluide_ = un_fluide;
239 }
240 else
241 {
242 Cerr << "Error of fluid type for the method IJK_Thermal_base::associer_milieu_base" << finl;
244 }
245
246 rank_ = idth;
247 const Fluide_Diphasique_IJK& mil = milieu_ijk() ;
248 const int cp_liq_size = mil.get_cp_liquid_length();
249 const int cp_vap_size = mil.get_cp_vapour_length();
250 const int lambda_liq_size = mil.get_lambda_liquid_length();
251 const int lambda_vap_size = mil.get_lambda_vapour_length();
252 cp_liquid_ = mil.get_cp_liquid(cp_liq_size > 1 ? idth : 0);
253 cp_vapour_ = mil.get_cp_vapour(cp_vap_size > 1 ? idth : 0);
254 lambda_liquid_ = mil.get_lambda_liquid(lambda_liq_size > 1 ? idth : 0);
255 lambda_vapour_ = mil.get_lambda_vapour(lambda_vap_size > 1 ? idth : 0);
256}
257
259 const char *lata_name,
260 const int latastep,
261 const double current_time,
262 const int idx,
263 const Motcles& tested_names,
264 const Nom& name_field,
265 const Motcle& lata_suffix,
266 const IJK_Field_double& field,
267 std::ostringstream& oss,
268 int& counter,
269 const int& first_thermal_rank)
270{
271 oss << name_field << "_" << lata_suffix << idx;
272 Nom name_field_tmp(oss.str().c_str());
273 const int nb_names = tested_names.size();
274 bool check_names = false;
275 for (int i=0; i<nb_names; i++)
276 check_names = check_names || (liste_post_instantanes.contient_(tested_names[i]));
277 check_names = check_names || liste_post_instantanes.contient_(name_field_tmp);
278 if (check_names)
279 {
280 counter++, dumplata_scalar(lata_name, name_field_tmp, field, latastep);
281 }
282 oss.str("");
283}
284
285void IJK_Thermal_base::initialize_switch(const Domaine_IJK& splitting, const int idx)
286{
287 temperature_->allocate(splitting, Domaine_IJK::ELEM, 1, get_field_name_with_rank("TEMPERATURE"));
288 champs_compris_.ajoute_champ(*temperature_);
289 if (fichier_reprise_temperature_ == "??") // si on ne fait pas une reprise on initialise V
290 {
291 Cerr << "Please provide initial conditions for temperature, either by an expression or a field for restart."
292 << "You should consider using either fichier_reprise_temperature or expression_T_init keywords. " << finl;
294 }
295 else
296 lire_temperature(splitting);
297}
298
300{
301 Cout << que_suis_je() << "::initialize()" << finl;
302
304
305 /*
306 * Diffusion operator:
307 * If temperature_diffusion_op_ is not written in the .data
308 * the operator is initialised with uniform_lambda & centre2
309 * in Operateur_IJK_elem_diff
310 */
312 temperature_diffusion_op_.typer_diffusion_op("uniform");
313 else
314 temperature_diffusion_op_.typer_diffusion_op("standard");
315
316 /*
317 * Convection operator
318 * If temperature_convection_op_ is not written in the .data
319 * the operator is initialised with quick
320 * in Operateur_IJK_elem_conv.h
321 */
322
323 /*
324 * Initialise the operators
325 */
327 {
328 temperature_convection_op_.initialize(splitting);
330 {
331 rho_cp_convection_op_.typer_convection_op("disc"); // TODO Mathis : je ne sais pas le typer
332 rho_cp_convection_op_.initialize(splitting);
333 // rho_cp_convection_op_.set_indicatrice(ref_ijk_ft_->itfce().I());// TODO Mathis
334 }
335 }
337 temperature_diffusion_op_.initialize(splitting);
338
339 /*
340 * Corrige Flux FT
341 */
342 corrige_flux_.typer("Corrige_flux_FT_temperature_conv");
343
344 /*
345 * Fields
346 */
347 temperature_->allocate(splitting, Domaine_IJK::ELEM, ghost_cells_, get_field_name_with_rank("TEMPERATURE"));
348 champs_compris_.ajoute_champ(*temperature_);
350
351 d_temperature_->allocate(splitting, Domaine_IJK::ELEM, 2);
354
355 /*
356 * GFM
357 */
359
361 {
362 div_coeff_grad_T_volume_->allocate(splitting, Domaine_IJK::ELEM, 2, get_field_name_with_rank("DIV_LAMBDA_GRAD_T_VOLUME"));
363 div_coeff_grad_T_volume_->data() = 0.;
365 }
366 if (ref_ijk_ft_->get_post().is_post_required("DIV_LAMBDA_GRAD_T"))
367 {
368 div_coeff_grad_T_.allocate(splitting, Domaine_IJK::ELEM, 0, get_field_name_with_rank("DIV_LAMBDA_GRAD_T"));
370 div_coeff_grad_T_.data() = 0.;
371 }
373 {
374 temperature_hess_flux_op_centre_.initialize(splitting);
375 allocate_cell_vector(div_coeff_grad_T_raw_, splitting, 1);
376 for (int c=0; c<3; c++)
377 div_coeff_grad_T_raw_[c].data() = 0.;
378 }
380 {
381 u_T_convective_volume_.allocate(splitting, Domaine_IJK::ELEM, 0, get_field_name_with_rank("U_T_CONVECTIVE_VOLUME"));
383 u_T_convective_volume_.data() = 0.;
384 }
385 if (ref_ijk_ft_->get_post().is_post_required("U_T_CONVECTIVE"))
386 {
387 u_T_convective_.allocate(splitting, Domaine_IJK::ELEM, 0, get_field_name_with_rank("U_T_CONVECTIVE"));
388 champs_compris_.ajoute_champ(u_T_convective_);
389 u_T_convective_.data() = 0.;
390 }
392 {
393 temperature_grad_flux_op_quick_.initialize(splitting);
394 allocate_cell_vector(rho_cp_u_T_convective_raw_, splitting, 1);
395 for (int c=0; c<3; c++)
396 rho_cp_u_T_convective_raw_[c].data() = 0.;
397 }
398
399 rho_cp_post_ = (liste_post_instantanes_.size() && liste_post_instantanes_.contient_("RHO_CP"));
400 if (rho_cp_post_)
401 rho_cp_.allocate(splitting, Domaine_IJK::ELEM, 2);
403 rho_cp_T_.allocate(splitting, Domaine_IJK::ELEM, 2);
404
406 div_rho_cp_T_.allocate(splitting, Domaine_IJK::ELEM, 0);
407 /*
408 * Storage for temperature gradient post-processing or method
409 */
410 if ((bool(ref_ijk_ft_)) && (!Option_IJK::DISABLE_DIPHASIQUE))
411 {
412 Cout << "Allocating fields temperature_ft_ and storage" << finl;
413 allocate_cell_vector(storage_, ref_ijk_ft_->get_domaine_ft(), 1);
414 }
415
416 /*
417 * Dimensionless temperature field (thermostat)
418 */
419 const Nom name_T_adim = get_field_name_with_rank("TEMPERATURE_ADIMENSIONNELLE_THETA");
420 const Nom name_sourceT = get_field_name_with_rank("SOURCE_TEMPERATURE");
421 const Nom name_Tphi = get_field_name_with_rank("TEMPERATURE_PHYSIQUE_T");
422 if ((wall_flux_) || ref_ijk_ft_post_->is_post_required(name_sourceT)
423 || ref_ijk_ft_post_->is_post_required(name_Tphi)
424 || ref_ijk_ft_post_->is_post_required(name_T_adim)
425 || (type_T_source_ != "??"))
426 {
427 Cout << "Allocating field for the thermal source term & co. " << finl;
428 source_temperature_.allocate(splitting, Domaine_IJK::ELEM, 1, name_sourceT);
430 source_temperature_v_.allocate(splitting, Domaine_IJK::ELEM, 1);
431 source_temperature_l_.allocate(splitting, Domaine_IJK::ELEM, 1);
432 d_source_Tv_.allocate(splitting, Domaine_IJK::ELEM, 1);
433 d_source_Tl_.allocate(splitting, Domaine_IJK::ELEM, 1);
434 temperature_physique_T_.allocate(splitting, Domaine_IJK::ELEM, 2, name_Tphi);
436 temperature_adimensionnelle_theta_.allocate(splitting, Domaine_IJK::ELEM, 2, name_T_adim);
438 // par defaut s'il n'y a pas de source renseignee, on utilise la source de Dabiri/Kawamura
439 // cela veut dire que dans le cas des SWARMS il faut imperativement renseigner le nom de
440 // la source
441 if (type_T_source_ == "??")
442 {
443 Cerr << "Attention on demande des post-traitement sans avoir renseigner type_T_source" << finl;
444 throw "Erreur post et type_T_source";
445 }
446 }
447 if (liste_post_instantanes_.contient_("TEMPERATURE_ADIM_BULLES"))
448 temperature_adim_bulles_.allocate(splitting, Domaine_IJK::ELEM, 2);
449
450 /*
451 * RK3 sub-steps
452 * Check that pointer is not null:
453 */
454 if (ref_ijk_ft_ && sub_type(Schema_RK3_IJK, ref_ijk_ft_->schema_temps_ijk()))
455 RK3_F_temperature_->allocate(splitting, Domaine_IJK::ELEM, 0);
456
457 if (ref_ijk_ft_post_->is_post_required(get_field_name_with_rank("TEMPERATURE_ANA"))
458 || ref_ijk_ft_post_->is_post_required(get_field_name_with_rank("ECART_T_ANA")) || ref_ijk_ft_post_->is_post_required(get_field_name_with_rank("ECART_T_ANA_REL"))
459 )
460 {
461 temperature_ana_.allocate(splitting, Domaine_IJK::ELEM, 1, get_field_name_with_rank("TEMPERATURE_ANA"));
462 ecart_t_ana_.allocate(splitting, Domaine_IJK::ELEM, 1, get_field_name_with_rank("ECART_T_ANA"));
463 ecart_t_ana_rel_.allocate(splitting, Domaine_IJK::ELEM, 1, get_field_name_with_rank("ECART_T_ANA_REL"));
464 champs_compris_.ajoute_champ(temperature_ana_);
465 champs_compris_.ajoute_champ(ecart_t_ana_);
466 champs_compris_.ajoute_champ(ecart_t_ana_rel_);
467 temperature_ana_.data() = 0.;
468 ecart_t_ana_.data() = 0.;
469 ecart_t_ana_rel_.data() = 0.;
470 temperature_ana_.echange_espace_virtuel(temperature_ana_.ghost());
471 ecart_t_ana_.echange_espace_virtuel(ecart_t_ana_.ghost());
472 ecart_t_ana_rel_.echange_espace_virtuel(ecart_t_ana_rel_.ghost());
473 }
474
475 /*
476 * Resume the calculation
477 */
478 if (fichier_reprise_temperature_ == "??") // si on ne fait pas une reprise on initialise V
479 {
480 if (expression_T_init_ != "??")
482 else
483 {
484 Cerr << "Please provide initial conditions for temperature, either by an expression or a field for restart. "
485 << "You should consider using either fichier_reprise_temperature or expression_T_init keywords. " << finl;
487 }
488 }
489 else
490 {
491 lire_temperature(splitting);
492 }
493
494 /*
495 * List of post-processed data
496 */
497 Cerr << " Initializing thermal fields dependant on the post-pro list : " ;
498 if (liste_post_instantanes_.size())
500 else
501 Cerr << "empty";
502 Cerr << finl;
503
504 if ((liste_post_instantanes_.contient_("SOURCE_TEMPERATURE_ANA")) || (liste_post_instantanes_.contient_("ECART_SOURCE_TEMPERATURE_ANA")) )
505 {
506 source_temperature_ana_.allocate(splitting, Domaine_IJK::ELEM, 1);
507 ecart_source_t_ana_.allocate(splitting, Domaine_IJK::ELEM, 1);
508 }
509
510 // TODO: Check with Aymeric
512 || (ref_ijk_ft_ && ref_ijk_ft_->t_debut_statistiques() < 1.e10 );
514 allocate_velocity(grad_T_, splitting, 1);
515
519
521 {
522 eulerian_distance_ft_ = &(ghost_fluid_fields_->get_eulerian_distance_ft());
523 eulerian_distance_ns_ = &(ghost_fluid_fields_->get_eulerian_distance_ns());
524 eulerian_normal_vectors_ft_ = &(ghost_fluid_fields_->get_eulerian_normal_vectors_ft());
525 eulerian_facets_barycentre_ft_ = &(ghost_fluid_fields_->get_eulerian_facets_barycentre_ft());
526 eulerian_normal_vectors_ns_ = &(ghost_fluid_fields_->get_eulerian_normal_vectors_ns());
527 eulerian_normal_vectors_ns_normed_ = &(ghost_fluid_fields_->get_eulerian_normal_vectors_ns_normed());
528 eulerian_facets_barycentre_ns_ = &(ghost_fluid_fields_->get_eulerian_facets_barycentre_ns());
529 }
531 {
532 eulerian_curvature_ft_ = &(ghost_fluid_fields_->get_eulerian_curvature_ft());
533 eulerian_curvature_ns_ = &(ghost_fluid_fields_->get_eulerian_curvature_ns());
534 eulerian_interfacial_area_ft_ = &(ghost_fluid_fields_->get_eulerian_interfacial_area_ft());
535 eulerian_interfacial_area_ns_ = &(ghost_fluid_fields_->get_eulerian_interfacial_area_ns());
536 }
538 {
539 // 1 ghost cell for eulerian_grad_T_interface_ and temperature_ft_ to access its neighbour
540 eulerian_grad_T_interface_ft_.allocate(ref_ijk_ft_->get_domaine_ft(), Domaine_IJK::ELEM, 1);
541 eulerian_grad_T_interface_ft_.echange_espace_virtuel(eulerian_grad_T_interface_ft_.ghost());
542 //
543 eulerian_grad_T_interface_ns_.allocate(splitting, Domaine_IJK::ELEM, 1);
544 eulerian_grad_T_interface_ns_.echange_espace_virtuel(eulerian_grad_T_interface_ns_.ghost());
545 //
546 }
547
548 temperature_ft_.allocate(ref_ijk_ft_->get_domaine_ft(), Domaine_IJK::ELEM, ghost_cells_);
549 temperature_ft_.echange_espace_virtuel(eulerian_grad_T_interface_ft_.ghost());
550
552 || (liste_post_instantanes_.size() && liste_post_instantanes_.contient_("EULERIAN_COMPO_NS"));
554 {
555 eulerian_compo_connex_ft_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_ft());
556 eulerian_compo_connex_ns_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex());
557 eulerian_compo_connex_ghost_ft_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_ghost_ft());
558 eulerian_compo_connex_ghost_ns_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_ghost());
559 eulerian_compo_connex_from_interface_ft_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_from_interface_ft());
560 eulerian_compo_connex_from_interface_ns_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_from_interface_ns());
561 eulerian_compo_connex_from_interface_ghost_ft_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_from_interface_ghost_ft());
562 eulerian_compo_connex_from_interface_ghost_ns_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_from_interface_ghost_ns());
563 eulerian_compo_connex_from_interface_int_ns_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_compo_connex_int_from_interface_ns());
565 }
566
568 (liste_post_instantanes_.size() && liste_post_instantanes_.contient_("RISING_VELOCITIES"));
570 (liste_post_instantanes_.size() && liste_post_instantanes_.contient_("RISING_VELOCITIES")));
571
573 {
574 rising_velocities_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_rising_velocities());
575 rising_velocities_from_barycentres_ = &(ref_ijk_ft_->get_interface().get_bubbles_velocities_magnitude_from_barycentres());
576 rising_vectors_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_rising_vectors());
577 rising_vectors_from_barycentres_ = &(ref_ijk_ft_->get_interface().get_bubble_rising_vectors_from_barycentres());
578 liquid_velocity_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_liquid_velocity());
579 rising_velocity_overall_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_rising_velocity_overall());
580 bubbles_barycentre_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bubbles_barycentre());
581 bubbles_barycentres_old_ = &(ref_ijk_ft_->get_interface().get_bubble_barycentres_old_new(0));
582 bubbles_barycentres_new_ = &(ref_ijk_ft_->get_interface().get_bubble_barycentres_old_new(1));
583 }
585 eulerian_rising_velocities_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_eulerian_rising_velocities());
586
589 || liste_post_instantanes_.contient_("HESS_XX_T_ELEM") || liste_post_instantanes_.contient_("HESS_YY_T_ELEM")
590 || liste_post_instantanes_.contient_("HESS_ZZ_T_ELEM");
592 || liste_post_instantanes_.contient_("HESS_XY_T_ELEM") || liste_post_instantanes_.contient_("HESS_XZ_T_ELEM")
593 || liste_post_instantanes_.contient_("HESS_YX_T_ELEM") || liste_post_instantanes_.contient_("HESS_YZ_T_ELEM")
594 || liste_post_instantanes_.contient_("HESS_ZX_T_ELEM") || liste_post_instantanes_.contient_("HESS_ZY_T_ELEM")
595 || liste_post_instantanes_.contient_("HESS_XZ_ZX_T_ELEM") || liste_post_instantanes_.contient_("HESS_ZX_XZ_T_ELEM")
596 || liste_post_instantanes_.contient_("HESS_YZ_ZY_T_ELEM") || liste_post_instantanes_.contient_("HESS_ZY_YZ_T_ELEM")
597 || liste_post_instantanes_.contient_("HESS_XY_YX_T_ELEM") || liste_post_instantanes_.contient_("HESS_YX_XY_T_ELEM");
598
600
602 || liste_post_instantanes_.contient_("GRAD_T_DIR_X_ELEM") || liste_post_instantanes_.contient_("GRAD_T_DIR_Y_ELEM")
603 || liste_post_instantanes_.contient_("GRAD_T_DIR_Z_ELEM");
606 {
607 allocate_cell_vector(grad_T_elem_, splitting, ghost_cells_); // 1 or 0 ?
608 grad_T_elem_.echange_espace_virtuel();
609 temperature_grad_op_centre_.initialize(splitting);
610 }
612 {
616 tmp_smoothing_field_.echange_espace_virtuel(tmp_smoothing_field_.ghost());
617 allocate_cell_vector(grad_T_elem_smooth_, splitting, ghost_cells_); // 1 or 0 ?
618 grad_T_elem_smooth_.echange_espace_virtuel();
619 allocate_cell_vector(grad_T_elem_tangential_, splitting, ghost_cells_); // 1 or 0 ?
620 grad_T_elem_tangential_.echange_espace_virtuel();
621
622 }
623
625 {
626 allocate_cell_vector(hess_diag_T_elem_, splitting, ghost_cells_); // 1 or 0 ?
627 hess_diag_T_elem_.echange_espace_virtuel();
628 temperature_hess_op_centre_.initialize(splitting);
629 }
630
632 {
633 allocate_cell_vector(hess_cross_T_elem_, splitting, ghost_cells_); // 1 or 0 ?
634 hess_cross_T_elem_.echange_espace_virtuel();
635 /*
636 * TODO: Cross derivatives (adapt the diffusion operator ?)
637 * Pb with Finite Volume Op, can not really relate on the fluxes
638 * to derive the cross derivatives...
639 */
640 }
642
643 /*
644 * FIXME: Temporary need to rewrite IJK_Thermal.cpp posttraitements
645 */
646 allocate_cell_vector(dummy_int_vect_, splitting, 0); // 1 or 0 ?
647 allocate_cell_vector(dummy_double_vect_, splitting, 0); // 1 or 0 ?
648 dummy_int_field_.allocate(splitting, Domaine_IJK::ELEM, 0);
649 dummy_double_field_.allocate(splitting, Domaine_IJK::ELEM, 0);
650 for (int c=0; c<3; c++)
651 {
652 dummy_int_vect_[c].data() = 0;
653 dummy_int_vect_[c].data() = 0.;
654 }
655 dummy_int_field_.data() = 0;
656 dummy_double_field_.data() = 0;
657
658 // ref_ijk_ft_->redistrib_from_ft_elem().redistribute(eulerian_grad_T_interface_, eulerian_grad_T_interface_);
659 // Cout << "End of " << que_suis_je() << "::initialize()" << finl;
660}
661
663{
664 Cout << "Temperature initialization from expression \nTini = " << expression_T_init_ << finl;
665 set_field_data(*temperature_, expression_T_init_, ref_ijk_ft_->get_interface().I(), 0.);
666}
667
669{
671 // Cout << "Temperature initialization from expression \nTini = " << expression_T_init_ << finl;
672 // set_field_data(*temperature_, expression_T_init_, ref_ijk_ft_->itfce().In(), 0.);
673}
674
676{
677 Cerr << "copie_pure_vers_diph_sans_interpolation est seulement possible dans le cas IJK_Thermal_cut_cell." << finl;
679}
680
682{
683 Cerr << "echange_pure_vers_diph_cellules_initialement_pures est seulement possible dans le cas IJK_Thermal_cut_cell." << finl;
685}
686
688{
689 Cerr << "echange_diph_vers_pure_cellules_finalement_pures est seulement possible dans le cas IJK_Thermal_cut_cell." << finl;
691}
692
694{
695 Cerr << "vide_phase_invalide_cellules_diphasiques est seulement possible dans le cas IJK_Thermal_cut_cell." << finl;
697}
698
700{
701 Cerr << "Remplir_cellules_diphasiques est seulement possible dans le cas IJK_Thermal_cut_cell." << finl;
703}
705{
706 Nom front_space = " ";
707 Nom end_space = " ";
708 Nom escape = "\n";
709 Objet_U::printOn( os );
710 os << " {" << escape;
711
712 os << escape;
713 os << front_space << "# BASE PARAMS #" << escape;
714 os << escape;
715
716 os << " boundary_conditions {" << escape;
717 /*
718 * Boundary conditions (Periodicity or wall)
719 */
720 Nom bctype_kmin, bctype_kmax, bckmin, bckmax, valeur_kmin, valeur_kmax;
722 {
723 bctype_kmax="Paroi_Temperature_imposee";
724 bckmax = "temperature_imposee_kmax";
726 }
727 else if( boundary_conditions_.get_bctype_k_max()==boundary_conditions_.Paroi_Flux_impose)
728 {
729 bctype_kmax="Paroi_Flux_impose";
730 bckmax = "flux_impose_kmax";
731 valeur_kmax = boundary_conditions_.get_flux_kmax();
732 }
733 else if( boundary_conditions_.get_bctype_k_max()==boundary_conditions_.Perio)
734 {
735 bctype_kmax="Perio";
736 bctype_kmin="Perio";
737 bckmax = " ";
738 bckmin = " ";
739 valeur_kmax = " ";
740 }
741 if( boundary_conditions_.get_bctype_k_min()==boundary_conditions_.Paroi_Temperature_imposee)
742 {
743 bctype_kmin="Paroi_Temperature_imposee";
744 bckmin = "temperature_imposee_kmin";
745 valeur_kmin = boundary_conditions_.get_temperature_kmin();
746 }
747 else if( boundary_conditions_.get_bctype_k_min()==boundary_conditions_.Paroi_Flux_impose)
748 {
749 bctype_kmin="Paroi_Flux_impose";
750 bckmin = "flux_impose_kmin";
751 valeur_kmin = boundary_conditions_.get_flux_kmin();
752 }
753 else if( boundary_conditions_.get_bctype_k_min()==boundary_conditions_.Perio)
754 {
755 bctype_kmin="Perio";
756 bctype_kmin="Perio";
757 bckmin = " ";
758 bckmin = " ";
759 valeur_kmin = " ";
760 }
761 os<< " bctype_kmin" << " " << bctype_kmin << " \n";
762 os<< " bctype_kmax" << " " << bctype_kmax << " \n";
763 os<< " " << bckmin << " " << valeur_kmin << " \n";
764 os<< " " << bckmax << " " << valeur_kmax << " \n";
765 os<< " } \n" ;
766
767 /*
768 * Source term
769 */
770 if (type_T_source_!="??")
771 os<< " type_T_source " << type_T_source_ << "\n";
772 if (type_T_source_=="SWARM")
773 {
774 os<< " kl_source " << kl_ << "\n";
775 os<< " kv_source " << kv_ << "\n";
776 os<< " T0l_source " << T0l_ << "\n";
777 os<< " T0v_source " << T0v_ << "\n";
778 }
779
780 if( wall_flux_)
781 os << front_space << "wall_flux" << escape;
782
783 /*
784 * Resume calculation
785 */
786 os << front_space << "fichier_reprise_temperature" << end_space << basename(fichier_reprise_temperature_) << escape;
787 os << front_space << "timestep_reprise_temperature" << end_space << timestep_reprise_temperature_ << escape;
788 os << front_space << "rank_reprise_temperature" << end_space << rank_reprise_temperature_ << escape;
789 os << front_space << "latastep_reprise" << end_space << latastep_reprise_ << escape;
790
791 /*
792 * Analytical expression of temperature at t_initial
793 */
794 if ( expression_T_ana_!="??")
795 os << front_space << "expression_T_ana" << end_space << expression_T_ana_ << escape;
796
797
798 os << front_space << "upstream_temperature" << end_space << upstream_temperature_ << escape;
799 os << front_space << "nb_diam_upstream" << end_space << nb_diam_upstream_ << escape;
800 os << front_space << "side_temperature" << end_space << side_temperature_ << escape;
801 os << front_space << "stencil_side" << end_space << stencil_side_ << escape;
802 os << front_space << "n_iter_distance" << end_space << n_iter_distance_ << escape;
803
804
805 os << front_space << "temperature_diffusion_op" << end_space << temperature_diffusion_op_ << escape;
806 os << front_space << "temperature_convection_op" << end_space << temperature_convection_op_ << escape;
807
808 os << front_space << "gfm_smooth_factor" << end_space << gfm_smooth_factor_ << escape;
809
810 os << front_space << "smoothing_numbers" << end_space << smoothing_numbers_ << escape;
811
812 /*
813 * Neglect an operator
814 */
815
816 os << escape;
817 os << front_space << "# BASE FLAGS #" << escape;
818 os << escape;
819
821 os << front_space << "conv_temperature_negligible" << escape;
823 os << front_space << "diff_temperature_negligible" << escape;
824 if (ghost_fluid_)
825 os << front_space << "ghost_fluid" << escape;
827 os << front_space << "spherical_exact" << escape;
828 if (debug_)
829 os << front_space << "debug" << escape;
831 os << front_space << "calculate_local_energy" << escape;
832
834 os << front_space << "store_flux_operators_for_energy_balance" << escape;
836 os << front_space << "disable_relative_velocity_energy_balance" << escape;
837
839 os << front_space << "use_bubbles_velocities_from_eulerian" << escape;
841 os << front_space << "use_bubbles_velocities_from_barycentres" << escape;
842
844 os << front_space << "smooth_grad_T_elem" << escape;
846 os << front_space << "smoothing_remove_normal_compo" << escape;
848 os << front_space << "smoothing_use_unique_phase" << escape;
850 os << front_space << "compute_eulerian_compo" << escape;
851
853 os << front_space << "avoid_gfm_parallel_calls" << escape;
854
855 return os;
856}
857
859{
860 return ref_ijk_ft_->schema_temps_ijk().get_current_time();
861}
862
864 int& fill_rising_velocities,
865 int& use_bubbles_velocities_from_interface,
866 int& use_bubbles_velocities_from_barycentres)
867{
869 fill_rising_velocities = fill_rising_velocities_ || fill_rising_velocities;
870 use_bubbles_velocities_from_interface = use_bubbles_velocities_from_interface_ || use_bubbles_velocities_from_interface;
871 use_bubbles_velocities_from_barycentres = use_bubbles_velocities_from_barycentres_ || use_bubbles_velocities_from_barycentres;
872}
873
875{
876 const Domaine_IJK& geom = d_temperature_->get_domaine();
877 const double dx = geom.get_constant_delta(DIRECTION_I);
878 const double dy = geom.get_constant_delta(DIRECTION_J);
879 const double dz = geom.get_constant_delta(DIRECTION_K);
880 vol_ = dx*dy*dz;
881}
882
884{
885 const Domaine_IJK& geom = d_temperature_->get_domaine();
886 const double dx = geom.get_constant_delta(DIRECTION_I);
887 const double dy = geom.get_constant_delta(DIRECTION_J);
888 const double dz = geom.get_constant_delta(DIRECTION_K);
889 min_delta_xyz_ = std::min(std::min(dx,dy),dz);
890}
891
893{
894 const double dx = geom.get_constant_delta(DIRECTION_I);
895 const double dy = geom.get_constant_delta(DIRECTION_J);
896 const double dz = geom.get_constant_delta(DIRECTION_K);
897 cell_diagonal_ = sqrt(dx*dx + dy*dy + dz*dz);
898}
899
901{
902 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_from_bounding_box())
903 return dummy_double_field_;
905}
907{
908 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_from_bounding_box())
909 return dummy_double_field_;
911}
913{
914 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_compo_fields())
915 return dummy_double_field_;
917}
919{
920 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_compo_fields())
921 return dummy_double_field_;
923}
925{
926 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_from_bounding_box())
927 return dummy_double_field_;
929}
931{
932 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_from_bounding_box())
933 return dummy_double_field_;
935}
937{
938 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_compo_fields())
939 return dummy_double_field_;
941}
943{
944 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_compo_fields())
945 return dummy_double_field_;
947}
949{
950 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_compo_fields())
951 return dummy_int_field_;
953}
955{
956 if (!ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_compute_compo_fields())
957 return dummy_int_field_;
959}
960
962{
963 const IJK_Field_double& temperature = *temperature_;
964 // Nombre de mailles du domaine NS :
965 const int nx = temperature.ni();
966 const int ny = temperature.nj();
967 const int nz = temperature.nk();
968 const double rhocpl = get_rhocp_l();
969 const double ene_ini = compute_global_energy();
970 const bool rho_cp_post = rho_cp_post_ || ((type_temperature_convection_form_ == 2) || (conserv_energy_global_));
972 {
973 if (rho_cp_post) rho_cp_.data()= rhocpl;
975 for (int k=0; k < nz ; k++)
976 for (int j=0; j< ny; j++)
977 for (int i=0; i < nx; i++)
978 rho_cp_T_(i,j,k) = rhocpl*temperature(i,j,k);
979 }
980 else
981 {
982 const double rhocpv = get_rhocp_v();
983 const IJK_Field_double& indic = ref_ijk_ft_->get_interface().I();
984 for (int k=0; k < nz ; k++)
985 for (int j=0; j< ny; j++)
986 for (int i=0; i < nx; i++)
987 {
988 double chi_l = indic(i,j,k);
989 if (rho_cp_post)
990 rho_cp_(i,j,k) = rhocpl*chi_l + rhocpv*(1-chi_l);
992 rho_cp_T_(i,j,k) = (rhocpl*chi_l + rhocpv*(1-chi_l))*temperature(i,j,k);
993 }
994 }
995 if (rho_cp_post)
996 rho_cp_.echange_espace_virtuel(rho_cp_.ghost());
998 rho_cp_T_.echange_espace_virtuel(rho_cp_T_.ghost());
999
1000 // Semble un endroit approprie pour calculer la variation d'energie due au transport de l'interface:
1001 const double ene_post = compute_global_energy();
1002 Cerr << "[Energy-Budget-T"<<rank_<<"-2-TransportIndic] time t=" << ref_ijk_ft_->schema_temps_ijk().get_current_time()
1003 << " " << ene_ini
1004 << " " << ene_post
1005 << " delta=" << ene_post-ene_ini << " [W.m-3]." << finl;
1006}
1007
1008// Methode de calcul du pas de temps max base sur Fo pour l'equation de thermique.
1009// CFL value is not computed as it is the same as for the velocity equation.
1010// The calculation should be stable if Fo <= 1.0 (thanks to the 0.5 in the formula below).
1011double IJK_Thermal_base::compute_timestep(const double timestep,
1012 const double dxmin)
1013{
1014 double alpha_max;
1015 double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
1016 double rho_v= ref_ijk_ft_->milieu_ijk().get_rho_vapour();
1018 alpha_max = lambda_liquid_ / (rho_l * cp_liquid_);
1019 else
1020 alpha_max = std::max(lambda_liquid_ / (rho_l * cp_liquid_), lambda_vapour_ / (rho_v * cp_vapour_));
1021 dt_fo_ = dxmin * dxmin / (alpha_max + 1.e-20) * fo_ * 0.125; // 1/6 ou 1/8 ?
1023 return dt_fo_;
1024}
1025
1027{
1028 ref_ijk_ft_ = ijk_ft;
1031}
1032
1034{
1035 ref_ijk_ft_post_ = ijk_ft_post;
1036}
1037
1039{
1040 ref_ijk_ft_switch_ = ijk_ft_switch;
1041}
1042
1043void IJK_Thermal_base::Fill_postprocessable_fields(std::vector<FieldInfo_t>& chps)
1044{
1045 /* does nothing
1046 * this should be done in IJK_thermals
1047 * if you want to write a new field for your own IJK_Thermal_xxx equation
1048 * add the base name of your field to IJK_Thermals::Fill_postprocessable_fields
1049 * for example { "BASE_NAME", Entity::ELEMENT, Nature_du_champ::scalaire, false },
1050 *
1051 * your field must be named with "BASE_NAME_" + Nom(rank_):
1052 * champ.nommer("BASE_NAME_" + Nom(rank_))
1053 * or :
1054 * champ.nommer(get_field_name_with_rank("BASE_NAME_"))
1055 *
1056 * then add the field to champs_compris from the equation (here or in derived class)
1057 * champs_compris.ajoute_champ(champ)
1058 */
1059}
1060
1062{
1063 return basename + Nom("_") + Nom(rank_);
1064}
1065
1066
1068{
1069 for (const auto& n : champs_compris_.liste_noms_compris())
1070 noms.add(n);
1071 for (const auto& n : champs_compris_.liste_noms_compris_vectoriel())
1072 noms.add(n);
1073}
1074
1076{
1077 if (champs_compris_.liste_noms_compris().contient_(nom))
1078 return champs_compris_.has_champ(nom);
1079 else if (champs_compris_.liste_noms_compris_vectoriel().contient_(nom))
1080 return champs_compris_.has_champ_vectoriel(nom);
1081 else
1082 return false;
1083}
1084
1085const IJK_Field_double& IJK_Thermal_base::get_IJK_field(const Motcle& nom)
1086{
1087 if ((nom == get_field_name_with_rank("TEMPERATURE_ANA")) || (nom == get_field_name_with_rank("ECART_T_ANA")))
1088 {
1089 Cerr << "Setting analytical temperature "<< rank_ <<" field to "<< expression_T_ana_ << finl;
1090 set_field_data(temperature_ana_, expression_T_ana_, ref_ijk_ft_->schema_temps_ijk().get_current_time());
1091 }
1092
1093 if (nom == get_field_name_with_rank("ECART_T_ANA"))
1094 {
1096 }
1097
1098 if (champs_compris_.has_champ(nom))
1099 return champs_compris_.get_champ(nom);
1100 else
1101 {
1102 Cerr << "ERROR in IJK_Thermal_base::get_IJK_field : " << finl;
1103 Cerr << "Requested field '" << nom << "' is not recognized by IJK_Thermal_base::get_IJK_field()." << finl;
1104 throw;
1105 }
1106}
1107
1108const IJK_Field_vector3_double& IJK_Thermal_base::get_IJK_field_vector(const Motcle& nom)
1109{
1110 if (champs_compris_.liste_noms_compris_vectoriel().contient_(nom))
1111 return champs_compris_.get_champ_vectoriel(nom);
1112 else
1113 {
1114 Cerr << "ERROR in IJK_Thermal_base::get_IJK_field_vector : " << finl;
1115 Cerr << "Requested field '" << nom << "' is not recognized by IJK_Thermal_base::get_IJK_field_vector()." << finl;
1116 throw;
1117 }
1118}
1119
1121 const Intersection_Interface_ijk_face& intersection_ijk_face)
1122{
1123 ref_intersection_ijk_cell_ = intersection_ijk_cell;
1124 ref_intersection_ijk_face_ = intersection_ijk_face;
1125}
1126
1128{
1129 ghost_fluid_fields_ = &ghost_fluid_fields;
1130}
1131
1133 int& compute_curvature,
1134 int& n_iter_distance,
1135 int& avoid_gfm_parallel_calls)
1136{
1137 compute_distance = compute_distance || compute_distance_;
1138 compute_curvature = compute_curvature || compute_curvature_;
1139 n_iter_distance = std::max(n_iter_distance, n_iter_distance_);
1140 avoid_gfm_parallel_calls = avoid_gfm_parallel_calls || avoid_gfm_parallel_calls_;
1141}
1142
1143void IJK_Thermal_base::get_boundary_fluxes(IJK_Field_local_double& boundary_flux_kmin,
1144 IJK_Field_local_double& boundary_flux_kmax)
1145{
1146 boundary_flux_kmin = boundary_flux_kmin_;
1147 boundary_flux_kmax = boundary_flux_kmax_;
1148}
1149
1150void IJK_Thermal_base::euler_time_step(const double timestep)
1151{
1152// statistics().create_custom_counter("Euler Time Step - Temperature",2,"IJK");
1153// statistics().create_custom_counter("Euler Time Step - Temperature post",2,"IJK");
1154// statistics().begin_count("Euler Time Step - Temperature post",statistics().get_last_opened_counter_level()+1);
1155 //static Stat_Counter_Id cnt_euler_thermal = //statistiques().new_counter(1, "Euler Time Step - Temperature");
1156 //static Stat_Counter_Id cnt_euler_thermal_post = //statistiques().new_counter(2, "Euler Time Step - Temperature post");
1157 //statistiques().begin_count(cnt_euler_thermal);
1158
1159 if (debug_)
1160 Cerr << "Thermal Euler time-step" << finl;
1161 calculer_dT(ref_ijk_ft_->eq_ns().get_velocity());
1162 // Update the temperature :
1163 const int kmax = temperature_->nk();
1164 const double ene_ini = compute_global_energy();
1165 if (debug_)
1166 Cerr << "Apply temperature increment d_temperature" << finl;
1167 for (int k = 0; k < kmax; k++)
1168 ref_ijk_ft_->eq_ns().euler_explicit_update(*d_temperature_, *temperature_, k);
1169
1170 /*
1171 * Erase the temperature increment (second call)
1172 */
1173 //statistiques().begin_count(cnt_euler_thermal_post);
1174 if (debug_)
1175 Cerr << "Temperature after increment" << finl;
1177 //statistiques().end_count(cnt_euler_thermal_post);
1178
1179 temperature_->echange_espace_virtuel(temperature_->ghost());
1180 const double ene_post = compute_global_energy();
1181 Cerr << "[Energy-Budget-T" << rank_ << "]"
1182 << " time t=" << ref_ijk_ft_->schema_temps_ijk().get_current_time()
1183 << " " << ene_ini
1184 << " " << ene_post << " [W.m-3]." << finl;
1186
1187// statistiques().end_count(cnt_euler_thermal);
1188}
1189
1190void IJK_Thermal_base::rk3_sub_step(const int rk_step, const double total_timestep,
1191 const double time)
1192{
1193 calculer_dT(ref_ijk_ft_->eq_ns().get_velocity());
1194 // Update the temperature :
1195 const int kmax = temperature_->nk();
1196 const double ene_ini = compute_global_energy();
1197 for (int k = 0; k < kmax; k++)
1198 {
1199 runge_kutta3_update(*d_temperature_, *RK3_F_temperature_, *temperature_, rk_step, k, total_timestep);
1200 }
1201 temperature_->echange_espace_virtuel(temperature_->ghost());
1202 const double ene_post = compute_global_energy();
1203 Cerr << "[Energy-Budget-T"<<rank_<<"] time t=" << ref_ijk_ft_->schema_temps_ijk().get_current_time()
1204 << " " << ene_ini
1205 << " " << ene_post << " [W.m-3]. [step"<< rk_step << "]" << finl;
1207}
1208
1209void IJK_Thermal_base::sauvegarder_temperature(Nom& lata_name, int idx, const int& stop)
1210{
1211 fichier_reprise_temperature_ = lata_name;
1214 dumplata_scalar(lata_name, Nom("TEMPERATURE_") + Nom(idx) , *temperature_, rank_reprise_temperature_);
1215 if (stop)
1216 latastep_reprise_ = latastep_reprise_ini_ + ref_ijk_ft_->schema_temps_ijk().get_tstep() + 1;
1217}
1218
1219/********************************************
1220 * Protected methods
1221 ********************************************/
1222
1224{
1226 Cout << "Reading initial temperature field T" << rank_ << " from file " << fichier_reprise_temperature_ << " timestep= " << timestep_reprise_temperature_
1227 << " from rank " << rank_reprise_temperature_ << finl;
1228 const Nom& geom_name = splitting.le_nom();
1230 *temperature_); // fonction qui lit un champ a partir d'un lata .
1231 temperature_->echange_espace_virtuel(temperature_->ghost()); // It is essential to fill the EV because the first call to convection needs them.
1232}
1233
1234// Mettre rk_step = -1 si schema temps different de rk3.
1235void IJK_Thermal_base::calculer_dT(const IJK_Field_vector3_double& velocity)
1236{
1237 //static Stat_Counter_Id cnt_gfm_temperature = //statistiques().new_counter(2, "GFM - Temperature");
1238 //static Stat_Counter_Id cnt_temperature_grad_hess = //statistiques().new_counter(2, "Gradient and Hessian Temperature calculation");
1239 //static Stat_Counter_Id cnt_lrs_temperature = //statistiques().new_counter(2, "Solve the LRS thermal problems");
1240 //static Stat_Counter_Id cnt_lrs_compute_flux = //statistiques().new_counter(2, "Compute flux correction from LRS");
1241 //static Stat_Counter_Id cnt_lrs_prepare_flux = //statistiques().new_counter(2, "Prepare flux correction from LRS");
1242 //static Stat_Counter_Id cnt_cell_temperature_first = //statistiques().new_counter(2, "Temperature Cell centre - First call");
1243 //static Stat_Counter_Id cnt_flux_balance = //statistiques().new_counter(2, "Thermal flux balance");
1244 //static Stat_Counter_Id cnt_upstream_temperature = //statistiques().new_counter(2, "Upstream temperature");
1245 // //static Stat_Counter_Id cnt_cell_temperature_second = //statistiques().new_counter(1, "Temperature Cell centre - Second call");
1246
1247 const double current_time = ref_ijk_ft_->schema_temps_ijk().get_current_time();
1248 const double ene_ini = compute_global_energy(*d_temperature_);
1249
1250 /*
1251 * Clean_subproblems !
1252 */
1253 if (debug_)
1254 Cerr << "Clean thermal subproblems" << finl;
1256
1257 // Correct the vapour and mixed cells values
1258 if (debug_)
1259 Cerr << "Store temperature before extrapolation" << finl;
1262
1263 /*
1264 * Correct the temperature field using either the ghost-fluid
1265 * approach or the laminar sub-resolution approach (and zero values for debug)
1266 */
1267 //statistiques().begin_count(cnt_gfm_temperature);
1268 if (debug_)
1269 Cerr << "Start the Ghost-fluid (GFM) approach" << finl;
1270 if (debug_)
1271 Cerr << "Br0 (GFM approach)" << finl;
1273 if (debug_)
1274 Cerr << "Br1 (GFM approach)" << finl;
1276 if (debug_)
1277 Cerr << "Br2 (GFM approach)" << finl;
1279 if (debug_)
1280 Cerr << "Br3 (GFM approach)" << finl;
1282 if (debug_)
1283 Cerr << "End the Ghost-fluid (GFM) approach" << finl;
1284 //statistiques().end_count(cnt_gfm_temperature);
1285
1286 /*
1287 * Compute gradients and hessian of the temperature after the ghost fluid extension
1288 */
1289 //statistiques().begin_count(cnt_temperature_grad_hess);
1290 if (debug_)
1291 Cerr << "Compute temperature derivatives" << finl;
1295 //statistiques().end_count(cnt_temperature_grad_hess);
1296
1297 /*
1298 * Compute sub-problems (For Subresolution Child classes only !)
1299 */
1300 //statistiques().begin_count(cnt_lrs_temperature);
1301 if (debug_)
1302 Cerr << "Compute thermal subproblems" << finl;
1304 //statistiques().end_count(cnt_lrs_temperature);
1305
1306 /*
1307 * Interpolate a value for the QUICK SCHEME (first call)
1308 */
1309
1310 //statistiques().begin_count(cnt_cell_temperature_first);
1311 if (debug_)
1312 Cerr << "Compute temperature mixed cell centres" << finl;
1314 //statistiques().end_count(cnt_cell_temperature_first);
1315
1316 /*
1317 * Convective and Diffusive fluxes
1318 */
1319 //statistiques().begin_count(cnt_lrs_compute_flux);
1320 if (debug_)
1321 Cerr << "Compute thermal convective and diffusive fluxes from subproblems" << finl;
1323 //statistiques().end_count(cnt_lrs_compute_flux);
1324
1325 //statistiques().begin_count(cnt_lrs_prepare_flux);
1326 if (debug_)
1327 Cerr << "Prepare ij fluxes" << finl;
1330 //statistiques().end_count(cnt_lrs_prepare_flux);
1331
1332
1333 //statistiques().begin_count(cnt_flux_balance);
1334 if (debug_)
1335 Cerr << "Compute fluxes balance" << finl;
1339 //statistiques().end_count(cnt_flux_balance);
1340
1341
1342 //statistiques().begin_count(cnt_upstream_temperature);
1343
1344 Navier_Stokes_FTD_IJK& ns = ref_ijk_ft_->eq_ns();
1345 if (debug_)
1346 Cerr << "Apply Upstream temperature" << finl;
1347 double nb_diam_upstream_velocity = ns.get_nb_diam_upstream();
1348 if (nb_diam_upstream_ == 0.)
1349 nb_diam_upstream_ = nb_diam_upstream_velocity;
1350 if (upstream_temperature_ > -1e20 && ns.get_vitesse_upstream() > -1e20)
1352 ref_ijk_ft_->get_interface(), nb_diam_upstream_,
1353 ns.get_upstream_dir(), ref_ijk_ft_->milieu_ijk().get_direction_gravite(),
1355 //statistiques().end_count(cnt_upstream_temperature);
1356
1357 if (debug_)
1358 Cerr << "Convection of temperature" << finl;
1360 {
1361 case 1:
1363 break;
1364 case 2:
1366 break;
1367 default:
1368 Cerr << "Pb du switch de convection" << finl;
1369 Process::exit();
1370 }
1371 const double ene_postConv = compute_global_energy(*d_temperature_);
1372
1373 if (debug_)
1374 Cerr << "Diffusion of temperature" << finl;
1376 const double ene_postDiffu = compute_global_energy(*d_temperature_);
1377
1378 if (debug_)
1379 Cerr << "Temperature source term" << finl;
1381 const double ene_postSource = compute_global_energy(*d_temperature_);
1382
1383 /*
1384 * In case of the subresolution or not
1385 */
1387 // calculer_gradient_temperature(*temperature_, grad_T_); Routine Aymeric gradient sur faces
1388
1389 Cerr << "[Energy-Budget-T"<<rank_<<"-1-TimeResolution] time t=" << current_time
1390 << " " << ene_ini
1391 << " " << ene_postConv
1392 << " " << ene_postDiffu
1393 << " " << ene_postSource
1394 << " delta=" << ene_postSource-ene_ini << " [W.m-3]." << finl;
1395
1396 const IJK_Field_double& temperature = *temperature_;
1397 double Tmax = -1.e20;
1398 double Tmin = 1.e20;
1399 const int ni = temperature.ni();
1400 const int nj = temperature.nj();
1401 const int nk = temperature.nk();
1402 for (int k = 0; k < nk; k++)
1403 for (int j = 0; j < nj; j++)
1404 for (int i = 0; i < ni; i++)
1405 {
1406 Tmax = std::max(Tmax, temperature(i,j,k));
1407 Tmin = std::min(Tmin, temperature(i,j,k));
1408 }
1409 Tmax = Process::mp_max(Tmax);
1410 Tmin = Process::mp_min(Tmin);
1411 Cerr <<"[Temperature-MinMax-" << rank_ <<"] t/Tmin/Tmax " << current_time << " "
1412 << Tmin << " " << Tmax
1413 << finl;
1414 return;
1415}
1416
1418{
1419 if (debug_)
1420 Cerr << "Post-Processing routines for visu" << finl;
1421 Cerr << "Override temperature cell centres for visu" << finl;
1423 if (debug_)
1424 Cerr << "Enforce periodic boundary conditions values" << finl;
1426 if (debug_)
1427 Cerr << "Clip temperature values" << finl;
1430 if (debug_)
1431 Cerr << "Correct temperature for visu" << finl;
1433 if (debug_)
1434 Cerr << "set analytical temperature field" << finl;
1436 if (debug_)
1437 Cerr << "Correct operators in mixed cells for visu" << finl;
1439}
1440
1442{
1444 {
1445 temperature_ft_.data() = 0.;
1446 temperature_ft_.echange_espace_virtuel(temperature_ft_.ghost());
1447 temperature_->echange_espace_virtuel(temperature_->ghost());
1448 ref_ijk_ft_->eq_ns().redistribute_to_splitting_ft_elem(*temperature_, temperature_ft_);
1449 temperature_ft_.echange_espace_virtuel(temperature_ft_.ghost());
1450
1451 compute_eulerian_normal_temperature_gradient_interface(*eulerian_distance_ft_,
1452 ref_ijk_ft_->get_interface().I_ft(),
1458 if (on_splitting_ns)
1459 {
1460 compute_eulerian_normal_temperature_gradient_interface(*eulerian_distance_ns_,
1461 ref_ijk_ft_->get_interface().I(),
1464 *temperature_,
1467 }
1468 else
1469 ref_ijk_ft_->eq_ns().redistribute_from_splitting_ft_elem(eulerian_grad_T_interface_ft_, eulerian_grad_T_interface_ns_);
1470
1471 }
1472 else
1473 Cerr << "Don't compute the grad_T_interface field" << finl;
1474}
1475
1477{
1479 {
1480
1481 eulerian_grad_T_interface_ft_.echange_espace_virtuel(eulerian_grad_T_interface_ft_.ghost());
1482 propagate_eulerian_normal_temperature_gradient_interface(ref_ijk_ft_->get_interface(),
1490 eulerian_grad_T_interface_ft_.echange_espace_virtuel(eulerian_grad_T_interface_ft_.ghost());
1491 ref_ijk_ft_->eq_ns().redistribute_from_splitting_ft_elem(eulerian_grad_T_interface_ft_, eulerian_grad_T_interface_ns_);
1492 eulerian_grad_T_interface_ns_.echange_espace_virtuel(eulerian_grad_T_interface_ns_.ghost());
1493 }
1494 else
1495 Cerr << "Don't compute the grad_T_interface field" << finl;
1496}
1497
1499{
1500 if (ghost_fluid_)
1501 {
1502
1503 temperature_ft_.echange_espace_virtuel(temperature_ft_.ghost());
1504 compute_eulerian_extended_temperature(ref_ijk_ft_->get_interface().I_ft(),
1510 if (on_splitting_ns)
1511 {
1512 eulerian_grad_T_interface_ns_.echange_espace_virtuel(eulerian_grad_T_interface_ns_.ghost());
1513 temperature_->echange_espace_virtuel(temperature_->ghost());
1514 compute_eulerian_extended_temperature(ref_ijk_ft_->get_interface().I(),
1518 *temperature_,
1520 }
1521 else
1522 {
1523 ref_ijk_ft_->eq_ns().redistribute_from_splitting_ft_elem(eulerian_grad_T_interface_ft_, eulerian_grad_T_interface_ns_);
1524 ref_ijk_ft_->eq_ns().redistribute_from_splitting_ft_elem(temperature_ft_, *temperature_);
1525 }
1526 temperature_->echange_espace_virtuel(temperature_->ghost());
1527 }
1528 else
1529 Cerr << "Don't compute the ghost temperature field" << finl;
1530}
1531
1533{
1535 {
1536 bubbles_barycentre_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bubbles_barycentre());
1537 bubbles_volume_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bubbles_volume());
1538 bounding_box_= &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bounding_box());
1539 min_max_larger_box_ = &(ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_min_max_larger_box());
1540 }
1541 else
1542 Cerr << "Don't compute the eulerian bubbles' components (composantes connexes)" << finl;
1543}
1544
1546{
1548 {
1549 temperature_->echange_espace_virtuel(temperature_->ghost());
1550 for (int dir=0; dir<3; dir++)
1551 grad_T_elem_[dir].data()=0;
1552 grad_T_elem_.echange_espace_virtuel();
1554 grad_T_elem_.echange_espace_virtuel();
1555
1557 {
1558 // temperature_gaussian_filtered_.data() = temperature_->data();
1559 smooth_eulerian_field(temperature_gaussian_filtered_,
1560 *temperature_,
1561 0,
1564 ref_ijk_ft_->get_interface(),
1567 smoothing_numbers_, 0, 1, 0);
1568 temperature_gaussian_filtered_.echange_espace_virtuel(temperature_gaussian_filtered_.ghost());
1569
1570 // grad_T_elem_smooth_ = grad_T_elem_;
1571 // grad_T_elem_smooth_.echange_espace_virtuel();
1572 smooth_vector_field(grad_T_elem_smooth_,
1575 ref_ijk_ft_->get_interface(),
1580 grad_T_elem_smooth_.echange_espace_virtuel();
1581
1582 fill_tangential_gradient(grad_T_elem_smooth_,
1585 grad_T_elem_tangential_.echange_espace_virtuel();
1586 }
1587 }
1588 else
1589 Cerr << "The temperature gradient at the cell centres is not computed" << finl;
1590}
1591
1593{
1595 {
1596 temperature_->echange_espace_virtuel(temperature_->ghost());
1597 for (int dir=0; dir<3; dir++)
1598 hess_diag_T_elem_[dir].data()=0;
1599 hess_diag_T_elem_.echange_espace_virtuel();
1602 hess_diag_T_elem_.echange_espace_virtuel();
1603 }
1604 else
1605 Cerr << "The temperature gradient at the cell centres is not computed" << finl;
1606}
1607
1609{
1611 {
1612 temperature_->echange_espace_virtuel(temperature_->ghost());
1613 for (int dir=0; dir<3; dir++)
1614 hess_cross_T_elem_[dir].data()=0;
1615 hess_cross_T_elem_.echange_espace_virtuel();
1619 hess_cross_T_elem_.echange_espace_virtuel();
1620 }
1621 else
1622 Cerr << "The temperature gradient at the cell centres is not computed" << finl;
1623}
1624
1625void IJK_Thermal_base::compute_temperature_convective_fluxes(const IJK_Field_vector3_double& velocity)
1626{
1627 //static Stat_Counter_Id cnt_convective_flux_balance = //statistiques().new_counter(2, "Thermal flux balance - Convection");
1628 //static Stat_Counter_Id cnt_convective_flux_balance_op = //statistiques().new_counter(3, "Thermal flux balance - Convection operator");
1629 //static Stat_Counter_Id cnt_convective_flux_balance_factor = //statistiques().new_counter(3, "Thermal flux balance - Convection prefactor");
1630
1631 //statistiques().begin_count(cnt_convective_flux_balance);
1632
1634 {
1635 for (int c=0; c<3; c++)
1636 rho_cp_u_T_convective_raw_[c].data() = 0.;
1638 {
1639 const Vecteur3 bubbles_velocity = (*rising_velocity_overall_);
1640 temperature_grad_flux_op_quick_.set_velocity_frame_of_reference(bubbles_velocity);
1641 }
1642
1643 //statistiques().begin_count(cnt_convective_flux_balance_op);
1645 velocity[0],
1646 velocity[1],
1647 velocity[2],
1649 //statistiques().end_count(cnt_convective_flux_balance_op);
1650
1651 //statistiques().begin_count(cnt_convective_flux_balance_factor);
1652 const double rhocp = get_rhocp_l();
1653 const int ni = d_temperature_->ni();
1654 const int nj = d_temperature_->nj();
1655 const int nk = d_temperature_->nk();
1656 for (int k = 0; k < nk; k++)
1657 for (int j = 0; j < nj; j++)
1658 for (int i = 0; i < ni; i++)
1660 for (int c=0; c<3; c++)
1661 {
1662 const double convective_flux = rho_cp_u_T_convective_raw_[c](i,j,k);
1663 rho_cp_u_T_convective_raw_[c](i,j,k) = convective_flux * rhocp;
1664 }
1665 //statistiques().end_count(cnt_convective_flux_balance_factor);
1666 rho_cp_u_T_convective_raw_.echange_espace_virtuel();
1667 }
1668
1669 //statistiques().end_count(cnt_convective_flux_balance);
1670}
1671
1672// Convect temperature field by the velocity.
1673// The output is stored in *d_temperature_ (it is a volume integral over the CV)
1674void IJK_Thermal_base::compute_temperature_convection(const IJK_Field_vector3_double& velocity)
1675{
1676 //static Stat_Counter_Id cnt_conv_temp = //statistiques().new_counter(2, "FT convection temperature");
1677 //static Stat_Counter_Id cnt_conv_temp_op = //statistiques().new_counter(3, "FT convection temperature operator");
1678 //static Stat_Counter_Id cnt_conv_temp_factor = //statistiques().new_counter(3, "FT convection temperature factor");
1679
1680 //statistiques().begin_count(cnt_conv_temp);
1681
1682 IJK_Field_double& d_temperature = *d_temperature_;
1683
1685 {
1686 d_temperature.data()=0;
1687 u_T_convective_volume_.data() = 0;
1688 }
1689 else
1690 {
1691 //statistiques().begin_count(cnt_conv_temp_op);
1692 temperature_convection_op_->calculer(*temperature_, velocity[0], velocity[1], velocity[2], d_temperature);
1693 //statistiques().end_count(cnt_conv_temp_op);
1694
1695 //statistiques().begin_count(cnt_conv_temp_factor);
1696 const bool post_pro_u_T_convective = ref_ijk_ft_->get_post().is_post_required("U_T_CONVECTIVE");
1697 const int ni = d_temperature.ni();
1698 const int nj = d_temperature.nj();
1699 const int nk = d_temperature.nk();
1700 for (int k = 0; k < nk; k++)
1701 for (int j = 0; j < nj; j++)
1702 for (int i = 0; i < ni; i++)
1703 {
1704 u_T_convective_volume_(i,j,k) = d_temperature(i,j,k);
1705 const double resu = d_temperature(i,j,k) / vol_;
1706 d_temperature(i,j,k) = resu;
1707
1708 if (post_pro_u_T_convective)
1709 u_T_convective_(i,j,k) = resu;
1710 }
1711 //statistiques().end_count(cnt_conv_temp_factor);
1712 }
1713
1714 //statistiques().end_count(cnt_conv_temp);
1715 DebogIJK::verifier("op_conv(rho)", d_temperature);
1716 return;
1717}
1718
1720{
1722 {
1723 const double T_paroi_impose_kmin = boundary_conditions_.get_temperature_kmin();
1724 double lambda_de_t_paroi_kmin = lambda_liquid_;
1725 // calculer ici div(lambda*grad(T))*volume)
1726 calculer_flux_thermique_bord(*temperature_, lambda_de_t_paroi_kmin,
1727 T_paroi_impose_kmin, boundary_flux_kmin_, 0 /* boundary kmin */);
1728 }
1730 {
1731 const double flux_paroi_impose_kmin = boundary_conditions_.get_flux_kmin();
1733 flux_paroi_impose_kmin, boundary_flux_kmin_, 0 /* boundary kmin */);
1734 }
1735 else
1736 {
1737 // Perio... not needed. The flux on the "boundary" (in that case , it's not truely a boundary) will be computed as inside...
1738 }
1740 {
1741 const double T_paroi_impose_kmax = boundary_conditions_.get_temperature_kmax();
1742 double lambda_de_t_paroi_kmax = lambda_liquid_;
1743 //TODO: calculer ici div(lambda*grad(T))*volume)
1744 calculer_flux_thermique_bord(*temperature_, lambda_de_t_paroi_kmax,
1745 T_paroi_impose_kmax, boundary_flux_kmax_, 1 /* boundary kmax */);
1746 }
1748 {
1749 const double flux_paroi_impose_kmax = boundary_conditions_.get_flux_kmax();
1751 flux_paroi_impose_kmax, boundary_flux_kmax_, 1 /* boundary kmax */);
1752 // Cerr << "not coded yet" << finl;
1753 // Process::exit();
1754 }
1755 else
1756 {
1757 // Perio... not needed. The flux on the "boundary" (in that case , it's not truely a boundary) will be computed as inside...
1758 }
1759 temperature_->echange_espace_virtuel(temperature_->ghost());
1761}
1762
1764{
1765 //static Stat_Counter_Id cnt_diffusive_flux_balance = //statistiques().new_counter(2, "Thermal flux balance - Diffusion");
1766 //statistiques().begin_count(cnt_diffusive_flux_balance);
1767
1769 {
1770 for (int dir=0; dir<3; dir++)
1771 div_coeff_grad_T_raw_[dir].data()=0;
1776 div_coeff_grad_T_raw_.echange_espace_virtuel();
1777 }
1778
1779 //statistiques().end_count(cnt_diffusive_flux_balance);
1780}
1781
1783{
1784 //static Stat_Counter_Id cnt_diff_temp = //statistiques().new_counter(2, "FT diffusion temperature");
1785 //static Stat_Counter_Id cnt_diff_temp_op = //statistiques().new_counter(3, "FT diffusion temperature operator");
1786 //static Stat_Counter_Id cnt_diff_temp_factor = //statistiques().new_counter(3, "FT diffusion temperature factor");
1787 //statistiques().begin_count(cnt_diff_temp);
1788
1791 {
1792 /*
1793 * Correct the diffusive fluxes here or in the operator ?
1794 */
1795 //statistiques().begin_count(cnt_diff_temp_op);
1800 //statistiques().end_count(cnt_diff_temp_op);
1801
1802 //statistiques().begin_count(cnt_diff_temp_factor);
1804 //statistiques().end_count(cnt_diff_temp_factor);
1805
1806 DebogIJK::verifier("div_coeff_grad_T_volume_", *div_coeff_grad_T_volume_);
1807 }
1808
1809 //statistiques().end_count(cnt_diff_temp);
1810}
1811
1812//////////////////////////////////////////
1813//void IJK_Thermal_base::add_temperature_source() { ; }
1814double IJK_Thermal_base::compute_rho_cp_u_mean(const IJK_Field_double& vx)
1815{
1816 /*
1817 * By default use only the liquid phase (same for subresolution)
1818 * Overridden in Onefluid and others
1819 */
1820 const double rho_cp = ref_ijk_ft_->milieu_ijk().get_rho_liquid() * cp_liquid_;
1821 return calculer_rho_cp_u_moyen(vx, vx, vx, rho_cp, 2);
1822}
1823
1824double IJK_Thermal_base::get_rho_cp_u_ijk(const IJK_Field_double& vx, int i, int j, int k) const
1825{
1826 return ref_ijk_ft_->milieu_ijk().get_rho_liquid() * cp_liquid_ * vx(i,j,k);
1827}
1828
1830{
1831 //static Stat_Counter_Id cnt_source_temp = //statistiques().new_counter(2, "FT source temperature");
1832 //statistiques().begin_count(cnt_source_temp);
1833 // Dans le cas ou les flux entrants et sortants sont identiques :
1834 // DONE: changer cette condition non adaptee
1835 if (type_T_source_!="??")
1836 {
1837 const IJK_Field_double& temperature = *temperature_;
1838 IJK_Field_double& d_temperature = *d_temperature_;
1839
1840 // int gravity_dir = ref_ijk_ft_->milieu_ijk().get_direction_gravite();
1841 const int gravity_dir=0;
1842 /*
1843 * Modifications un jour peut-être ?!
1844 * Adaptation paroi dans une autre direction ?
1845 */
1846 const int wall_normal_dir = DIRECTION_K;
1847 const IJK_Field_double& vx = ref_ijk_ft_->eq_ns().get_velocity()[gravity_dir];
1848 double rho_cp_u_moy = compute_rho_cp_u_mean(vx);
1849 const Domaine_IJK& geom = temperature.get_domaine();
1850 const double dl = geom.get_constant_delta(gravity_dir);
1851 const double lwall = geom.get_domain_length(wall_normal_dir) ;
1852 const double h = lwall / 2.;
1853 const int nk = d_temperature_->nk();
1854 const int ni = d_temperature_->ni();
1855 const int nj = d_temperature_->nj();
1856 // TODO: faire une methode calculer_rho_cp
1857 //debut if source = ponderee par la vitesse
1858 if (type_T_source_=="dabiri")
1859 {
1860 const double wall_flux = boundary_conditions_.get_flux_kmax();
1861 // wall_flux in W.m^{-2}
1862 const double qw = wall_flux;
1863 // TODO: Ask Aymeric -> 2 wall with same B.Cs ?
1864 const double dTm = 2 * qw / rho_cp_u_moy;
1865 /*
1866 * Local correction using global dTm
1867 * TODO: faux, il manque un facteur 1/h pour homogeneite
1868 * MG: Pas sûr...
1869 */
1870 for (int k = 0; k < nk; k++)
1871 for (int j = 0; j < nj; j++)
1872 for (int i = 0; i < ni; i++)
1873 {
1874// const double rho = ref_ijk_ft_->rho_field_(i,j,k);
1875// const double cp = cp_(i,j,k);
1876// const double u = (vx(i,j,k) +vx(i+1,j,k))/2;
1877// const double rho_cp_u = rho*cp*u;
1878 /*
1879 * TODO: Ask Aymeric : WTF lambda_variable_; at the wall ???
1880 */
1881// if(lambda_variable_)
1882// {
1883// const double div_lambda = compute_lambda_variations(dl);
1884// const double div_lambda = (lambda_(i+1,j,k)-lambda_(i-1,j,k))/(2*dl);
1885// source_temperature_(i,j,k) = (rho_cp_u - div_lambda) * dTm;
1886// }
1887// else
1888// {
1889// source_temperature_(i,j,k) = rho_cp_u * dTm;
1890// }
1891 const double rho_cp_u = get_rho_cp_u_ijk(vx, i, j, k);
1892 const double div_lambda = get_div_lambda_ijk(i,j,k) / (2*dl);
1893 source_temperature_(i,j,k) = (rho_cp_u - div_lambda) * dTm;
1894 // TODO: Each plate generates heat in a volume of half the plates distance ??
1895 const double Sc = qw / h ; // qw / lambda * h;
1896 const double source = (source_temperature_(i,j,k) - Sc) * vol_; // -Sc ) * volume;
1897 // TODO: faux, que vient faire Sc en plus de source ?
1898 d_temperature(i,j,k) += source;
1899 }
1900 //
1903 calculer_Nusselt(vx);
1904 return;
1905 }
1906 // TODO: remplacer dabiri par patch_dabiri apres verif
1907 else if (type_T_source_=="patch_dabiri")
1908 {
1909 Cerr << "Type de source : patch_dabiri" << finl;
1910 const double wall_flux = boundary_conditions_.get_flux_kmax();
1911 const double qw = wall_flux;
1912 const double dTm = -2*qw/(2*h*rho_cp_u_moy) ;
1913 if (std::fabs(rho_cp_u_moy)<DMINFLOAT)
1914 {
1915 Cerr << "You cannot use this source " << type_T_source_ << " without flowrate!" << finl;
1916 Process::exit();
1917 }
1918
1919 for (int k = 0; k < nk; k++)
1920 for (int j = 0; j < nj; j++)
1921 for (int i = 0; i < ni; i++)
1922 {
1923 const double u = (vx(i,j,k) +vx(i+1,j,k))/2;
1924 source_temperature_(i,j,k) = (u - get_div_lambda_ijk(i,j,k) / (2*dl)) * dTm;
1925 const double source = source_temperature_(i,j,k);
1926 d_temperature(i,j,k) += source;
1927 }
1928 //
1931 calculer_Nusselt(vx);
1932 return;
1933 }
1934 else if (type_T_source_=="unweighted_dabiri")
1935 {
1936 // Sans la ponderation de S par u (S=rhocpu.../<rhocpu>), cela permet d'avoir une source uniforme!
1937 // Mais ce n'est plus le meme changement de variable, c'est quoi alors?
1938 // TODO: Que faire de rho_cp en diphasique? Moyen ou local?
1939 Cerr << "Type de source : unweighted_dabiri" << finl;
1940 const double wall_flux = boundary_conditions_.get_flux_kmax();
1941 const double qw = wall_flux;
1942 const double liquid_fraction = calculer_v_moyen(ref_ijk_ft_->get_interface().I());
1943 const double rho_cp_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid() * cp_liquid_;
1944 const double rho_cp_v = ref_ijk_ft_->milieu_ijk().get_rho_vapour() * cp_vapour_;
1945 const double rhocp_moy = rho_cp_l*liquid_fraction + rho_cp_v*(1-liquid_fraction);
1946 const double dTm = -2*qw/(2*h*rhocp_moy) ;
1947 for (int k = 0; k < nk; k++)
1948 for (int j = 0; j < nj; j++)
1949 for (int i = 0; i < ni; i++)
1950 {
1952 {
1953 Cerr << "Veut-on vraiment calculer une partie en lambda spatialement variable??" <<finl;
1954 Cerr << "Exit at IJK_Thermal_base::add_temperature_source" << finl;
1955 Process::exit();
1956 }
1957 else
1958 {
1959 source_temperature_(i,j,k) = dTm;
1960 }
1961 const double source = source_temperature_(i,j,k);
1962 d_temperature(i,j,k) += source;
1963 }
1964 //
1967 calculer_Nusselt(vx);
1968 return;
1969 }
1970 // Debut source = SWARM
1971 else if (type_T_source_=="SWARM")
1972 {
1973 // DONE: idem
1974 double Tv=0;
1975 double Tl=0;
1976 double Vv = 0;
1977 double Vl = 0;
1978
1979 // calcul de Tv et Tl
1980 for (int k = 0; k < nk; k++)
1981 for (int j = 0; j < nj; j++)
1982 for (int i = 0; i < ni; i++)
1983 {
1984 const double chi = ref_ijk_ft_->get_interface().I(i, j, k);
1985 const double T = temperature(i, j, k);
1986 Tv += T*(1.-chi);
1987 Vv += (1.-chi);
1988 Tl += T*chi;
1989 Vl += chi;
1990 }
1991 Tv = Process::mp_sum(Tv);
1992 Tl = Process::mp_sum(Tl);
1993 Vv = Process::mp_sum(Vv);
1994 Vl = Process::mp_sum(Vl);
1995 Tv /= Vv;
1996 Tl /= Vl;
1997 Cerr << "AY-test_source : " << Tv << finl;
1998
1999 // Calcul de dT a partir de l'expression suivante : dT = k(T - Tm)/(rho*cp)
2000 const double kv = kv_;
2001 const double kl = kl_;
2002 const double T0v = T0v_;
2003 const double T0l = T0l_;
2004 const double rho_cp_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid() * cp_liquid_;
2005 const double rho_cp_v = ref_ijk_ft_->milieu_ijk().get_rho_vapour() * cp_vapour_;
2006 for (int k = 0; k < nk; k++)
2007 for (int j = 0; j < nj; j++)
2008 for (int i = 0; i < ni; i++)
2009 {
2010 d_source_Tv_(i,j,k) = kv/rho_cp_v * (Tv - T0v);
2011 d_source_Tl_(i,j,k) = kl/rho_cp_l * (Tl - T0l);
2012 }
2013 Cerr << "AY-test_source1 : " << Tv << finl;
2014 // TODO: Remplacer euler_explicit_update par l'utilisation de timestep_ et utiliser d_source_Tv_ comme une constante
2015 for (int k = 0; k < nk; k++)
2016 {
2017 ref_ijk_ft_->eq_ns().euler_explicit_update(d_source_Tv_, source_temperature_v_, k);
2018 ref_ijk_ft_->eq_ns().euler_explicit_update(d_source_Tl_, source_temperature_l_, k);
2019 }
2020 Cerr << "AY-test_source2 : " << Tv << finl;
2021 for (int k = 0; k < nk; k++)
2022 for (int j = 0; j < nj; j++)
2023 for (int i = 0; i < ni; i++)
2024 {
2025 // chi vaut 1. dans le liquide et 0 dans les bulles
2026 const double chi = ref_ijk_ft_->get_interface().I(i, j, k);
2027 source_temperature_(i,j,k) = (1.-chi)*source_temperature_v_(i,j,k) + chi*source_temperature_l_(i,j,k);
2028 }
2029 Cerr << "AY-test_source3 : " << Tv << finl;
2030 for (int k = 0; k < nk; k++)
2031 for (int j = 0; j < nj; j++)
2032 for (int i = 0; i < ni; i++)
2033 {
2034 d_temperature(i,j,k) += source_temperature_(i,j,k)*vol_;
2035 }
2036 Cerr << "AY-test_source 111 : " << source_temperature_(1,1,1) << finl;
2037 Cerr << "AY-test_source vol : " << vol_ << finl;
2038 Cerr << "source_temp " << " " << d_temperature(1,1,1) << finl;
2039 const double current_time = ref_ijk_ft_->schema_temps_ijk().get_current_time();
2040
2041 // GB : Ma comprehension est que ce ne sont pas des champs, mais un scalaire unique
2042 const double Sl = source_temperature_l_(0,0,0);
2043 const double Sv = source_temperature_v_(0,0,0);
2044 const double dSl = d_source_Tl_(0,0,0);
2045 const double dSv = d_source_Tv_(0,0,0);
2046 Cerr <<"[ThermalInfo-" << rank_ <<"] t/Tl/Tv/Sl/Sv/dSldt/dSvdt " << current_time << " "
2047 << Tl << " " << Tv << " "
2048 << Sl << " " << Sv << " "
2049 << dSl << " " << dSv
2050 <<finl;
2051 /*
2052 * TODO: M.G c'est quoi ??
2053 * Si on utilise ca c'est pour remplir dans tous les cas d'utilisation d'une source le champs temperature_physique_T
2054 * calculer_temperature_physique_T_dummy();
2055 */
2056 temperature_physique_T_.data() = 0.;
2057 //statistiques().end_count(cnt_source_temp);
2058 return;
2059 }
2060 }
2061 // Dans ce cas la ce ne sont pas des flux thermiques identiques
2062 else
2063 {
2064 Cerr << "no_source_for_temperature" << finl;
2065 //statistiques().end_count(cnt_source_temp);
2066 return;
2067 }
2068}
2069
2071{
2072 if (debug_)
2073 Cerr << "Source terms post-processing routines" << finl;
2074 if (liste_post_instantanes_.contient_("TEMPERATURE_ADIM_BULLES"))
2076}
2077
2078/*
2079 * Aymeric: Renommer pour expliciter qu'il s'agit de la transformation
2080 * inverse de Kawamura avec le gradient de temperature moyenne
2081 */
2082void IJK_Thermal_base::calculer_temperature_physique_T(const IJK_Field_double& vx, const double dTm)
2083{
2084 if (wall_flux_)
2085 {
2086 const IJK_Field_double& temperature = *temperature_;
2087
2088 const Domaine_IJK& geom = temperature.get_domaine();
2089 double dx =geom.get_constant_delta(DIRECTION_I);
2090 double origin_x = geom.get_origin(DIRECTION_I) + (dx * 0.5) ;
2091 const int offset_i = geom.get_offset_local(DIRECTION_I);
2092
2093 const int nk = d_temperature_->nk();
2094 const int ni = d_temperature_->ni();
2095 const int nj = d_temperature_->nj();
2096
2097 for (int k = 0; k < nk; k++)
2098 for (int j = 0; j < nj; j++)
2099 for (int i = 0; i < ni; i++)
2100 {
2101 const double x = (i+ offset_i ) *dx + origin_x; //MR A GB: ne doit-on pas soustraire par -dx*0.5???
2102 temperature_physique_T_(i,j,k) = (x*dTm)-temperature(i,j,k);
2103 }
2104 temperature_physique_T_.echange_espace_virtuel(temperature_physique_T_.ghost());
2105 DebogIJK::verifier("temperature_physique_T", temperature_physique_T_);
2106 return;
2107 }
2108 else
2109 {
2110 Cerr << "No source for the temperature field" << finl;
2111 return;
2112 }
2113}
2114
2116{
2117 const IJK_Field_double& temperature = *temperature_;
2118
2119 const int nk = temperature.nk();
2120 const int ni = temperature.ni();
2121 const int nj = temperature.nj();
2122
2123 // Calcul de moy1 = moy(chi*T+)/moy(chi) et moy2 = moy((1-chi)*T+) / moy(1-chi)
2124 double Tl = 0.;
2125 double Tv = 0.;
2126 double Vl = 0.;
2127 double Vv = 0.;
2128 const IJK_Field_double& chi = ref_ijk_ft_->get_interface().I(); // rappel : chi vaut 1. dans le liquide et 0 dans la vapeur
2129
2130 // assuming uniform mesh : vol_cell=cste.
2131 for (int k = 0; k < nk; k++)
2132 for (int j = 0; j < nj; j++)
2133 for (int i = 0; i < ni; i++)
2134 {
2135 Tl += temperature(i,j,k)*chi(i, j, k);
2136 Tv += temperature(i,j,k)*(1.-chi(i, j, k));
2137 Vl += chi(i, j, k);
2138 Vv += (1.-chi(i, j, k));
2139 }
2140 Tl = Process::mp_sum(Tl);
2141 Tv = Process::mp_sum(Tv);
2142 Vv = Process::mp_sum(Vv);
2143 Vl = Process::mp_sum(Vl);
2144 Tl /= Vl;
2145 Tv /= Vv;
2146 // Calcul de Tl et Tv :
2147 // const double Tl = Tv0_ / (1 - Tl) * (1 - Tl / (1 + Tv)) / (1 + Tl * Tv / ((1 - Tl) * (1 + Tv)));
2148 // const double Tv = Tv0_ / (1 + Tv) * (1 + Tv / (1 - Tl)) / (1 + Tv * Tl / ((1 + Tv) * (1 - Tl)));
2149 const int ntot = temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_I)
2150 *temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_J)
2151 *temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_K);
2152 const double time = ref_ijk_ft_->schema_temps_ijk().get_current_time();
2153 Cerr << "Tl_test : time= "<< time << " alpha_l= " << Vl/ntot<< " TI=" <<Tl*Vl/ntot<< " Tl="<< Tl << finl;
2154 Cerr << "Tv_test : time= "<< time << " alpha_v= " << Vv/ntot<< " TIv=" <<Tv*Vv/ntot<< " Tv="<< Tv << finl;
2155
2156 for (int k = 0; k < nk; k++)
2157 for (int j = 0; j < nj; j++)
2158 for (int i = 0; i < ni; i++)
2159 temperature_adim_bulles_(i,j,k) = (temperature(i,j,k) - Tv0_)/(Tl - Tv);
2160
2161 // temperature_adim_bulles_.echange_espace_virtuel(temperature_adim_bulles_.ghost());
2162 // TODO: ce qui suit ne devrait pas etre la, mais je le met ici temporairement avant de trouver une meilleure solution
2163
2164 double E_tot = 0.;
2165 double E_liq_pure = 0., E_liq = 0;
2166 double E_vap_pure = 0., E_vap = 0;
2167 double E_mixt = 0.;
2168 calculer_energies(E_liq_pure, E_liq,
2169 E_vap_pure, E_vap,
2170 E_mixt, E_tot);
2171
2172 /*
2173 * TODO: voir si on ne doit pas faire mieux, mais a priori les variations de Tl et Tv
2174 * sont lentes par rapport au reste donc ea devrait aller.
2175 * DONE: il y a manifestement un pb ici, car on ne peut pas avoir acces e Tv(n+1) encore,
2176 * donc il faut stocker Tv(n-1)
2177 */
2178
2179 // Impression dans le fichier temperature_bulles.out
2181 {
2182 int reset = (!ref_ijk_ft_->get_reprise()) && (ref_ijk_ft_->schema_temps_ijk().get_tstep()==0);
2183 SFichier fic=Ouvrir_fichier(Nom("_source_temperature_")+Nom(rank_)+Nom("_bulles.out"),
2184 "tstep\ttime\tTl\tTv\tEtot\tElpu\tEl\tEvpu\tEv\tEm",
2185 reset);
2186 // la derivee_acceleration n'est connue que sur le maitre
2187 fic<< ref_ijk_ft_->schema_temps_ijk().get_tstep()<<" "<< ref_ijk_ft_->schema_temps_ijk().get_current_time() <<" "<< Tl << " " << Tv << " " << E_tot;
2188 fic<< " " << E_liq_pure << " " << E_liq;
2189 fic<< " " << E_vap_pure << " " << E_vap;
2190 fic<< " " << E_mixt;
2191 fic<<finl;
2192 fic.close();
2193 }
2194}
2195
2197 double& E_liq,
2198 double& E_vap_pure,
2199 double& E_vap,
2200 double& E_mixt,
2201 double& E_tot)
2202{
2203 const IJK_Field_double& temperature = *temperature_;
2204
2205 const int nk = temperature.nk();
2206 const int ni = temperature.ni();
2207 const int nj = temperature.nj();
2208 const IJK_Field_double& chi = ref_ijk_ft_->get_interface().I(); // rappel : chi vaut 1. dans le liquide et 0 dans la vapeur
2209 const double rhocpl = ref_ijk_ft_->milieu_ijk().get_rho_liquid()*cp_liquid_;
2210 const double rhocpv = ref_ijk_ft_->milieu_ijk().get_rho_vapour()*cp_vapour_;
2211 for (int k = 0; k < nk; k++)
2212 for (int j = 0; j < nj; j++)
2213 for (int i = 0; i < ni; i++)
2214 {
2215 const double indic=chi(i, j, k);
2216 const double rhocpm = indic*rhocpl+(1.-indic)*rhocpv;
2217 const double T = temperature(i,j,k);
2218 E_tot += T * rhocpm;
2219 E_liq += indic * rhocpl * T;
2220 E_vap += (1.-indic) * rhocpv * T;
2221 if (std::fabs(indic)<1.e-8)
2222 {
2223 // vap pure
2224 E_vap_pure += rhocpv * T;
2225 }
2226 else if (std::fabs(1.-indic)<1.e-8)
2227 {
2228 // liq pure
2229 E_liq_pure += rhocpl * T;
2230 }
2231 else
2232 {
2233 // mixte :
2234 E_mixt += rhocpm * T;
2235 }
2236 }
2237
2238 const int ntot = (temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_I)
2239 * temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_J)
2240 * temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_K));
2241 E_vap_pure = Process::mp_sum(E_vap_pure)/ntot;
2242 E_liq_pure = Process::mp_sum(E_liq_pure)/ntot;
2243 E_vap = Process::mp_sum(E_vap)/ntot;
2244 E_liq = Process::mp_sum(E_liq)/ntot;
2245 E_tot = Process::mp_sum(E_tot)/ntot;
2246 E_mixt = Process::mp_sum(E_mixt)/ntot;
2247}
2248
2250{
2251 if (liste_post_instantanes_.contient_("ECART_SOURCE_TEMPERATURE_ANA"))
2252 {
2253 if (!liste_post_instantanes_.contient_("SOURCE_TEMPERATURE_ANA"))
2254 set_field_data(source_temperature_ana_, expression_source_temperature_, ref_ijk_ft_->eq_ns().get_velocity()[0], ref_ijk_ft_->schema_temps_ijk().get_current_time());
2255 // do some work
2256
2257 double ct = ref_ijk_ft_->schema_temps_ijk().get_current_time();
2258 Cerr << "MR: ERROR SOURCE T FIELD " << ct;
2259 double err = 0.;
2260 //set_field_data(source_temperature_ana_, curseur->expression_source_T_ana_, ct);
2261 const int ni = source_temperature_.ni();
2262 const int nj = source_temperature_.nj();
2263 const int nk = source_temperature_.nk();
2264 const trustIdType ntot=Process::mp_sum(ni*nj*nk);
2265 // La temperature est definie a une constante pres:
2266 // const double cst_temp = temperature_ana_(0,0,0) - curseur->temperature_(0,0,0);
2267 for (int k = 0; k < nk; k++)
2268 for (int j = 0; j < nj; j++)
2269 for (int i = 0; i < ni; i++)
2270 {
2271 const double val = source_temperature_ana_(i,j,k) - source_temperature_(i,j,k); //- cst_temp;
2272 ecart_source_t_ana_(i,j,k) = val;
2273 err += val*val;
2274 }
2275 err=Process::mp_sum(err);
2276 err=sqrt(err/static_cast<double>(ntot));
2277 Cerr << " " << err ;
2279 {
2280 Process::Journal() << "IJK_FT_Post::posttraiter_champs_instantanes : OWN_PTR(Champ_base) ECART_SOURCE_TEMPERATURE_ANA sur ce proc (ni,nj,nk,ntot):"
2281 << " " << ni << " " << nj << " " << nk << " " << ntot << finl;
2282 }
2283 // ecart_t_ana_.echange_espace_virtuel(ecart_t_ana_.ghost());
2284 Cerr << finl ;
2285 // n++,dumplata_scalar(lata_name,"ECART_SOURCE_TEMPERATURE_ANA", ecart_source_t_ana_, latastep);
2286 }
2287}
2288
2289double IJK_Thermal_base::compute_variable_wall_temperature(const int kmin, const int kmax)
2290{
2291 return calculer_variable_wall(*temperature_, *temperature_, *temperature_, cp_liquid_ * ref_ijk_ft_->milieu_ijk().get_rho_liquid(), kmin, kmax, 2);
2292}
2293
2294void IJK_Thermal_base::calculer_temperature_adimensionnelle_theta(const IJK_Field_double& vx, const double wall_flux)
2295{
2296 /*
2297 * TODO : M.G -> Don't understand anything ask Aymeric
2298 */
2299 if(wall_flux_)
2300 {
2301 const IJK_Field_double& temperature = *temperature_;
2302
2303 const int wall_normal_dir = DIRECTION_K;
2304 const Domaine_IJK& geom = temperature.get_domaine();
2305 const double lwall = geom.get_domain_length(wall_normal_dir);
2306 const double h = lwall/2.;
2307 const double q_w = wall_flux;
2308 const int kmin = temperature.get_domaine().get_offset_local(wall_normal_dir);
2309 const int kmax = geom.get_nb_elem_tot(wall_normal_dir);
2310 const int nk = temperature.nk();
2311 const int ni = temperature.ni();
2312 const int nj = temperature.nj();
2313 double T_wall = compute_variable_wall_temperature(kmin, kmax);
2314 /* if (Process::je_suis_maitre())
2315 {
2316 T_wall = calculer_variable_wall(temperature, cp_, ref_ijk_ft_->rho_field_, kmin, kmax);
2317 Cerr << "calcul de T_wall sur maitre" << finl;
2318 }
2319 envoyer_broadcast(T_wall, 0); */
2320 /*
2321 * if(kmin+ nk == kmax) //|| (kmin ==0)
2322 {
2323 rank = Process::me();
2324 T_wall = calculer_variable_wall(temperature, cp_, ref_ijk_ft_->rho_field_, kmin, kmax);
2325 envoyer_broadcast(T_wall, rank);
2326 }
2327 */
2328 for (int k = 0; k < nk; k++)
2329 {
2330 // const double T_mean = compute_spatial_mean(vx, temperature, cp_, ref_ijk_ft_->rho_field_, kmin, nktot, k);
2331 for (int j = 0; j < nj; j++)
2332 for (int i = 0; i < ni; i++)
2333 {
2334 double theta = T_wall - temperature(i,j,k);
2335 // double theta = T_wall -T_mean;
2336 // temperature_adimensionnelle_theta_(i,j,k) = theta/theta_tau;
2337 const double lambda_l = lambda_liquid_;
2338 temperature_adimensionnelle_theta_(i,j,k) = theta * lambda_l / q_w / h;
2339 // temperature_adimensionnelle_theta_(i,j,k) = -T_mean*lambda_l/q_w/h;
2340 }
2341
2342 }
2343 return;
2344 }
2345 else
2346 {
2347 Cerr << "no_source_for_temperature" << finl;
2348 return;
2349 }
2350}
2351
2353{
2354 return calculer_temperature_adimensionnelle_theta_moy(vx, temperature_adimensionnelle_theta_, vx, vx, ref_ijk_ft_->milieu_ijk().get_rho_liquid() * cp_liquid_, 2);
2355}
2356
2357void IJK_Thermal_base::calculer_Nusselt(const IJK_Field_double& vx)
2358{
2359 const double theta_adim_moy = compute_temperature_dimensionless_theta_mean(vx);
2360 double Nu = 0.;
2361 if (std::fabs(theta_adim_moy)>1.e-10)
2362 Nu = 2./theta_adim_moy;
2363 const double rho_cp_u_moy = compute_rho_cp_u_mean(vx);
2364
2365 // Impression dans le fichier source_temperature.out
2367 {
2368 int reset = (!ref_ijk_ft_->get_reprise()) && (ref_ijk_ft_->schema_temps_ijk().get_tstep() == 0);
2369 const Nom name = Nom("_temperature_") + Nom(rank_) + Nom(".out");
2370 SFichier fic = Ouvrir_fichier(name,
2371 "tstep\ttime\ttheta_adim_moy\tNu\trho_cp_u",
2372 reset);
2373 fic << ref_ijk_ft_->schema_temps_ijk().get_tstep() << " " << ref_ijk_ft_->schema_temps_ijk().get_current_time() << " " << theta_adim_moy << " " << Nu << " " << rho_cp_u_moy << finl;
2374 fic.close();
2375 }
2376}
2377
2379{
2380 if (expression_T_ana_ != "??")
2381 {
2382 Cerr << "Setting analytical temperature "<< rank_ <<" field to "<< expression_T_ana_ << finl;
2383 set_field_data(temperature_ana_, expression_T_ana_, ref_ijk_ft_->schema_temps_ijk().get_current_time());
2384 }
2385}
2386
2388{
2389 const IJK_Field_double& temperature = *temperature_;
2390
2391 double ct = ref_ijk_ft_->schema_temps_ijk().get_current_time();
2392 Cerr << "GB: ERROR T FIELD " << ct;
2393 double err = 0.;
2394 set_field_data(temperature_ana_, expression_T_ana_, ct);
2395 const int ni = temperature.ni();
2396 const int nj = temperature.nj();
2397 const int nk = temperature.nk();
2398 const trustIdType ntot=Process::mp_sum(ni*nj*nk);
2399 // La temperature est definie a une constante pres:
2400 // const double cst_temp = temperature_ana_(0,0,0) - curseur->temperature_(0,0,0);
2401 for (int k = 0; k < nk; k++)
2402 for (int j = 0; j < nj; j++)
2403 for (int i = 0; i < ni; i++)
2404 {
2405 const double val = temperature_ana_(i,j,k) - temperature(i,j,k); //- cst_temp;
2406 ecart_t_ana_(i,j,k) = val;
2407 err += val*val;
2408 }
2409 err=Process::mp_sum(err);
2410 err=sqrt(err/static_cast<double>(ntot));
2411 Cerr << " " << err ;
2413 {
2414 Process::Journal() << "IJK_FT_Post::posttraiter_champs_instantanes : OWN_PTR(Champ_base) ECART_T_ANA sur ce proc (ni,nj,nk,ntot):"
2415 << " " << ni << " " << nj << " " << nk << " " << ntot << finl;
2416 }
2417 ecart_t_ana_.echange_espace_virtuel(ecart_t_ana_.ghost());
2418 Cerr << finl ;
2419 // n++,dumplata_scalar(lata_name,"ECART_T_ANA", ecart_t_ana_, latastep);
2420}
2421
2422void IJK_Thermal_base::calculer_gradient_temperature(const IJK_Field_double& temperature, IJK_Field_vector3_double& grad_T)
2423{
2424 if ((liste_post_instantanes_.contient_("GRAD_T") || (calulate_grad_T_)))
2425 {
2426 /*
2427 * Re-initialisation of the gradient vector
2428 */
2429 for (int dir = 0; dir < 3; dir++)
2430 grad_T[dir].data() = 0.;
2431
2432 // add_gradient_temperature(temperature, 1. /*constant*/, grad_T[0], grad_T[1], grad_T[2], boundary_conditions_, lambda_);
2433 for (int dir = 0; dir < 3; dir++)
2434 grad_T[dir].echange_espace_virtuel(1);
2435 }
2436}
2437
2438// Results are intensive (ie prop to area)
2439// Method fills storage_ so it changes the class
2440// Les interfaces connaissent le splitting_ft_ donc la correspondance doit etre appliquee au splitting ft pour convertir :
2441// convert_packed_to_ijk_cell.
2442// Donc il faut un champ de T etendu...
2443
2444double IJK_Thermal_base::compute_global_energy(const IJK_Field_double& temperature)
2445{
2446 double global_energy = 0.;
2447 const IJK_Field_double& indic = ref_ijk_ft_->get_interface().I();
2448 const double rhocpl = get_rhocp_l();
2449 const double rhocpv = get_rhocp_v();
2450 const int nx = temperature.ni();
2451 const int ny = temperature.nj();
2452 const int nz = temperature.nk();
2453 // To be sure we're on a regular mesh
2454 assert(indic.get_domaine().get_constant_delta(DIRECTION_K) > 0);
2455 for (int k=0; k < nz ; k++)
2456 for (int j=0; j< ny; j++)
2457 for (int i=0; i < nx; i++)
2458 {
2459 double chi_l = indic(i,j,k);
2460 global_energy += (rhocpl * chi_l + (1.- chi_l) * rhocpv) * temperature(i,j,k);
2461 }
2462 const int ntot = temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_I)
2463 * temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_J)
2464 * temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_K);
2465 global_energy = mp_sum(global_energy)/(double)(ntot);
2466 return global_energy;
2467}
2468
2469/*
2470 * Getters and setters
2471 */
2472
2474{
2475 return ref_ijk_ft_->milieu_ijk().get_rho_liquid()*ref_ijk_ft_->milieu_ijk().get_cp_liquid(0);
2476}
2477
2479{
2480 return ref_ijk_ft_->milieu_ijk().get_rho_vapour() * ref_ijk_ft_->milieu_ijk().get_cp_vapour(0);
2481}
2482
2483/*
2484 * Methods that do not belong to the class
2485 */
2486
2487// From DNS_QC; Vectorize code later?
2488int IJK_Thermal_base::calculer_k_pour_bord(const IJK_Field_double& temperature, const bool bord_kmax)
2489{
2490 const int kmin = temperature.get_domaine().get_offset_local(DIRECTION_K);
2491 const int nktot = temperature.get_domaine().get_nb_items_global(Domaine_IJK::ELEM, DIRECTION_K);
2492 int k;
2493 // calcul l'indice k de la couche de mailles voisine du bord. Si je n'ai pas de bord, on met k = -1
2494 if (!bord_kmax)
2495 {
2496 // on veut le bord "k_global = 0"
2497 if (kmin == 0)
2498 {
2499 // ce bord est chez moi... et il est en k=0
2500 k = 0;
2501 }
2502 else
2503 {
2504 // ce bord n'est pas chez moi
2505 k = -1;
2506 }
2507 }
2508 else
2509 {
2510 // on veut le bord kmax
2511 if (kmin + temperature.nk() == nktot)
2512 {
2513 // ce bord est chez moi... et il est en k= truc...
2514 k = temperature.nk() - 1;
2515 }
2516 else
2517 {
2518 k = -1;
2519 }
2520 }
2521 return k;
2522}
2523
2524// From DNS_QC; Vectorize code later?
2525// valeur de retour: indice local du plan de temperature voisin utilise,
2526// -1 si on n'a pas le bord sur ce processeur
2527// Calcule l'integrale sur chaque face du bord demande du flux de chaleur a travers la face
2528// positif si le flux va vers les k positifs.
2529int IJK_Thermal_base::calculer_flux_thermique_bord(const IJK_Field_double& temperature,
2530 const double lambda_de_t_paroi,
2531 const double T_paroi_impose,
2532 IJK_Field_local_double& flux_bord,
2533 const bool bord_kmax)
2534{
2535 const int kmin = temperature.get_domaine().get_offset_local(DIRECTION_K);
2536 int k = calculer_k_pour_bord(temperature, bord_kmax);
2537 if (k == -1)
2538 return k;
2539
2540 // redimensionne flux_bord avec ni * nj:
2541 const int ni = temperature.ni(); // nombre d'element local sur ce processeur
2542 const int nj = temperature.nj();
2543 flux_bord.allocate(ni, nj, 1 /* 1 seule couche de valeurs en k */, 0 /* pas d'elements fantomes */);
2544
2545 const Domaine_IJK& geometry = temperature.get_domaine();
2546 const double delta_k = geometry.get_delta(DIRECTION_K)[k + kmin]; // k+kmin est l'indice global de la maille locale k
2547 double facteur = 2.0 / delta_k * geometry.get_constant_delta(DIRECTION_I) * geometry.get_constant_delta(DIRECTION_J);
2548 if (bord_kmax)
2549 facteur *= -1.; // he he... je vous laisse reflechir a ca :)
2550 // nan c'est pas simpa: la convention dans l'operateur de diffusion est
2551 // d/dt = flux(i,j) - flux(i+1,j) + ... + flux(i,j,k) - flux(i,j,k+1)
2552 // donc si la paroi inferieure (k=0) est plus froide que le fluide, il faut que le flux stocke soit negatif.
2553 // et si la paroi inferieure (k=kmax) est plus froide que le fluide, il faut que le flux stocke soit positif.
2554 for (int j = 0; j < nj; j++)
2555 {
2556 for (int i = 0; i < ni; i++)
2557 {
2558 // Temperature de la maille voisine
2559 const double t = temperature(i,j,k);
2560 // le flux est positif s'il va vers les k croissants
2561 flux_bord(i,j,0) = (T_paroi_impose - t) * lambda_de_t_paroi * facteur;
2562 }
2563 }
2564 return k;
2565}
2566int IJK_Thermal_base::imposer_flux_thermique_bord(const IJK_Field_double& temperature,
2567 const double flux_paroi_impose,
2568 IJK_Field_local_double& flux_bord,
2569 const bool bord_kmax)
2570{
2571 int k = calculer_k_pour_bord(temperature, bord_kmax);
2572 if (k == -1)
2573 return k;
2574
2575 // redimensionne flux_bord avec ni * nj:
2576 const int ni = temperature.ni(); // nombre d'element local sur ce processeur
2577 const int nj = temperature.nj();
2578 flux_bord.allocate(ni, nj, 1 /* 1 seule couche de valeurs en k */, 0 /* pas d'elements fantomes */);
2579 // MR je multiplie le flux par la surface dxdy
2580 const Domaine_IJK& geometry = temperature.get_domaine();
2581
2582 double facteur = 1.* geometry.get_constant_delta(DIRECTION_I) * geometry.get_constant_delta(DIRECTION_J);
2583 if (bord_kmax)
2584 facteur *= -1.; // he he... je vous laisse reflechir a ca :)
2585 // nan c'est pas sympa: la convention dans l'operateur de diffusion est
2586 // d/dt = flux(i,j) - flux(i+1,j) + ... + flux(i,j,k) - flux(i,j,k+1)
2587 // donc si la paroi inferieure (k=0) est plus froide que le fluide, il faut que le flux stocke soit negatif.
2588 // et si la paroi superieure (k=kmax) est plus froide que le fluide, il faut que le flux stocke soit positif.
2589 for (int j = 0; j < nj; j++)
2590 {
2591 for (int i = 0; i < ni; i++)
2592 {
2593 // le flux est positif s'il va vers les k croissants
2594 flux_bord(i,j,0) = flux_paroi_impose * facteur;
2595 }
2596 }
2597 return k;
2598}
2599
2600void IJK_Thermal_base::compute_interfacial_temperature2(ArrOfDouble& interfacial_temperature,
2601 ArrOfDouble& flux_normal_interp)
2602{
2603 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
2604 const double dist = 1.52 * std::pow(std::pow(geom.get_constant_delta(0), 2.) +
2605 std::pow(geom.get_constant_delta(1), 2.) +
2606 std::pow(geom.get_constant_delta(2), 2.),
2607 0.5);
2608 const Maillage_FT_IJK& maillage = ref_ijk_ft_->get_interface().maillage_ft_ijk();
2609 const DoubleTab& normale_facettes = maillage.get_update_normale_facettes();
2610 const ArrOfDouble& surface_facettes = maillage.get_update_surface_facettes();
2611 const int nb_facettes = maillage.nb_facettes();
2612 const IntTab& facettes = maillage.facettes();
2613 const DoubleTab& sommets = maillage.sommets();
2614 DoubleTab coord_facettes;
2615 coord_facettes.resize(nb_facettes, 3);
2616 coord_facettes = 0.;
2617 for (int fa7 = 0; fa7 < nb_facettes; fa7++)
2618 for (int dir = 0; dir < 3; dir++)
2619 for (int som = 0; som < 3; som++)
2620 coord_facettes(fa7, dir) += sommets(facettes(fa7, som), dir);
2621
2622 for (int fa7 = 0; fa7 < nb_facettes; fa7++)
2623 for (int dir = 0; dir < 3; dir++)
2624 coord_facettes(fa7, dir) /= 3.;
2625
2626 DoubleTab coo_liqu, coo_vap;
2627 ArrOfDouble temp_liqu, temp_vap;
2628 corrige_flux_->calcul_temperature_flux_interface(temperature_ft_,
2631 dist,
2632 coord_facettes,
2633 normale_facettes,
2634 interfacial_temperature,
2635 flux_normal_interp,
2636 temp_liqu,
2637 temp_vap,
2638 coo_liqu,
2639 coo_vap);
2640 for (int fa7 = 0; fa7 < nb_facettes; fa7++)
2641 {
2642 flux_normal_interp(fa7) *= surface_facettes(fa7);
2643 interfacial_temperature(fa7) *= surface_facettes(fa7);
2644 }
2645}
2646
2647void IJK_Thermal_base::force_upstream_temperature(IJK_Field_double& temperature,
2648 double T_imposed,
2649 const IJK_Interfaces& interfaces,
2650 double nb_diam,
2651 int upstream_dir,
2652 int gravity_dir,
2653 int upstream_stencil)
2654{
2655 int dir = 0;
2656 if (upstream_dir == -1)
2657 {
2658 dir = gravity_dir;
2659 if (dir == -1)
2660 dir=0;
2661 }
2662 const Domaine_IJK& geom = temperature.get_domaine();
2663
2664 bool perio = geom.get_periodic_flag(dir);
2665
2666 assert(interfaces.get_nb_bulles_reelles() == 1);
2667 DoubleTab bounding_box;
2668 // interfaces.calculer_bounding_box_bulles(bounding_box);
2669 bounding_box = interfaces.get_ijk_compo_connex().get_bounding_box();
2670 // Calcule la hauteur en x de la permiere bulle et la position de son cdg :
2671 const double Dbdir = bounding_box(0, dir, 1) - bounding_box(0, dir, 0);
2672 const double dirb = ( bounding_box(0, dir, 1) + bounding_box(0, dir, 0) ) / 2.;
2673 const double ldir = geom.get_domain_length(dir) ;
2674 if (nb_diam == 0.)
2675 nb_diam = (ldir/Dbdir) / 2;
2676 double dirobj = dirb + nb_diam*Dbdir;
2677
2678 // L'origine est sur un noeud. Donc que la premiere face en I est sur get_origin(DIRECTION_I)
2679 const double ddir = geom.get_constant_delta(dir);
2680 const double origin_dir = geom.get_origin(dir) ;
2681 const int offset_dir = geom.get_offset_local(dir);
2682
2683 // FIXME: If nb_diam is too large it will iterate a lot
2684 if (perio)
2685 {
2686 while (dirobj<origin_dir)
2687 dirobj += ldir;
2688 while (dirobj>origin_dir+ldir)
2689 dirobj -= ldir;
2690 }
2691
2692 // On devrait avoir xobj dans le domaine, sinon, on a choisi nb_diam trop grand :
2693 assert( ((dirobj>=origin_dir) && (dirobj <= origin_dir+ldir) ));
2694
2695 const double x2 = (dirobj-origin_dir)/ ddir;
2696 int index_dir = (int)(floor(x2)) - offset_dir; // C'est l'index local, donc potentiellement negatif...
2697 const int& ndir = select_dir(dir, temperature.ni(), temperature.nj(), temperature.nk());
2698
2699 // Cerr << "index_dir " << index_dir << finl;
2700 if ((index_dir >=0) && (index_dir < ndir))
2701 {
2702 // On est sur le bon proc...
2703 if (index_dir+upstream_stencil >= ndir)
2704 // On ne veut pas s'embeter sur 2 procs...
2705 index_dir = ndir-upstream_stencil;
2706 }
2707 else
2708 return;
2709
2710 const double imposed = T_imposed;
2711 const int& imin = select_dir(dir, index_dir, 0, 0);
2712 const int& jmin = select_dir(dir, 0, index_dir, 0);
2713 const int& kmin = select_dir(dir, 0, 0, index_dir);
2714 const int& imax = select_dir(dir, imin + upstream_stencil, temperature.nj(), temperature.nk());
2715 const int& jmax = select_dir(dir, temperature.ni(), jmin + upstream_stencil, temperature.nk());
2716 const int& kmax = select_dir(dir, temperature.ni(), temperature.nj(), kmin + upstream_stencil);
2717 for (int k = kmin; k < kmax; k++)
2718 for (int j = jmin; j < jmax; j++)
2719 for (int i = imin; i < imax; i++)
2720 temperature(i,j,k) = imposed;
2721}
2722
2723
2728
2730 const char *lata_name,
2731 const int latastep)
2732{
2733 return thermal_local_subproblems_interfaces_fields_.posttraiter_champs_instantanes(liste_post_instantanes,
2734 lata_name,
2735 latastep);
2736}
2737
2738
2740{
2741 /*
2742 * thermal_words_[0] = "subresolution";
2743 * thermal_words_[1] = "multiplesubresolutions";
2744 * thermal_words_[2] = "onefluid";
2745 * thermal_words_[3] = "onefluidenergy";
2746 * thermal_words_[4] = "cut_cell";
2747 */
2748 liste.add("TEMPERATURE");
2749 liste.add("TEMPERATURE_ANA");
2750 liste.add("ECART_T_ANA");
2751 liste.add("DIV_LAMBDA_GRAD_T_VOLUME");
2752 liste.add("U_T_CONVECTIVE_VOLUME");
2753 liste.add("GRAD_T");
2754 //
2755 liste.add("DISTANCE");
2756 liste.add("CURVATURE");
2758 {
2759 /*
2760 * TODO: ADD SOME PARTICULAR FIELDS OR DO SWITCH CASE(thermal_rank)
2761 */
2762 }
2763 else
2764 {
2765 /*
2766 * TODO: CHECK IF GRAD_T0 MUST STILL BE POST-PROCESSED
2767 */
2768 liste.add("CP");
2769 liste.add("LAMBDA");
2770 //
2771 liste.add("SOURCE_TEMPERATURE");
2772 liste.add("TEMPERATURE_ADIM_BULLES");
2773 liste.add("TEMPERATURE_PHYSIQUE_T");
2774 liste.add("TEMPERATURE_ADIMENSIONNELLE_THETA");
2775 liste.add("SOURCE_TEMPERATURE_ANA");
2776 liste.add("ECART_SOURCE_TEMPERATURE_ANA");
2777 //
2778 liste.add("GRAD_T0");
2779 liste.add("GRAD_T1");
2780 liste.add("GRAD_T2");
2781 //
2782 liste.add("T_RUST");
2783 liste.add("DIV_RHO_CP_T_V");
2784 }
2785}
2786
2787void IJK_Thermal_base::ecrire_statistiques_bulles(int reset, const Nom& nom_cas, const double current_time, const ArrOfDouble& surface, const int idx)
2788{
2789 ArrOfDouble interfacial_temperature;
2790 ArrOfDouble interfacial_phin_ai;
2791 // To transfer the field to FT splitting (because interfaces are there...) !!! NEEDED for compute_interfacial_temperature
2792 IJK_Field_double& temperature_ft = get_temperature_ft();
2793 ref_ijk_ft_->eq_ns().redistribute_to_splitting_ft_elem(*get_temperature(), temperature_ft);
2794 temperature_ft.echange_espace_virtuel(temperature_ft.ghost());
2795 //compute_interfacial_temperature(interfacial_temperature, interfacial_phin_ai, get_storage());
2796 compute_interfacial_temperature2(interfacial_temperature, interfacial_phin_ai);
2797
2798 // Compute Bubble mean :
2799 ArrOfDouble Ti_per_bubble;
2800 ArrOfDouble phin_per_bubble;
2801 ref_ijk_ft_->get_interface().compute_surface_average_per_bubble(surface, interfacial_temperature, Ti_per_bubble);
2802 ref_ijk_ft_->get_interface().compute_surface_average_per_bubble(surface, interfacial_phin_ai, phin_per_bubble);
2804 {
2805 char s[1000];
2806 const char *nomcas = nom_cas;
2807 SFichier fic;
2808 const int n = Ti_per_bubble.size_array();
2809 IOS_OPEN_MODE mode = (reset) ? ios::out : ios::app;
2810
2811#if INT_is_64_ == 1
2812 snprintf(s, 1000, "%s_bulles_Ti_%ld.out", nomcas, idx);
2813#else
2814 snprintf(s, 1000, "%s_bulles_Ti_%d.out", nomcas, idx);
2815#endif
2816 // Cerr << "Ecriture des donnees par bulles: fichier " << s << finl;
2817 fic.ouvrir(s, mode);
2818 snprintf(s, 1000, "%.16e ", current_time);
2819 fic << s;
2820 for (int i = 0; i < n; i++)
2821 {
2822 snprintf(s, 1000, "%.16e ", Ti_per_bubble[i]);
2823 fic << s;
2824 }
2825 fic << finl;
2826 fic.close();
2827
2828 // Cerr << "Ecriture des donnees par bulles: fichier " << s << finl;
2829#if INT_is_64_ == 1
2830 snprintf(s, 1000, "%s_bulles_phin_%ld.out", nomcas, idx);
2831#else
2832 snprintf(s, 1000, "%s_bulles_phin_%d.out", nomcas, idx);
2833#endif
2834 fic.ouvrir(s, mode);
2835 snprintf(s, 1000, "%.16e ", current_time);
2836 fic << s;
2837 for (int i = 0; i < n; i++)
2838 {
2839 snprintf(s, 1000, "%.16e ", phin_per_bubble[i]);
2840 fic << s;
2841 }
2842 fic << finl;
2843 fic.close();
2844
2845 Cerr << "Fin de l'ecriture des stats par bulles pour la temperature " << idx << finl;
2846 }
2847}
2848
2849
2850
2851int IJK_Thermal_base::posttraiter_champs_instantanes_thermal_interface(const Motcles& liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, const int idx)
2852{
2853 int n = 0; // nombre de champs postraites
2855 {
2856 n = post_process_quantities_from_subresolution(liste_post_instantanes,
2857 lata_name,
2858 latastep);
2859 /*
2860 * TODO: COMPUTE INTERFACIAL GRADIENT
2861 */
2862 }
2863 else
2864 {
2865 n = posttraiter_champs_instantanes_thermal_interface_ref(liste_post_instantanes, lata_name, latastep, current_time, idx);
2866 }
2867 return n;
2868}
2869
2870int IJK_Thermal_base::posttraiter_champs_instantanes_thermal_interface_ref(const Motcles& liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, const int idx)
2871{
2872 Cerr << liste_post_instantanes << finl;
2873 int n = 0; // nombre de champs postraites
2874 Motcle lata_suffix = lata_suffix_[thermal_rank_];
2875
2876 std::ostringstream oss;
2877 oss << "INTERFACE_TEMPERATURE_" << lata_suffix << idx;
2878 Nom nom_temp(oss.str().c_str());
2879
2880 std::ostringstream oss2;
2881 oss2 << "INTERFACE_PHIN_" << lata_suffix << idx;
2882 Nom nom_phin(oss2.str().c_str());
2883
2884 if ((liste_post_instantanes.contient_("INTERFACE_TEMPERATURE")) || (liste_post_instantanes.contient_("INTERFACE_PHIN")) || (liste_post_instantanes.contient_(nom_temp))
2885 || (liste_post_instantanes.contient_(nom_phin)))
2886 {
2887 // Computing interfacial temperature at fa7 centre :
2888 const Maillage_FT_IJK& mesh = ref_ijk_ft_->get_maillage_ft_ijk(); // ref_ijk_ft_post_->interfaces_.maillage_ft_ijk();
2889 const ArrOfDouble& surface_facettes = mesh.get_update_surface_facettes();
2890 const int nb_facettes = mesh.nb_facettes();
2891 ArrOfDouble interfacial_temperature;
2892 ArrOfDouble interfacial_phin;
2893 // To transfer the field to FT splitting (because interfaces are there...) !!! NEEDED for compute_interfacial_temperature
2894 IJK_Field_double& temperature_ft = get_temperature_ft();
2895 ref_ijk_ft_->eq_ns().redistribute_to_splitting_ft_elem(*get_temperature(), temperature_ft);
2896 temperature_ft.echange_espace_virtuel(temperature_ft.ghost());
2897 // results are prop to the area :
2898 //itr.compute_interfacial_temperature(interfacial_temperature, interfacial_phin, itr.get_storage());
2899 compute_interfacial_temperature2(interfacial_temperature, interfacial_phin);
2900 for (int fa7 = 0; fa7 < nb_facettes; fa7++)
2901 {
2902 const double sf = surface_facettes[fa7];
2903 interfacial_temperature[fa7] /= sf;
2904 interfacial_phin[fa7] /= sf;
2905 }
2906 if ((liste_post_instantanes.contient_("INTERFACE_TEMPERATURE")) || (liste_post_instantanes.contient_(nom_temp)))
2907 n++, dumplata_ft_field(lata_name, "INTERFACES", nom_temp, "ELEM", interfacial_temperature, latastep);
2908 if ((liste_post_instantanes.contient_("INTERFACE_PHIN")) || (liste_post_instantanes.contient_(nom_phin)))
2909 n++, dumplata_ft_field(lata_name, "INTERFACES", nom_phin, "ELEM", interfacial_phin, latastep);
2910 }
2911 oss.str("");
2912 return n;
2913}
2914
2915void IJK_Thermal_base::thermal_subresolution_outputs(const Nom& interfacial_quantities_thermal_probes, const Nom& shell_quantities_thermal_probes, const Nom& overall_bubbles_quantities, const Nom& local_quantities_thermal_probes_time_index_folder, const Nom& local_quantities_thermal_slices_time_index_folder, const Nom& local_quantities_thermal_lines_time_index_folder)
2916{
2918 {
2919 set_thermal_subresolution_outputs(interfacial_quantities_thermal_probes, shell_quantities_thermal_probes, overall_bubbles_quantities, local_quantities_thermal_probes_time_index_folder);
2920 post_process_thermal_wake_slices(local_quantities_thermal_slices_time_index_folder);
2921 post_process_thermal_downstream_lines(local_quantities_thermal_lines_time_index_folder);
2922 }
2923}
2924
2925
2926int IJK_Thermal_base::posttraiter_champs_instantanes_thermal(const Motcles& liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, const int idx)
2927{
2928 const int& rank = get_rank();
2929 Cerr << liste_post_instantanes << finl;
2930 int n = 0; // number of post-processed field
2931 std::ostringstream oss;
2932 Motcle lata_suffix = lata_suffix_[thermal_rank_];
2933
2934 int cut_cell_activated = (thermal_rank_ == CUTCELL);
2935
2936 /*
2937 * TEMPERATURE
2938 */
2939// {
2940// Motcles tested_names(1);
2941// tested_names[0] = "TEMPERATURE";
2942// post_process_std_thermal_field(liste_post_instantanes, lata_name, latastep, current_time, idx,
2943// tested_names, "TEMPERATURE", lata_suffix, *get_temperature(), oss, n);
2944// }
2945 /*
2946 for (auto &itr : liste_post_instantanes) {
2947 oss << nom << lata_suffix << idx;
2948 const IJK_Field_double& my_field = probleme().get_IJK_field(nom_complet);
2949 n++, dumplata_scalar(lata_name, nom_complet, my_field, latastep);
2950 }
2951 */
2952 oss << "TEMPERATURE_" << lata_suffix << idx;
2953 Nom nom_temp(oss.str().c_str());
2954 if ((liste_post_instantanes.contient_("TEMPERATURE")) || (liste_post_instantanes.contient_(nom_temp)))
2955 {
2956 n++, dumplata_scalar_cut_cell(cut_cell_activated, lata_name, nom_temp, get_temperature(), latastep);
2957 }
2958
2959 oss.str("");
2960
2961 oss << "SOURCE_TEMPERATURE_" << lata_suffix << idx;
2962 Nom nom_src_temp(oss.str().c_str());
2963 if ((liste_post_instantanes.contient_("SOURCE_TEMPERATURE")) || (liste_post_instantanes.contient_(nom_src_temp)))
2964 {
2965 n++, dumplata_scalar(lata_name, nom_src_temp, source_temperature_, latastep);
2966 }
2967
2968 oss.str("");
2969 oss << "TEMPERATURE_ADIMENSIONNELLE_THETA_" << lata_suffix << idx;
2970 Nom nom_tempa(oss.str().c_str());
2971 if ((liste_post_instantanes.contient_("TEMPERATURE_ADIMENSIONNELLE_THETA")) || (liste_post_instantanes.contient_(nom_tempa)))
2972 {
2973 n++, dumplata_scalar(lata_name, nom_tempa, temperature_adimensionnelle_theta_, latastep);
2974 }
2975 oss.str("");
2976
2977 oss << "TEMPERATURE_SMOOTH_" << lata_suffix << idx;
2978 Nom nom_temp_smooth(oss.str().c_str());
2979 if ((liste_post_instantanes.contient_("TEMPERATURE_SMOOTH")) || (liste_post_instantanes.contient_(nom_temp_smooth)))
2980 {
2981 n++, dumplata_scalar(lata_name, nom_temp_smooth, get_temperature_elem_smooth(), latastep);
2982 }
2983 oss.str("");
2984
2985 /*
2986 * TEMPERATURE_BEFORE_EXTRAP
2987 */
2988 oss << "TEMPERATURE_BEFORE_EXTRAP_" << lata_suffix << idx;
2989 Nom nom_temp_before_extrap(oss.str().c_str());
2990 if ((liste_post_instantanes.contient_("TEMPERATURE_BEFORE_EXTRAP")) || (liste_post_instantanes.contient_(nom_temp_before_extrap)))
2991 {
2992 n++, dumplata_scalar(lata_name, nom_temp_before_extrap, get_temperature_before_extrapolation(), latastep);
2993 }
2994 oss.str("");
2995
2996 /*
2997 * TEMPERATURE_CELL_NEIGHBOURS
2998 */
2999 oss << "TEMPERATURE_CELL_NEIGHBOURS_" << lata_suffix << idx;
3000 Nom nom_temp_cell_neighbours(oss.str().c_str());
3001 if ((liste_post_instantanes.contient_("TEMPERATURE_CELL_NEIGHBOURS")) || (liste_post_instantanes.contient_(nom_temp_cell_neighbours)))
3002 {
3003 n++, dumplata_scalar(lata_name, nom_temp_cell_neighbours, get_temperature_cell_neighbours(), latastep);
3004 }
3005 oss.str("");
3006
3007 /*
3008 * TEMPERATURE_CELL_NEIGHBOURS_DEBUG
3009 */
3010 oss << "TEMPERATURE_CELL_NEIGHBOURS_DEBUG_" << lata_suffix << idx;
3011 Nom nom_temp_cell_neighbours_debug(oss.str().c_str());
3012 if ((liste_post_instantanes.contient_("TEMPERATURE_CELL_NEIGHBOURS_DEBUG")) || (liste_post_instantanes.contient_(nom_temp_cell_neighbours_debug)))
3013 {
3014 n++, dumplata_scalar(lata_name, nom_temp_cell_neighbours_debug, get_temperature_cell_neighbours_debug(), latastep);
3015 }
3016 oss.str("");
3017
3018 /*
3019 * CELL_NEIGHBOURS_CORRECTED
3020 */
3021 oss << "CELL_NEIGHBOURS_CORRECTED_" << lata_suffix << idx;
3022 Nom nom_temp_cell_neighbours_corrected(oss.str().c_str());
3023 if ((liste_post_instantanes.contient_("CELL_NEIGHBOURS_CORRECTED")) || (liste_post_instantanes.contient_(nom_temp_cell_neighbours_corrected)))
3024 {
3025 n++, dumplata_scalar(lata_name, nom_temp_cell_neighbours_corrected, get_cell_neighbours_corrected(), latastep);
3026 }
3027 oss.str("");
3028
3029 /*
3030 * CELL_NEIGHBOURS_COLINEARITY
3031 */
3032 oss << "CELL_NEIGHBOURS_COLINEARITY_" << lata_suffix << idx;
3033 Nom nom_temp_cell_neighbours_colinearity(oss.str().c_str());
3034 if ((liste_post_instantanes.contient_("CELL_NEIGHBOURS_COLINEARITY")) || (liste_post_instantanes.contient_(nom_temp_cell_neighbours_colinearity)))
3035 {
3036 n++, dumplata_scalar(lata_name, nom_temp_cell_neighbours_colinearity, get_neighbours_temperature_colinearity_weighting(), latastep);
3037 }
3038 oss.str("");
3039
3040 /*
3041 * TEMPERATURE_ANA
3042 */
3043 oss << "TEMPERATURE_ANA_" << lata_suffix << idx;
3044 Nom nom_ana(oss.str().c_str());
3045 if ((liste_post_instantanes.contient_("TEMPERATURE_ANA")) || (liste_post_instantanes.contient_(nom_ana)) || (liste_post_instantanes.contient_("ECART_T_ANA")))
3046 {
3047 //set_field_data(itr.temperature_ana_, itr.expression_T_ana_, current_time);
3049 n++, dumplata_scalar(lata_name, nom_ana, get_temperature_ana(), latastep);
3050 }
3051 oss.str("");
3052
3053 /*
3054 * ECART_T_ANA
3055 */
3056 oss << "ECART_T_ANA_" << lata_suffix << idx;
3057 Nom nom_ecart_ana(oss.str().c_str());
3058 if ((liste_post_instantanes.contient_("ECART_T_ANA") || liste_post_instantanes.contient_(nom_ecart_ana)))
3059 {
3061 n++, dumplata_scalar(lata_name, nom_ecart_ana, get_ecart_t_ana(), latastep);
3062 }
3063 oss.str("");
3064
3065 /*
3066 * ECART_T_ANA_REL
3067 */
3068 oss << "ECART_T_ANA_REL_" << lata_suffix << idx;
3069 Nom nom_ecart_ana_rel(oss.str().c_str());
3070 if ((liste_post_instantanes.contient_("ECART_T_ANA_REL") || liste_post_instantanes.contient_(nom_ecart_ana_rel)))
3071 {
3072 // calculer_ecart_T_ana();
3073 n++, dumplata_scalar(lata_name, nom_ecart_ana_rel, get_ecart_t_ana_rel(), latastep);
3074 }
3075 oss.str("");
3076
3077 /*
3078 * DIV_LAMBDA_GRAD_T_VOLUME
3079 */
3080 oss << "DIV_LAMBDA_GRAD_T_VOLUME_" << lata_suffix << idx;
3081 Nom nom_div_lambda_grad_T_volume(oss.str().c_str());
3082 if ((liste_post_instantanes.contient_("DIV_LAMBDA_GRAD_T_VOLUME") || liste_post_instantanes.contient_(nom_div_lambda_grad_T_volume)))
3083 {
3084 n++, dumplata_scalar_cut_cell(cut_cell_activated, lata_name, nom_div_lambda_grad_T_volume, get_div_lambda_grad_T_volume(), latastep);
3085 }
3086 oss.str("");
3087
3088 /*
3089 * DIV_LAMBDA_GRAD_T
3090 */
3091 oss << "DIV_LAMBDA_GRAD_T_" << lata_suffix << idx;
3092 Nom nom_div_lambda_grad_T(oss.str().c_str());
3093 if ((liste_post_instantanes.contient_("DIV_LAMBDA_GRAD_T") || liste_post_instantanes.contient_(nom_div_lambda_grad_T)))
3094 {
3095 n++, dumplata_scalar(lata_name, nom_div_lambda_grad_T, get_div_lambda_grad_T(), latastep);
3096 }
3097 oss.str("");
3098
3099 /*
3100 * U_T_CONVECTIVE_VOLUME
3101 */
3102 oss << "U_T_CONVECTIVE_VOLUME_" << lata_suffix << idx;
3103 Nom nom_u_T_convective_volume(oss.str().c_str());
3104 if ((liste_post_instantanes.contient_("U_T_CONVECTIVE_VOLUME") || liste_post_instantanes.contient_(nom_u_T_convective_volume)))
3105 {
3106 n++, dumplata_scalar(lata_name, nom_u_T_convective_volume, get_u_T_convective_volume(), latastep);
3107 }
3108 oss.str("");
3109
3110 /*
3111 * U_T_CONVECTIVE
3112 */
3113 oss << "U_T_CONVECTIVE_" << lata_suffix << idx;
3114 Nom nom_u_T_convective(oss.str().c_str());
3115 if ((liste_post_instantanes.contient_("U_T_CONVECTIVE") || liste_post_instantanes.contient_(nom_u_T_convective)))
3116 {
3117 n++, dumplata_scalar(lata_name, nom_u_T_convective, get_u_T_convective(), latastep);
3118 }
3119 oss.str("");
3120
3121 /*
3122 * GRAD_T
3123 */
3124 oss << "GRAD_T_" << lata_suffix << idx;
3125 Nom nom_grad(oss.str().c_str());
3126 if (liste_post_instantanes.contient_("GRAD_T") || (liste_post_instantanes.contient_(nom_grad)))
3127 {
3128 const IJK_Field_vector3_double& grad_T = get_grad_T();
3129 n++, dumplata_vector(lata_name, nom_grad, grad_T[0], grad_T[1], grad_T[2], latastep);
3130 }
3131 oss.str("");
3132
3133 /*
3134 * GRAD_T_INTERFACE
3135 */
3136 oss << "GRAD_T_INTERFACE_" << lata_suffix << idx;
3137 Nom nom_grad_T_interface(oss.str().c_str());
3138 if ((liste_post_instantanes.contient_("GRAD_T_INTERFACE") || liste_post_instantanes.contient_(nom_grad_T_interface)))
3139 {
3140 n++, dumplata_scalar(lata_name, nom_grad_T_interface, get_grad_T_interface_ns(), latastep);
3141 }
3142 oss.str("");
3143
3144 /*
3145 * GRAD_T_INTERFACE_FT
3146 */
3147 oss << "GRAD_T_INTERFACE_FT_" << lata_suffix << idx;
3148 Nom nom_grad_T_interface_ft(oss.str().c_str());
3149 if ((liste_post_instantanes.contient_("GRAD_T_INTERFACE_FT") || liste_post_instantanes.contient_(nom_grad_T_interface_ft)))
3150 {
3151 n++, dumplata_scalar(lata_name, nom_grad_T_interface_ft, get_grad_T_interface_ft(), latastep);
3152 }
3153 oss.str("");
3154
3155 /*
3156 * TEMPERATURE_FT
3157 */
3158 oss << "TEMPERATURE_FT_" << lata_suffix << idx;
3159 Nom nom_temperature_ft(oss.str().c_str());
3160 if ((liste_post_instantanes.contient_("TEMPERATURE_FT") || liste_post_instantanes.contient_(nom_temperature_ft)))
3161 {
3162 n++, dumplata_scalar(lata_name, nom_temperature_ft, get_temperature_ft(), latastep);
3163 }
3164 oss.str("");
3165
3166 /*
3167 * GRAD_T_DIR_X_ELEM
3168 */
3169 oss << "GRAD_T_DIR_X_ELEM_" << lata_suffix << idx;
3170 Nom nom_grad_T_dir_x(oss.str().c_str());
3171 if (liste_post_instantanes.contient_("GRAD_T_DIR_X_ELEM") || liste_post_instantanes.contient_("GRAD_T_ELEM") || liste_post_instantanes.contient_(nom_grad_T_dir_x))
3172 {
3173 n++, dumplata_scalar(lata_name, nom_grad_T_dir_x, get_gradient_temperature_elem()[0], latastep);
3174 }
3175 oss.str("");
3176
3177 /*
3178 * GRAD_T_DIR_Y_ELEM
3179 */
3180 oss << "GRAD_T_DIR_Y_ELEM_" << lata_suffix << idx;
3181 Nom nom_grad_T_dir_y(oss.str().c_str());
3182 if (liste_post_instantanes.contient_("GRAD_T_DIR_Y_ELEM_") || liste_post_instantanes.contient_("GRAD_T_ELEM") || liste_post_instantanes.contient_(nom_grad_T_dir_y))
3183 {
3184 n++, dumplata_scalar(lata_name, nom_grad_T_dir_y, get_gradient_temperature_elem()[1], latastep);
3185 }
3186 oss.str("");
3187
3188 /*
3189 * GRAD_T_DIR_Z_ELEM
3190 */
3191 oss << "GRAD_T_DIR_Z_ELEM_" << lata_suffix << idx;
3192 Nom nom_grad_T_dir_z(oss.str().c_str());
3193 if (liste_post_instantanes.contient_("GRAD_T_DIR_Z_ELEM_") || liste_post_instantanes.contient_("GRAD_T_ELEM") || liste_post_instantanes.contient_(nom_grad_T_dir_z))
3194 {
3195 n++, dumplata_scalar(lata_name, nom_grad_T_dir_z, get_gradient_temperature_elem()[2], latastep);
3196 }
3197 oss.str("");
3198
3199 /*
3200 * GRAD_T_DIR_X_ELEM_SMOOTH
3201 */
3202 oss << "GRAD_T_DIR_X_ELEM_SMOOTH_" << lata_suffix << idx;
3203 Nom nom_grad_T_dir_x_smooth(oss.str().c_str());
3204 if (liste_post_instantanes.contient_("GRAD_T_DIR_X_ELEM_SMOOTH") || liste_post_instantanes.contient_("GRAD_T_ELEM_SMOOTH")
3205 || liste_post_instantanes.contient_(nom_grad_T_dir_x_smooth))
3206 {
3207 n++, dumplata_scalar(lata_name, nom_grad_T_dir_x_smooth, get_gradient_temperature_elem_smooth()[0], latastep);
3208 }
3209 oss.str("");
3210
3211 /*
3212 * GRAD_T_DIR_Y_ELEM_SMOOTH
3213 */
3214 oss << "GRAD_T_DIR_Y_ELEM_SMOOTH_" << lata_suffix << idx;
3215 Nom nom_grad_T_dir_y_smooth(oss.str().c_str());
3216 if (liste_post_instantanes.contient_("GRAD_T_DIR_Y_ELEM_SMOOTH") || liste_post_instantanes.contient_("GRAD_T_ELEM_SMOOTH")
3217 || liste_post_instantanes.contient_(nom_grad_T_dir_y_smooth))
3218 {
3219 n++, dumplata_scalar(lata_name, nom_grad_T_dir_y_smooth, get_gradient_temperature_elem_smooth()[1], latastep);
3220 }
3221 oss.str("");
3222
3223 /*
3224 * GRAD_T_DIR_Z_ELEM_SMOOTH
3225 */
3226 oss << "GRAD_T_DIR_Z_ELEM_SMOOTH_" << lata_suffix << idx;
3227 Nom nom_grad_T_dir_z_smooth(oss.str().c_str());
3228 if (liste_post_instantanes.contient_("GRAD_T_DIR_Z_ELEM_SMOOTH") || liste_post_instantanes.contient_("GRAD_T_ELEM_SMOOTH")
3229 || liste_post_instantanes.contient_(nom_grad_T_dir_z_smooth))
3230 {
3231 n++, dumplata_scalar(lata_name, nom_grad_T_dir_z_smooth, get_gradient_temperature_elem_smooth()[2], latastep);
3232 }
3233 oss.str("");
3234
3235 /*
3236 * GRAD_T_DIR_X_ELEM_SMOOTH
3237 */
3238 oss << "GRAD_T_DIR_X_ELEM_TAN_SMOOTH_" << lata_suffix << idx;
3239 Nom nom_tangential_grad_T_dir_x_smooth(oss.str().c_str());
3240 if (liste_post_instantanes.contient_("GRAD_T_DIR_X_ELEM_TAN_SMOOTH") || liste_post_instantanes.contient_("GRAD_T_ELEM_TAN_SMOOTH")
3241 || liste_post_instantanes.contient_(nom_tangential_grad_T_dir_x_smooth))
3242 {
3243 n++, dumplata_scalar(lata_name, nom_tangential_grad_T_dir_x_smooth, get_tangential_gradient_temperature_elem_smooth()[0], latastep);
3244 }
3245 oss.str("");
3246
3247 /*
3248 * GRAD_T_DIR_Y_ELEM_SMOOTH
3249 */
3250 oss << "GRAD_T_DIR_Y_ELEM_TAN_SMOOTH_" << lata_suffix << idx;
3251 Nom nom_tangential_grad_T_dir_y_smooth(oss.str().c_str());
3252 if (liste_post_instantanes.contient_("GRAD_T_DIR_Y_ELEM_TAN_SMOOTH") || liste_post_instantanes.contient_("GRAD_T_ELEM_TAN_SMOOTH")
3253 || liste_post_instantanes.contient_(nom_tangential_grad_T_dir_y_smooth))
3254 {
3255 n++, dumplata_scalar(lata_name, nom_tangential_grad_T_dir_y_smooth, get_tangential_gradient_temperature_elem_smooth()[1], latastep);
3256 }
3257 oss.str("");
3258
3259 /*
3260 * GRAD_T_DIR_Z_ELEM_SMOOTH
3261 */
3262 oss << "GRAD_T_DIR_Z_ELEM_TAN_SMOOTH_" << lata_suffix << idx;
3263 Nom nom_tangential_grad_T_dir_z_smooth(oss.str().c_str());
3264 if (liste_post_instantanes.contient_("GRAD_T_DIR_Z_ELEM_TAN_SMOOTH") || liste_post_instantanes.contient_("GRAD_T_ELEM_TAN_SMOOTH")
3265 || liste_post_instantanes.contient_(nom_tangential_grad_T_dir_z_smooth))
3266 {
3267 n++, dumplata_scalar(lata_name, nom_tangential_grad_T_dir_z_smooth, get_tangential_gradient_temperature_elem_smooth()[2], latastep);
3268 }
3269 oss.str("");
3270
3271
3272
3273 /*
3274 * HESS_T_DIR_XX_ELEM
3275 */
3276 oss << "HESS_T_DIR_XX_ELEM_" << lata_suffix << idx;
3277 Nom nom_hess_T_dir_xx(oss.str().c_str());
3278 if (liste_post_instantanes.contient_("HESS_T_DIR_XX_ELEM") || liste_post_instantanes.contient_("HESS_DIAG_T_ELEM") || liste_post_instantanes.contient_("HESS_T_ELEM")
3279 || liste_post_instantanes.contient_(nom_hess_T_dir_xx))
3280 {
3281 n++, dumplata_scalar(lata_name, nom_hess_T_dir_xx, get_hessian_diag_temperature_elem()[0], latastep);
3282 }
3283 oss.str("");
3284
3285 /*
3286 * HESS_T_DIR_YY_ELEM
3287 */
3288 oss << "HESS_T_DIR_YY_ELEM_" << lata_suffix << idx;
3289 Nom nom_hess_T_dir_yy(oss.str().c_str());
3290 if (liste_post_instantanes.contient_("HESS_T_DIR_YY_ELEM") || liste_post_instantanes.contient_("HESS_DIAG_T_ELEM") || liste_post_instantanes.contient_("HESS_T_ELEM")
3291 || liste_post_instantanes.contient_(nom_hess_T_dir_yy))
3292 {
3293 n++, dumplata_scalar(lata_name, nom_hess_T_dir_yy, get_hessian_diag_temperature_elem()[1], latastep);
3294 }
3295 oss.str("");
3296
3297 /*
3298 * HESS_T_DIR_ZZ_ELEM
3299 */
3300 oss << "HESS_T_DIR_ZZ_ELEM_" << lata_suffix << idx;
3301 Nom nom_hess_T_dir_zz(oss.str().c_str());
3302 if (liste_post_instantanes.contient_("HESS_T_DIR_ZZ_ELEM") || liste_post_instantanes.contient_("HESS_DIAG_T_ELEM") || liste_post_instantanes.contient_("HESS_T_ELEM")
3303 || liste_post_instantanes.contient_(nom_hess_T_dir_zz))
3304 {
3305 n++, dumplata_scalar(lata_name, nom_hess_T_dir_zz, get_hessian_diag_temperature_elem()[2], latastep);
3306 }
3307 oss.str("");
3308
3309 /*
3310 * HESS_T_DIR_XY_YX_ELEM
3311 */
3312 oss << "HESS_T_DIR_XY_YX_ELEM_" << lata_suffix << idx;
3313 Nom nom_hess_T_dir_xy_yx(oss.str().c_str());
3314 if (liste_post_instantanes.contient_("HESS_T_DIR_XY_YX_ELEM") || liste_post_instantanes.contient_("HESS_CROSS_T_ELEM") || liste_post_instantanes.contient_("HESS_T_ELEM")
3315 || liste_post_instantanes.contient_(nom_hess_T_dir_xy_yx))
3316 {
3317 n++, dumplata_scalar(lata_name, nom_hess_T_dir_xy_yx, get_hessian_cross_temperature_elem()[2], latastep);
3318 }
3319 oss.str("");
3320
3321 /*
3322 * HESS_T_DIR_XZ_ZX_ELEM
3323 */
3324 oss << "HESS_T_DIR_XZ_ZX_ELEM_" << lata_suffix << idx;
3325 Nom nom_hess_T_dir_xz_zx(oss.str().c_str());
3326 if (liste_post_instantanes.contient_("HESS_T_DIR_XZ_ZX_ELEM") || liste_post_instantanes.contient_("HESS_CROSS_T_ELEM") || liste_post_instantanes.contient_("HESS_T_ELEM")
3327 || liste_post_instantanes.contient_(nom_hess_T_dir_xz_zx))
3328 {
3329 n++, dumplata_scalar(lata_name, nom_hess_T_dir_xz_zx, get_hessian_cross_temperature_elem()[1], latastep);
3330 }
3331 oss.str("");
3332
3333 /*
3334 * HESS_T_DIR_YZ_ELEM
3335 */
3336 oss << "HESS_T_DIR_YZ_ZY_ELEM_" << lata_suffix << idx;
3337 Nom nom_hess_T_dir_yz_zy(oss.str().c_str());
3338 if (liste_post_instantanes.contient_("HESS_T_DIR_YZ_ZY_ELEM") || liste_post_instantanes.contient_("HESS_CROSS_T_ELEM") || liste_post_instantanes.contient_("HESS_T_ELEM")
3339 || liste_post_instantanes.contient_(nom_hess_T_dir_yz_zy))
3340 {
3341 n++, dumplata_scalar(lata_name, nom_hess_T_dir_yz_zy, get_hessian_cross_temperature_elem()[0], latastep);
3342 }
3343 oss.str("");
3344
3345 /*
3346 * RHO_CP_U_T_CONVECTIVE_FLUXES_X
3347 */
3348 oss << "RHO_CP_U_T_CONVECTIVE_FLUXES_X_" << lata_suffix << idx;
3349 Nom nom_rho_cp_u_T_convective_x(oss.str().c_str());
3350 if (liste_post_instantanes.contient_("RHO_CP_U_T_CONVECTIVE_FLUXES_X") || liste_post_instantanes.contient_(nom_rho_cp_u_T_convective_x))
3351 {
3352 n++, dumplata_scalar(lata_name, nom_rho_cp_u_T_convective_x, get_rho_cp_u_T_convective_fluxes()[0], latastep);
3353 }
3354 oss.str("");
3355
3356 /*
3357 * RHO_CP_U_T_CONVECTIVE_FLUXES_Y
3358 */
3359 oss << "RHO_CP_U_T_CONVECTIVE_FLUXES_Y_" << lata_suffix << idx;
3360 Nom nom_rho_cp_u_T_convective_y(oss.str().c_str());
3361 if (liste_post_instantanes.contient_("RHO_CP_U_T_CONVECTIVE_FLUXES_Y") || liste_post_instantanes.contient_(nom_rho_cp_u_T_convective_y))
3362 {
3363 n++, dumplata_scalar(lata_name, nom_rho_cp_u_T_convective_y, get_rho_cp_u_T_convective_fluxes()[1], latastep);
3364 }
3365 oss.str("");
3366
3367 /*
3368 * RHO_CP_U_T_CONVECTIVE_FLUXES_Z
3369 */
3370 oss << "RHO_CP_U_T_CONVECTIVE_FLUXES_Z_" << lata_suffix << idx;
3371 Nom nom_rho_cp_u_T_convective_z(oss.str().c_str());
3372 if (liste_post_instantanes.contient_("RHO_CP_U_T_CONVECTIVE_FLUXES_Z") || liste_post_instantanes.contient_(nom_rho_cp_u_T_convective_z))
3373 {
3374 n++, dumplata_scalar(lata_name, nom_rho_cp_u_T_convective_z, get_rho_cp_u_T_convective_fluxes()[2], latastep);
3375 }
3376 oss.str("");
3377
3378 /*
3379 * LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_X
3380 */
3381 oss << "LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_X_" << lata_suffix << idx;
3382 Nom nom_coeff_grad_T_diffusive_x(oss.str().c_str());
3383 if (liste_post_instantanes.contient_("LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_X") || liste_post_instantanes.contient_(nom_coeff_grad_T_diffusive_x))
3384 {
3385 n++, dumplata_scalar(lata_name, nom_coeff_grad_T_diffusive_x, get_div_coeff_grad_T_diffusive_fluxes()[0], latastep);
3386 }
3387 oss.str("");
3388
3389 /*
3390 * LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_Y
3391 */
3392 oss << "LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_Y_" << lata_suffix << idx;
3393 Nom nom_coeff_grad_T_diffusive_y(oss.str().c_str());
3394 if (liste_post_instantanes.contient_("LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_Y") || liste_post_instantanes.contient_(nom_coeff_grad_T_diffusive_y))
3395 {
3396 n++, dumplata_scalar(lata_name, nom_coeff_grad_T_diffusive_y, get_div_coeff_grad_T_diffusive_fluxes()[1], latastep);
3397 }
3398 oss.str("");
3399
3400 /*
3401 * LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_Z
3402 */
3403 oss << "LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_Z_" << lata_suffix << idx;
3404 Nom nom_coeff_grad_T_diffusive_z(oss.str().c_str());
3405 if (liste_post_instantanes.contient_("LAMBDA_GRAD_T_DIFFUSIVE_FLUXES_Z") || liste_post_instantanes.contient_(nom_coeff_grad_T_diffusive_z))
3406 {
3407 n++, dumplata_scalar(lata_name, nom_coeff_grad_T_diffusive_z, get_div_coeff_grad_T_diffusive_fluxes()[2], latastep);
3408 }
3409 oss.str("");
3410
3411 if (rank == 0)
3412 {
3413 /*
3414 * DISTANCE
3415 */
3416 // oss << "DISTANCE_" << lata_suffix << idx;
3417 oss << "DISTANCE";
3418 Nom nom_distance(oss.str().c_str());
3419 if ((liste_post_instantanes.contient_("DISTANCE") || liste_post_instantanes.contient_(nom_distance)))
3420 {
3421 n++, dumplata_scalar(lata_name, nom_distance, get_eulerian_distance_ns(), latastep);
3422 }
3423 oss.str("");
3424
3425 /*
3426 * NORMAL_VECTOR_X
3427 */
3428 // oss << "NORMAL_VECTOR_X_" << lata_suffix << idx;
3429 oss << "NORMAL_VECTOR_X";
3430 Nom nom_normal_vector_x(oss.str().c_str());
3431 if (liste_post_instantanes.contient_("NORMAL_VECTOR_X") || liste_post_instantanes.contient_(nom_normal_vector_x))
3432 {
3433 n++, dumplata_scalar(lata_name, nom_normal_vector_x, get_normal_vector_ns()[0], latastep);
3434 }
3435 oss.str("");
3436
3437 /*
3438 * NORMAL_VECTOR_Y
3439 */
3440 // oss << "NORMAL_VECTOR_Y_" << lata_suffix << idx;
3441 oss << "NORMAL_VECTOR_Y";
3442 Nom nom_normal_vector_y(oss.str().c_str());
3443 if (liste_post_instantanes.contient_("NORMAL_VECTOR_Y") || liste_post_instantanes.contient_(nom_normal_vector_y))
3444 {
3445 n++, dumplata_scalar(lata_name, nom_normal_vector_y, get_normal_vector_ns()[1], latastep);
3446 }
3447 oss.str("");
3448
3449 /*
3450 * NORMAL_VECTOR_Z
3451 */
3452 // oss << "NORMAL_VECTOR_Z_" << lata_suffix << idx;
3453 oss << "NORMAL_VECTOR_Z";
3454 Nom nom_normal_vector_z(oss.str().c_str());
3455 if (liste_post_instantanes.contient_("NORMAL_VECTOR_Z") || liste_post_instantanes.contient_(nom_normal_vector_z))
3456 {
3457 n++, dumplata_scalar(lata_name, nom_normal_vector_z, get_normal_vector_ns()[2], latastep);
3458 }
3459 oss.str("");
3460
3461 /*
3462 * NORMAL_VECTOR_X_NORMED
3463 */
3464 // oss << "NORMAL_VECTOR_X_NORMED_" << lata_suffix << idx;
3465 oss << "NORMAL_VECTOR_X_NORMED";
3466 Nom nom_normal_vector_x_normed(oss.str().c_str());
3467 if (liste_post_instantanes.contient_("NORMAL_VECTOR_X_NORMED") || liste_post_instantanes.contient_(nom_normal_vector_x_normed))
3468 {
3469 n++, dumplata_scalar(lata_name, nom_normal_vector_x_normed, get_normal_vector_ns_normed()[0], latastep);
3470 }
3471 oss.str("");
3472
3473 /*
3474 * NORMAL_VECTOR_Y_NORMED
3475 */
3476 // oss << "NORMAL_VECTOR_Y_NORMED_" << lata_suffix << idx;
3477 oss << "NORMAL_VECTOR_Y_NORMED";
3478 Nom nom_normal_vector_y_normed(oss.str().c_str());
3479 if (liste_post_instantanes.contient_("NORMAL_VECTOR_Y_NORMED") || liste_post_instantanes.contient_(nom_normal_vector_y_normed))
3480 {
3481 n++, dumplata_scalar(lata_name, nom_normal_vector_y_normed, get_normal_vector_ns_normed()[1], latastep);
3482 }
3483 oss.str("");
3484
3485 /*
3486 * NORMAL_VECTOR_Z_NORMED
3487 */
3488 // oss << "NORMAL_VECTOR_Z_NORMED_" << lata_suffix << idx;
3489 oss << "NORMAL_VECTOR_Z_NORMED";
3490 Nom nom_normal_vector_z_normed(oss.str().c_str());
3491 if (liste_post_instantanes.contient_("NORMAL_VECTOR_Z_NORMED") || liste_post_instantanes.contient_(nom_normal_vector_z_normed))
3492 {
3493 n++, dumplata_scalar(lata_name, nom_normal_vector_z_normed, get_normal_vector_ns_normed()[2], latastep);
3494 }
3495 oss.str("");
3496
3497 /*
3498 * CURVATURE
3499 */
3500 // oss << "CURVATURE_" << lata_suffix << idx;
3501 oss << "CURVATURE";
3502 Nom nom_curvature(oss.str().c_str());
3503 if ((liste_post_instantanes.contient_("CURVATURE") || liste_post_instantanes.contient_(nom_curvature)))
3504 {
3505 n++, dumplata_scalar(lata_name, nom_curvature, get_eulerian_curvature_ns(), latastep);
3506 }
3507 oss.str("");
3508
3509 /*
3510 * INTERFACIAL AREA
3511 */
3512 // oss << "INTERFACIAL_AREA_" << lata_suffix << idx;
3513 oss << "INTERFACIAL_AREA";
3514 Nom nom_interfacial_area(oss.str().c_str());
3515 if ((liste_post_instantanes.contient_("INTERFACIAL_AREA") || liste_post_instantanes.contient_(nom_interfacial_area)))
3516 {
3517 n++, dumplata_scalar(lata_name, nom_interfacial_area, get_interfacial_area_ns(), latastep);
3518 }
3519 oss.str("");
3520
3521 /*
3522 * DISTANCE_FT
3523 */
3524 // oss << "DISTANCE_FT_" << lata_suffix << idx;
3525 oss << "DISTANCE_FT";
3526 Nom nom_distance_ft(oss.str().c_str());
3527 if ((liste_post_instantanes.contient_("DISTANCE_FT") || liste_post_instantanes.contient_(nom_distance_ft)))
3528 {
3529 n++, dumplata_scalar(lata_name, nom_distance_ft, get_eulerian_distance_ft(), latastep);
3530 }
3531 oss.str("");
3532
3533 /*
3534 * NORMAL_VECTOR_X_FT
3535 */
3536 // oss << "NORMAL_VECTOR_X_FT_" << lata_suffix << idx;
3537 oss << "NORMAL_VECTOR_X_FT";
3538 Nom nom_normal_vector_x_ft(oss.str().c_str());
3539 if (liste_post_instantanes.contient_("NORMAL_VECTOR_X_FT") || liste_post_instantanes.contient_("NORMAL_VECTOR_X_FT") || liste_post_instantanes.contient_(nom_normal_vector_x_ft))
3540 {
3541 n++, dumplata_scalar(lata_name, nom_normal_vector_x_ft, get_normal_vector_ft()[0], latastep);
3542 }
3543 oss.str("");
3544
3545 /*
3546 * NORMAL_VECTOR_Y_FT
3547 */
3548 // oss << "NORMAL_VECTOR_Y_FT_" << lata_suffix << idx;
3549 oss << "NORMAL_VECTOR_Y_FT";
3550 Nom nom_normal_vector_y_ft(oss.str().c_str());
3551 if (liste_post_instantanes.contient_("NORMAL_VECTOR_Y_FT") || liste_post_instantanes.contient_("NORMAL_VECTOR_Y_FT") || liste_post_instantanes.contient_(nom_normal_vector_y_ft))
3552 {
3553 n++, dumplata_scalar(lata_name, nom_normal_vector_y_ft, get_normal_vector_ft()[1], latastep);
3554 }
3555 oss.str("");
3556
3557 /*
3558 * NORMAL_VECTOR_Z_FT
3559 */
3560 // oss << "NORMAL_VECTOR_Z_FT_" << lata_suffix << idx;
3561 oss << "NORMAL_VECTOR_Z_FT";
3562 Nom nom_normal_vector_z_ft(oss.str().c_str());
3563 if (liste_post_instantanes.contient_("NORMAL_VECTOR_Z_FT") || liste_post_instantanes.contient_("NORMAL_VECTOR_Z_FT") || liste_post_instantanes.contient_(nom_normal_vector_z_ft))
3564 {
3565 n++, dumplata_scalar(lata_name, nom_normal_vector_z_ft, get_normal_vector_ft()[2], latastep);
3566 }
3567 oss.str("");
3568
3569 /*
3570 * CURVATURE_FT
3571 */
3572 // oss << "CURVATURE_FT_" << lata_suffix << idx;
3573 oss << "CURVATURE_FT";
3574 Nom nom_curvature_ft(oss.str().c_str());
3575 if ((liste_post_instantanes.contient_("CURVATURE_FT") || liste_post_instantanes.contient_(nom_curvature_ft)))
3576 {
3577 n++, dumplata_scalar(lata_name, nom_curvature_ft, get_eulerian_curvature_ft(), latastep);
3578 }
3579 oss.str("");
3580
3581 /*
3582 * INTERFACIAL_AREA_FT
3583 */
3584 // oss << "INTERFACIAL_AREA_FT_" << lata_suffix << idx;
3585 oss << "INTERFACIAL_AREA_FT";
3586 Nom nom_interfacial_area_ft(oss.str().c_str());
3587 if ((liste_post_instantanes.contient_("INTERFACIAL_AREA_FT") || liste_post_instantanes.contient_(nom_interfacial_area_ft)))
3588 {
3589 n++, dumplata_scalar(lata_name, nom_interfacial_area_ft, get_interfacial_area_ft(), latastep);
3590 }
3591 oss.str("");
3592
3593 /*
3594 * INDICATOR_FT
3595 */
3596 // oss << "INDICATOR_FT_" << lata_suffix << idx;
3597 oss << "INDICATOR_FT";
3598 Nom nom_indicator_ft(oss.str().c_str());
3599 if ((liste_post_instantanes.contient_("INDICATOR_FT") || liste_post_instantanes.contient_(nom_indicator_ft)))
3600 {
3601 n++, dumplata_scalar(lata_name, nom_indicator_ft, ref_ijk_ft_->get_interface().I_ft(), latastep);
3602 }
3603 oss.str("");
3604
3605 /*
3606 * BARY_X
3607 */
3608 // oss << "BARY_X_" << lata_suffix << idx;
3609 oss << "BARY_X";
3610 Nom nom_bary_x(oss.str().c_str());
3611 if (liste_post_instantanes.contient_("BARY") || liste_post_instantanes.contient_("BARY_X") || liste_post_instantanes.contient_(nom_bary_x))
3612 {
3613 n++, dumplata_scalar(lata_name, nom_bary_x, get_bary()[0], latastep);
3614 }
3615 oss.str("");
3616
3617 /*
3618 * BARY_Y
3619 */
3620 // oss << "BARY_Y_" << lata_suffix << idx;
3621 oss << "BARY_Y";
3622 Nom nom_bary_y(oss.str().c_str());
3623 if (liste_post_instantanes.contient_("BARY") || liste_post_instantanes.contient_("BARY_Y") || liste_post_instantanes.contient_(nom_bary_y))
3624 {
3625 n++, dumplata_scalar(lata_name, nom_bary_y, get_bary()[1], latastep);
3626 }
3627 oss.str("");
3628
3629 /*
3630 * BARY_Z
3631 */
3632 // oss << "BARY_Z_" << lata_suffix << idx;
3633 oss << "BARY_Z";
3634 Nom nom_bary_z(oss.str().c_str());
3635 if (liste_post_instantanes.contient_("BARY") || liste_post_instantanes.contient_("BARY_Z") || liste_post_instantanes.contient_(nom_bary_z))
3636
3637 {
3638 n++, dumplata_scalar(lata_name, nom_bary_z, get_bary()[2], latastep);
3639 }
3640 oss.str("");
3641
3642 /*
3643 * EULERIAN_COMPO_FT
3644 */
3645 // oss << "EULERIAN_COMPO_FT_" << lata_suffix << idx;
3646 oss << "EULERIAN_COMPO_FT";
3647 Nom nom_eulerian_compo_ft(oss.str().c_str());
3648 if (liste_post_instantanes.contient_("EULERIAN_COMPO_FT") || liste_post_instantanes.contient_(nom_eulerian_compo_ft))
3649
3650 {
3651 n++, dumplata_scalar(lata_name, nom_eulerian_compo_ft, get_eulerian_compo_connex_ft(), latastep);
3652 }
3653 oss.str("");
3654
3655 /*
3656 * EULERIAN_COMPO
3657 */
3658 // oss << "EULERIAN_COMPO_" << lata_suffix << idx;
3659 oss << "EULERIAN_COMPO";
3660 Nom nom_eulerian_compo(oss.str().c_str());
3661 if (liste_post_instantanes.contient_("EULERIAN_COMPO") || liste_post_instantanes.contient_(nom_eulerian_compo))
3662
3663 {
3664 n++, dumplata_scalar(lata_name, nom_eulerian_compo, get_eulerian_compo_connex_ns(), latastep);
3665 }
3666 oss.str("");
3667
3668 /*
3669 * EULERIAN_COMPO_GHOST_FT
3670 */
3671 // oss << "EULERIAN_COMPO_GHOST_FT_" << lata_suffix << idx;
3672 oss << "EULERIAN_COMPO_GHOST_FT";
3673 Nom nom_eulerian_compo_ghost_ft(oss.str().c_str());
3674 if (liste_post_instantanes.contient_("EULERIAN_COMPO_GHOST_FT") || liste_post_instantanes.contient_(nom_eulerian_compo_ghost_ft))
3675
3676 {
3677 n++, dumplata_scalar(lata_name, nom_eulerian_compo_ghost_ft, get_eulerian_compo_connex_ghost_ft(), latastep);
3678 }
3679 oss.str("");
3680
3681 /*
3682 * EULERIAN_COMPO_GHOST
3683 */
3684 // oss << "EULERIAN_COMPO_GHOST_" << lata_suffix << idx;
3685 oss << "EULERIAN_COMPO_GHOST";
3686 Nom nom_eulerian_compo_ghost(oss.str().c_str());
3687 if (liste_post_instantanes.contient_("EULERIAN_COMPO_GHOST") || liste_post_instantanes.contient_(nom_eulerian_compo_ghost))
3688
3689 {
3690 n++, dumplata_scalar(lata_name, nom_eulerian_compo_ghost, get_eulerian_compo_connex_ghost_ns(), latastep);
3691 }
3692 oss.str("");
3693
3694 /*
3695 * EULERIAN_COMPO_INTERFACE_FT
3696 */
3697 // oss << "EULERIAN_COMPO_INTERFACE_FT_" << lata_suffix << idx;
3698 oss << "EULERIAN_COMPO_INTERFACE_FT";
3699 Nom nom_eulerian_compo_from_interface_ft(oss.str().c_str());
3700 if (liste_post_instantanes.contient_("EULERIAN_COMPO_INTERFACE_FT") || liste_post_instantanes.contient_(nom_eulerian_compo_from_interface_ft))
3701
3702 {
3703 n++, dumplata_scalar(lata_name, nom_eulerian_compo_from_interface_ft, get_eulerian_compo_connex_from_interface_ft(), latastep);
3704 }
3705 oss.str("");
3706
3707 /*
3708 * EULERIAN_COMPO_INTERFACE_GHOST_FT
3709 */
3710 // oss << "EULERIAN_COMPO_INTERFACE_GHOST_FT_" << lata_suffix << idx;
3711 oss << "EULERIAN_COMPO_INTERFACE_GHOST_FT";
3712 Nom nom_eulerian_compo_from_interface_ghost_ft(oss.str().c_str());
3713 if (liste_post_instantanes.contient_("EULERIAN_COMPO_INTERFACE_GHOST_FT") || liste_post_instantanes.contient_(nom_eulerian_compo_from_interface_ghost_ft))
3714
3715 {
3716 n++, dumplata_scalar(lata_name, nom_eulerian_compo_from_interface_ghost_ft, get_eulerian_compo_connex_from_interface_ghost_ft(), latastep);
3717 }
3718 oss.str("");
3719
3720 /*
3721 * EULERIAN_COMPO_INTERFACE_NS
3722 */
3723 // oss << "EULERIAN_COMPO_INTERFACE_NS_" << lata_suffix << idx;
3724 oss << "EULERIAN_COMPO_INTERFACE_NS";
3725 Nom nom_eulerian_compo_from_interface_ns(oss.str().c_str());
3726 if (liste_post_instantanes.contient_("EULERIAN_COMPO_INTERFACE_NS") || liste_post_instantanes.contient_(nom_eulerian_compo_from_interface_ns))
3727
3728 {
3729 n++, dumplata_scalar(lata_name, nom_eulerian_compo_from_interface_ns, get_eulerian_compo_connex_from_interface_ns(), latastep);
3730 }
3731 oss.str("");
3732
3733 /*
3734 * EULERIAN_COMPO_INTERFACE_GHOST_NS
3735 */
3736 // oss << "EULERIAN_COMPO_INTERFACE_GHOST_NS_" << lata_suffix << idx;
3737 oss << "EULERIAN_COMPO_INTERFACE_GHOST_NS";
3738 Nom nom_eulerian_compo_from_interface_ghost_ns(oss.str().c_str());
3739 if (liste_post_instantanes.contient_("EULERIAN_COMPO_INTERFACE_GHOST_NS") || liste_post_instantanes.contient_(nom_eulerian_compo_from_interface_ghost_ns))
3740
3741 {
3742 n++, dumplata_scalar(lata_name, nom_eulerian_compo_from_interface_ghost_ns, get_eulerian_compo_connex_from_interface_ghost_ns(), latastep);
3743 }
3744 oss.str("");
3745
3746 /*
3747 * EULERIAN_COMPO_INTERFACE_INT
3748 */
3749 // oss << "EULERIAN_COMPO_INTERFACE_INT_" << lata_suffix << idx;
3750 oss << "EULERIAN_COMPO_INTERFACE_INT";
3751 Nom nom_eulerian_compo_from_interface_int(oss.str().c_str());
3752 if (liste_post_instantanes.contient_("EULERIAN_COMPO_INTERFACE_INT") || liste_post_instantanes.contient_(nom_eulerian_compo_from_interface_int))
3753
3754 {
3755 n++, dumplata_scalar(lata_name, nom_eulerian_compo_from_interface_int, get_eulerian_compo_connex_int_from_interface_ns(), latastep);
3756 }
3757 oss.str("");
3758
3759 /*
3760 * EULERIAN_COMPO_INTERFACE_GHOST_INT
3761 */
3762 // oss << "EULERIAN_COMPO_INTERFACE_GHOST_INT_" << lata_suffix << idx;
3763 oss << "EULERIAN_COMPO_INTERFACE_GHOST_INT";
3764 Nom nom_eulerian_compo_from_interface_ghost_int(oss.str().c_str());
3765 if (liste_post_instantanes.contient_("EULERIAN_COMPO_INTERFACE_GHOST_INT") || liste_post_instantanes.contient_(nom_eulerian_compo_from_interface_ghost_int))
3766
3767 {
3768 n++, dumplata_scalar(lata_name, nom_eulerian_compo_from_interface_ghost_int, get_eulerian_compo_connex_int_from_interface_ghost_ns(), latastep);
3769 }
3770 oss.str("");
3771
3772 /*
3773 * RISING_VELOCITIES
3774 */
3775 // oss << "RISING_VELOCITIES_" << lata_suffix << idx;
3776 oss << "RISING_VELOCITIES";
3777 Nom nom_eulerian_rising_velocities(oss.str().c_str());
3778 if (liste_post_instantanes.contient_("RISING_VELOCITIES") || liste_post_instantanes.contient_(nom_eulerian_rising_velocities))
3779
3780 {
3781 n++, dumplata_scalar(lata_name, nom_eulerian_rising_velocities, get_eulerian_rising_velocities(), latastep);
3782 }
3783 oss.str("");
3784 }
3785
3786
3787 /*
3788 * DEBUG_LRS_CELLS
3789 */
3790 if (get_debug())
3791 {
3792 oss << "DEBUG_LRS_CELLS_" << lata_suffix << idx;
3793 Nom nom_debug_lrs_cells(oss.str().c_str());
3794 if (liste_post_instantanes.contient_("DEBUG_LRS_CELLS") || liste_post_instantanes.contient_(nom_debug_lrs_cells))
3795 {
3796 n++, dumplata_scalar(lata_name, nom_debug_lrs_cells, get_debug_lrs_cells(), latastep);
3797 }
3798 oss.str("");
3799 }
3800
3801 /*
3802 * CELL_FACES_CORRECTED_CONVECTIVE_X
3803 */
3804 oss << "CELL_FACES_CORRECTED_CONVECTIVE_X_" << lata_suffix << idx;
3805 Nom nom_cell_faces_corrected_convective_x(oss.str().c_str());
3806 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_CONVECTIVE_X") || liste_post_instantanes.contient_(nom_cell_faces_corrected_convective_x))
3807 {
3808 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_convective_x, get_cell_faces_corrected_convective()[0], latastep);
3809 }
3810 oss.str("");
3811
3812 /*
3813 * CELL_FACES_CORRECTED_CONVECTIVE_Y
3814 */
3815 oss << "CELL_FACES_CORRECTED_CONVECTIVE_Y_" << lata_suffix << idx;
3816 Nom nom_cell_faces_corrected_convective_y(oss.str().c_str());
3817 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_CONVECTIVE_Y") || liste_post_instantanes.contient_(nom_cell_faces_corrected_convective_y))
3818 {
3819 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_convective_y, get_cell_faces_corrected_convective()[1], latastep);
3820 }
3821 oss.str("");
3822
3823 /*
3824 * CELL_FACES_CORRECTED_CONVECTIVE_Z
3825 */
3826 oss << "CELL_FACES_CORRECTED_CONVECTIVE_Z_" << lata_suffix << idx;
3827 Nom nom_cell_faces_corrected_convective_z(oss.str().c_str());
3828 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_CONVECTIVE_Z") || liste_post_instantanes.contient_(nom_cell_faces_corrected_convective_z))
3829 {
3830 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_convective_z, get_cell_faces_corrected_convective()[2], latastep);
3831 }
3832 oss.str("");
3833
3834 /*
3835 * CELL_FACES_CORRECTED_DIFFUSIVE_X
3836 */
3837 oss << "CELL_FACES_CORRECTED_DIFFUSIVE_X_" << lata_suffix << idx;
3838 Nom nom_cell_faces_corrected_diffusive_x(oss.str().c_str());
3839 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_DIFFUSIVE_X") || liste_post_instantanes.contient_(nom_cell_faces_corrected_diffusive_x))
3840 {
3841 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_diffusive_x, get_cell_faces_corrected_diffusive()[0], latastep);
3842 }
3843 oss.str("");
3844
3845 /*
3846 * CELL_FACES_CORRECTED_DIFFUSIVE_Y
3847 */
3848 oss << "CELL_FACES_CORRECTED_DIFFUSIVE_Y_" << lata_suffix << idx;
3849 Nom nom_cell_faces_corrected_diffusive_y(oss.str().c_str());
3850 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_DIFFUSIVE_Y") || liste_post_instantanes.contient_(nom_cell_faces_corrected_diffusive_y))
3851 {
3852 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_diffusive_y, get_cell_faces_corrected_diffusive()[1], latastep);
3853 }
3854 oss.str("");
3855
3856 /*
3857 * CELL_FACES_CORRECTED_DIFFUSIVE_Z
3858 */
3859 oss << "CELL_FACES_CORRECTED_DIFFUSIVE_Z_" << lata_suffix << idx;
3860 Nom nom_cell_faces_corrected_diffusive_z(oss.str().c_str());
3861 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_DIFFUSIVE_Z") || liste_post_instantanes.contient_(nom_cell_faces_corrected_diffusive_z))
3862 {
3863 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_diffusive_z, get_cell_faces_corrected_diffusive()[2], latastep);
3864 }
3865 oss.str("");
3866
3867 /*
3868 * CELL_FACES_CORRECTED_BOOL_X
3869 */
3870 oss << "CELL_FACES_CORRECTED_BOOL_X_" << lata_suffix << idx;
3871 Nom nom_cell_faces_corrected_bool_x(oss.str().c_str());
3872 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_BOOL_X") || liste_post_instantanes.contient_(nom_cell_faces_corrected_bool_x))
3873 {
3874 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_bool_x, get_cell_faces_corrected_bool()[0], latastep);
3875 }
3876 oss.str("");
3877
3878 /*
3879 * CELL_FACES_CORRECTED_BOOL_Y
3880 */
3881 oss << "CELL_FACES_CORRECTED_BOOL_Y_" << lata_suffix << idx;
3882 Nom nom_cell_faces_corrected_bool_y(oss.str().c_str());
3883 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_BOOL_Y") || liste_post_instantanes.contient_(nom_cell_faces_corrected_bool_y))
3884 {
3885 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_bool_y, get_cell_faces_corrected_bool()[1], latastep);
3886 }
3887 oss.str("");
3888
3889 /*
3890 * CELL_FACES_CORRECTED_BOOL_Z
3891 */
3892 oss << "CELL_FACES_CORRECTED_BOOL_Z_" << lata_suffix << idx;
3893 Nom nom_cell_faces_corrected_bool_z(oss.str().c_str());
3894 if (liste_post_instantanes.contient_("CELL_FACES_CORRECTED_BOOL_Z") || liste_post_instantanes.contient_(nom_cell_faces_corrected_bool_z))
3895 {
3896 n++, dumplata_scalar(lata_name, nom_cell_faces_corrected_bool_z, get_cell_faces_corrected_bool()[2], latastep);
3897 }
3898 oss.str("");
3899
3900 /*
3901 * CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_X
3902 */
3903 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_X_" << lata_suffix << idx;
3904 Nom nom_cell_faces_neighbours_corrected_diag_bool_x(oss.str().c_str());
3905 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_diag_bool_x))
3906 {
3907 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_diag_bool_x, get_cell_faces_neighbours_corrected_diag_bool()[0], latastep);
3908 }
3909 oss.str("");
3910
3911 /*
3912 * CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_Y
3913 */
3914 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_Y_" << lata_suffix << idx;
3915 Nom nom_cell_faces_neighbours_corrected_diag_bool_y(oss.str().c_str());
3916 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_diag_bool_y))
3917 {
3918 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_diag_bool_y, get_cell_faces_neighbours_corrected_diag_bool()[1], latastep);
3919 }
3920 oss.str("");
3921
3922 /*
3923 * CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_Z
3924 */
3925 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_Z_" << lata_suffix << idx;
3926 Nom nom_cell_faces_neighbours_corrected_diag_bool_z(oss.str().c_str());
3927 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_DIAG_BOOL_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_diag_bool_z))
3928 {
3929 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_diag_bool_z, get_cell_faces_neighbours_corrected_diag_bool()[2], latastep);
3930 }
3931 oss.str("");
3932
3933 /*
3934 * CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_X
3935 */
3936 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_X_" << lata_suffix << idx;
3937 Nom nom_cell_faces_neighbours_corrected_all_bool_x(oss.str().c_str());
3938 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_all_bool_x))
3939 {
3940 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_all_bool_x, get_cell_faces_neighbours_corrected_all_bool()[0], latastep);
3941 }
3942 oss.str("");
3943
3944 /*
3945 * CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_Y
3946 */
3947 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_Y_" << lata_suffix << idx;
3948 Nom nom_cell_faces_neighbours_corrected_all_bool_y(oss.str().c_str());
3949 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_all_bool_y))
3950 {
3951 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_all_bool_y, get_cell_faces_neighbours_corrected_all_bool()[1], latastep);
3952 }
3953 oss.str("");
3954
3955 /*
3956 * CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_Z
3957 */
3958 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_Z_" << lata_suffix << idx;
3959 Nom nom_cell_faces_neighbours_corrected_all_bool_z(oss.str().c_str());
3960 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_ALL_BOOL_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_all_bool_z))
3961 {
3962 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_all_bool_z, get_cell_faces_neighbours_corrected_all_bool()[2], latastep);
3963 }
3964 oss.str("");
3965
3966 /*
3967 * CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_X
3968 */
3969 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_X_" << lata_suffix << idx;
3970 Nom nom_cell_faces_neighbours_corrected_min_max_bool_x(oss.str().c_str());
3971 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_min_max_bool_x))
3972 {
3973 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_min_max_bool_x, get_cell_faces_neighbours_corrected_min_max_bool()[0], latastep);
3974 }
3975 oss.str("");
3976
3977 /*
3978 * CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_Y
3979 */
3980 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_Y_" << lata_suffix << idx;
3981 Nom nom_cell_faces_neighbours_corrected_min_max_bool_y(oss.str().c_str());
3982 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_min_max_bool_y))
3983 {
3984 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_min_max_bool_y, get_cell_faces_neighbours_corrected_min_max_bool()[1], latastep);
3985 }
3986 oss.str("");
3987
3988 /*
3989 * CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_Z
3990 */
3991 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_Z_" << lata_suffix << idx;
3992 Nom nom_cell_faces_neighbours_corrected_min_max_bool_z(oss.str().c_str());
3993 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_MIN_MAX_BOOL_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_min_max_bool_z))
3994 {
3995 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_min_max_bool_z, get_cell_faces_neighbours_corrected_min_max_bool()[2], latastep);
3996 }
3997 oss.str("");
3998
3999 /*
4000 * CELL_FACES_NEIGHBOURS_CORRECTED_U_T_X
4001 */
4002 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_U_T_X_" << lata_suffix << idx;
4003 Nom nom_cell_faces_neighbours_corrected_u_T_x(oss.str().c_str());
4004 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_U_T_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_u_T_x))
4005 {
4006 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_u_T_x, get_cell_faces_neighbours_corrected_velocity_temperature()[0], latastep);
4007 }
4008 oss.str("");
4009
4010 /*
4011 * CELL_FACES_NEIGHBOURS_CORRECTED_U_T_Y
4012 */
4013 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_U_T_Y_" << lata_suffix << idx;
4014 Nom nom_cell_faces_neighbours_corrected_u_T_y(oss.str().c_str());
4015 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_U_T_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_u_T_y))
4016 {
4017 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_u_T_y, get_cell_faces_neighbours_corrected_velocity_temperature()[1], latastep);
4018 }
4019 oss.str("");
4020
4021 /*
4022 * CELL_FACES_NEIGHBOURS_CORRECTED_U_T_Z
4023 */
4024 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_U_T_Z_" << lata_suffix << idx;
4025 Nom nom_cell_faces_neighbours_corrected_u_T_z(oss.str().c_str());
4026 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_U_T_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_u_T_z))
4027 {
4028 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_u_T_z, get_cell_faces_neighbours_corrected_velocity_temperature()[2], latastep);
4029 }
4030 oss.str("");
4031
4032 /*
4033 * CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_X
4034 */
4035 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_X_" << lata_suffix << idx;
4036 Nom nom_cell_faces_neighbours_corrected_convective_frame_ref_x(oss.str().c_str());
4037 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_convective_frame_ref_x))
4038 {
4039 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_convective_frame_ref_x, get_cell_faces_neighbours_corrected_convective_frame_of_ref()[0], latastep);
4040 }
4041 oss.str("");
4042
4043 /*
4044 * CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_Y
4045 */
4046 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_Y_" << lata_suffix << idx;
4047 Nom nom_cell_faces_neighbours_corrected_convective_frame_ref_y(oss.str().c_str());
4048 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_convective_frame_ref_y))
4049 {
4050 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_convective_frame_ref_y, get_cell_faces_neighbours_corrected_convective_frame_of_ref()[1], latastep);
4051 }
4052 oss.str("");
4053
4054 /*
4055 * CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_Z
4056 */
4057 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_Z_" << lata_suffix << idx;
4058 Nom nom_cell_faces_neighbours_corrected_convective_frame_ref_z(oss.str().c_str());
4059 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_FRAME_REF_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_convective_frame_ref_z))
4060 {
4061 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_convective_frame_ref_z, get_cell_faces_neighbours_corrected_convective_frame_of_ref()[2], latastep);
4062 }
4063 oss.str("");
4064
4065
4066 /*
4067 * CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_X
4068 */
4069 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_X_" << lata_suffix << idx;
4070 Nom nom_cell_faces_neighbours_corrected_convective_x(oss.str().c_str());
4071 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_convective_x))
4072 {
4073 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_convective_x, get_cell_faces_neighbours_corrected_convective()[0], latastep);
4074 }
4075 oss.str("");
4076
4077 /*
4078 * CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_Y
4079 */
4080 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_Y_" << lata_suffix << idx;
4081 Nom nom_cell_faces_neighbours_corrected_convective_y(oss.str().c_str());
4082 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_convective_y))
4083 {
4084 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_convective_y, get_cell_faces_neighbours_corrected_convective()[1], latastep);
4085 }
4086 oss.str("");
4087
4088 /*
4089 * CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_Z
4090 */
4091 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_Z_" << lata_suffix << idx;
4092 Nom nom_cell_faces_neighbours_corrected_convective_z(oss.str().c_str());
4093 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_CONVECTIVE_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_convective_z))
4094 {
4095 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_convective_z, get_cell_faces_neighbours_corrected_convective()[2], latastep);
4096 }
4097 oss.str("");
4098
4099 /*
4100 * CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_X
4101 */
4102 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_X_" << lata_suffix << idx;
4103 Nom nom_cell_faces_neighbours_corrected_diffusive_x(oss.str().c_str());
4104 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_diffusive_x))
4105 {
4106 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_diffusive_x, get_cell_faces_neighbours_corrected_diffusive()[0], latastep);
4107 }
4108 oss.str("");
4109
4110 /*
4111 * CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_Y
4112 */
4113 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_Y_" << lata_suffix << idx;
4114 Nom nom_cell_faces_neighbours_corrected_diffusive_y(oss.str().c_str());
4115 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_diffusive_y))
4116 {
4117 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_diffusive_y, get_cell_faces_neighbours_corrected_diffusive()[1], latastep);
4118 }
4119 oss.str("");
4120
4121 /*
4122 * CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_Z
4123 */
4124 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_Z_" << lata_suffix << idx;
4125 Nom nom_cell_faces_neighbours_corrected_diffusive_z(oss.str().c_str());
4126 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_DIFFUSIVE_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_diffusive_z))
4127 {
4128 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_diffusive_z, get_cell_faces_neighbours_corrected_diffusive()[2], latastep);
4129 }
4130 oss.str("");
4131
4132 /*
4133 * CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_X
4134 */
4135 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_X_" << lata_suffix << idx;
4136 Nom nom_cell_faces_neighbours_corrected_colinearity_x(oss.str().c_str());
4137 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_X") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_colinearity_x))
4138 {
4139 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_colinearity_x, get_neighbours_faces_weighting_colinearity()[0], latastep);
4140 }
4141 oss.str("");
4142
4143 /*
4144 * CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_Y
4145 */
4146 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_Y_" << lata_suffix << idx;
4147 Nom nom_cell_faces_neighbours_corrected_colinearity_y(oss.str().c_str());
4148 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_Y") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_colinearity_y))
4149 {
4150 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_colinearity_y, get_neighbours_faces_weighting_colinearity()[1], latastep);
4151 }
4152 oss.str("");
4153
4154 /*
4155 * CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_Z
4156 */
4157 oss << "CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_Z_" << lata_suffix << idx;
4158 Nom nom_cell_faces_neighbours_corrected_colinearity_z(oss.str().c_str());
4159 if (liste_post_instantanes.contient_("CELL_FACES_NEIGHBOURS_CORRECTED_COLINEARITY_Z") || liste_post_instantanes.contient_(nom_cell_faces_neighbours_corrected_colinearity_z))
4160 {
4161 n++, dumplata_scalar(lata_name, nom_cell_faces_neighbours_corrected_colinearity_z, get_neighbours_faces_weighting_colinearity()[2], latastep);
4162 }
4163 oss.str("");
4164
4165 /*
4166 * CELL_NEIGHBOURS_CORRECTED_TRIMMED
4167 */
4168 oss << "CELL_NEIGHBOURS_CORRECTED_TRIMMED_" << lata_suffix << idx;
4169 Nom nom_cell_neighbours_corrected_trimmed(oss.str().c_str());
4170 if (liste_post_instantanes.contient_("CELL_NEIGHBOURS_CORRECTED_TRIMMED") || liste_post_instantanes.contient_(nom_cell_neighbours_corrected_trimmed))
4171 {
4172 n++, dumplata_scalar(lata_name, nom_cell_neighbours_corrected_trimmed, get_cell_neighbours_corrected_trimmed(), latastep);
4173 }
4174 oss.str("");
4175
4176 if (rank == 0)
4177 {
4178 /*
4179 * PROBE_COLLISION_DEBUG
4180 */
4181 oss << "PROBE_COLLISION_DEBUG";
4182 Nom nom_probe_collision_debug(oss.str().c_str());
4183 if (liste_post_instantanes.contient_("PROBE_COLLISION_DEBUG") || liste_post_instantanes.contient_(nom_probe_collision_debug))
4184 {
4185 n++, dumplata_scalar(lata_name, nom_probe_collision_debug, get_probe_collision_debug_field(), latastep);
4186 }
4187 oss.str("");
4188 }
4189
4190 /*
4191 * INTERFACIAL_FLUX_DISPATCH_X
4192 */
4193 oss << "INTERFACIAL_FLUX_DISPATCH_X_" << lata_suffix << idx;
4194 Nom nom_interfacial_flux_dispatch_x(oss.str().c_str());
4195 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_DISPATCH_X") || liste_post_instantanes.contient_(nom_interfacial_flux_dispatch_x))
4196 {
4197 n++, dumplata_scalar(lata_name, nom_interfacial_flux_dispatch_x, get_interfacial_heat_flux_dispatched()[0], latastep);
4198 }
4199 oss.str("");
4200
4201 /*
4202 * INTERFACIAL_FLUX_DISPATCH_Y
4203 */
4204 oss << "INTERFACIAL_FLUX_DISPATCH_Y_" << lata_suffix << idx;
4205 Nom nom_interfacial_flux_dispatch_y(oss.str().c_str());
4206 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_DISPATCH_Y") || liste_post_instantanes.contient_(nom_interfacial_flux_dispatch_y))
4207 {
4208 n++, dumplata_scalar(lata_name, nom_interfacial_flux_dispatch_y, get_interfacial_heat_flux_dispatched()[1], latastep);
4209 }
4210 oss.str("");
4211
4212 /*
4213 * INTERFACIAL_FLUX_DISPATCH_Z
4214 */
4215 oss << "INTERFACIAL_FLUX_DISPATCH_Z_" << lata_suffix << idx;
4216 Nom nom_interfacial_flux_dispatch_z(oss.str().c_str());
4217 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_DISPATCH_Z") || liste_post_instantanes.contient_(nom_interfacial_flux_dispatch_z))
4218 {
4219 n++, dumplata_scalar(lata_name, nom_interfacial_flux_dispatch_z, get_interfacial_heat_flux_dispatched()[2], latastep);
4220 }
4221 oss.str("");
4222
4223
4224 /*
4225 * INTERFACIAL_FLUX_CONTRIB_X
4226 */
4227 oss << "INTERFACIAL_FLUX_CONTRIB_X_" << lata_suffix << idx;
4228 Nom nom_interfacial_flux_contrib_x(oss.str().c_str());
4229 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_CONTRIB_X") || liste_post_instantanes.contient_(nom_interfacial_flux_contrib_x))
4230 {
4231 n++, dumplata_scalar(lata_name, nom_interfacial_flux_contrib_x, get_interfacial_heat_flux_contrib()[0], latastep);
4232 }
4233 oss.str("");
4234
4235 /*
4236 * INTERFACIAL_FLUX_CONTRIB_Y
4237 */
4238 oss << "INTERFACIAL_FLUX_CONTRIB_Y_" << lata_suffix << idx;
4239 Nom nom_interfacial_flux_contrib_y(oss.str().c_str());
4240 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_CONTRIB_Y") || liste_post_instantanes.contient_(nom_interfacial_flux_contrib_y))
4241 {
4242 n++, dumplata_scalar(lata_name, nom_interfacial_flux_contrib_y, get_interfacial_heat_flux_contrib()[1], latastep);
4243 }
4244 oss.str("");
4245
4246 /*
4247 * INTERFACIAL_FLUX_CONTRIB_Z
4248 */
4249 oss << "INTERFACIAL_FLUX_CONTRIB_Z_" << lata_suffix << idx;
4250 Nom nom_interfacial_flux_contrib_z(oss.str().c_str());
4251 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_CONTRIB_Z") || liste_post_instantanes.contient_(nom_interfacial_flux_contrib_z))
4252 {
4253 n++, dumplata_scalar(lata_name, nom_interfacial_flux_contrib_z, get_interfacial_heat_flux_contrib()[2], latastep);
4254 }
4255 oss.str("");
4256
4257 /*
4258 * INTERFACIAL_FLUX_CURRENT_X
4259 */
4260 oss << "INTERFACIAL_FLUX_CURRENT_X_" << lata_suffix << idx;
4261 Nom nom_interfacial_flux_current_x(oss.str().c_str());
4262 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_CURRENT_X") || liste_post_instantanes.contient_(nom_interfacial_flux_current_x))
4263 {
4264 n++, dumplata_scalar(lata_name, nom_interfacial_flux_current_x, get_interfacial_heat_flux_current()[0], latastep);
4265 }
4266 oss.str("");
4267
4268 /*
4269 * INTERFACIAL_FLUX_CURRENT_Y
4270 */
4271 oss << "INTERFACIAL_FLUX_CURRENT_Y_" << lata_suffix << idx;
4272 Nom nom_interfacial_flux_current_y(oss.str().c_str());
4273 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_CURRENT_Y") || liste_post_instantanes.contient_(nom_interfacial_flux_current_y))
4274 {
4275 n++, dumplata_scalar(lata_name, nom_interfacial_flux_current_y, get_interfacial_heat_flux_current()[1], latastep);
4276 }
4277 oss.str("");
4278
4279 /*
4280 * INTERFACIAL_FLUX_CURRENT_Z
4281 */
4282 oss << "INTERFACIAL_FLUX_CURRENT_Z_" << lata_suffix << idx;
4283 Nom nom_interfacial_flux_current_z(oss.str().c_str());
4284 if (liste_post_instantanes.contient_("INTERFACIAL_FLUX_CURRENT_Z") || liste_post_instantanes.contient_(nom_interfacial_flux_current_z))
4285 {
4286 n++, dumplata_scalar(lata_name, nom_interfacial_flux_current_z, get_interfacial_heat_flux_current()[2], latastep);
4287 }
4288 oss.str("");
4289
4290 return n;
4291}
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
int get_offset_local(int direction) const
Returns the local offset in requested direction.
bool get_periodic_flag(int direction) const
Method returns true if periodic in this direction.
double get_domain_length(int direction) const
Returns the length of the entire domain in requested direction.
double get_constant_delta(int direction) const
Returns the size of cells in a direction.
const ArrOfDouble & get_delta(int direction) const
Returns the array of mesh cell sizes in requested direction.
double get_origin(int direction) const
Returns the coordinate of the first node (global) of the mesh in the requested direction.
int get_nb_items_global(Localisation loc, int direction) const
Returns the number of local items (on this processor) for the given localisation in the requested dir...
int get_nb_elem_tot(int direction) const
Returns the total (global) number of mesh cells in requested direction.
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
double get_cp_vapour(int i) const
double get_lambda_vapour(int i) const
double get_lambda_liquid(int i) const
double get_cp_liquid(int i) const
const DoubleTab & get_bounding_box() const
void allocate(int ni, int nj, int nk, int ghosts, int additional_k_layers=0, int nb_compo=1, bool external_storage=false)
void echange_espace_virtuel(int ghost)
Exchange data over "ghost" number of cells.
const Domaine_IJK & get_domaine() const
: class IJK_Interfaces
int get_nb_bulles_reelles() const
const IJK_Composantes_Connex & get_ijk_compo_connex() const
Operateur_IJK_elem_conv rho_cp_convection_op_
virtual void set_thermal_subresolution_outputs(const Nom &interfacial_quantities_thermal_probes, const Nom &shell_quantities_thermal_probes, const Nom &overall_bubbles_quantities, const Nom &local_quantities_thermal_probes_time_index_folder)
const IJK_Field_vector3_double & get_gradient_temperature_elem() const
const IJK_Field_vector3_double & get_tangential_gradient_temperature_elem_smooth() const
const IJK_Field_vector3_double & get_hessian_diag_temperature_elem() const
virtual void echange_pure_vers_diph_cellules_initialement_pures()
virtual const IJK_Field_vector3_double & get_cell_faces_neighbours_corrected_convective_frame_of_ref() const
void set_fichier_reprise(const char *lataname)
virtual double compute_global_energy()
virtual const IJK_Field_vector3_double & get_cell_faces_neighbours_corrected_diffusive() const
IJK_Field_vector3_double div_coeff_grad_T_raw_
virtual void calculer_ecart_T_ana()
int posttraiter_champs_instantanes_thermal(const Motcles &liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, const int idx)
IJK_Field_double dummy_double_field_
const IJK_Field_double * eulerian_rising_velocities_
const IJK_Field_vector3_double & get_normal_vector_ft() const
const IJK_Field_double & get_grad_T_interface_ns() const
OpHessFluxCentre2IJKScalar_double temperature_hess_flux_op_centre_
static void typer_lire_thermal_equation(OWN_PTR(IJK_Thermal_base)&, Entree &)
virtual const IJK_Field_double & get_neighbours_temperature_colinearity_weighting() const
const IJK_Field_double * eulerian_interfacial_area_ns_
const DoubleTab * bubbles_barycentres_old_
int posttraiter_champs_instantanes_thermal_interface_ref(const Motcles &liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, const int idx)
IJK_Field_double rho_cp_
const IJK_Field_int * eulerian_compo_connex_from_interface_ghost_int_ns_
bool store_flux_operators_for_energy_balance_
const IJK_Field_double * eulerian_curvature_ns_
virtual void correct_temperature_for_eulerian_fluxes()=0
const IJK_Field_double & get_eulerian_compo_connex_ft() const
const IJK_Field_double * eulerian_compo_connex_from_interface_ns_
const IJK_Field_int * eulerian_compo_connex_from_interface_int_ns_
std::shared_ptr< IJK_Field_double > div_coeff_grad_T_volume_
void calculer_Nusselt(const IJK_Field_double &vx)
IJK_Field_vector3_double grad_T_elem_smooth_
IJK_Field_double d_source_Tv_
void compute_eulerian_bounding_box_fill_compo()
virtual const IJK_Field_vector3_double & get_interfacial_heat_flux_dispatched() const
virtual double get_rho_cp_u_ijk(const IJK_Field_double &vx, int i, int j, int k) const
virtual void initialize_switch(const Domaine_IJK &splitting, const int idx)
const DoubleTab * bounding_box_
virtual const IJK_Field_vector3_double & get_cell_faces_corrected_diffusive() const
const IJK_Field_vector3_double & get_gradient_temperature_elem_smooth() const
virtual const IJK_Field_double & get_debug_lrs_cells() const
const Vecteur3 * liquid_velocity_
virtual void rk3_sub_step(const int rk_step, const double total_timestep, const double time)
const IJK_Field_double & get_eulerian_compo_connex_ghost_ns() const
bool use_bubbles_velocities_from_barycentres_
const DoubleTab * min_max_larger_box_
const DoubleTab * bubbles_barycentres_new_
virtual void compute_diffusion_increment()=0
bool use_bubbles_velocities_from_interface_
Champs_compris_IJK champs_compris_
virtual const IJK_Field_vector3_double & get_cell_faces_neighbours_corrected_velocity_temperature() const
Operateur_IJK_elem_conv temperature_convection_op_
const IJK_Field_double & get_eulerian_compo_connex_ns() const
const IJK_Field_double & get_ecart_t_ana() const
const IJK_Field_double * eulerian_compo_connex_from_interface_ghost_ns_
IJK_Field_double temperature_ft_
virtual const IJK_Field_int & get_cell_neighbours_corrected() const
const IJK_Field_double & get_eulerian_compo_connex_ghost_ft() const
void compute_temperature_diffusive_fluxes()
IJK_Field_vector3_double hess_diag_T_elem_
IJK_Field_double u_T_convective_volume_
void propagate_eulerian_grad_T_interface()
const IJK_Field_double & get_IJK_field(const Motcle &nom) override
IJK_Field_int dummy_int_field_
void associer_interface_intersections(const Intersection_Interface_ijk_cell &intersection_ijk_cell, const Intersection_Interface_ijk_face &intersection_ijk_face)
virtual const IJK_Field_vector3_double & get_cell_faces_corrected_convective() const
void associer_post(const Postprocessing_IJK &ijk_ft_post)
IJK_Field_vector3_double grad_T_
virtual void compute_convective_diffusive_fluxes_face_centre()
void calculer_temperature_physique_T(const IJK_Field_double &vx, const double dTm)
const IJK_Field_double * eulerian_distance_ns_
virtual void correct_temperature_for_visu()
virtual const IJK_Field_double & get_temperature_cell_neighbours_debug() const
virtual void compute_temperature_init()
Operateur_IJK_elem_diff temperature_diffusion_op_
void compute_temperature_hessian_diag_elem()
virtual const IJK_Field_vector3_int & get_cell_faces_neighbours_corrected_min_max_bool() const
Nom get_field_name_with_rank(Nom basename) const
const IJK_Field_double & get_grad_T_interface_ft() const
virtual void update_thermal_properties()
void retrieve_ghost_fluid_params(int &compute_distance, int &compute_curvature, int &n_iter_distance, int &avoid_gfm_parallel_calls)
virtual void post_process_thermal_downstream_lines(const Nom &local_quantities_thermal_lines_time_index_folder)
const IJK_Field_double * eulerian_compo_connex_from_interface_ft_
double compute_variable_wall_temperature(const int kmin, const int kmax)
int posttraiter_champs_instantanes_thermal_interface(const Motcles &liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, const int idx)
const IJK_Field_double * eulerian_compo_connex_ft_
OWN_PTR(Corrige_flux_FT_base) corrige_flux_
IJK_Field_double u_T_convective_
const IJK_Field_double & get_interfacial_area_ns() const
virtual void store_temperature_before_extrapolation()
virtual void compute_temperature_cell_centres(const int first_corr)
const IJK_Field_double & get_eulerian_curvature_ns() const
virtual void echange_diph_vers_pure_cellules_finalement_pures()
IJK_Field_double rho_cp_T_
IJK_Field_double div_rho_cp_T_
virtual double get_div_lambda_ijk(int i, int j, int k) const
void ecrire_statistiques_bulles(int reset, const Nom &nom_cas, const double current_time, const ArrOfDouble &surface, const int idx)
const DoubleTab * rising_vectors_from_barycentres_
void get_noms_champs_postraitables(Noms &noms, Option opt=NONE) const
virtual void vide_phase_invalide_cellules_diphasiques()
const IJK_Field_vector3_double * eulerian_facets_barycentre_ft_
IJK_Field_vector3_double grad_T_elem_tangential_
const IJK_Field_double & get_u_T_convective() const
const IJK_Field_double * eulerian_compo_connex_ghost_ns_
double gaussian_smoothing_factors_[3][3][3]
const IJK_Field_double * eulerian_compo_connex_ghost_ft_
Motcles liste_post_instantanes_
virtual void post_process_thermal_wake_slices(const Nom &local_quantities_thermal_slices_time_index_folder)
virtual const IJK_Field_vector3_double & get_neighbours_faces_weighting_colinearity() const
virtual const IJK_Field_vector3_double & get_cell_faces_neighbours_corrected_convective() const
const IJK_Field_double & get_eulerian_compo_connex_from_interface_ghost_ft() const
IJK_Field_double d_source_Tl_
IJK_Field_double source_temperature_v_
virtual void compute_thermal_subproblems()
IJK_Field_double temperature_ana_
OpGradFluxQuickIJKScalar_double temperature_grad_flux_op_quick_
std::shared_ptr< IJK_Field_double > RK3_F_temperature_
IJK_Field_double & get_temperature_ft()
virtual const IJK_Field_vector3_double & get_interfacial_heat_flux_current() const
const IJK_Field_vector3_double * eulerian_facets_barycentre_ns_
virtual void initialize(const Domaine_IJK &splitting)
virtual void clean_thermal_subproblems()
void calculer_temperature_adim_bulles()
virtual const IJK_Field_double & get_probe_collision_debug_field() const
const IJK_Field_double & get_eulerian_rising_velocities() const
const IJK_Field_vector3_double * eulerian_normal_vectors_ns_normed_
IJK_Field_local_double boundary_flux_kmax_
const IJK_Field_double & get_eulerian_compo_connex_from_interface_ft() const
IJK_Field_local_double boundary_flux_kmin_
const IJK_Field_vector3_double & get_normal_vector_ns() const
void associer_milieu_base(const Milieu_base &, const int &idth)
double compute_timestep(const double timestep, const double dxmin)
const IJK_Field_double & get_ecart_t_ana_rel() const
virtual const IJK_Field_vector3_int & get_cell_faces_neighbours_corrected_all_bool() const
void thermal_subresolution_outputs(const Nom &interfacial_quantities_thermal_probes, const Nom &shell_quantities_thermal_probes, const Nom &overall_bubbles_quantities, const Nom &local_quantities_thermal_probes_time_index_folder, const Nom &local_quantities_thermal_slices_time_index_folder, const Nom &local_quantities_thermal_lines_time_index_folder)
virtual void enforce_periodic_temperature_boundary_value()
IJK_Field_double ecart_source_t_ana_
const IJK_Field_double * eulerian_interfacial_area_ft_
const IJK_Field_int & get_eulerian_compo_connex_int_from_interface_ns() const
const IJK_Field_double & get_div_lambda_grad_T() const
virtual void compute_temperature_convection_conservative(const IJK_Field_vector3_double &velocity)
const IJK_Field_double & get_temperature_ana() const
const IJK_Field_vector3_double * eulerian_normal_vectors_ft_
virtual void prepare_ij_fluxes_k_layers()
virtual void compute_interfacial_temperature2(ArrOfDouble &interfacial_temperature, ArrOfDouble &flux_normal_interp)
IJK_Field_vector3_double grad_T_elem_
void compute_temperature_gradient_elem()
bool get_debug() const
virtual const IJK_Field_vector3_double & get_interfacial_heat_flux_contrib() const
const IJK_Field_int & get_eulerian_compo_connex_int_from_interface_ghost_ns() const
void calculer_temperature_adimensionnelle_theta(const IJK_Field_double &vx, const double qw)
virtual void set_param(Param &param) const override
void calculer_dT(const IJK_Field_vector3_double &velocity)
IJK_Field_vector3_int dummy_int_vect_
virtual void set_field_T_ana()
void post_process_std_thermal_field(const Motcles &liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, const int idx, const Motcles &tested_names, const Nom &name_field, const Motcle &lata_suffix, const IJK_Field_double &field, std::ostringstream &oss, int &counter, const int &first_thermal_rank=0)
IJK_Field_vector3_double hess_cross_T_elem_
const DoubleTab * rising_vectors_
virtual void clip_max_temperature_values()
OpGradCentre2IJKScalar_double temperature_grad_op_centre_
const IJK_Field_vector3_double & get_bary() const
double get_rhocp_v() const
IJK_One_Dimensional_Subproblems_Interfaces_Fields thermal_local_subproblems_interfaces_fields_
const IJK_Field_double * eulerian_compo_connex_ns_
const int & get_rank() const
const Vecteur3 * rising_velocity_overall_
Boundary_Conditions_Thermique boundary_conditions_
IJK_Field_double temperature_adimensionnelle_theta_
const std::shared_ptr< IJK_Field_double > & get_temperature() const
const DoubleTab * bubbles_barycentre_
void get_rising_velocities_parameters(int &compute_rising_velocities, int &fill_rising_velocities, int &use_bubbles_velocities_from_interface, int &use_bubbles_velocities_from_barycentres)
void force_upstream_temperature(IJK_Field_double &temperature, double T_imposed, const IJK_Interfaces &interfaces, double nb_diam, int upstream_dir, int gravity_dir, int upstream_stencil)
void associer_ghost_fluid_fields(const IJK_Ghost_Fluid_Fields &ghost_fluid_fields)
void associer_switch(const Switch_FT_double &ijk_ft_switch)
virtual void recompute_temperature_init()
const IJK_Ghost_Fluid_Fields * ghost_fluid_fields_
double get_rhocp_l() const
virtual const IJK_Field_int & get_cell_neighbours_corrected_trimmed() const
IJK_Field_double eulerian_grad_T_interface_ns_
virtual void correct_operators_for_visu()
const IJK_Field_double * eulerian_compo_connex_from_interface_ghost_ft_
virtual void euler_time_step(const double timestep)
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)
const Milieu_base & milieu() const
const ArrOfDouble * bubbles_volume_
virtual const IJK_Field_double & get_temperature_cell_neighbours() const
std::shared_ptr< IJK_Field_double > d_temperature_
virtual void compare_fluxes_thermal_subproblems()
virtual const IJK_Field_vector3_int & get_cell_faces_corrected_bool() const
static void Fill_postprocessable_fields(std::vector< FieldInfo_t > &chps)
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)
const IJK_Field_double & get_eulerian_curvature_ft() const
void compute_temperature_hessian_cross_elem()
virtual void clip_min_temperature_values()
virtual double compute_rho_cp_u_mean(const IJK_Field_double &vx)
void get_boundary_fluxes(IJK_Field_local_double &boundary_flux_kmin, IJK_Field_local_double &boundary_flux_kmax)
Nom & get_thermal_problem_type()
virtual void lire_temperature(const Domaine_IJK &splitting)
const IJK_Field_vector3_double & get_normal_vector_ns_normed() const
Fluide_Diphasique_IJK & milieu_ijk()
virtual const IJK_Field_vector3_int & get_cell_faces_neighbours_corrected_diag_bool() const
const IJK_Field_double & get_temperature_before_extrapolation() const
virtual void post_process_after_temperature_increment()
double direct_smoothing_factors_[7]
virtual void add_temperature_diffusion()
const IJK_Field_double * eulerian_distance_ft_
virtual void set_zero_temperature_increment()
IJK_Field_double source_temperature_l_
const IJK_Field_double & get_eulerian_compo_connex_from_interface_ns() const
IJK_Field_double div_coeff_grad_T_
virtual void sauvegarder_temperature(Nom &lata_name, int idx, const int &stop=0)
IJK_Field_double tmp_smoothing_field_
virtual void remplir_tableau_pure_cellules_diphasiques(bool next_time)
void compute_eulerian_grad_T_interface(const int on_splitting_ns=0)
virtual double get_modified_time()
void compute_temperature_convection(const IJK_Field_vector3_double &velocity)
const ArrOfDouble * rising_velocities_
IJK_Field_vector3_double dummy_double_vect_
IJK_Field_double temperature_physique_T_
IJK_Field_double ecart_t_ana_rel_
IJK_Field_double source_temperature_
const IJK_Field_vector3_double & get_IJK_field_vector(const Motcle &nom) override
const IJK_Field_double & get_u_T_convective_volume() const
bool has_champ(const Motcle &nom) const override
const IJK_Field_double & get_eulerian_distance_ns() const
IJK_Field_double temperature_gaussian_filtered_
void compute_temperature_convective_fluxes(const IJK_Field_vector3_double &velocity)
void calculer_gradient_temperature(const IJK_Field_double &temperature, IJK_Field_vector3_double &grad_T)
const IJK_Field_double & get_interfacial_area_ft() const
bool disable_relative_velocity_energy_balance_
IJK_Field_double ecart_t_ana_
void calculer_energies(double &E_liq_pure, double &E_liq, double &E_vap_pure, double &E_vap, double &E_mixt, double &E_tot)
void posttraiter_tous_champs_thermal(Motcles &liste, const int idx) const
OpHessCentre2IJKScalar_double temperature_hess_op_centre_
virtual void copie_pure_vers_diph_sans_interpolation()
const IJK_Field_vector3_double & get_rho_cp_u_T_convective_fluxes() const
const std::shared_ptr< IJK_Field_double > & get_div_lambda_grad_T_volume() const
const IJK_Field_vector3_double & get_div_coeff_grad_T_diffusive_fluxes() const
void compute_boundary_conditions_thermal()
const IJK_Field_vector3_double & get_grad_T() const
const IJK_Field_double * eulerian_curvature_ft_
void associer(const Probleme_FTD_IJK_base &ijk_ft)
IJK_Field_double source_temperature_ana_
IJK_Field_double temperature_adim_bulles_
void compute_rising_velocities()
void compute_eulerian_temperature_ghost(const int on_splitting_ns=0)
IJK_Field_vector3_double rho_cp_u_T_convective_raw_
virtual double compute_temperature_dimensionless_theta_mean(const IJK_Field_double &vx)
const IJK_Field_vector3_double & get_hessian_cross_temperature_elem() const
std::shared_ptr< IJK_Field_double > temperature_
const IJK_Field_double & get_eulerian_compo_connex_from_interface_ghost_ns() const
IJK_Field_double temperature_for_ini_per_bubble_
const IJK_Field_vector3_double * eulerian_normal_vectors_ns_
IJK_Field_double eulerian_grad_T_interface_ft_
void compute_cell_diagonal(const Domaine_IJK &splitting)
IJK_Field_vector3_double storage_
const IJK_Field_double & get_eulerian_distance_ft() const
const ArrOfDouble * rising_velocities_from_barycentres_
const IJK_Field_double & get_temperature_elem_smooth() const
int calculer_k_pour_bord(const IJK_Field_double &temperature, const bool bord_kmax)
int post_process_quantities_from_subresolution(const Motcles &liste_post_instantanes, const char *lata_name, const int latastep)
const DoubleTab & sommets() const
renvoie le tableau des sommets (reels et virtuels) dimension(0) = nombre de sommets,
int nb_facettes() const
renvoie le nombre de facettes (reelles et virtuelles) (egal a facettes().
virtual const DoubleTab & get_update_normale_facettes() const
Calcule la grandeur demandee, stocke le resultat dans un tableau interne a la classe et renvoie le re...
virtual const ArrOfDouble & get_update_surface_facettes() const
Calcule la grandeur demandee, stocke le resultat dans un tableau interne a la classe et renvoie le re...
const IntTab & facettes() const
renvoie le tableau des facettes (reelles et virtuelles) dimension(0) = nombre de facettes,
: class Maillage_FT_IJK
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
int debute_par(const char *const n) const override
Definition Motcle.cpp:309
Un tableau d'objets de la classe Motcle.
Definition Motcle.h:63
int contient_(const char *const ch) const
Definition Motcle.cpp:333
int search(const Motcle &t) const
Definition Motcle.cpp:321
double get_vitesse_upstream() const
double get_nb_diam_upstream() const
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
const std::string & getString() const
Definition Nom.h:92
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
classe Objet_U Cette classe est la classe de base des Objets de TRUST
Definition Objet_U.h:73
friend class Entree
Definition Objet_U.h:76
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
static bool DISABLE_DIPHASIQUE
Definition Option_IJK.h:26
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
Motcles get_liste_post_instantanes() const
const Postprocessing_IJK & get_post() const
static double mp_min(double)
Definition Process.cpp:386
static double mp_max(double)
Definition Process.cpp:376
static Sortie & Journal(int message_level=0)
Renvoie un objet statique de type Sortie qui sert de journal d'evenements.
Definition Process.cpp:588
static void abort()
Routine de sortie de Trio-U sur une erreur abort().
Definition Process.cpp:570
static double mp_sum(double)
Calcule la somme de x sur tous les processeurs du groupe courant.
Definition Process.cpp:146
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
static int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
Definition Process.cpp:86
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::out)
Classe de base des flux de sortie.
Definition Sortie.h:52
_SIZE_ size_array() const
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469