TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_One_Dimensional_Subproblem.h
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#ifndef IJK_One_Dimensional_Subproblem_included
17#define IJK_One_Dimensional_Subproblem_included
18
19#include <Objet_U.h>
20#include <IJK_Field.h>
21#include <IJK_Interfaces.h>
22#include <Linear_algebra_tools.h>
23#include <IJK_Field_vector.h>
24#include <TRUSTArrays.h>
25#include <TRUSTTab.h>
26#include <Vecteur3.h>
27#include <Matrice33.h>
28#include <Matrice.h>
29#include <IJK_Finite_Difference_One_Dimensional_Matrix_Assembler.h>
30#include <IJK_subres_constants.h>
31
32#define INVALID_TEMPERATURE 1e10
33#define INVALID_FIELD 1e10
34#define INVALID_VELOCITY 1e-12
35#define INVALID_INTERP 1.e20
36#define INVALID_INTERP_TEST 1.e19
37#define INVALID_VELOCITY_CFL 1e-20
38#define INVALID_SOURCE_TERM 1e-20
39#define NEIGHBOURS_FIRST_DIR {-1., -1., 1., 1.}
40#define NEIGHBOURS_SECOND_DIR {-1., 1., -1., 1.}
41#define NEIGHBOURS_SIGN {1, 0, 1, 0, 1, 0}
42#define FACES_DIR {0, 0, 1, 1, 2, 2}
43#define FLUXES_OUT {-1, 1, -1, 1, -1, 1}
44#define FLUX_SIGN_DIFF {-1, -1, -1, -1, -1, -1}
45#define FLUX_SIGN_CONV {1, 1, 1, 1, 1, 1}
46#define INVALID_INDEX -100
47#define MAX_FLUX_TEST 1.e16
48
53
54/*! class IJK_One_Dimensional_Subproblem
55 *
56 */
58{
59 Declare_instanciable( IJK_One_Dimensional_Subproblem ) ;
60 // friend class Corrige_flux_FT_temperature_subresolution;
61public :
63 void associer(const Probleme_FTD_IJK_base& ijk_ft) { ref_ijk_ft_ = ijk_ft; };
64 void associate_sub_problem_to_inputs(IJK_Thermal_Subresolution& ref_thermal_subresolution,
65 IJK_One_Dimensional_Subproblems& ref_one_dimensional_subproblems,
66 int i, int j, int k,
67 int init,
68 int sub_problem_index,
69 double global_time_step,
70 double current_time,
71 int compo_connex,
72 double distance,
73 double curvature,
74 double interfacial_area,
75 ArrOfDouble facet_barycentre,
76 ArrOfDouble normal_vector,
77 double bubble_rising_velocity,
78 ArrOfDouble bubble_rising_vector,
79 ArrOfDouble bubble_barycentre,
80 const double& indicator,
81 const IJK_Interfaces& interfaces,
82 const IJK_Field_vector3_double& velocity,
83 const IJK_Field_vector3_double& velocity_ft,
84 const IJK_Field_double& pressure);
85
87 double find_cell_related_indicator_on_probes(const int& last_index);
90 void compute_modified_probe_length_condition(const int probe_length_condition);
97 double compute_cell_weighting(const double& dx_contrib,
98 const double& dy_contrib,
99 const double& dz_contrib);
101 Vecteur3 compute_relative_vector_cell_faces(const double& dx_contrib,
102 const double& dy_contrib,
103 const double& dz_contrib);
104 double compute_cell_faces_weighting(const double& dx_contrib,
105 const double& dy_contrib,
106 const double& dz_contrib,
107 const int& dir);
108 double compute_colinearity(const double& dx_contrib, const double& dy_contrib, const double& dz_contrib);
109 double compute_colinearity_cell_faces(const double& dx_contrib,
110 const double& dy_contrib,
111 const double& dz_contrib,
112 const int& dir);
113 double compute_distance_cell_faces(const double& dx_contrib,
114 const double& dy_contrib,
115 const double& dz_contrib);
122 double compute_max_distance_pure_face_vertices(int& lmax, int& mmax);
123 void compute_vertex_position(const int& vertex_number,
124 const int& face_dir,
125 Vecteur3& bary_vertex,
126 double& distance_vertex_centre,
127 double& tangential_distance_vertex_centre,
128 Vecteur3& tangential_distance_vector_vertex_centre);
129 void compute_modified_probe_length(const int& probe_variations_enabled);
132 void prepare_boundary_conditions(DoubleVect * thermal_subproblems_rhs_assembly,
133 DoubleVect * thermal_subproblems_temperature_solution_ini,
134 int& boundary_condition_interface,
135 const double& interfacial_boundary_condition_value,
136 const int& impose_boundary_condition_interface_from_simulation,
137 int& boundary_condition_end,
138 const double& end_boundary_condition_value,
139 const int& impose_user_boundary_condition_end_value);
140 void compute_source_terms_impose_boundary_conditions(const int& boundary_condition_interface,
141 const double& interfacial_boundary_condition_value,
142 const int& impose_boundary_condition_interface_from_simulation,
143 const int& boundary_condition_end,
144 const double& end_boundary_condition_value,
145 const int& impose_user_boundary_condition_end_value);
150 void add_source_terms(const int& boundary_condition_interface, const int& boundary_condition_end);
151 void add_source_terms_temporal_tests(const int& boundary_condition_interface, const int& boundary_condition_end);
166
174
175 void get_ijk_indices(int& i, int& j, int& k) const;
176 double get_field_profile_at_point(const double& dist,
177 const DoubleVect& field,
178 const int temp_bool) const;
179 double get_field_profile_at_point(const double& dist,
180 const DoubleVect& field,
181 const DoubleVect& field_weak_gradient,
182 const IJK_Field_double& eulerian_field,
183 const int temp_bool,
184 const int weak_gradient_variable,
185 const int interp_eulerian) const;
186 double get_temperature_profile_at_point(const double& dist) const;
187 double get_temperature_times_velocity_profile_at_point(const double& dist,
188 const int& dir,
189 bool& valid_val,
190 const int& l,
191 const int& index_i=INVALID_INDEX,
192 const int& index_j=INVALID_INDEX,
193 const int& index_k=INVALID_INDEX,
194 const int& temperature=0);
196 const int& levels,
197 const int& dir,
198 const DoubleVect& field,
199 const DoubleVect& field_weak_gradient,
200 const IJK_Field_double& eulerian_field,
201 const int temp_bool,
202 const int weak_gradient_variable,
203 const int vel,
204 const int& l=-1);
205 DoubleVect get_field_times_velocity_discrete_integral_at_point(const double& dist,
206 const int& levels,
207 const int& dir,
208 const DoubleVect& field,
209 const DoubleVect& field_weak_gradient,
210 const IJK_Field_double& eulerian_field,
211 const int& l);
212 DoubleVect get_field_discrete_integral_at_point(const double& dist,
213 const int& levels,
214 const int& dir,
215 const DoubleVect& field,
216 const DoubleVect& field_weak_gradient,
217 const IJK_Field_double& eulerian_field,
218 const int weak_gradient_variable,
219 const int temp_bool);
220 double get_velocity_weighting(const double& dist, const int& dir, const int vel) const;
221 DoubleVect get_temperature_profile_discrete_integral_at_point(const double& dist, const int& levels, const int& dir);
222 DoubleVect get_temperature_times_velocity_profile_discrete_integral_at_point(const double& dist, const int& levels, const int& dir, const int& l);
223 DoubleVect get_temperature_gradient_profile_discrete_integral_at_point(const double& dist, const int& levels, const int& dir);
224 DoubleVect get_temperature_gradient_times_conductivity_profile_discrete_integral_at_point(const double& dist, const int& levels, const int& dir);
225 void get_field_discrete_value_recursive(const int& ilevel, const int& max_level,
226 const int& dir, const double& dist,
227 const int& vel,
228 const double& surface,
229 const DoubleVect& field,
230 const DoubleVect& field_weak_gradient,
231 const IJK_Field_double& eulerian_field,
232 const int temp_bool,
233 const int weak_gradient_variable,
234 const double dl1_parent,
235 const double dl2_parent,
236 Vecteur3& point_coords_parent,
237 DoubleVect& discrete_values,
238 int& value_counter) const;
239 double get_velocity_component_at_point(const double& dist,
240 const int& dir,
241 const int& index_i=-100,
242 const int& index_j=-100,
243 const int& index_k=-100) const;
244 double get_velocity_cartesian_grid_value(const double& dist,
245 const int& dir,
246 const int& sign_dir,
247 const int& index_i,
248 const int& index_j,
249 const int& index_k) const;
250 double get_temperature_gradient_profile_at_point(const double& dist, const int& dir) const;
251 double get_temperature_gradient_times_conductivity_profile_at_point(const double& dist, const int& dir, bool& valid_val) const;
252 void get_discrete_two_dimensional_spacing(const int& dir, const int& level,
253 const double& first_dir, const double& second_dir,
254 double& dl1, double& dl2, Vecteur3& point_coords) const;
255 double get_discrete_surface_at_level(const int& dir, const int& level) const;
258 SFichier& fic_shell,
259 const int rank,
260 const Nom& local_quantities_thermal_probes_time_index_folder);
261 void thermal_subresolution_outputs_parallel(const int rank, const Nom& local_quantities_thermal_probes_time_index_folder);
262 void retrieve_shell_quantities(const int rank,
263 const int& itr,
264 std::vector<std::string> key_results_int,
265 std::vector<std::string> key_results_double,
266 std::map<std::string, ArrOfInt>& results_probes_int,
267 std::map<std::string, ArrOfDouble>& results_probes_double);
268 void retrieve_interfacial_quantities(const int rank,
269 const int& itr,
270 std::vector<std::string> key_results_int,
271 std::vector<std::string> key_results_double,
272 std::map<std::string, ArrOfInt>& results_probes_int,
273 std::map<std::string, ArrOfDouble>& results_probes_double,
274 const int& coord=0);
275
276 double get_min_temperature() const;
277 double get_max_temperature() const;
278 double get_min_temperature_domain_ends() const;
279 double get_max_temperature_domain_ends() const;
280
281 void dispatch_interfacial_heat_flux_correction(IJK_Field_vector3_double& interfacial_heat_flux_dispatched,
282 FixedVector<ArrOfInt, 4>& ijk_indices_out,
283 ArrOfDouble& thermal_flux_out,
284 IJK_Field_vector3_double& interfacial_heat_flux_current);
285 void dispatch_interfacial_heat_flux(IJK_Field_vector3_double& interfacial_heat_flux_dispatched,
286 FixedVector<ArrOfInt, 3>& ijk_indices_out,
287 FixedVector<ArrOfDouble, 3>& thermal_flux_out);
288
289 void add_interfacial_heat_flux_neighbours_correction(IJK_Field_vector3_double& interfacial_heat_flux_dispatched,
290 IJK_Field_vector3_double& interfacial_heat_flux_current);
291 void add_interfacial_heat_flux_neighbours(IJK_Field_vector3_double& interfacial_heat_flux_dispatched);
292
295 void compare_fluxes_thermal_subproblems(const IJK_Field_vector3_double& convective_diffusive_fluxes_raw,
296 const int flux_type,
297 const int inv_sign=0);
298
299 void set_subproblem_index(const int& sub_problem_index)
300 {
301 sub_problem_index_ = sub_problem_index;
302 }
303 void set_global_index(const int& global_subproblem_index)
304 {
305 global_subproblem_index_ = global_subproblem_index;
306 }
307 const double& get_local_time_step_round() const
308 {
310 };
311 const int& get_nb_iter_explicit() const
312 {
313 return nb_iter_explicit_;
314 };
315 void set_local_time_step(const double& local_time_step)
316 {
317 local_time_step_overall_ = local_time_step;
318 };
324 {
326 };
327 const double& get_local_dt_cfl() const
328 {
329 return local_dt_cfl_;
330 };
331 const double& get_local_dt_cfl_min_delta_xyz() const
332 {
334 };
336 {
338 };
340 {
342 };
343 void set_reference_gfm_on_probes(const int& reference_gfm_on_probes)
344 {
345 reference_gfm_on_probes_ = reference_gfm_on_probes;
346 };
347 const double& get_dist_cell() const
348 {
351 else
353 };
362 {
363 return facet_barycentre_;
364 };
365 const int& get_end_index_subproblem() const
366 {
367 return end_index_;
368 }
369 const int& get_dxyz_increment_bool() const
370 {
372 }
374 {
376 }
381 const std::vector<std::vector<std::vector<bool>>>& get_pure_neighbours_to_correct() const
382 {
384 }
385 const std::vector<std::vector<std::vector<double>>>& get_pure_neighbours_corrected_distance() const
386 {
388 }
389 const std::vector<std::vector<std::vector<double>>>& get_pure_neighbours_corrected_colinearity() const
390 {
392 }
393 const std::vector<std::vector<std::vector<std::vector<bool>>>> get_pure_neighbours_last_faces_to_correct() const
394 {
396 }
397 const std::vector<std::vector<std::vector<std::vector<double>>>> get_pure_neighbours_last_faces_corrected_distance() const
398 {
400 }
401 const std::vector<std::vector<std::vector<std::vector<double>>>> get_pure_neighbours_last_faces_corrected_colinearity() const
402 {
404 }
405 const double& get_radius_spherical_coords() const
406 {
407 return r_sph_;
408 }
409 const double& get_theta_spherical_coords() const
410 {
411 return theta_sph_;
412 }
413 const double& get_phi_spherical_coords() const
414 {
415 return phi_sph_;
416 }
418 {
420
422 };
428 const double& get_interfacial_thermal_flux() const
429 {
430 return thermal_flux_[0];
431 }
433 {
434 return thermal_flux_raw_;
435 }
437 {
438 return thermal_flux_gfm_;
439 }
441 {
442 return thermal_flux_lrs_;
443 }
445 {
446 return thermal_flux_max_;
447 }
449 {
451 }
453 {
455 }
456 const double& get_local_surface_area() const
457 {
458 return surface_;
459 }
460 const double& get_lambda() const
461 {
462 return (*lambda_);
463 }
464 const int& get_compo() const
465 {
466 return compo_connex_;
467 }
468 const double& get_shear_stress() const
469 {
471 }
472 const double& get_shear_force() const
473 {
475 }
476 const double& get_pressure_gradient() const
477 {
478 return pressure_gradient_;
479 }
480 const DoubleVect& get_current_temperature_solution() const
481 {
483 }
484 const double& get_current_indicator() const
485 {
486 return indicator_;
487 }
489 {
490 return xyz_velocity_cell_;
491 }
493 {
495 }
496 const double& get_sum_convective_diffusive_flux_op_value(const int flux_type) const
497 {
498 if (flux_type==0)
500 else
502 }
503 const double& get_sum_convective_diffusive_flux_op_value_vap(const int flux_type) const
504 {
505 if (flux_type==0)
507 else
509 }
510 const double& get_sum_convective_diffusive_flux_op_value_mixed(const int flux_type) const
511 {
512 if (flux_type==0)
514 else
516 }
517 const double& get_sum_convective_diffusive_flux_op_value_normal(const int flux_type) const
518 {
519 if (flux_type==0)
521 else
523 }
524 const double& get_sum_convective_diffusive_flux_op_value_leaving(const int flux_type) const
525 {
526 if (flux_type==0)
528 else
530 }
531 const double& get_sum_convective_diffusive_flux_op_value_entering(const int flux_type) const
532 {
533 if (flux_type==0)
535 else
537 }
538 const double& get_sum_convective_diffusive_flux_op_value_leaving_lrs(const int flux_type) const
539 {
540 if (flux_type==0)
542 else
544 }
545 const double& get_sum_convective_diffusive_flux_op_value_entering_lrs(const int flux_type) const
546 {
547 if (flux_type==0)
549 else
551 }
552 const double& get_sum_convective_diffusive_flux_op_value_lrs(const int flux_type)
553 {
554 if (flux_type==0)
556 else
558 }
560
562 {
564 }
566 {
567 return corrective_flux_current_[l];
568 }
569 void set_pure_flux_corrected(const double& flux_face, const int& l, const int flux_type);
571 void compute_weighting_coefficient(const int& l, double& weight, const int& weight_type=0);
572 void compare_flux_interface(std::vector<double>& radial_flux_error);
573 double get_value_from_index(const int& index_val);
574protected :
575 void clear_vectors();
576 void reset_counters();
577 void reset_flags();
578 void reinit_variable(DoubleVect& vect);
579 void associate_thermal_subproblem_parameters(const int& reference_gfm_on_probes,
580 const int& debug,
581 const int& n_iter_distance,
582 const double& delta_T_subcooled_overheated,
583 const int& pre_initialise_thermal_subproblems_list,
584 const int& use_sparse_matrix,
585 const int& compute_normal_derivative_on_reference_probes,
586 const int& latastep_reprise);
588 void associate_flux_correction_parameters(const int& correct_fluxes,
589 const int& distance_cell_faces_from_lrs,
590 const int& interp_eulerian,
591 const int& use_corrected_velocity_convection,
592 const int& use_velocity_cartesian_grid,
593 const int& compute_radial_displacement,
594 const int& fluxes_correction_conservations,
595 const int& conserve_max_interfacial_fluxes,
596 const int& fluxes_corrections_weighting,
597 const int& use_normal_gradient_for_flux_corr);
598 void associate_source_terms_parameters(const int& source_terms_type,
601 const int& advected_frame_of_reference,
602 const int& neglect_frame_of_reference_radial_advection,
603 const int& compute_tangential_variables);
605 Matrice& thermal_subproblems_matrix_assembly,
606 DoubleVect& thermal_subproblems_rhs_assembly,
607 DoubleVect& thermal_subproblems_temperature_solution,
608 DoubleVect& thermal_subproblems_temperature_solution_ini);
609 void associate_temporal_parameters(const double& global_time_step, const double& current_time);
610 void associate_cell_ijk(int i, int j, int k) { index_i_ = i; index_j_=j; index_k_=k; };
611 void associate_tweaked_parameters(const int& disable_probe_weak_gradient, const int& disable_probe_weak_gradient_gfm);
612 void associate_collisions_parameters(const int& enable_probe_collision_detection,
613 const int& enable_resize_probe_collision,
614 const int& debug_probe_collision);
615 void associate_sub_problem_temporal_params(const bool& is_first_time_step,
616 bool& first_time_step_temporal,
617 const int& first_time_step_explicit,
618 const double& local_fourier,
619 const double& local_cfl,
620 const double& min_delta_xyz,
621 int max_u_radial);
622 void associate_varying_probes_params(const int& readjust_probe_length_from_vertices,
623 const int& first_time_step_varying_probes,
624 const int& probe_variations_priority,
625 const int& disable_interpolation_in_mixed_cells);
626 void associate_compos(int compo_connex) { compo_connex_ = compo_connex; };
627 void associate_compos(int compo_connex, int compo_group) { compo_connex_ = compo_connex; compo_group_ = compo_group; };
628 void associate_eulerian_field_values(int compo_connex, const double& indicator) { compo_connex_ = compo_connex; indicator_ = indicator; };
629 void associate_interface_related_parameters(double distance, double curvature, double interfacial_area, ArrOfDouble facet_barycentre, ArrOfDouble normal_vector)
630 {
631 distance_ = distance;
632 curvature_ = curvature;
633 interfacial_area_ = interfacial_area;
634 facet_barycentre_ = Vecteur3(facet_barycentre);
635 normal_vector_compo_ = Vecteur3(normal_vector);
636 };
637 void associate_rising_velocity(double bubble_rising_velocity, ArrOfDouble bubble_rising_vector, ArrOfDouble bubble_barycentre)
638 {
639 bubble_rising_velocity_ = bubble_rising_velocity;
640 bubble_rising_vector_ = Vecteur3(bubble_rising_vector);
641 bubble_barycentre_ = Vecteur3(bubble_barycentre);
643 // bubble_rising_velocity_ is an absolute value
645 };
646
648 const IJK_Field_double * eulerian_distance,
649 const IJK_Field_double * eulerian_curvature,
650 const IJK_Field_double * eulerian_interfacial_area,
651 const IJK_Field_vector3_double * eulerian_normal_vect,
652 const IJK_Field_vector3_double * eulerian_facets_barycentre,
653 const IJK_Field_double& temperature,
654 const IJK_Field_double& temperature_ft,
655 const IJK_Field_double& temperature_before_extrapolation,
656 const IJK_Field_vector3_double& velocity,
657 const IJK_Field_vector3_double& velocity_ft,
658 const IJK_Field_double& pressure,
659 const IJK_Field_vector3_double& grad_T_elem,
660 const IJK_Field_vector3_double& grad_T_elem_smooth,
661 const IJK_Field_vector3_double& hess_diag_T_elem,
662 const IJK_Field_vector3_double& hess_cross_T_elem,
663 const IJK_Field_double& eulerian_grad_T_interface_ns,
664 IJK_Field_double& probe_collision_debug_field,
665 IJK_Field_int& zero_liquid_neighbours,
666 const int& smooth_grad_T_elem);
667 void associate_flags_neighbours_correction(const int& correct_temperature_cell_neighbours,
668 const int& correct_neighbours_rank,
669 const int& neighbours_corrected_rank,
670 const int& neighbours_colinearity_weighting,
671 const int& neighbours_distance_weighting,
672 const int& neighbours_colinearity_distance_weighting,
673 const int& neighbours_last_faces_colinearity_weighting,
674 const int& neighbours_last_faces_colinearity_face_weighting,
675 const int& neighbours_last_faces_distance_weighting,
676 const int& neighbours_last_faces_distance_colinearity_weighting,
677 const int& neighbours_last_faces_distance_colinearity_face_weighting,
678 const int& compute_reachable_fluxes,
679 const int& find_cell_neighbours_for_fluxes_spherical_correction);
680 void associate_probe_parameters(const int& points_per_thermal_subproblem,
681 const double& cp_liquid,
682 const double& alpha,
683 const double& lambda,
684 const double& prandtl_number,
685 const double& coeff_distance_diagonal,
686 const double& cell_diagonal,
687 const double& dr_base,
688 const DoubleVect& radial_coordinates);
689 void associate_bubble_parameters(const ArrOfDouble& bubbles_surface,
690 const ArrOfDouble& radius_from_surfaces_per_bubble,
691 const ArrOfDouble& radius_from_volumes_per_bubble,
692 const double& delta_temperature,
693 const double& mean_liquid_temperature,
694 const ArrOfDouble * bubbles_volume,
695 const DoubleTab * rising_vectors);
696 void associate_global_subproblems_parameters(const int& reconstruct_previous_probe_field,
697 const int& implicit_solver_from_previous_probe_field,
698 const std::map<int, std::map<int, std::map<int, int>>>& subproblem_to_ijk_indices_previous,
699 const std::vector<DoubleVect>& temperature_probe_previous,
700 const std::vector<double>& indicator_probes_previous,
701 const std::vector<Vecteur3>& velocities_probes_previous,
702 const std::vector<Vecteur3>& normal_vector_compo_probes_previous);
703 void associate_finite_difference_operators(const Matrice& radial_first_order_operator_raw,
704 const Matrice& radial_second_order_operator_raw,
705 const Matrice& radial_first_order_operator,
706 const Matrice& radial_second_order_operator,
707 const Matrice& identity_matrix_explicit_implicit,
708 Matrice& identity_matrix_subproblems,
709 Matrice& radial_diffusion_matrix,
710 Matrice& radial_convection_matrix);
716 const int * increase_number_of_points();
717 void compute_identity_matrix_local(Matrice& identity_matrix_explicit_implicit);
718 void compute_first_order_operator_local(Matrice& radial_first_order_operator);
719 void compute_second_order_operator_local(Matrice& second_first_order_operator);
721 void compute_first_order_operator_local_varying_probe_length(const Matrice * radial_first_order_operator);
722 void compute_second_order_operator_local_varying_probe_length(const Matrice * radial_second_order_operator);
728 void interpolate_quantities_at_point(const IJK_Field_double& eulerian_field, const Vecteur3& compo_xyz, double& field_value);
729 DoubleTab get_single_point_coordinates(const Vecteur3& compo_xyz);
734 void correct_velocities();
735 void correct_velocity(const DoubleVect& velocity, DoubleVect& velocity_corrected);
736 void correct_velocity_rise(const DoubleVect& velocity, const Vecteur3& basis, DoubleVect& velocity_corrected);
738 void project_cartesian_onto_basis_vector(const DoubleVect& compo_x, const DoubleVect& compo_y, const DoubleVect& compo_z, const Vecteur3& basis, DoubleVect& projection);
739 void project_basis_vector_onto_cartesian_dir(const int& dir, const DoubleVect& compo_u, const DoubleVect& compo_v, const DoubleVect& compo_w,
740 const Vecteur3& basis_u, const Vecteur3& basis_v, const Vecteur3& basis_w,
741 DoubleVect& projection);
742 void compute_integral_quantity(DoubleVect& quantity, double& integrated_quantity);
743 void compute_integral_quantity_on_probe(DoubleVect& quantity, double& integrated_quantity);
746 void retrieve_previous_temperature_on_probe_type(const int computation_type,
747 const int& previous_rank,
748 const double& best_indicator_prev,
749 const double& colinearity,
750 const double& velocity_eval,
751 DoubleVect& temperature_previous,
752 DoubleVect& temperature_previous_options,
753 double& averaging_weight);
754 int is_in_map_index_ijk(const std::map<int, std::map<int, std::map<int, int>>>& subproblem_to_ijk_indices,
755 const int& index_i,
756 const int& index_j,
757 const int& index_k);
765 void project_matrix_on_basis(const Matrice33& projection_matrix, const Matrice33& inverse_projection_matrix, const Matrice33& matrix, Matrice33& projected_matrix);
768 void approximate_temperature_material_derivatives(const Vecteur3& normal_vector_compo,
769 const Vecteur3& first_tangential_vector_compo,
770 const Vecteur3& second_tangential_vector_compo,
771 const DoubleVect& radial_velocity_frame,
772 const DoubleVect& first_tangential_velocity_frame,
773 const DoubleVect& second_tangential_velocity_frame,
774 const DoubleVect& temperature_time_increment,
775 DoubleVect& convective_term,
776 DoubleVect& material_derivative);
777 void correct_tangential_temperature_gradient(DoubleVect& tangential_convection_source_terms);
778 void correct_tangential_temperature_hessian(DoubleVect& tangential_diffusion_source_terms);
779 void find_interval(const double& dist, int& left_interval, int& right_interval) const;
780
781 void post_process_interfacial_quantities(SFichier& fic, const int rank, const int& coord=0);
782 void post_process_radial_quantities(const int rank, const Nom& local_quantities_thermal_probes_time_index_folder);
783
785 double compute_temperature_integral_subproblem(const double& distance);
786
788
797
801
804
805 const std::map<int, std::map<int, std::map<int, int>>> * subproblem_to_ijk_indices_previous_ = nullptr;
806 const std::vector<DoubleVect> * temperature_probes_previous_ = nullptr;
807 const std::vector<double> * indicator_probes_previous_ = nullptr;
808 const std::vector<Vecteur3> * velocities_probes_previous_ = nullptr;
809 const std::vector<Vecteur3> * normal_vector_compo_probes_previous_ = nullptr;
810
815 int debug_ = 0;
816 int init_ = 1;
820 /*
821 * FIXME: Should I use only references or just for IJK_Field_double ?
822 * Should I use IJK_Field_local_double or IJK_Field_double as pointers ?
823 */
827
828 int index_i_ = 0, index_j_ = 0, index_k_ = 0;
830 int compo_group_ = -1;
831 double distance_ = 0.;
832 double curvature_ = 0.;
833 double interfacial_area_ = 0.;
837
843
845
846 /*
847 * Several ways to calculate the tangential vector !
848 * Either by considering a unique tangential vector (pure spherical)
849 * Or two tangential vectors (osculating sphere)
850 */
853
856
860
864
871
874
875 // FIXME: Should each probes have their own number of points ?
877
879 const int * points_per_thermal_subproblem_ = nullptr;
881 // FIXME: Should alpha_liq be constant, or a reference ?
882 const double * cp_liquid_ = nullptr;
883 const double * alpha_ = nullptr;
884 const double * prandtl_number_ = nullptr;
885 const double * lambda_ = nullptr;
886 const double * coeff_distance_diagonal_ = nullptr;
887 const double * cell_diagonal_ = nullptr;
888 double probe_length_ = 0.;
889 double surface_ = 0.;
890
891 double r_sph_ = 0.;
892 double theta_sph_ = 0.;
893 double phi_sph_ = 0.;
897
898 /*
899 * References to IJK_Field_double to avoid copy of large fields
900 * Similar to operators !
901 */
902 const IJK_Interfaces * interfaces_ = nullptr;
903 double indicator_=0.5;
906 const IJK_Field_double * eulerian_distance_ = nullptr;
907 const IJK_Field_double * eulerian_curvature_ = nullptr;
908 const IJK_Field_double * eulerian_interfacial_area_ = nullptr;
909 const IJK_Field_vector3_double * eulerian_normal_vect_ = nullptr;
910 const IJK_Field_vector3_double * eulerian_facets_barycentre_ = nullptr;
911
912 const IJK_Field_double * temperature_ = nullptr;
913 const IJK_Field_double * temperature_ft_ = nullptr;
914 const IJK_Field_double * temperature_before_extrapolation_ = nullptr;
915 const IJK_Field_vector3_double * velocity_ = nullptr;
916 const IJK_Field_vector3_double * velocity_ft_ = nullptr;
917 const IJK_Field_double * pressure_ = nullptr;
918 const IJK_Field_double * eulerian_grad_T_interface_ns_ = nullptr;
919 IJK_Field_double * probe_collision_debug_field_ = nullptr;
920 IJK_Field_int * zero_liquid_neighbours_ = nullptr;
921
923 const IJK_Field_vector3_double * grad_T_elem_ = nullptr;
924 const IJK_Field_vector3_double * grad_T_elem_smooth_ = nullptr;
925 const IJK_Field_vector3_double * grad_T_elem_solver_ = nullptr;
926 const IJK_Field_vector3_double * hess_diag_T_elem_ = nullptr;
927 const IJK_Field_vector3_double * hess_cross_T_elem_ = nullptr;
928
929 const double * dr_base_ = nullptr;
930 // FIXME: Should I use DoubleTab instead ?
931 const DoubleVect* radial_coordinates_base_ = nullptr;
932
944
945 /*
946 * Pointers to non-constant matrice
947 * FIXME: Should I declare constant pointers ?
948 */
953 // const Matrice * tangential_velocity_convection_matrix_base_;
954 // const Matrice * azymuthal_velocity_convection_matrix_base_;
955
956 double dr_=0.;
957 double dr_inv_=0.;
958 const DoubleVect * radial_coordinates_ = nullptr;
965
968 DoubleVect x_velocity_;
969 DoubleVect y_velocity_;
970 DoubleVect z_velocity_;
997 DoubleVect * first_tangential_velocity_solver_ = nullptr;
1029
1033
1041
1046
1051 };
1064 DoubleVect source_terms_;
1065
1069
1072
1078 DoubleVect rhs_assembly_;
1082 int end_index_ = 0;
1090 DoubleVect thermal_flux_;
1104
1106
1111
1112 const double * delta_temperature_ = nullptr;
1113 const double * mean_liquid_temperature_ = nullptr;
1114 const ArrOfDouble * bubbles_volume_ = nullptr;
1115 const ArrOfDouble * bubbles_surface_ = nullptr;
1116 const ArrOfDouble * radius_from_surfaces_per_bubble_ = nullptr;
1117 const ArrOfDouble * radius_from_volumes_per_bubble_ = nullptr;
1118 const DoubleTab * bubbles_rising_vectors_per_bubble_ = nullptr;
1119
1126
1127 DoubleVect shear_stress_;
1133
1135
1138
1140 bool is_updated_ = false;
1142
1143 /*
1144 * Some tries to do explicit temporal variations at the beginning
1145 */
1150 double current_time_ = 0.;
1151 double global_dt_cfl_ = 0.;
1152 double global_dt_fo_ = 0.;
1154 double local_dt_cfl_ = 0.;
1155 double local_dt_fo_ = 0.;
1156 double local_time_step_ = 0.;
1157 double local_fourier_ = 1.;
1158 double local_cfl_ = 1.;
1160 double max_u_ = 0.9 * INVALID_VELOCITY_CFL;
1168
1169 /*
1170 * Some tries to make the probe length varies at the beginning of the simulation
1171 */
1199
1203
1206
1210
1211 /*
1212 * Identify neighbours cells centre for temperature correction
1213 */
1222 std::vector<std::vector<std::vector<bool>>> pure_neighbours_to_correct_;
1223 std::vector<std::vector<std::vector<double>>> pure_neighbours_corrected_distance_;
1224 std::vector<std::vector<std::vector<double>>> pure_neighbours_corrected_colinearity_;
1227
1229
1230 /*
1231 * Identify neighbours faces centres for flux correction
1232 */
1241 std::vector<std::vector<std::vector<std::vector<bool>>>> pure_neighbours_last_faces_to_correct_;
1242 std::vector<std::vector<std::vector<std::vector<double>>>> pure_neighbours_last_faces_corrected_distance_;
1243 std::vector<std::vector<std::vector<std::vector<double>>>> pure_neighbours_last_faces_corrected_colinearity_;
1244
1247
1248 const int * latastep_reprise_ = nullptr;
1249
1256
1263
1270
1277
1284
1296
1300
1306};
1307
1308#endif /* IJK_One_Dimensional_Subproblem_included */
: class IJK_Interfaces
void compute_temporal_explicit_implicit_matrices()
double compute_temperature_integral_subproblem(const double &distance)
void project_cartesian_onto_basis_vector(const DoubleVect &compo_x, const DoubleVect &compo_y, const DoubleVect &compo_z, const Vecteur3 &basis, DoubleVect &projection)
void add_source_terms_temporal_tests(const int &boundary_condition_interface, const int &boundary_condition_end)
void project_matrix_on_basis(const Matrice33 &projection_matrix, const Matrice33 &inverse_projection_matrix, const Matrice33 &matrix, Matrice33 &projected_matrix)
void associate_thermal_subproblem_parameters(const int &reference_gfm_on_probes, const int &debug, const int &n_iter_distance, const double &delta_T_subcooled_overheated, const int &pre_initialise_thermal_subproblems_list, const int &use_sparse_matrix, const int &compute_normal_derivative_on_reference_probes, const int &latastep_reprise)
FixedVector< DoubleVect, 3 > hess_diag_T_elem_interp_
double get_discrete_surface_at_level(const int &dir, const int &level) const
IJK_Finite_Difference_One_Dimensional_Matrix_Assembler * finite_difference_assembler_
double get_velocity_component_at_point(const double &dist, const int &dir, const int &index_i=-100, const int &index_j=-100, const int &index_k=-100) const
std::vector< std::vector< std::vector< std::vector< double > > > > pure_neighbours_last_faces_corrected_colinearity_
int is_in_map_index_ijk(const std::map< int, std::map< int, std::map< int, int > > > &subproblem_to_ijk_indices, const int &index_i, const int &index_j, const int &index_k)
void set_subproblem_index(const int &sub_problem_index)
const IJK_Field_vector3_double * hess_cross_T_elem_
void compute_identity_matrix_local(Matrice &identity_matrix_explicit_implicit)
FixedVector< FixedVector< Vecteur3, 4 >, 6 > vertices_tangential_distance_vector_
void associate_varying_probes_params(const int &readjust_probe_length_from_vertices, const int &first_time_step_varying_probes, const int &probe_variations_priority, const int &disable_interpolation_in_mixed_cells)
double get_temperature_gradient_profile_at_point(const double &dist, const int &dir) const
void get_discrete_two_dimensional_spacing(const int &dir, const int &level, const double &first_dir, const double &second_dir, double &dl1, double &dl2, Vecteur3 &point_coords) const
FixedVector< Vecteur3, 6 > face_tangential_distance_vector_
FixedVector< double, 6 > diffusive_flux_op_value_mixed_
double get_field_profile_at_point(const double &dist, const DoubleVect &field, const int temp_bool) const
double get_temperature_gradient_times_conductivity_profile_at_point(const double &dist, const int &dir, bool &valid_val) const
void compute_second_order_operator_local(Matrice &second_first_order_operator)
FixedVector< DoubleVect, 3 > temperature_gradient_solution_
void associer(const Probleme_FTD_IJK_base &ijk_ft)
const FixedVector< double, 6 > & get_dist_faces() const
std::vector< std::vector< std::vector< bool > > > pure_neighbours_to_correct_
void associate_flags_neighbours_correction(const int &correct_temperature_cell_neighbours, const int &correct_neighbours_rank, const int &neighbours_corrected_rank, const int &neighbours_colinearity_weighting, const int &neighbours_distance_weighting, const int &neighbours_colinearity_distance_weighting, const int &neighbours_last_faces_colinearity_weighting, const int &neighbours_last_faces_colinearity_face_weighting, const int &neighbours_last_faces_distance_weighting, const int &neighbours_last_faces_distance_colinearity_weighting, const int &neighbours_last_faces_distance_colinearity_face_weighting, const int &compute_reachable_fluxes, const int &find_cell_neighbours_for_fluxes_spherical_correction)
void get_ijk_indices(int &i, int &j, int &k) const
FixedVector< double, 6 > convective_flux_op_entering_value_
void dispatch_interfacial_heat_flux(IJK_Field_vector3_double &interfacial_heat_flux_dispatched, FixedVector< ArrOfInt, 3 > &ijk_indices_out, FixedVector< ArrOfDouble, 3 > &thermal_flux_out)
void correct_velocity(const DoubleVect &velocity, DoubleVect &velocity_corrected)
const IJK_Field_vector3_double * grad_T_elem_solver_
const IJK_Field_vector3_double * velocity_
void associate_collisions_parameters(const int &enable_probe_collision_detection, const int &enable_resize_probe_collision, const int &debug_probe_collision)
void associate_interface_related_parameters(double distance, double curvature, double interfacial_area, ArrOfDouble facet_barycentre, ArrOfDouble normal_vector)
const std::vector< Vecteur3 > * normal_vector_compo_probes_previous_
double compute_colinearity(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
const DoubleVect & get_current_temperature_solution() const
void compute_integral_quantity(DoubleVect &quantity, double &integrated_quantity)
void compute_modified_probe_length_condition(const int probe_length_condition)
FixedVector< double, 6 > convective_flux_op_value_normal_contrib_
void correct_tangential_temperature_hessian(DoubleVect &tangential_diffusion_source_terms)
const IJK_Field_vector3_double * grad_T_elem_smooth_
FixedVector< double, 6 > diffusive_flux_op_entering_value_
double find_cell_related_indicator_on_probes(const int &last_index)
double get_temperature_times_velocity_profile_at_point(const double &dist, const int &dir, bool &valid_val, const int &l, const int &index_i=INVALID_INDEX, const int &index_j=INVALID_INDEX, const int &index_k=INVALID_INDEX, const int &temperature=0)
FixedVector< DoubleVect, 3 > hess_cross_T_elem_spherical_from_rising_
void associate_finite_difference_solver_solution(IJK_Finite_Difference_One_Dimensional_Matrix_Assembler &finite_difference_assembler, Matrice &thermal_subproblems_matrix_assembly, DoubleVect &thermal_subproblems_rhs_assembly, DoubleVect &thermal_subproblems_temperature_solution, DoubleVect &thermal_subproblems_temperature_solution_ini)
DoubleVect get_temperature_profile_discrete_integral_at_point(const double &dist, const int &levels, const int &dir)
const double & get_sum_convective_diffusive_flux_op_value_entering(const int flux_type) const
void associate_eulerian_field_values(int compo_connex, const double &indicator)
const IJK_Field_vector3_double * velocity_ft_
DoubleVect get_field_discrete_integral_velocity_weighting_at_point(const double &dist, const int &levels, const int &dir, const DoubleVect &field, const DoubleVect &field_weak_gradient, const IJK_Field_double &eulerian_field, const int temp_bool, const int weak_gradient_variable, const int vel, const int &l=-1)
void project_basis_vector_onto_cartesian_dir(const int &dir, const DoubleVect &compo_u, const DoubleVect &compo_v, const DoubleVect &compo_w, const Vecteur3 &basis_u, const Vecteur3 &basis_v, const Vecteur3 &basis_w, DoubleVect &projection)
void associate_temporal_parameters(const double &global_time_step, const double &current_time)
const std::vector< std::vector< std::vector< std::vector< double > > > > get_pure_neighbours_last_faces_corrected_distance() const
FixedVector< ArrOfInt, 6 > * first_indices_sparse_matrix_
const double & get_sum_convective_diffusive_flux_op_value_leaving_lrs(const int flux_type) const
OBS_PTR(Probleme_FTD_IJK_base) ref_ijk_ft_
void associate_thermal_subproblem_sparse_matrix(FixedVector< ArrOfInt, 6 > &first_indices_sparse_matrix)
DoubleVect get_field_times_velocity_discrete_integral_at_point(const double &dist, const int &levels, const int &dir, const DoubleVect &field, const DoubleVect &field_weak_gradient, const IJK_Field_double &eulerian_field, const int &l)
const std::vector< std::vector< std::vector< std::vector< bool > > > > get_pure_neighbours_last_faces_to_correct() const
IJK_One_Dimensional_Subproblem(const Probleme_FTD_IJK_base &ijk_ft)
void retrieve_interfacial_quantities(const int rank, const int &itr, std::vector< std::string > key_results_int, std::vector< std::string > key_results_double, std::map< std::string, ArrOfInt > &results_probes_int, std::map< std::string, ArrOfDouble > &results_probes_double, const int &coord=0)
void compute_modified_probe_length(const int &probe_variations_enabled)
const std::vector< Vecteur3 > * velocities_probes_previous_
FixedVector< DoubleVect, 3 > hess_cross_T_elem_interp_
void post_process_radial_quantities(const int rank, const Nom &local_quantities_thermal_probes_time_index_folder)
void get_field_discrete_value_recursive(const int &ilevel, const int &max_level, const int &dir, const double &dist, const int &vel, const double &surface, const DoubleVect &field, const DoubleVect &field_weak_gradient, const IJK_Field_double &eulerian_field, const int temp_bool, const int weak_gradient_variable, const double dl1_parent, const double dl2_parent, Vecteur3 &point_coords_parent, DoubleVect &discrete_values, int &value_counter) const
void correct_velocity_rise(const DoubleVect &velocity, const Vecteur3 &basis, DoubleVect &velocity_corrected)
double get_temperature_profile_at_point(const double &dist) const
const double & get_sum_convective_diffusive_flux_op_value_lrs(const int flux_type)
const double & get_sum_convective_diffusive_flux_op_value_mixed(const int flux_type) const
double get_velocity_cartesian_grid_value(const double &dist, const int &dir, const int &sign_dir, const int &index_i, const int &index_j, const int &index_k) const
void set_global_index(const int &global_subproblem_index)
void compute_second_order_operator_local_varying_probe_length(const Matrice *radial_second_order_operator)
void compute_first_order_operator_local_varying_probe_length(const Matrice *radial_first_order_operator)
double compute_cell_faces_weighting(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib, const int &dir)
void thermal_subresolution_outputs_parallel(const int rank, const Nom &local_quantities_thermal_probes_time_index_folder)
std::vector< std::vector< std::vector< double > > > pure_neighbours_corrected_distance_
const double & get_sum_convective_diffusive_flux_op_value_normal(const int flux_type) const
void retrieve_previous_temperature_on_probe_type(const int computation_type, const int &previous_rank, const double &best_indicator_prev, const double &colinearity, const double &velocity_eval, DoubleVect &temperature_previous, DoubleVect &temperature_previous_options, double &averaging_weight)
const double & get_sum_convective_diffusive_flux_op_value_entering_lrs(const int flux_type) const
FixedVector< double, 6 > convective_flux_op_value_mixed_
FixedVector< double, 6 > face_centres_distance_corrected_
void associate_tweaked_parameters(const int &disable_probe_weak_gradient, const int &disable_probe_weak_gradient_gfm)
void associate_sub_problem_to_inputs(IJK_Thermal_Subresolution &ref_thermal_subresolution, IJK_One_Dimensional_Subproblems &ref_one_dimensional_subproblems, int i, int j, int k, int init, int sub_problem_index, double global_time_step, double current_time, int compo_connex, double distance, double curvature, double interfacial_area, ArrOfDouble facet_barycentre, ArrOfDouble normal_vector, double bubble_rising_velocity, ArrOfDouble bubble_rising_vector, ArrOfDouble bubble_barycentre, const double &indicator, const IJK_Interfaces &interfaces, const IJK_Field_vector3_double &velocity, const IJK_Field_vector3_double &velocity_ft, const IJK_Field_double &pressure)
void compute_vertex_position(const int &vertex_number, const int &face_dir, Vecteur3 &bary_vertex, double &distance_vertex_centre, double &tangential_distance_vertex_centre, Vecteur3 &tangential_distance_vector_vertex_centre)
const std::map< int, std::map< int, std::map< int, int > > > * subproblem_to_ijk_indices_previous_
DoubleVect get_temperature_gradient_profile_discrete_integral_at_point(const double &dist, const int &levels, const int &dir)
FixedVector< FixedVector< double, 4 >, 6 > vertices_centres_tangential_distance_
void compare_flux_interface(std::vector< double > &radial_flux_error)
void associate_eulerian_fields_references(const IJK_Interfaces &interfaces, const IJK_Field_double *eulerian_distance, const IJK_Field_double *eulerian_curvature, const IJK_Field_double *eulerian_interfacial_area, const IJK_Field_vector3_double *eulerian_normal_vect, const IJK_Field_vector3_double *eulerian_facets_barycentre, const IJK_Field_double &temperature, const IJK_Field_double &temperature_ft, const IJK_Field_double &temperature_before_extrapolation, const IJK_Field_vector3_double &velocity, const IJK_Field_vector3_double &velocity_ft, const IJK_Field_double &pressure, const IJK_Field_vector3_double &grad_T_elem, const IJK_Field_vector3_double &grad_T_elem_smooth, const IJK_Field_vector3_double &hess_diag_T_elem, const IJK_Field_vector3_double &hess_cross_T_elem, const IJK_Field_double &eulerian_grad_T_interface_ns, IJK_Field_double &probe_collision_debug_field, IJK_Field_int &zero_liquid_neighbours, const int &smooth_grad_T_elem)
const double & get_interfacial_thermal_flux_max_gfm() const
void set_reference_gfm_on_probes(const int &reference_gfm_on_probes)
const IJK_Field_vector3_double * eulerian_facets_barycentre_
const FixedVector< int, 3 > & get_pure_neighbours_corrected_sign() const
FixedVector< DoubleVect, 3 > hess_cross_T_elem_spherical_
const std::vector< DoubleVect > * temperature_probes_previous_
void compute_weighting_coefficient(const int &l, double &weight, const int &weight_type=0)
double get_velocity_weighting(const double &dist, const int &dir, const int vel) const
FixedVector< double, 6 > diffusive_flux_op_leaving_value_
void compare_fluxes_thermal_subproblems(const IJK_Field_vector3_double &convective_diffusive_fluxes_raw, const int flux_type, const int inv_sign=0)
std::vector< std::vector< std::vector< double > > > pure_neighbours_corrected_colinearity_
FixedVector< DoubleVect, 3 > hess_diag_T_elem_spherical_from_rising_
std::vector< std::vector< std::vector< std::vector< double > > > > pure_neighbours_last_faces_corrected_distance_
std::vector< std::vector< std::vector< std::vector< bool > > > > pure_neighbours_last_faces_to_correct_
void prepare_boundary_conditions(DoubleVect *thermal_subproblems_rhs_assembly, DoubleVect *thermal_subproblems_temperature_solution_ini, int &boundary_condition_interface, const double &interfacial_boundary_condition_value, const int &impose_boundary_condition_interface_from_simulation, int &boundary_condition_end, const double &end_boundary_condition_value, const int &impose_user_boundary_condition_end_value)
FixedVector< double, 6 > convective_flux_op_leaving_value_
DoubleVect get_temperature_times_velocity_profile_discrete_integral_at_point(const double &dist, const int &levels, const int &dir, const int &l)
void correct_tangential_temperature_gradient(DoubleVect &tangential_convection_source_terms)
void retrieve_shell_quantities(const int rank, const int &itr, std::vector< std::string > key_results_int, std::vector< std::string > key_results_double, std::map< std::string, ArrOfInt > &results_probes_int, std::map< std::string, ArrOfDouble > &results_probes_double)
void compute_first_order_operator_local(Matrice &radial_first_order_operator)
const double & get_local_fourier_time_step_probe_length() const
const IJK_Field_vector3_double * eulerian_normal_vect_
const std::vector< double > * indicator_probes_previous_
const Vecteur3 & get_current_cell_xyz_velocities() const
const IJK_Field_vector3_double * hess_diag_T_elem_
const IJK_Field_vector3_double * grad_T_elem_
const std::vector< std::vector< std::vector< bool > > > & get_pure_neighbours_to_correct() const
const double & get_interfacial_thermal_flux_max_raw() const
void associate_source_terms_parameters(const int &source_terms_type, const int &correct_tangential_temperature_gradient, const int &correct_tangential_temperature_hessian, const int &advected_frame_of_reference, const int &neglect_frame_of_reference_radial_advection, const int &compute_tangential_variables)
void add_interfacial_heat_flux_neighbours(IJK_Field_vector3_double &interfacial_heat_flux_dispatched)
const std::vector< std::vector< std::vector< double > > > & get_pure_neighbours_corrected_distance() const
const std::vector< std::vector< std::vector< std::vector< double > > > > get_pure_neighbours_last_faces_corrected_colinearity() const
FixedVector< double, 6 > corrective_flux_from_neighbours_
void associate_probe_parameters(const int &points_per_thermal_subproblem, const double &cp_liquid, const double &alpha, const double &lambda, const double &prandtl_number, const double &coeff_distance_diagonal, const double &cell_diagonal, const double &dr_base, const DoubleVect &radial_coordinates)
const std::vector< std::vector< std::vector< double > > > & get_pure_neighbours_corrected_colinearity() const
FixedVector< double, 6 > diffusive_flux_op_value_normal_contrib_
void associate_sub_problem_temporal_params(const bool &is_first_time_step, bool &first_time_step_temporal, const int &first_time_step_explicit, const double &local_fourier, const double &local_cfl, const double &min_delta_xyz, int max_u_radial)
void dispatch_interfacial_heat_flux_correction(IJK_Field_vector3_double &interfacial_heat_flux_dispatched, FixedVector< ArrOfInt, 4 > &ijk_indices_out, ArrOfDouble &thermal_flux_out, IJK_Field_vector3_double &interfacial_heat_flux_current)
const IJK_Field_double * temperature_before_extrapolation_
void add_interfacial_heat_flux_neighbours_correction(IJK_Field_vector3_double &interfacial_heat_flux_dispatched, IJK_Field_vector3_double &interfacial_heat_flux_current)
DoubleVect get_field_discrete_integral_at_point(const double &dist, const int &levels, const int &dir, const DoubleVect &field, const DoubleVect &field_weak_gradient, const IJK_Field_double &eulerian_field, const int weak_gradient_variable, const int temp_bool)
void interpolate_quantities_at_point(const IJK_Field_double &eulerian_field, const Vecteur3 &compo_xyz, double &field_value)
FixedVector< FixedVector< double, 4 >, 6 > vertices_centres_distance_
FixedVector< DoubleVect, 3 > hess_diag_T_elem_spherical_
FixedVector< double, 6 > face_centres_tangential_distance_
DoubleVect get_temperature_gradient_times_conductivity_profile_discrete_integral_at_point(const double &dist, const int &levels, const int &dir)
double compute_colinearity_cell_faces(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib, const int &dir)
void associate_flux_correction_parameters(const int &correct_fluxes, const int &distance_cell_faces_from_lrs, const int &interp_eulerian, const int &use_corrected_velocity_convection, const int &use_velocity_cartesian_grid, const int &compute_radial_displacement, const int &fluxes_correction_conservations, const int &conserve_max_interfacial_fluxes, const int &fluxes_corrections_weighting, const int &use_normal_gradient_for_flux_corr)
void post_process_interfacial_quantities(SFichier &fic, const int rank, const int &coord=0)
void set_pure_flux_corrected(const double &flux_face, const int &l, const int flux_type)
void find_interval(const double &dist, int &left_interval, int &right_interval) const
FixedVector< double, 6 > face_centres_radius_difference_
void compute_source_terms_impose_boundary_conditions(const int &boundary_condition_interface, const double &interfacial_boundary_condition_value, const int &impose_boundary_condition_interface_from_simulation, const int &boundary_condition_end, const double &end_boundary_condition_value, const int &impose_user_boundary_condition_end_value)
const double & get_sum_convective_diffusive_flux_op_value_vap(const int flux_type) const
const double & get_sum_convective_diffusive_flux_op_value_leaving(const int flux_type) const
void associate_rising_velocity(double bubble_rising_velocity, ArrOfDouble bubble_rising_vector, ArrOfDouble bubble_barycentre)
FixedVector< double, 6 > corrective_flux_to_neighbours_
double compute_cell_weighting(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
FixedVector< DoubleVect, 3 > grad_T_elem_interp_
void thermal_subresolution_outputs(SFichier &fic, SFichier &fic_shell, const int rank, const Nom &local_quantities_thermal_probes_time_index_folder)
void associate_bubble_parameters(const ArrOfDouble &bubbles_surface, const ArrOfDouble &radius_from_surfaces_per_bubble, const ArrOfDouble &radius_from_volumes_per_bubble, const double &delta_temperature, const double &mean_liquid_temperature, const ArrOfDouble *bubbles_volume, const DoubleTab *rising_vectors)
const IJK_Field_double * eulerian_grad_T_interface_ns_
void set_local_time_step(const double &local_time_step)
void add_source_terms(const int &boundary_condition_interface, const int &boundary_condition_end)
const double & get_sum_convective_diffusive_flux_op_value(const int flux_type) const
void associate_global_subproblems_parameters(const int &reconstruct_previous_probe_field, const int &implicit_solver_from_previous_probe_field, const std::map< int, std::map< int, std::map< int, int > > > &subproblem_to_ijk_indices_previous, const std::vector< DoubleVect > &temperature_probe_previous, const std::vector< double > &indicator_probes_previous, const std::vector< Vecteur3 > &velocities_probes_previous, const std::vector< Vecteur3 > &normal_vector_compo_probes_previous)
DoubleTab get_single_point_coordinates(const Vecteur3 &compo_xyz)
double compute_distance_cell_faces(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
Vecteur3 compute_relative_vector_cell_faces(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
void compute_integral_quantity_on_probe(DoubleVect &quantity, double &integrated_quantity)
void associate_finite_difference_operators(const Matrice &radial_first_order_operator_raw, const Matrice &radial_second_order_operator_raw, const Matrice &radial_first_order_operator, const Matrice &radial_second_order_operator, const Matrice &identity_matrix_explicit_implicit, Matrice &identity_matrix_subproblems, Matrice &radial_diffusion_matrix, Matrice &radial_convection_matrix)
const double & get_local_cfl_time_step_probe_length() const
void associate_compos(int compo_connex, int compo_group)
une matrice 3x3.
Definition Matrice33.h:28
Classe Matrice Classe generique de la hierarchie des matrices.
Definition Matrice.h:34
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
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