16#include <IJK_One_Dimensional_Subproblem.h>
17#include <IJK_Field_vector.h>
18#include <IJK_Navier_Stokes_tools.h>
19#include <Ouvrir_fichier.h>
20#include <Probleme_FTD_IJK.h>
21#include <IJK_Thermal_base.h>
22#include <IJK_Thermal_Subresolution.h>
23#include <IJK_One_Dimensional_Subproblems.h>
25#define selectxy(a,x,y) ((a==0)?(x):(y))
47static int compute_periodic_index(
const int index,
const int n)
49 return (n + index % n) % n;
72 int sub_problem_index,
73 double global_time_step,
78 double interfacial_area,
79 ArrOfDouble facet_barycentre,
80 ArrOfDouble normal_vector,
81 double bubble_rising_velocity,
82 ArrOfDouble bubble_rising_vector,
83 ArrOfDouble bubble_barycentre,
84 const double& indicator,
86 const IJK_Field_vector3_double& velocity,
87 const IJK_Field_vector3_double& velocity_ft,
88 const IJK_Field_double& pressure)
99 ref_thermal_subresolution.
debug_,
134 ref_thermal_subresolution.
dr_,
229 (*first_time_step_temporal_) = 0;
241 for (
int l=0; l<6; l++)
275 const int& n_iter_distance,
276 const double& delta_T_subcooled_overheated,
277 const int& pre_initialise_thermal_subproblems_list,
278 const int& use_sparse_matrix,
279 const int& compute_normal_derivative_on_reference_probes,
280 const int& latastep_reprise)
298 const IJK_Field_double * eulerian_distance,
299 const IJK_Field_double * eulerian_curvature,
300 const IJK_Field_double * eulerian_interfacial_area,
301 const IJK_Field_vector3_double * eulerian_normal_vect,
302 const IJK_Field_vector3_double * eulerian_facets_barycentre,
303 const IJK_Field_double& temperature,
304 const IJK_Field_double& temperature_ft,
305 const IJK_Field_double& temperature_before_extrapolation,
306 const IJK_Field_vector3_double& velocity,
307 const IJK_Field_vector3_double& velocity_ft,
308 const IJK_Field_double& pressure,
309 const IJK_Field_vector3_double& grad_T_elem,
310 const IJK_Field_vector3_double& grad_T_elem_smooth,
311 const IJK_Field_vector3_double& hess_diag_T_elem,
312 const IJK_Field_vector3_double& hess_cross_T_elem,
313 const IJK_Field_double& eulerian_grad_T_interface_ns,
314 IJK_Field_double& probe_collision_debug_field,
315 IJK_Field_int& zero_liquid_neighbours,
316 const int& smooth_grad_T_elem)
345 const int& disable_probe_weak_gradient_gfm)
354 const int& enable_resize_probe_collision,
355 const int& debug_probe_collision)
363 bool& first_time_step_temporal,
364 const int& first_time_step_explicit,
365 const double& local_fourier,
366 const double& local_cfl,
367 const double& min_delta_xyz,
381 const int& first_time_step_varying_probes,
382 const int& probe_variations_priority,
383 const int& disable_interpolation_in_mixed_cells)
392 const int& distance_cell_faces_from_lrs,
393 const int& interp_eulerian,
394 const int& use_corrected_velocity_convection,
395 const int& use_velocity_cartesian_grid,
396 const int& compute_radial_displacement,
397 const int& fluxes_correction_conservations,
398 const int& conserve_max_interfacial_fluxes,
399 const int& fluxes_corrections_weighting,
400 const int& use_normal_gradient_for_flux_corr)
417 const int& advected_frame_of_reference,
418 const int& neglect_frame_of_reference_radial_advection,
419 const int& compute_tangential_variables)
434 Matrice& thermal_subproblems_matrix_assembly,
435 DoubleVect& thermal_subproblems_rhs_assembly,
436 DoubleVect& thermal_subproblems_temperature_solution,
437 DoubleVect& thermal_subproblems_temperature_solution_ini)
453 const int& correct_neighbours_rank,
454 const int& neighbours_corrected_rank,
455 const int& neighbours_colinearity_weighting,
456 const int& neighbours_distance_weighting,
457 const int& neighbours_colinearity_distance_weighting,
458 const int& neighbours_last_faces_colinearity_weighting,
459 const int& neighbours_last_faces_colinearity_face_weighting,
460 const int& neighbours_last_faces_distance_weighting,
461 const int& neighbours_last_faces_distance_colinearity_weighting,
462 const int& neighbours_last_faces_distance_colinearity_face_weighting,
463 const int& compute_reachable_fluxes,
464 const int& find_cell_neighbours_for_fluxes_spherical_correction)
494 const double& cp_liquid,
496 const double& lambda,
497 const double& prandtl_number,
498 const double& coeff_distance_diagonal,
499 const double& cell_diagonal,
500 const double& dr_base,
501 const DoubleVect& radial_coordinates)
526 const ArrOfDouble& radius_from_surfaces_per_bubble,
527 const ArrOfDouble& radius_from_volumes_per_bubble,
528 const double& delta_temperature,
529 const double& mean_liquid_temperature,
530 const ArrOfDouble * bubbles_volume,
531 const DoubleTab * rising_vectors)
543 const int& implicit_solver_from_previous_probe_field,
544 const std::map<
int, std::map<
int, std::map<int, int>>>& subproblem_to_ijk_indices_previous,
545 const std::vector<DoubleVect>& temperature_probe_previous,
546 const std::vector<double>& indicator_probes_previous,
547 const std::vector<Vecteur3>& velocities_probes_previous,
548 const std::vector<Vecteur3>& normal_vector_compo_probes_previous)
561 const Matrice& radial_second_order_operator_raw,
562 const Matrice& radial_first_order_operator,
563 const Matrice& radial_second_order_operator,
564 const Matrice& identity_matrix_explicit_implicit_raw,
565 Matrice& identity_matrix_subproblems,
566 Matrice& radial_diffusion_matrix,
567 Matrice& radial_convection_matrix)
587 Cerr <<
"Compute interface basis vectors" << finl;
591 Cerr <<
"Compute pure spherical basis vectors" << finl;
595 Cerr <<
"Compute probe parameters" << finl;
597 probe_length_ = (*coeff_distance_diagonal_) * (*cell_diagonal_);
610 if (
curvature_ >= DMINFLOAT && max_length < 0)
618 Cerr <<
"Compute local discretisation" << finl;
626 Cerr <<
"Compute cell and faces distance to the interface" << finl;
635 Cerr <<
"Compute distance cell neighbours" << finl;
639 Cerr <<
"Compute distance faces neighbours" << finl;
686 const double facet_barycentre_relative_norm = facet_barycentre_relative_normed.
length();
687 facet_barycentre_relative_normed *= (1 / facet_barycentre_relative_norm);
693 Cerr <<
"Normal vector norm:" << normal_vector_compo_norm << finl;
697 DoubleTab facet_barycentre(1, 3);
699 for (
int dir=0; dir<3; dir++)
701 for (
int dir=0; dir<3; dir++)
703 DoubleVect interfacial_velocity_component(1);
704 ijk_interpolate_skip_unknown_points((*
velocity_)[dir], facet_barycentre, interfacial_velocity_component, INVALID_INTERP);
779 Cerr <<
"r_sph_ calculation" << finl;
785 Cerr <<
"r_sph_ = " <<
r_sph_ << finl;
786 Cerr <<
"theta_sph_ calculation" << finl;
793 const double atan_theta_incr_ini = M_PI / 2;
794 const double atan_incr_factor = -1;
803 Cerr <<
"theta_sph_ = " <<
theta_sph_ << finl;
804 Cerr <<
"phi_sph_ calculation" << finl;
810 Cerr <<
"phi_sph_ = " <<
phi_sph_ << finl;
811 Cerr <<
"er_sph_ calculation" << finl;
813 for (
int dir=0; dir<3; dir++)
821 Cerr <<
"er_sph_ = " <<
er_sph_[0] << finl;
822 Cerr <<
"etheta_sph_ calculation" << finl;
824 for (
int dir=0; dir<2; dir++)
886 for (
int dir=0; dir<3; dir++)
900 double max_u_inv = 1.e20;
901 if (
max_u_ > INVALID_VELOCITY_CFL)
944 Cerr <<
"Check_nb_elem" << check_nb_elem << finl;
952 Cerr <<
"Check_nb_elem" << check_nb_elem << finl;
961 Cerr <<
"Check_nb_elem" << check_nb_elem << finl;
962 const double dr_squared_inv = 1 / pow(
dr_, 2);
989 const double dr_squared_inv = 1 / pow(
dr_, 2);
1008 const IJK_Field_double& indicator =
interfaces_->I();
1015 if (indic_last > LIQUID_INDICATOR_TEST)
1030 const int last_index = (*points_per_thermal_subproblem_) - 1;
1032 if (indic_last < LIQUID_INDICATOR_TEST)
1043 if (indicator_val < LIQUID_INDICATOR_TEST)
1056 const IJK_Field_double& indicator =
interfaces_->I();
1057 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
1067 Vecteur3 displacement_centre_probe = centre_elem;
1068 displacement_centre_probe *= (-1);
1069 displacement_centre_probe += xyz_cart_end;
1070 Vecteur3 displacement_factor = {displacement_centre_probe[0] / dx,
1071 displacement_centre_probe[1] / dy,
1072 displacement_centre_probe[2] / dz
1074 const int offset_x = (int) displacement_factor[0];
1075 const int offset_y = (int) displacement_factor[1];
1076 const int offset_z = (int) displacement_factor[2];
1077 const int offset_x_elem = ((abs(displacement_factor[0] - offset_x) >= 0.5) ? 1 : 0);
1078 const int offset_y_elem = ((abs(displacement_factor[1] - offset_y) >= 0.5) ? 1 : 0);
1079 const int offset_z_elem = ((abs(displacement_factor[2] - offset_z) >= 0.5) ? 1 : 0);
1080 const int real_offset_x = offset_x + (signbit(offset_x) ? - offset_x_elem : offset_x_elem);
1081 const int real_offset_y = offset_y + (signbit(offset_y) ? - offset_y_elem : offset_y_elem);
1082 const int real_offset_z = offset_z + (signbit(offset_z) ? - offset_z_elem : offset_z_elem);
1083 const double indic_last = indicator(
index_i_ + real_offset_x,
1131 Cerr <<
"This strategy for readjusting the probe length does not exist" << finl;
1137 switch(probe_length_condition)
1161 bool has_liquid_neighbours = 1;
1162 for (
int i=0; i<6; i++)
1179 Cerr <<
"Maximum vertex distance:" << max_distance_pure_vertex_centre << finl;
1184 const double current_time = ref_ijk_ft_->schema_temps_ijk().get_current_time();
1195 Cerr <<
"Probe length should be modified" << finl;
1211 bool has_liquid_neighbours = 1;
1212 for (
int i=0; i<6; i++)
1216 const double max_distance_face_centre_vertex = std::max(max_distance_pure_face_centre, max_distance_pure_vertex_centre);
1249 facet_to_cell_centre *= -1;
1250 facet_to_cell_centre += centre;
1254 facet_to_osculating_cell_centre += facet_to_cell_centre;
1263 Vecteur3 tangential_displacement = normal_contrib;
1264 tangential_displacement *= (-1);
1265 tangential_displacement += facet_to_cell_centre;
1273 Cerr <<
"Cell centre distances have already been computed" << finl;
1281 Vecteur3 vector_relative {0., 0., 0.};
1283 const int face_dir[6] = FACES_DIR;
1285 for (
int l=0; l<6; l++)
1287 const int ii = NEIGHBOURS_I[l];
1288 const int jj = NEIGHBOURS_J[l];
1289 const int kk = NEIGHBOURS_K[l];
1291 if (fabs(indic_neighbour) > LIQUID_INDICATOR_TEST)
1293 const int ii_f = NEIGHBOURS_FACES_I[l];
1294 const int jj_f = NEIGHBOURS_FACES_J[l];
1295 const int kk_f = NEIGHBOURS_FACES_K[l];
1307 vector_relative *= (-1);
1308 vector_relative += bary_face;
1315 normal_contrib *= distance_face_centre;
1316 Vecteur3 tangential_displacement = normal_contrib;
1317 tangential_displacement *= (-1);
1318 tangential_displacement += vector_relative;
1327 double distance_vertex_centre = 0.;
1328 double tangential_distance_vertex_centre = 0.;
1329 Vecteur3 tangential_distance_vector_vertex_centre = {0., 0., 0.};
1330 bary_vertex = vector_relative;
1334 distance_vertex_centre,
1335 tangential_distance_vertex_centre,
1336 tangential_distance_vector_vertex_centre);
1344 if (fabs(indic_neighbour) < VAPOUR_INDICATOR_TEST)
1364 Cerr <<
"Cell face distances have already been computed" << finl;
1369 double min_face_centre_distance = 1.e20;
1370 for (
int l=0; l<6; l++)
1374 return min_face_centre_distance;
1379 double min_face_vertex_distance = 1.e20;
1381 for (
int l=0; l<6; l++)
1386 return min_face_vertex_distance;
1391 double max_face_centre_distance = 0.;
1392 for (
int l=0; l<6; l++)
1396 return max_face_centre_distance;
1401 double max_face_vertex_distance = 0.;
1403 for (
int l=0; l<6; l++)
1408 return max_face_vertex_distance;
1413 double max_face_vertex_distance = 0.;
1417 for (
int l=0; l<6; l++)
1429 return max_face_vertex_distance;
1433 const int& face_dir,
1435 double& distance_vertex_centre,
1436 double& tangential_distance_vertex_centre,
1437 Vecteur3& tangential_distance_vector_vertex_centre)
1439 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
1443 const double neighbours_first_dir[4] = NEIGHBOURS_FIRST_DIR;
1444 const double neighbours_second_dir[4] = NEIGHBOURS_SECOND_DIR;
1445 Vecteur3 point_coords {0., 0., 0.};
1453 point_coords[1] = dl1 * neighbours_first_dir[vertex_number];
1454 point_coords[2] = dl2 * neighbours_second_dir[vertex_number];
1459 point_coords[0] = dl1 * neighbours_first_dir[vertex_number];
1460 point_coords[2] = dl2 * neighbours_second_dir[vertex_number];
1465 point_coords[0] = dl1 * neighbours_first_dir[vertex_number];
1466 point_coords[1] = dl2 * neighbours_second_dir[vertex_number];
1471 point_coords[0] = dl1 * neighbours_first_dir[vertex_number];
1472 point_coords[1] = dl2 * neighbours_second_dir[vertex_number];
1475 bary_vertex += point_coords;
1478 tangential_distance_vector *= distance_vertex_centre;
1479 tangential_distance_vector *= (-1);
1480 tangential_distance_vector += bary_vertex;
1481 tangential_distance_vertex_centre = tangential_distance_vector.
length();
1482 if (tangential_distance_vertex_centre > 1e-16)
1483 tangential_distance_vector *= (1 / tangential_distance_vertex_centre);
1484 tangential_distance_vector_vertex_centre = tangential_distance_vector;
1489 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
1504 for (l=dxyz_increment_max; l>=0; l--)
1510 for (m=dxyz_increment_max; m>=0; m--)
1516 for (n=dxyz_increment_max; n>=0; n--)
1528 remaining_distance_diag_projected *= remaining_distance_diag;
1529 for (
int i=0; i<3; i++)
1531 int dx_increment = (int) abs(remaining_distance_diag_projected[0] / dx);
1532 int dy_increment = (int) abs(remaining_distance_diag_projected[1] / dy);
1533 int dz_increment = (int) abs(remaining_distance_diag_projected[2] / dz);
1536 dx_increment = std::min(dx_increment, dxyz_increment_max);
1537 dy_increment = std::min(dy_increment, dxyz_increment_max);
1538 dz_increment = std::min(dz_increment, dxyz_increment_max);
1541 for (l=dx_increment; l>=0; l--)
1542 for (m=dy_increment; m>=0; m--)
1543 for (n=dz_increment; n>=0; n--)
1544 if (l!=0 || m!=0 || n!=0)
1549 const double indic_neighbour = ref_ijk_ft_->get_interface().I()(
index_i_ + l_dir,
index_j_ + m_dir,
index_k_ + n_dir);
1550 if (indic_neighbour > LIQUID_INDICATOR_TEST)
1553 const double dx_contrib = l_dir * dx;
1554 const double dy_contrib = m_dir * dy;
1555 const double dz_contrib = n_dir * dz;
1556 Vecteur3 distance_contrib = {dx_contrib, dy_contrib, dz_contrib};
1569 const double& dy_contrib,
1570 const double& dz_contrib)
1583 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
1587 const double dx_over_two = dx / 2.;
1588 const double dy_over_two = dy / 2.;
1589 const double dz_over_two = dz / 2.;
1591 int l_cell, m_cell, n_cell;
1595 const int first_increment[3] = {dxyz_over_two_increment_max + 1, dxyz_increment_max, dxyz_increment_max};
1596 const int second_increment[3] = {dxyz_increment_max, dxyz_over_two_increment_max + 1, dxyz_increment_max};
1597 const int third_increment[3] = {dxyz_increment_max, dxyz_increment_max, dxyz_over_two_increment_max + 1};
1610 for (
int c=0; c<3; c++)
1612 const int first_incr = first_increment[c];
1613 const int second_incr = second_increment[c];
1614 const int third_incr = third_increment[c];
1619 for (l=first_incr; l>=0; l--)
1625 for (m=second_incr; m>=0; m--)
1631 for (n=third_incr; n>=0; n--)
1644 remaining_distance_diag_projected *= remaining_distance_diag;
1645 for (
int i=0; i<3; i++)
1647 int dx_over_two_increment = (int) abs(remaining_distance_diag_projected[0] / dx_over_two);
1648 int dy_over_two_increment = (int) abs(remaining_distance_diag_projected[1] / dy_over_two);
1649 int dz_over_two_increment = (int) abs(remaining_distance_diag_projected[2] / dz_over_two);
1650 int dx_increment = (int) (dx_over_two_increment / 2);
1651 int dy_increment = (int) (dy_over_two_increment / 2);
1652 int dz_increment = (int) (dz_over_two_increment / 2);
1653 dx_over_two_increment -= dx_increment;
1654 dy_over_two_increment -= dy_increment;
1655 dz_over_two_increment -= dz_increment;
1658 dx_over_two_increment = std::min(dx_over_two_increment, dxyz_over_two_increment_max);
1659 dy_over_two_increment = std::min(dy_over_two_increment, dxyz_over_two_increment_max);
1660 dz_over_two_increment = std::min(dz_over_two_increment, dxyz_over_two_increment_max);
1661 dx_increment = std::min(dx_increment, dxyz_increment_max);
1662 dy_increment = std::min(dy_increment, dxyz_increment_max);
1663 dz_increment = std::min(dz_increment, dxyz_increment_max);
1666 if (dx_over_two_increment>0)
1667 dx_over_two_increment--;
1668 if (dy_over_two_increment>0)
1669 dy_over_two_increment--;
1670 if (dz_over_two_increment>0)
1671 dz_over_two_increment--;
1676 for (l=dx_over_two_increment + 1; l>=0; l--)
1677 for (m_cell=dy_increment; m_cell>=0; m_cell--)
1678 for (n_cell=dz_increment; n_cell>=0; n_cell--)
1684 const double indic_neighbour = ref_ijk_ft_->get_interface().I()(
index_i_ + l_dir_elem,
index_j_ + m_dir,
index_k_ + n_dir);
1685 if (indic_neighbour > LIQUID_INDICATOR_TEST)
1688 const double lmn_zero = (l > 0) ? 1. : 0.;
1690 lmn_zero * (2 * (l_dir - 1) + 1) - (1. - lmn_zero);
1691 const double dx_contrib = contrib_factor * dx_over_two;
1692 const double dy_contrib = m_dir * dy;
1693 const double dz_contrib = n_dir * dz;
1694 Vecteur3 distance_contrib = {dx_contrib, dy_contrib, dz_contrib};
1707 for (l_cell=dx_increment; l_cell>=0; l_cell--)
1708 for (m=dy_over_two_increment + 1; m>=0; m--)
1709 for (n_cell=dz_increment; n_cell>=0; n_cell--)
1715 const double indic_neighbour = ref_ijk_ft_->get_interface().I()(
index_i_ + l_dir,
index_j_ + m_dir_elem,
index_k_ + n_dir);
1716 if (indic_neighbour > LIQUID_INDICATOR_TEST)
1719 const double lmn_zero = (m > 0) ? 1. : 0.;
1721 lmn_zero * (2 * (m_dir - 1) + 1) - (1. - lmn_zero);
1722 const double dx_contrib = l_dir * dx;
1723 const double dy_contrib = contrib_factor * dy_over_two;
1724 const double dz_contrib = n_dir * dz;
1725 Vecteur3 distance_contrib = {dx_contrib, dy_contrib, dz_contrib};
1738 for (l_cell=dx_increment; l_cell>=0; l_cell--)
1739 for (m_cell=dy_increment; m_cell>=0; m_cell--)
1740 for (n=dz_over_two_increment + 1; n>=0; n--)
1746 const double indic_neighbour = ref_ijk_ft_->get_interface().I()(
index_i_ + l_dir,
index_j_ + m_dir,
index_k_ + n_dir_elem);
1747 if (indic_neighbour > LIQUID_INDICATOR_TEST)
1750 const double lmn_zero = (n > 0) ? 1. : 0.;
1752 lmn_zero * (2 * (n_dir - 1) + 1) - (1. - lmn_zero);
1753 const double dx_contrib = l_dir * dx;
1754 const double dy_contrib = m_dir * dy;
1755 const double dz_contrib = contrib_factor * dz_over_two;
1756 Vecteur3 distance_contrib = {dx_contrib, dy_contrib, dz_contrib};
1782 const double& dy_contrib,
1783 const double& dz_contrib,
1800 const double& dy_contrib,
1801 const double& dz_contrib)
1807 relative_vector += tangential_relative_vector;
1808 Vecteur3 dxyz_contrib = {dx_contrib, dy_contrib, dz_contrib};
1809 relative_vector += dxyz_contrib;
1810 return relative_vector;
1816 const double relative_vector_norm = relative_vector.
length();
1817 relative_vector *= (1 / relative_vector_norm);
1819 return abs(colinearity);
1823 const double& dy_contrib,
1824 const double& dz_contrib,
1828 const double relative_vector_norm = relative_vector.
length();
1829 relative_vector *= (1 / relative_vector_norm);
1830 return abs(relative_vector[dir]);
1834 const double& dy_contrib,
1835 const double& dz_contrib)
1839 return abs(1 / (distance + 1e-16));
1844 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
1849 int dxyz_increment_max;
1852 const int dx_increment_max = (int) ((dx +
probe_length_) / dx);
1853 const int dy_increment_max = (int) ((dy +
probe_length_) / dy);
1854 const int dz_increment_max = (int) ((dz +
probe_length_) / dz);
1855 dxyz_increment_max = std::max(std::max(dx_increment_max, dy_increment_max), dz_increment_max);
1861 return dxyz_increment_max;
1866 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
1871 int dxyz_over_two_increment_max;
1874 const int dx_increment_max = (int) ((
probe_length_ + dx) / (dx / 2.));
1875 const int dy_increment_max = (int) ((
probe_length_ + dy) / (dy / 2.));
1876 const int dz_increment_max = (int) ((
probe_length_ + dz) / (dz / 2.));
1877 dxyz_over_two_increment_max = std::max(std::max(dx_increment_max, dy_increment_max), dz_increment_max);
1883 return dxyz_over_two_increment_max;
1908 probe_length_ = (*coeff_distance_diagonal_) * (*cell_diagonal_);
1917 Cerr <<
"Compute distance cell neighbours" << finl;
1921 Cerr <<
"Compute distance faces neighbours" << finl;
1938 double x_velocity_cell, y_velocity_cell, z_velocity_cell;
1947 DoubleVect field_interp(1);
1949 ijk_interpolate_skip_unknown_points(eulerian_field, coordinates_point, field_interp, INVALID_INTERP);
1950 field_value = field_interp(0);
1955 DoubleTab coordinates_point;
1956 coordinates_point.
resize(1,3);
1957 for (
int c=0; c<3; c++)
1958 coordinates_point(0,c) = compo_xyz[c];
1959 return coordinates_point;
1969 DoubleVect * vel_compo =
nullptr;
1970 for (
int dir = 0; dir < 3; dir++)
2001 for(
int i=0; i<(*points_per_thermal_subproblem_); i++)
2021 max_u_ = INVALID_VELOCITY_CFL * 0.9;
2089 for (
int l=0; l<6; l++)
2101 velocity_corrected = velocity;
2102 for (
int i=0; i<velocity_corrected.
size(); i++)
2103 velocity_corrected[i] -= velocity[0];
2108 DoubleVect bubble_rising_velocity_projection(1);
2109 DoubleVect bubble_rising_velocity_compo_x(1);
2110 DoubleVect bubble_rising_velocity_compo_y(1);
2111 DoubleVect bubble_rising_velocity_compo_z(1);
2116 basis, bubble_rising_velocity_projection);
2117 velocity_corrected = velocity;
2118 for (
int i=0; i<velocity_corrected.
size(); i++)
2119 velocity_corrected[i] -= bubble_rising_velocity_projection[0];
2128 const DoubleVect& compo_y,
2129 const DoubleVect& compo_z,
2131 DoubleVect& projection)
2133 const int size_x = compo_x.
size();
2134 for (
int i=0; i<size_x; i++)
2135 projection[i] = compo_x[i] * basis[0] + compo_y[i] * basis[1] + compo_z[i] * basis[2];
2139 const DoubleVect& compo_u,
2140 const DoubleVect& compo_v,
2141 const DoubleVect& compo_w,
2145 DoubleVect& projection)
2147 const int size_u = compo_u.
size();
2148 const int size_v = compo_v.
size();
2149 const int size_w = compo_w.
size();
2150 for (
int i=0; i<projection.
size(); i++)
2153 projection[i] += (compo_u[i] * basis_u[dir]);
2155 projection[i] += (compo_v[i] * basis_v[dir]);
2157 projection[i] += (compo_w[i] * basis_w[dir]);
2163 double integrated_quantity_tmp = 0.;
2164 for (
int i=0; i<quantity.
size()-1; i++)
2166 integrated_quantity_tmp += 0.5*(quantity[i] + quantity[i+1]) *
dr_;
2168 integrated_quantity = integrated_quantity_tmp;
2188 if (ref_ijk_ft_->schema_temps_ijk().get_tstep() == 0)
2192 for (
int i=0; i<(*points_per_thermal_subproblem_); i++)
2200 if (count_index_ijk)
2207 int counter_mixed_neighbours = 0;
2211 double averaging_weight = 0.;
2212 DoubleVect temperature_previous, temperature_previous_options;
2215 for (
int l=0; l<6; l++)
2217 const int ii = NEIGHBOURS_I[l];
2218 const int jj = NEIGHBOURS_J[l];
2219 const int kk = NEIGHBOURS_K[l];
2220 int index_i_neighbour_prev =
index_i_ + NEIGHBOURS_I[l];
2221 int index_j_neighbour_prev =
index_j_ + NEIGHBOURS_J[l];
2222 int index_k_neighbour_prev =
index_k_ + NEIGHBOURS_K[l];
2224 if (count_index_ijk_neighbour)
2226 const int previous_rank = (*subproblem_to_ijk_indices_previous_).at(index_i_neighbour_prev).at(index_j_neighbour_prev).at(index_k_neighbour_prev);
2227 const double indicator_prev = (*indicator_probes_previous_)[previous_rank];
2228 const double indicator_prev_vapour = 1 - indicator_prev;
2229 double best_indicator_prev = 0;
2230 best_indicator_prev = (
indicator_ > 0.5) ? indicator_prev_vapour : indicator_prev;
2231 double velocity = 0.;
2232 Vecteur3 velocities_xyz = (*velocities_probes_previous_)[previous_rank];
2233 Vecteur3 normal_vector_compo_previous = (*normal_vector_compo_probes_previous_)[previous_rank];
2238 velocity = velocities_xyz[0];
2243 velocity = velocities_xyz[1];
2248 velocity = velocities_xyz[2];
2251 const double velocity_eval = abs(velocity) > 1e-10 ? abs(velocity) : 1.;
2255 best_indicator_prev,
2258 temperature_previous,
2259 temperature_previous_options,
2261 counter_mixed_neighbours++;
2265 if (counter_mixed_neighbours)
2267 if (averaging_weight < 1e-12)
2270 Cerr <<
"temperature_previous_mixed_neighbour: " << counter_mixed_neighbours << finl;
2277 Cerr <<
"temperature_previous_averaging_weight: " << averaging_weight << finl;
2290 const int& previous_rank,
2291 const double& best_indicator_prev,
2292 const double& colinearity,
2293 const double& velocity_eval,
2294 DoubleVect& temperature_previous,
2295 DoubleVect& temperature_previous_options,
2296 double& averaging_weight)
2298 DoubleVect temperature_previous_tmp = (*temperature_probes_previous_)[previous_rank];
2299 temperature_previous += temperature_previous_tmp;
2302 temperature_previous_tmp *= colinearity;
2303 temperature_previous_options += temperature_previous_tmp;
2306 averaging_weight += colinearity;
2314 const int count_index_i = (int) subproblem_to_ijk_indices.count(index_i);
2315 int count_index_j = 0;
2316 int count_index_k = 0;
2319 count_index_j = (int) subproblem_to_ijk_indices.at(index_i).count(index_j);
2321 count_index_k = (int) subproblem_to_ijk_indices.at(index_i).at(index_j).count(index_k);
2323 return (count_index_i && count_index_j && count_index_k);
2340 for (
int dir = 0; dir < 3; dir++)
2370 for (
int dir = 0; dir < 3; dir++)
2394 Matrice33 temperature_hessian_cartesian;
2395 Matrice33 temperature_hessian_spherical;
2396 Matrice33 temperature_hessian_spherical_from_rising;
2511 const double alpha_inv = - 1 / *
alpha_;
2513 osculating_radial_coefficient *= 2;
2528 Cerr <<
"Diffusion case : don't compute the radial convection pre-factor" << finl;
2536 const int boundary_conditions = 0;
2544 boundary_conditions,
2578 DoubleVect * thermal_subproblems_temperature_solution_ini,
2579 int& boundary_condition_interface,
2580 const double& interfacial_boundary_condition_value,
2581 const int& impose_boundary_condition_interface_from_simulation,
2582 int& boundary_condition_end,
2583 const double& end_boundary_condition_value,
2584 const int& impose_user_boundary_condition_end_value)
2598 if (!impose_boundary_condition_interface_from_simulation)
2602 switch (boundary_condition_interface)
2622 if (impose_user_boundary_condition_end_value)
2626 switch (boundary_condition_end)
2646 const int thermal_subproblems_rhs_size = (*thermal_subproblems_rhs_assembly_).size();
2664 boundary_condition_end =
neumann;
2681 if (boundary_condition_interface ==
dirichlet || boundary_condition_interface ==
default_bc)
2686 double end_field_value_temporal=0.;
2688 if (impose_user_boundary_condition_end_value)
2689 end_field_value_temporal = end_boundary_condition_value;
2694 for (
int i=1; i<(*points_per_thermal_subproblem_); i++)
2701 const double& interfacial_boundary_condition_value,
2702 const int& impose_boundary_condition_interface_from_simulation,
2703 const int& boundary_condition_end,
2704 const double& end_boundary_condition_value,
2705 const int& impose_user_boundary_condition_end_value)
2707 int boundary_condition_interface_local = boundary_condition_interface;
2708 int boundary_condition_end_local = boundary_condition_end;
2712 boundary_condition_interface_local,
2713 interfacial_boundary_condition_value,
2714 impose_boundary_condition_interface_from_simulation,
2715 boundary_condition_end_local,
2716 end_boundary_condition_value,
2717 impose_user_boundary_condition_end_value);
2724 boundary_condition_interface_local,
2726 boundary_condition_end_local,
2737 add_source_terms(boundary_condition_interface_local, boundary_condition_end_local);
2826 const double alpha_inv = 1 / (*alpha_);
2836 const double alpha_inv = 1 / (*alpha_);
2856 boundary_condition_interface,
2857 boundary_condition_end);
2869 boundary_condition_interface,
2870 boundary_condition_end);
2876 boundary_condition_interface,
2877 boundary_condition_end);
2893 const double alpha_liq = *
alpha_;
2956 const Vecteur3& first_tangential_vector_compo,
2957 const Vecteur3& second_tangential_vector_compo,
2958 const DoubleVect& radial_velocity_frame,
2959 const DoubleVect& first_tangential_velocity_frame,
2960 const DoubleVect& second_tangential_velocity_frame,
2961 const DoubleVect& temperature_time_increment,
2962 DoubleVect& convective_term,
2963 DoubleVect& material_derivative)
2971 const double radial_velocity = radial_velocity_frame[i];
2972 const double first_tangential_velocity = first_tangential_velocity_frame[i];
2973 const double second_tangential_velocity = second_tangential_velocity_frame[i];
2975 Vecteur3 radial_convection_frame = normal_vector_compo;
2976 radial_convection_frame *= -radial_velocity;
2977 Vecteur3 first_tangent_convection_frame = first_tangential_vector_compo;
2978 first_tangent_convection_frame *= -first_tangential_velocity;
2979 Vecteur3 second_tangent_convection_frame = second_tangential_vector_compo;
2980 second_tangent_convection_frame *= -second_tangential_velocity;
2981 radial_convection_frame += cartesian_velocity;
2982 first_tangent_convection_frame += cartesian_velocity;
2983 second_tangent_convection_frame += cartesian_velocity;
2987 material_derivative[i] = temperature_time_increment[i] + convective_term[i];
2993 DoubleVect tangential_convection_source_terms_tmp = tangential_convection_source_terms;
2994 for (
int i=0; i<tangential_convection_source_terms.
size(); i++)
2995 tangential_convection_source_terms[i] -= tangential_convection_source_terms_tmp[0];
3000 DoubleVect tangential_diffusion_source_terms_tmp = tangential_diffusion_source_terms;
3001 for (
int i=0; i<tangential_diffusion_source_terms_tmp.
size(); i++)
3002 tangential_diffusion_source_terms[i] -= tangential_diffusion_source_terms_tmp[0];
3109 const double flux_coeff = ((*lambda_) *
surface_);
3161 DoubleVect dummy_tangential_deriv;
3201 if (interfacial_gradient_solution < interfacial_gradient_gfm)
3206 if (interfacial_gradient_solution < interfacial_gradient_interp)
3237 const double flux_coeff = ((*lambda_) *
surface_);
3273 const double alpha_inv = 1 / (*alpha_);
3296 for (
int dir = 0; dir < 3; dir++)
3375 for (
int i=0; i<(*points_per_thermal_subproblem_); i++)
3381 local_shear_stress += local_shear_stress_second;
3388 local_shear_stress += local_shear_stress_second;
3391 const double mu_liquid = ref_ijk_ft_->milieu_ijk().get_mu_liquid();
3428 const DoubleVect& field,
3429 const DoubleVect& field_weak_gradient,
3430 const IJK_Field_double& eulerian_field,
3431 const int temp_bool,
3432 const int weak_gradient_variable,
3433 const int interp_eulerian)
const
3435 double field_value = INVALID_TEMPERATURE;
3436 const DoubleVect * field_ref = &field;
3441 field_ref = &field_weak_gradient;
3446 Cerr <<
"Radial ini: " << (*radial_coordinates_)[0] << finl;
3448 Cerr <<
"Field ini: " << field[0] << finl;
3461 int left_interval = 0;
3464 const double field_interp = ((*field_ref)[right_interval] - (*field_ref)[left_interval])
3466 (dist-(*radial_coordinates_)[left_interval]) + (*field_ref)[left_interval];
3467 field_value = field_interp;
3478 field_value = interfacial_temperature_gradient_solution * dist;
3481 field_value = (interfacial_temperature_gradient_solution * dist
3482 + 0.5 * interfacial_temperature_double_derivative_solution * (dist * dist));
3485 field_value = interfacial_temperature_gradient_solution * dist;
3489 field_value = field[0];
3495 DoubleTab coordinates_point;
3496 DoubleVect field_interp(1);
3497 coordinates_point.
resize(1,3);
3501 for (
int c=0; c<3; c++)
3502 coordinates_point(0,c) = compo_xyz[c];
3503 ijk_interpolate_skip_unknown_points(eulerian_field, coordinates_point, field_interp, INVALID_INTERP);
3504 field_value = field_interp(0);
3514 double field_value = INVALID_TEMPERATURE;
3518 Cerr <<
"Distance d: " << dist << finl;
3519 Cerr <<
"Indicator I: " <<
indicator_ << finl;
3524 Cerr <<
"Radial ini: " << (*radial_coordinates_)[0] << finl;
3526 Cerr <<
"Field ini: " << field[0] << finl;
3539 int left_interval = 0;
3542 const double field_interp = (field[right_interval] - field[left_interval])
3544 (dist-(*radial_coordinates_)[left_interval]) + field[left_interval];
3545 field_value = field_interp;
3560 field_value = interfacial_temperature_gradient_solution * dist;
3563 field_value = (interfacial_temperature_gradient_solution * dist
3564 + 0.5 * interfacial_temperature_double_derivative_solution * (dist * dist));
3567 field_value = interfacial_temperature_gradient_solution * dist;
3586 field_value = field[(*points_per_thermal_subproblem_) - 1];
3589 field_value = field[(*points_per_thermal_subproblem_) - 1];
3604 const int& index_k)
const
3606 double velocity = 0;
3637 const int& sign_dir,
3640 const int& index_k)
const
3645 double velocity = 0.;
3646 const int test_index_i = index_i != INVALID_INDEX;
3647 const int test_index_j = index_j != INVALID_INDEX;
3648 const int test_index_k = index_k != INVALID_INDEX;
3649 int i = test_index_i ? index_i:
index_i_;
3650 int j = test_index_j ? index_j:
index_j_;
3651 int k = test_index_k ? index_k:
index_k_;
3657 if (!(test_index_i && test_index_j && test_index_k))
3679 velocity = (*velocity_)[dir](i,j,k);
3703 double temperature_gradient = 0;
3739 return temperature_gradient;
3749 const int& temperature)
3753 if (abs(temperature_interp) > INVALID_INTERP_TEST)
3755 temperature_interp = 0.;
3759 return temperature_interp;
3765 const double first_tangential_corr = (*first_tangential_velocity_not_corrected_)[0] - (*first_tangential_velocity_solver_)[0];
3766 const double second_tangential_corr = (*second_tangential_velocity_not_corrected_)[0] - (*second_tangential_velocity_solver_)[0];
3768 velocity_interp -= (first_tangential_corr * (*first_tangential_vector_compo_solver_)[dir]);
3769 velocity_interp -= (second_tangential_corr * (*second_tangential_vector_compo_solver_)[dir]);
3775 return temperature_interp * velocity_interp;
3780 double diffusive_flux = 0;
3782 if (abs(diffusive_flux) > INVALID_INTERP_TEST)
3784 diffusive_flux = 0.;
3787 diffusive_flux *= (*lambda_);
3788 return diffusive_flux;
3794 const DoubleVect& field,
3795 const DoubleVect& field_weak_gradient,
3796 const IJK_Field_double& eulerian_field,
3797 const int temp_bool,
3798 const int weak_gradient_variable,
3802 const int nb_values = (int) pow(4., (
double) levels);
3803 DoubleVect discrete_values(nb_values);
3807 int value_counter = 0;
3812 discrete_values(0) = value * surface * velocity;
3816 double dl1_ini = 0.;
3817 double dl2_ini = 0.;
3818 Vecteur3 point_coords_ini = {0., 0., 0.};
3820 field, field_weak_gradient, eulerian_field,
3821 temp_bool, weak_gradient_variable,
3823 point_coords_ini, discrete_values, value_counter);
3827 for (
int c=0; c<discrete_values.
size(); c++)
3830 return discrete_values;
3834 const int& dir,
const double& dist,
3836 const double& surface,
3837 const DoubleVect& field,
3838 const DoubleVect& field_weak_gradient,
3839 const IJK_Field_double& eulerian_field,
3840 const int temp_bool,
3841 const int weak_gradient_variable,
3842 const double dl1_parent,
3843 const double dl2_parent,
3845 DoubleVect& discrete_values,
3846 int& value_counter)
const
3848 if (ilevel != max_level)
3850 const double neighbours_first_dir[4] = NEIGHBOURS_FIRST_DIR;
3851 const double neighbours_second_dir[4] = NEIGHBOURS_SECOND_DIR;
3852 for(
int i=ilevel; i<max_level; i++)
3856 for(
int l=0; l<4; l++)
3858 const double first_dir = neighbours_first_dir[l];
3859 const double second_dir = neighbours_second_dir[l];
3862 Vecteur3 point_coords = {0., 0., 0.};
3866 point_coords += point_coords_parent;
3868 field, field_weak_gradient, eulerian_field,
3869 temp_bool, weak_gradient_variable,
3870 dl1, dl2, point_coords, discrete_values, value_counter);
3878 const double dist_value = dist + dist_increment;
3883 discrete_values(value_counter) = value * surface * velocity;
3899 const DoubleVect& field,
3900 const DoubleVect& field_weak_gradient,
3901 const IJK_Field_double& eulerian_field,
3902 const int temp_bool,
3903 const int weak_gradient_variable)
3906 field, field_weak_gradient,
3908 temp_bool, weak_gradient_variable, 0);
3914 const DoubleVect& field,
3915 const DoubleVect& field_weak_gradient,
3916 const IJK_Field_double& eulerian_field,
3920 field, field_weak_gradient, eulerian_field,
3943 DoubleVect temperature_gradient;
3967 return temperature_gradient;
3973 diffusive_flux *= (*lambda_);
3974 return diffusive_flux;
3979 int mid_interval = left_interval + (right_interval - left_interval) / 2;
3980 while ((right_interval - left_interval) != 1)
3983 left_interval = mid_interval;
3985 right_interval = mid_interval;
3986 mid_interval = left_interval + (right_interval - left_interval) / 2;
3991 const double& first_dir,
const double& second_dir,
3992 double& dl1,
double& dl2,
3995 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
4004 point_coords[1] = dl1 * first_dir;
4005 point_coords[2] = dl2 * second_dir;
4010 point_coords[0] = dl1 * first_dir;
4011 point_coords[2] = dl2 * second_dir;
4016 point_coords[0] = dl1 * first_dir;
4017 point_coords[1] = dl2 * second_dir;
4022 point_coords[0] = dl1 * first_dir;
4023 point_coords[1] = dl2 * second_dir;
4026 dl1 /= pow(2., (
double) levels + 1.);
4027 dl2 /= pow(2., (
double) levels + 1.);
4030 point_coords *= (1 / pow(2., (
double) levels + 1.));
4035 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
4039 double surface = 0.;
4055 surface /= pow(pow(2., (
double) level), 2.);
4066 double max_distance = distance;
4070 double integral_eval = 0.;
4072 for (
int i=0; i<(*points_per_thermal_subproblem_) - 1; i++)
4076 discrete_int_eval(i) *= (radial_incr / 2.);
4077 integral_eval += discrete_int_eval(i);
4079 integral_eval *= (1 / (radial_incr + 1e-20));
4080 return integral_eval;
4089 const double atan_theta_incr_ini = M_PI / 2;
4090 const double atan_incr_factor = -1;
4091 const double theta = (
theta_sph_ * atan_incr_factor) + atan_theta_incr_ini;
4093 radius_squared *= radius_squared;
4094 radius_squared *= (double) std::sin(theta);
4105 const Nom& local_quantities_thermal_probes_time_index_folder)
4119 std::vector<std::string> key_results_int,
4120 std::vector<std::string> key_results_double,
4121 std::map<std::string, ArrOfInt>& results_probes_int,
4122 std::map<std::string, ArrOfDouble>& results_probes_double)
4125 key_results_int, key_results_double,
4126 results_probes_int, results_probes_double,
4132 std::vector<std::string> key_results_int,
4133 std::vector<std::string> key_results_double,
4134 std::map<std::string, ArrOfInt>& results_probes_int,
4135 std::map<std::string, ArrOfDouble>& results_probes_double,
4138 const double last_time = ref_ijk_ft_->schema_temps_ijk().get_current_time() - ref_ijk_ft_->schema_temps_ijk().get_timestep();
4139 const int last_time_index = ref_ijk_ft_->schema_temps_ijk().get_tstep() + (*latastep_reprise_);
4140 std::vector<int> results_int =
4145 std::vector<double> results_double =
4148 (*radial_coordinates_)[coord],
4174 (*
lambda_), (*alpha_), (*prandtl_number_),
4207 assert(key_results_int.size() == results_int.size());
4208 int size_int = (int) key_results_int.size();
4209 for (i=0; i<size_int; i++)
4210 results_probes_int[key_results_int[i]](itr) = results_int[i];
4211 assert(key_results_double.size() == results_double.size());
4212 int size_double = (int) key_results_double.size();
4213 for (i=0; i<size_double; i++)
4214 results_probes_double[key_results_double[i]](itr) = results_double[i];
4225 const double last_time = ref_ijk_ft_->schema_temps_ijk().get_current_time() - ref_ijk_ft_->schema_temps_ijk().get_timestep();
4226 const int last_time_index = ref_ijk_ft_->schema_temps_ijk().get_tstep() + (*latastep_reprise_);
4227 fic << last_time_index <<
" ";
4229 fic << last_time <<
" ";
4230 fic << (*radial_coordinates_)[coord] <<
" ";
4279 fic << (*delta_temperature_) <<
" " << (*mean_liquid_temperature_) <<
" ";
4280 fic << (*bubbles_rising_vectors_per_bubble_)(
compo_connex_, 0) <<
" ";
4281 fic << (*bubbles_rising_vectors_per_bubble_)(
compo_connex_, 1) <<
" ";
4282 fic << (*bubbles_rising_vectors_per_bubble_)(
compo_connex_, 2) <<
" ";
4298 const int reset = 1;
4299 const int max_digit = 8;
4300 const int last_time_index = (*latastep_reprise_) + ref_ijk_ft_->schema_temps_ijk().get_tstep();
4303 const int nb_digit_tstep = last_time_index < 1 ? 1 : (int) (log10(last_time_index) + 1);
4304 const int max_digit_rank = 3;
4305 const int nb_digit_rank = rank < 1 ? 1 : (int) (log10(rank) + 1);
4306 Nom probe_name =
Nom(
"_thermal_rank_") +
Nom(std::string(max_digit_rank - nb_digit_rank,
'0')) +
Nom(rank) +
Nom(
"_thermal_subproblem_") +
Nom(std::string(max_digit - nb_digit_index_post_pro,
'0'))
4309 +
Nom(
"_radial_quantities_time_index_") +
4310 +
Nom(std::string(max_digit - nb_digit_tstep,
'0')) +
Nom(last_time_index) +
Nom(
".out");
4311 Nom probe_header =
Nom(
"tstep\tthermal_rank\tpost_pro_index\tglobal_subproblem\tlocal_subproblem\ttime"
4317 "\tr_sph\ttheta_sph\tphi_sph"
4319 "\ttemperature_interp\ttemperature_sol\ttemperature_prev"
4320 "\ttemperature_gradient\ttemperature_gradient_sol"
4321 "\ttemperature_double_deriv\ttemperature_double_deriv_sol"
4322 "\ttemperature_gradient_tangential\ttemperature_gradient_tangential2"
4323 "\ttemperature_gradient_tangential_rise\ttemperature_gradient_azymuthal"
4324 "\ttemperature_diffusion_hessian_cartesian_trace"
4325 "\ttemperature_diffusion_hessian_trace"
4326 "\tradial_temperature_diffusion"
4327 "\tradial_temperature_diffusion_sol"
4328 "\ttangential_temperature_diffusion"
4329 "\tradial_scale_factor_interp\tradial_scale_factor_sol"
4330 "\tradial_convection_interp\tradial_convection_sol"
4331 "\ttangential_convection_first\ttangential_convection_second"
4332 "\tsurface\tthermal_flux"
4333 "\tlambda_liq\talpha_liq\tprandtl_liq"
4334 "\tnusselt_number\tnusselt_number_liquid_temperature"
4335 "\tnusselt_number_integrand\tnusselt_number_liquid_temperature_integrand"
4339 "\tu_r\tu_r_corr\tu_r_static\tu_r_advected"
4340 "\tu_theta\tu_theta_corr\tu_theta_static\tu_theta_advected"
4341 "\tu_theta2\tu_theta2_corr\tu_theta2_static\tu_theta2_advected"
4342 "\tu_theta_rise\tu_theta_rise_corr\tu_theta_rise_static\tu_theta_rise_advected"
4343 "\tu_phi\tu_phi_corr\tu_phi_static\tu_phi_advected"
4344 "\tdu_r_dr\tdu_theta_dr\tdu_theta2_dr\tdu_theta_rise_dr\tdu_phi_dr"
4345 "\ttotal_surface\ttotal_volume\tradius_from_surface\tradius_from_volume"
4346 "\tdelta_temperature\tmean_liquid_temperature"
4347 "\trising_dir_x\trising_dir_y\trising_dir_z"
4348 "\trising_vel_x\trising_vel_y\trising_vel_z"
4350 SFichier fic = Open_file_folder(local_quantities_thermal_probes_time_index_folder, probe_name, probe_header, reset);
4351 const double last_time = ref_ijk_ft_->schema_temps_ijk().get_current_time() - ref_ijk_ft_->schema_temps_ijk().get_timestep();
4352 for (
int i=0; i<(*points_per_thermal_subproblem_); i++)
4354 fic << last_time_index <<
" ";
4356 fic << last_time <<
" ";
4363 fic << (*radial_coordinates_)[i] <<
" ";
4405 fic << (*delta_temperature_) <<
" " << (*mean_liquid_temperature_) <<
" ";
4406 fic << (*bubbles_rising_vectors_per_bubble_)(
compo_connex_, 0) <<
" ";
4407 fic << (*bubbles_rising_vectors_per_bubble_)(
compo_connex_, 1) <<
" ";
4408 fic << (*bubbles_rising_vectors_per_bubble_)(
compo_connex_, 2) <<
" ";
4422 double min_temperature_value=1e20;
4425 return min_temperature_value;
4430 double max_temperature_value=-1e20;
4433 return max_temperature_value;
4439 return min_temperature_value;
4445 return max_temperature_value;
4452 const Domaine_IJK& geom = ref_ijk_ft_->get_domaine();
4453 const int face_dir[6] = FACES_DIR;
4454 const int flux_out[6] = FLUXES_OUT;
4455 const double rho_cp = ref_ijk_ft_->milieu_ijk().get_rho_liquid() * (*cp_liquid_);
4457 for (
int l=0; l<6; l++)
4459 convective_term_frame_of_ref *= (-1) * rho_cp;
4461 for (
int l=0; l<6; l++)
4466 for (
int c = 0; c < 3; c++)
4469 double flux_val = convective_term_frame_of_ref[face_dir[l]] * flux_out[l] * surf_face;
4471 flux_val *= sign_temp;
4473 if (sign_temp * flux_val >= 0)
4493 const double rho_cp = ref_ijk_ft_->milieu_ijk().get_rho_liquid() * (*cp_liquid_);
4494 const double rho_cp_flux = rho_cp * flux_face * sign_temp;
4497 if (rho_cp_flux >= 0)
4504 const double flux_face_sign = sign_temp * flux_face;
4507 if (flux_face_sign >= 0)
4518 double total_flux_error = 0.;
4523 double weight_tot = 0.;
4524 const int face_dir[6] = FACES_DIR;
4525 const int flux_out[6] = FLUXES_OUT;
4528 int counter_assert = 0;
4530 std::vector<int> mixed_neighbours;
4531 for (
int l=0; l<6; l++)
4535 if (signbit(flux_out[l]) == signbit(normal_compo))
4537 const int ii = NEIGHBOURS_I[l];
4538 const int jj = NEIGHBOURS_J[l];
4539 const int kk = NEIGHBOURS_K[l];
4541 if (!isolated_mixed_neighbours)
4544 weight_tot += abs(weight);
4545 mixed_neighbours.push_back(l);
4551 Cerr <<
"The neighbour is isolated" << finl;
4556 for (
int l=0; l<6; l++)
4560 if (signbit(flux_out[l]) == signbit(normal_compo))
4564 weight_tot += abs(weight);
4570 Cerr <<
"counter_assert: " << counter_assert << finl;
4571 assert(counter_assert <= 3);
4575 for (
int m=0; m<(int) mixed_neighbours.size(); m++)
4577 const int mixed_neighbour = mixed_neighbours[m];
4586 Cerr <<
"Some fluxes contributions are not relocated !" << finl;
4589 for (
int l=0; l<6; l++)
4599 const int face_dir[6] = FACES_DIR;
4600 const int dir = face_dir[l];
4601 if (weight_type == 0)
4605 const int flux_out[6] = FLUXES_OUT;
4606 const double kinematic_viscosity = ref_ijk_ft_->milieu_ijk().get_mu_liquid() / ref_ijk_ft_->milieu_ijk().get_rho_liquid();
4607 const double velocity = (*first_tangential_velocity_solver_)[0] * (*first_tangential_vector_compo_solver_)[dir]
4608 + (*second_tangential_velocity_solver_)[0] * (*second_tangential_vector_compo_solver_)[dir];
4609 Vecteur3 first_vel = (*first_tangential_vector_compo_solver_);
4610 first_vel *= (*first_tangential_velocity_solver_)[0];
4611 Vecteur3 second_vel = (*second_tangential_vector_compo_solver_);
4612 second_vel *= (*second_tangential_velocity_solver_)[0];
4614 vel_vect += second_vel;
4615 const double vel_vect_norm = vel_vect.
length();
4616 if (vel_vect_norm > 1e-12)
4617 vel_vect *= (1 / vel_vect_norm);
4618 const int vel_sign = signbit(velocity);
4619 const int vel_effect = (vel_sign == signbit(flux_out[l])) ? 1. : 0.;
4620 if (weight_type == 1)
4621 weight = kinematic_viscosity * vel_effect * vel_vect[dir];
4623 weight = (*alpha_) *
normal_vector_compo_[dir] + kinematic_viscosity * vel_effect * vel_vect[dir];
4629 const int flux_out[6] = FLUXES_OUT;
4632 double weight_tot = 0.;
4633 for (
int l=0; l<3; l++)
4635 const int face_dir[6] = FACES_DIR;
4636 std::vector<double> thermal_flux_neighbour;
4637 for (
int l=0; l<6; l++)
4647 thermal_flux_neighbour.push_back(-
thermal_flux_dir_[face_dir[l]] * flux_out[l]);
4648 radial_flux_error.push_back(radial_flux_contrib);
4651 for (
int l=0; l<(int) radial_flux_error.size(); l++)
4653 radial_flux_error[l] /= weight_tot;
4654 radial_flux_error[l] += thermal_flux_neighbour[l];
4664 ArrOfDouble& thermal_flux_out,
4665 IJK_Field_vector3_double& interfacial_heat_flux_current)
4670 const int ni = ref_ijk_ft_->get_interface().I().ni();
4671 const int nj = ref_ijk_ft_->get_interface().I().nj();
4672 const int nk = ref_ijk_ft_->get_interface().I().nk();
4674 const Domaine_IJK& geometry = ref_ijk_ft_->get_interface().I().get_domaine();
4683 const int face_dir[6] = FACES_DIR;
4686 int index_i_neighbour_global, index_j_neighbour_global, index_k_neighbour_global;
4687 int index_i_procs, index_j_procs, index_k_procs;
4688 for (
int l=0; l<6; l++)
4692 if (abs(flux_corr) > 1e-16)
4694 const int ii = NEIGHBOURS_I[l];
4695 const int jj = NEIGHBOURS_J[l];
4696 const int kk = NEIGHBOURS_K[l];
4700 index_i_neighbour_global = compute_periodic_index((i + offset_i), ni_tot);
4701 index_j_neighbour_global = compute_periodic_index((j + offset_j), nj_tot);
4702 index_k_neighbour_global = compute_periodic_index((k + offset_k), nk_tot);
4703 index_i_procs = compute_periodic_index(i, ni);
4704 index_j_procs = compute_periodic_index(j, nj);
4705 index_k_procs = compute_periodic_index(k, nk);
4706 if (index_i_procs == i
4707 && index_j_procs == j
4708 && index_k_procs == k)
4710 interfacial_heat_flux_dispatched[face_dir[l]](i,j,k) += flux_corr;
4714 ijk_indices_out[0].append_array(index_i_neighbour_global);
4715 ijk_indices_out[1].append_array(index_j_neighbour_global);
4716 ijk_indices_out[2].append_array(index_k_neighbour_global);
4717 ijk_indices_out[3].append_array(face_dir[l]);
4731 const int ni = ref_ijk_ft_->get_interface().I().ni();
4732 const int nj = ref_ijk_ft_->get_interface().I().nj();
4733 const int nk = ref_ijk_ft_->get_interface().I().nk();
4735 bool is_all_mix =
true;
4736 double weight_tot = 0.;
4737 for (
int l=0; l<3; l++)
4739 const int face_dir[6] = FACES_DIR;
4740 const int flux_out[6] = FLUXES_OUT;
4741 std::vector<int> mixed_neighbours;
4742 for (
int l=0; l<6; l++)
4749 mixed_neighbours.push_back(l);
4754 for (
int l=0; l<(int) mixed_neighbours.size(); l++)
4755 for (
int m=0; m<(int) mixed_neighbours.size(); m++)
4758 const int mixed_neighbour = mixed_neighbours[l];
4759 const int neighbour_dir = mixed_neighbours[m];
4760 const int ii = NEIGHBOURS_I[mixed_neighbour];
4761 const int jj = NEIGHBOURS_J[mixed_neighbour];
4762 const int kk = NEIGHBOURS_K[mixed_neighbour];
4767 const double heat_flux_dispatch =
thermal_flux_total_ * weight / (weight_tot * weight_tot);
4768 if ((i==ni || i==-1) || (j==nj || j==-1) || (k==nk || k==-1))
4770 ijk_indices_out[0].append_array(i);
4771 ijk_indices_out[1].append_array(j);
4772 ijk_indices_out[2].append_array(k);
4773 thermal_flux_out[face_dir[neighbour_dir]].append_array(heat_flux_dispatch);
4774 for (
int n=0; n<(int) mixed_neighbours.size(); n++)
4777 const int neighbour_dir_tmp = mixed_neighbours[n];
4778 thermal_flux_out[face_dir[neighbour_dir_tmp]].append_array(0.);
4782 interfacial_heat_flux_dispatched[face_dir[neighbour_dir]](i, j, k) += heat_flux_dispatch;
4787 IJK_Field_vector3_double& interfacial_heat_flux_current)
4790 if (!isolated_mixed_cell)
4793 const int flux_out[6] = FLUXES_OUT;
4796 for (
int c=0; c<3; c++)
4799 const int face_dir[6] = FACES_DIR;
4800 double weight_dir_tot;
4802 std::vector<int> pure_faces;
4803 std::vector<double> weight_dir;
4804 for (
int c=0; c<3; c++)
4806 weight_dir_tot = 0.;
4809 for (
int l=0; l<6; l++)
4813 if (signbit(flux_out[l]) == signbit(normal_compo))
4817 weight = abs(weight);
4818 pure_faces.push_back(l);
4819 weight_dir.push_back(weight);
4820 weight_dir_tot += weight;
4823 if (weight_dir.size() == 0)
4824 for (
int l=0; l<6; l++)
4828 if (signbit(flux_out[l]) == signbit(normal_compo))
4832 weight = abs(weight);
4833 pure_faces.push_back(l);
4834 weight_dir.push_back(weight);
4835 weight_dir_tot += weight;
4838 if (weight_dir.size() == 0)
4840 for (
int l=0; l<6; l++)
4842 Cerr <<
"Neighbour face index l: " << l << finl;
4845 Cerr <<
"Flux value:" << flux_error[c] << finl;
4847 assert(weight_dir.size() != 0);
4848 for (
int m=0; m<(int) pure_faces.size(); m++)
4850 const int pure_face = pure_faces[m];
4852 * (weight_dir[m] / weight_dir_tot));
4855 for (
int l=0; l<6; l++)
4862 for (
int c=0; c<3; c++)
4870 for (
int l=0; l<6; l++)
4872 const int ii = NEIGHBOURS_I[l];
4873 const int jj = NEIGHBOURS_J[l];
4874 const int kk = NEIGHBOURS_K[l];
4876 if (fabs(indic_neighbour) > LIQUID_INDICATOR_TEST)
4884 if (fabs(indic_neighbour) < VAPOUR_INDICATOR_TEST)
4896 int liquid_faces = 0;
4897 for (
int l=0; l<6; l++)
4905 const int flux_type,
4923 sum_convective_diffusive_flux_op_value = 0.;
4924 sum_convective_diffusive_flux_op_value_vap = 0.;
4925 sum_convective_diffusive_flux_op_value_mixed = 0.;
4926 sum_convective_diffusive_flux_op_value_normal_contrib = 0.;
4927 sum_convective_diffusive_flux_op_value_leaving = 0.;
4928 sum_convective_diffusive_flux_op_value_entering = 0.;
4933 const int flux_out[6] = FLUXES_OUT;
4934 const int face_dir[6] = FACES_DIR;
4935 for (
int l=0; l<6; l++)
4937 convective_diffusive_flux_op_value[l] = 0.;
4938 convective_diffusive_flux_op_value_vap[l] = 0.;
4939 convective_diffusive_flux_op_value_mixed[l] = 0.;
4940 convective_diffusive_flux_op_value_normal_contrib[l] = 0.;
4941 convective_diffusive_flux_op_value_leaving[l] = 0.;
4942 convective_diffusive_flux_op_value_entering[l] = 0.;
4944 const int ii_f = NEIGHBOURS_FACES_I[l];
4945 const int jj_f = NEIGHBOURS_FACES_J[l];
4946 const int kk_f = NEIGHBOURS_FACES_K[l];
4948 double flux_val = convective_diffusive_fluxes_raw[face_dir[l]](
index_i_ + ii_f,
4952 flux_val = -flux_val;
4953 flux_val *= flux_out[l];
4962 flux_val *= sign_temp;
4982 convective_diffusive_flux_op_value[l] = flux_val;
4983 sum_convective_diffusive_flux_op_value += flux_val;
4987 convective_diffusive_flux_op_value_leaving[l] = flux_val;
4988 sum_convective_diffusive_flux_op_value_leaving += flux_val;
4995 convective_diffusive_flux_op_value_entering[l] = flux_val;
4996 sum_convective_diffusive_flux_op_value_entering += flux_val;
4999 convective_diffusive_flux_op_value_normal_contrib[l] = flux_val *
normal_vector_compo_[face_dir[l]] * flux_out[l];
5000 sum_convective_diffusive_flux_op_value_normal_contrib += flux_val *
normal_vector_compo_[face_dir[l]] * flux_out[l];
5004 convective_diffusive_flux_op_value_normal_contrib[l] = flux_val *
normal_vector_compo_[face_dir[l]] * flux_out[l];
5005 sum_convective_diffusive_flux_op_value_normal_contrib += flux_val *
normal_vector_compo_[face_dir[l]] * flux_out[l];
5009 convective_diffusive_flux_op_value_mixed[l] = flux_val;
5010 sum_convective_diffusive_flux_op_value_mixed += flux_val;
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
int get_offset_local(int direction) const
Returns the local offset in requested direction.
double get_constant_delta(int direction) const
Returns the size of cells in a direction.
int get_nb_elem_tot(int direction) const
Returns the total (global) number of mesh cells in requested direction.
Class defining operators and methods for all reading operation in an input flow (file,...
void compute_projection_matrix_cartesian_to_local_spherical()
double sum_convective_flux_op_leaving_lrs_
int first_time_step_explicit_
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)
int increased_point_numbers_
void compute_temperature_integral_subproblem_probe()
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)
DoubleVect convective_term_static_frame_rising_
double get_interfacial_double_derivative_corrected() const
int neighbours_corrected_rank_
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)
void complete_tangential_source_terms_for_post_processings()
double get_max_temperature_domain_ends() const
void compute_energy_from_temperature_interp()
double sum_convective_flux_op_value_vap_
double energy_increment_times_dt
double compute_min_distance_pure_face_centre()
FixedVector< DoubleVect, 3 > hess_diag_T_elem_interp_
double cell_centre_distance_corrected_
double get_discrete_surface_at_level(const int &dir, const int &level) const
void interpolate_temperature_gradient_on_probe()
IJK_Finite_Difference_One_Dimensional_Matrix_Assembler * finite_difference_assembler_
DoubleVect temperature_time_increment_
const IJK_Field_double * temperature_
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
const Matrice * radial_first_order_operator_
Matrice33 projection_matrix_
Vecteur3 facet_barycentre_
double sum_convective_flux_op_value_normal_contrib_
DoubleVect osculating_radial_coordinates_
void locate_pure_mixed_neighbours_without_pure_liquid_faces()
std::vector< std::vector< std::vector< std::vector< double > > > > pure_neighbours_last_faces_corrected_colinearity_
DoubleVect normal_temperature_double_derivative_solution_
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)
DoubleVect tangential_temperature_gradient_second_
void compute_local_discretisation()
FixedVector< double, 6 > face_centres_distance_
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_
int probe_variations_enabled_
double sum_convective_flux_op_value_
FixedVector< int, 3 > pure_neighbours_corrected_sign_
void retrieve_temperature_solution()
DoubleVect azymuthal_velocity_
void correct_velocities()
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)
DoubleVect material_derivative_static_frame_
const Matrice * radial_second_order_operator_
double get_temperature_gradient_profile_at_point(const double &dist, const int &dir) const
double normal_temperature_double_derivative_solution_integral_exact_
Matrice radial_first_order_operator_local_
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
DoubleVect radial_convection_prefactor_
void prepare_temporal_schemes()
DoubleVect radial_velocity_corrected_
void retrieve_variables_solution_gfm_on_probes()
int use_corrected_velocity_convection_
int dxyz_over_two_increment_bool_
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
DoubleVect first_tangential_velocity_normal_gradient_
void interpolate_temperature_on_probe()
double get_temperature_gradient_times_conductivity_profile_at_point(const double &dist, const int &dir, bool &valid_val) const
DoubleVect radial_velocity_advected_frame_
Vecteur3 first_tangential_vector_compo_
void compute_second_order_operator_local(Matrice &second_first_order_operator)
DoubleVect temperature_diffusion_hessian_trace_
Matrice * thermal_subproblems_matrix_assembly_
void initialise_radial_diffusion_operator_local()
void compute_pure_liquid_neighbours()
DoubleVect first_tangential_velocity_advected_frame_
double bubble_rising_velocity_
bool has_computed_lrs_flux_frame_of_ref_terms_
void compute_source_terms()
int probe_variations_priority_
void interpolate_velocity_at_cell_centre()
void initialise_identity_operator_local()
Vecteur3 facet_barycentre_relative_
void associer(const Probleme_FTD_IJK_base &ijk_ft)
std::vector< std::vector< std::vector< bool > > > pure_neighbours_to_correct_
DoubleVect tangential_convection_source_terms_second_
void initialise_radial_convection_operator_local()
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
int neighbours_last_faces_weighting_
DoubleVect pressure_normal_gradient_
DoubleVect second_tangential_velocity_
FixedVector< double, 6 > convective_flux_op_entering_value_
FixedVector< double, 6 > temperature_interp_conv_flux_
int debug_probe_collision_
DoubleVect tangential_diffusion_source_terms_
double get_azymuthal_velocity_normal_gradient() const
int readjust_probe_length_from_vertices_
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)
const DoubleVect * radial_coordinates_
DoubleVect temperature_x_gradient_solution_
void correct_velocity(const DoubleVect &velocity, DoubleVect &velocity_corrected)
double sum_diffusive_flux_op_value_normal_contrib_
const IJK_Field_vector3_double * grad_T_elem_solver_
const IJK_Field_vector3_double * velocity_
double temperature_integral_
void compute_error_flux_interface()
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)
int velocities_calculation_counter_
const std::vector< Vecteur3 > * normal_vector_compo_probes_previous_
void compute_pure_spherical_basis_vectors()
void compute_local_temperature_gradient_solution()
double compute_colinearity(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
@ spherical_diffusion_approx
@ tangential_conv_2D_tangential_diffusion_3D
@ tangential_conv_3D_tangentual_diffusion_3D
DoubleVect normal_temperature_gradient_solution_
void complete_frame_of_reference_lrs_fluxes_eval()
void compute_integral_quantity(DoubleVect &quantity, double &integrated_quantity)
const double * prandtl_number_
double get_min_temperature_domain_ends() const
DoubleVect normal_velocity_normal_gradient_
bool is_post_processed_local_
int disable_probe_weak_gradient_local_
int correct_tangential_temperature_gradient_
double local_dt_cfl_min_delta_xyz_
void compute_modified_probe_length_condition(const int probe_length_condition)
void compute_bubble_related_quantities()
FixedVector< double, 6 > convective_flux_op_value_normal_contrib_
DoubleTab coordinates_cartesian_compo_
void compute_local_shear_stress()
double sum_convective_flux_op_entering_value_
int compute_normal_derivative_on_reference_probes_
void correct_tangential_temperature_hessian(DoubleVect &tangential_diffusion_source_terms)
DoubleTab osculating_radial_coordinates_cartesian_compo_
const IJK_Field_vector3_double * grad_T_elem_smooth_
FixedVector< bool, 6 > pure_liquid_neighbours_
int distance_cell_faces_from_lrs_
FixedVector< double, 6 > diffusive_flux_op_entering_value_
const DoubleTab * bubbles_rising_vectors_per_bubble_
int short_probe_condition_
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)
void compute_velocity_magnitude()
void approximate_temperature_material_derivatives()
void compute_distance_cell_centre()
double sum_convective_flux_op_leaving_value_
DoubleVect x_velocity_corrected_
DoubleVect nusselt_number_integrand_
FixedVector< DoubleVect, 3 > hess_cross_T_elem_spherical_from_rising_
int fluxes_correction_conservations_
const IJK_Field_double * temperature_ft_
double tangential_source_terms_integral_
int disable_probe_because_collision_
double sum_diffusive_flux_op_entering_lrs_
Matrice33 inverse_projection_matrix_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)
double tangential_convection_second_integral_
DoubleVect get_temperature_profile_discrete_integral_at_point(const double &dist, const int &levels, const int &dir)
DoubleVect shear_stress_from_rising_dir_
void compute_modified_probe_length_vertex_condition()
DoubleVect radial_scale_factor_interp_
DoubleVect first_tangential_velocity_
void compute_modified_probe_length_collision()
IJK_Field_int * zero_liquid_neighbours_
int neglect_frame_of_reference_radial_advection_
Matrice identity_matrix_explicit_implicit_local_
void associate_eulerian_field_values(int compo_connex, const double &indicator)
const IJK_Field_vector3_double * velocity_ft_
void project_temperature_hessian_on_probes()
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)
DoubleVect radial_temperature_diffusion_solution_
double sum_diffusive_flux_op_entering_value_
void retrieve_previous_temperature_on_probe()
DoubleVect normal_temperature_gradient_previous_
DoubleVect tangential_temperature_gradient_first_
void associate_temporal_parameters(const double &global_time_step, const double ¤t_time)
const double * coeff_distance_diagonal_
double thermal_flux_total_
FixedVector< ArrOfInt, 6 > * first_indices_sparse_matrix_
double modified_probe_length_from_vertices_
int first_time_step_varying_probes_
void associate_thermal_subproblem_sparse_matrix(FixedVector< ArrOfInt, 6 > &first_indices_sparse_matrix)
DoubleVect azymuthal_velocity_corrected_
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)
Vecteur3 tangential_distance_vector_
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)
void initialise_thermal_probe()
double radial_displacement_over_time_step_
void compute_local_velocity_gradient()
const Matrice * radial_first_order_operator_base_
int temperature_probe_condition_
void compute_interface_basis_vectors()
void correct_radial_velocity_probe()
const Matrice * identity_matrix_explicit_implicit_
const std::vector< Vecteur3 > * velocities_probes_previous_
int correct_radial_velocity_
double delta_T_subcooled_overheated_
double local_time_step_overall_
DoubleVect convective_term_advected_frame_rising_
const IJK_Interfaces * interfaces_
FixedVector< DoubleVect, 3 > hess_cross_T_elem_interp_
int compute_radial_displacement_
void post_process_radial_quantities(const int rank, const Nom &local_quantities_thermal_probes_time_index_folder)
void interpolate_pressure_on_probes()
int disable_find_cell_centre_probe_tip_
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)
const Matrice * radial_second_order_operator_base_
void initialise_empty_variables_for_post_processing()
int fluxes_corrections_weighting_
DoubleVect * tangential_temperature_gradient_second_solver_
double energy_temperature_interp_
double get_temperature_profile_at_point(const double &dist) const
DoubleVect z_velocity_corrected_
DoubleVect temperature_ini_temporal_schemes_
DoubleVect azymuthal_velocity_advected_frame_
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)
DoubleVect y_velocity_corrected_
int pure_thermal_diffusion_
int avoid_post_processing_all_terms_
int disable_probe_weak_gradient_gfm_
DoubleVect temperature_solution_
double get_value_from_index(const int &index_val)
void compute_tangential_convection_source_terms_second()
void interpolate_project_velocities_on_probes()
void interpolate_indicator_on_probes()
int correct_temperature_cell_neighbours_
int disable_interpolation_in_mixed_cells_
double local_fourier_time_step_probe_length_
DoubleVect radial_convection_solution_
int index_post_processing_
void copy_interpolations_on_solution_variables_for_post_processing()
IJK_Field_double * probe_collision_debug_field_
void compute_second_order_operator_local_varying_probe_length(const Matrice *radial_second_order_operator)
DoubleVect first_tangential_velocity_from_rising_dir_corrected_
void compute_first_order_operator_local_varying_probe_length(const Matrice *radial_first_order_operator)
int get_dxyz_increment_max()
int correct_tangential_temperature_hessian_
double compute_cell_faces_weighting(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib, const int &dir)
DoubleVect * thermal_subproblems_rhs_assembly_
double radial_convection_solution_integral_
FixedVector< double, 6 > convective_flux_op_value_
DoubleVect radial_temperature_diffusion_
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 * cell_diagonal_
int disable_probe_weak_gradient_
DoubleVect temperature_previous_
DoubleVect * thermal_subproblems_temperature_solution_ini_
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)
DoubleVect velocity_magnitude_
Vecteur3 bubble_rising_vector_
FixedVector< double, 6 > convective_flux_op_value_vap_
void approximate_partial_temperature_time_increment()
int neighbours_last_faces_colinearity_face_weighting_
const Matrice * identity_matrix_explicit_implicit_base_
void compute_distance_faces_centres()
int use_velocity_cartesian_grid_
Vecteur3 bubble_barycentre_
const ArrOfDouble * bubbles_surface_
void reinit_variable(DoubleVect &vect)
int reconstruct_previous_probe_field_
FixedVector< double, 6 > convective_flux_op_value_mixed_
void compute_tangential_convection_source_terms_first()
double velocity_shear_force_
const double * cp_liquid_
void compute_tangential_diffusion_source_terms()
double get_min_temperature() const
int find_cell_neighbours_for_fluxes_spherical_correction_
FixedVector< double, 6 > face_centres_distance_corrected_
DoubleVect tangential_temperature_diffusion_
double modified_probe_length_from_collision_
DoubleVect * second_tangential_velocity_solver_
double cell_centre_distance_
int implicit_solver_from_previous_probe_field_
void compute_integral_quantities_solution()
DoubleVect * first_tangential_velocity_solver_
void compute_radial_convection_scale_factor_solution()
void associate_tweaked_parameters(const int &disable_probe_weak_gradient, const int &disable_probe_weak_gradient_gfm)
const int * points_per_thermal_subproblem_base_
DoubleVect * second_tangential_velocity_not_corrected_
Matrice radial_second_order_operator_local_
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)
bool has_computed_cell_faces_distance_
double get_interfacial_gradient_corrected() const
int neighbours_last_faces_distance_colinearity_weighting_
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 IJK_Field_double * eulerian_interfacial_area_
double sum_convective_flux_op_lrs_
const std::map< int, std::map< int, std::map< int, int > > > * subproblem_to_ijk_indices_previous_
int neighbours_colinearity_distance_weighting_
DoubleVect azymuthal_velocity_static_frame_
int enable_resize_probe_collision_
DoubleVect get_temperature_gradient_profile_discrete_integral_at_point(const double &dist, const int &levels, const int &dir)
const ArrOfDouble * bubbles_volume_
const Matrice * radial_second_order_operator_raw_base_
FixedVector< FixedVector< double, 4 >, 6 > vertices_centres_tangential_distance_
int get_dxyz_over_two_increment_max()
void compare_flux_interface(std::vector< double > &radial_flux_error)
int resize_probe_collision_
int order_approx_temperature_ext_
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)
double radial_scale_factor_solution_integral_
double max_cfl_fourier_probe_length_
const double * delta_temperature_
const IJK_Field_vector3_double * eulerian_facets_barycentre_
const IJK_Field_double * eulerian_curvature_
FixedVector< DoubleVect, 3 > hess_cross_T_elem_spherical_
int neighbours_colinearity_weighting_
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
void compute_modified_probe_length_temporal_condition()
void compute_local_pressure_gradient()
FixedVector< double, 6 > diffusive_flux_op_leaving_value_
void reset_post_processing_theta_phi_scope()
void project_velocities_on_probes()
bool has_computed_cell_centre_distance_
DoubleVect azymuthal_velocity_normal_gradient_
int neighbours_last_faces_distance_weighting_
void compare_fluxes_thermal_subproblems(const IJK_Field_vector3_double &convective_diffusive_fluxes_raw, const int flux_type, const int inv_sign=0)
DoubleVect * tangential_temperature_gradient_first_solver_
DoubleVect thermal_flux_interp_gfm_
DoubleVect indicator_interp_
std::vector< std::vector< std::vector< double > > > pure_neighbours_corrected_colinearity_
void retrieve_temperature_diffusion_spherical_on_probes()
int neighbours_weighting_
void associate_cell_ijk(int i, int j, int k)
void compute_radial_temperature_diffusion_solution()
FixedVector< double, 6 > diffusive_flux_op_value_vap_
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_
DoubleTab radial_coordinates_cartesian_compo_
double normal_temperature_gradient_solution_integral_exact_
std::vector< std::vector< std::vector< std::vector< bool > > > > pure_neighbours_last_faces_to_correct_
double cell_centre_tangential_distance_
const int * increase_number_of_points()
int correct_neighbours_rank_
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)
Vecteur3 * first_tangential_vector_compo_solver_
Vecteur3 interfacial_tangential_velocity_compo_
Matrice * identity_matrix_subproblems_
const IJK_Field_double * pressure_
DoubleVect first_tangential_velocity_normal_gradient_from_rising_dir_
double velocity_shear_stress_
DoubleVect radial_velocity_static_frame_
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 interpolate_cartesian_velocities_on_probes()
int resize_probe_collision_index_
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 interpolate_temperature_hessian_on_probe()
Vecteur3 xyz_velocity_cell_
Vecteur3 first_tangential_vector_compo_from_rising_dir_
void compute_first_order_operator_local(Matrice &radial_first_order_operator)
void project_temperature_gradient_on_probes()
void recompute_finite_difference_matrices()
double energy_temperature_solution_
double pressure_gradient_
Vecteur3 second_tangential_vector_compo_
const IJK_Field_vector3_double * eulerian_normal_vect_
DoubleVect radial_coordinates_modified_
const std::vector< double > * indicator_probes_previous_
int compute_tangential_variables_
void retrieve_radial_quantities()
bool has_computed_liquid_neighbours_
int use_normal_gradient_for_flux_corr_
const IJK_Field_vector3_double * hess_diag_T_elem_
double normal_temperature_double_derivative_solution_numerical_integral_
const int * latastep_reprise_
const IJK_Field_vector3_double * grad_T_elem_
double compute_max_distance_pure_face_vertices()
DoubleVect tangential_convection_source_terms_first_
DoubleVect convective_term_advected_frame_
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)
double sum_diffusive_flux_op_leaving_value_
void add_interfacial_heat_flux_neighbours(IJK_Field_vector3_double &interfacial_heat_flux_dispatched)
Vecteur3 azymuthal_vector_compo_
DoubleVect * first_tangential_velocity_not_corrected_
DoubleVect temperature_y_gradient_solution_
FixedVector< double, 6 > diffusive_flux_op_lrs_
double sum_convective_flux_op_value_mixed_
FixedVector< double, 6 > corrective_flux_from_neighbours_
void approximate_temperature_increment_material_derivative()
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)
bool global_probes_characteristics_
FixedVector< double, 6 > diffusive_flux_op_value_normal_contrib_
void compute_radial_convection_diffusion_operators()
FixedVector< double, 6 > diffusive_flux_op_value_
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)
int compute_reachable_fluxes_
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_
double sum_diffusive_flux_op_value_
bool tangential_from_rising_vel_
double fourier_probe_length_
void compute_local_time_step()
DoubleVect * thermal_subproblems_temperature_solution_
DoubleVect nusselt_number_liquid_temperature_integrand_
DoubleVect first_tangential_velocity_corrected_
DoubleVect nusselt_number_
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)
double sum_diffusive_flux_op_lrs_
void interpolate_quantities_at_point(const IJK_Field_double &eulerian_field, const Vecteur3 &compo_xyz, double &field_value)
DoubleVect tangential_convection_source_terms_
bool * first_time_step_temporal_
DoubleVect material_derivative_static_frame_rising_
DoubleVect temperature_interp_
double thermal_flux_max_raw_
void compute_distance_last_cell_faces_neighbours()
FixedVector< FixedVector< double, 4 >, 6 > vertices_centres_distance_
FixedVector< DoubleVect, 3 > hess_diag_T_elem_spherical_
FixedVector< double, 6 > face_centres_tangential_distance_
int advected_frame_of_reference_
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)
DoubleVect convective_term_static_frame_
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)
double compute_max_distance_pure_face_centre()
DoubleVect first_tangential_velocity_from_rising_dir_advected_frame_
int disable_relative_velocity_energy_balance_
Vecteur3 bubble_rising_velocity_compo_
Vecteur3 interfacial_velocity_compo_
int enable_probe_collision_detection_
DoubleVect first_tangential_velocity_from_rising_dir_
double cell_centre_osculating_radius_difference_
DoubleVect radial_scale_factor_solution_
int conserve_max_interfacial_fluxes_
Matrice * radial_diffusion_matrix_base_
void compute_distance_cell_centres_neighbours()
DoubleVect second_tangential_velocity_static_frame_
double interfacial_boundary_condition_value_
int pre_initialise_thermal_subproblems_list_
double normal_temperature_gradient_solution_numerical_integral_
const ArrOfDouble * radius_from_surfaces_per_bubble_
double osculating_radius_
double tangential_diffusion_integral_
DoubleVect nusselt_number_liquid_temperature_
Vecteur3 normal_vector_compo_
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)
int neighbours_face_corrected_rank_
const double * mean_liquid_temperature_
double cell_centre_radius_difference_
void find_interval(const double &dist, int &left_interval, int &right_interval) const
DoubleVect temperature_diffusion_hessian_cartesian_trace_
Matrice * radial_convection_matrix_base_
double end_boundary_condition_value_
DoubleVect second_tangential_velocity_normal_gradient_
FixedVector< double, 6 > face_centres_radius_difference_
int neighbours_last_faces_colinearity_weighting_
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)
Vecteur3 azymuthal_vector_compo_raw_
double get_normal_velocity_normal_gradient() const
const ArrOfDouble * radius_from_volumes_per_bubble_
DoubleVect first_tangential_velocity_from_rising_dir_static_frame_
double local_cfl_time_step_probe_length_
int reference_gfm_on_probes_
double get_tangential_velocity_normal_gradient() const
DoubleVect material_derivative_advected_frame_rising_
const IJK_Field_double * eulerian_distance_
void associate_rising_velocity(double bubble_rising_velocity, ArrOfDouble bubble_rising_vector, ArrOfDouble bubble_barycentre)
DoubleVect osculating_radial_coordinates_inv_
double local_time_step_round_
double sum_diffusive_flux_op_value_mixed_
double compute_min_distance_pure_face_vertices()
FixedVector< double, 6 > corrective_flux_to_neighbours_
double sum_diffusive_flux_op_leaving_lrs_
double compute_cell_weighting(const double &dx_contrib, const double &dy_contrib, const double &dz_contrib)
DoubleVect azymuthal_temperature_gradient_
FixedVector< DoubleVect, 3 > grad_T_elem_interp_
DoubleVect second_tangential_velocity_advected_frame_
const DoubleVect * radial_coordinates_base_
Vecteur3 * second_tangential_vector_compo_solver_
void reajust_probe_length()
int neighbours_distance_weighting_
Matrice33 projection_matrix_from_rising_
int global_subproblem_index_
FixedVector< double, 6 > convective_flux_op_lrs_
double get_second_tangential_velocity_normal_gradient() const
Matrice33 inverse_projection_matrix_
int operators_reinitialisation_
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)
double sum_convective_flux_op_entering_lrs_
double sum_convective_diffusive_flux_op_lrs_
const IJK_Field_double * eulerian_grad_T_interface_ns_
const int * points_per_thermal_subproblem_
FixedVector< double, 6 > corrective_flux_current_
FixedVector< double, 3 > thermal_flux_dir_
void add_source_terms(const int &boundary_condition_interface, const int &boundary_condition_end)
FixedVector< bool, 6 > pure_vapour_neighbours_
DoubleVect second_tangential_velocity_corrected_
double thermal_flux_max_gfm_
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 sum_diffusive_flux_op_value_vap_
DoubleVect material_derivative_advected_frame_
int neighbours_last_faces_distance_colinearity_face_weighting_
DoubleVect temperature_z_gradient_solution_
DoubleVect first_tangential_velocity_static_frame_
double radial_flux_error_lrs_
void recompute_finite_difference_matrices_varying_probe_length()
DoubleVect pressure_interp_
DoubleVect tangential_temperature_gradient_first_from_rising_dir_
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)
DoubleVect radial_convection_interp_
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)
DoubleVect radial_velocity_
const Matrice * radial_first_order_operator_raw_base_
DoubleVect normal_temperature_gradient_interp_
double tangential_convection_first_integral_
double get_max_temperature() const
ArrOfDouble total_surface_per_bubble_
double delta_temperature_
std::vector< Vecteur3 > normal_vector_compo_probes_previous_
ArrOfDouble radius_from_volumes_per_bubble_
std::vector< DoubleVect > temperature_probes_previous_
std::vector< double > indicator_probes_previous_
std::map< int, std::map< int, std::map< int, int > > > subproblem_to_ijk_indices_previous_
std::vector< Vecteur3 > velocities_probes_previous_
ArrOfDouble radius_from_surfaces_per_bubble_
bool readjust_probe_length_from_vertices_
bool probe_variations_priority_
bool correct_neighbours_using_probe_length_
Matrice thermal_subproblems_matrix_assembly_
int distance_cell_faces_from_lrs_
bool disable_interpolation_in_mixed_cells_
bool reference_gfm_on_probes_
bool neglect_frame_of_reference_radial_advection_
DoubleVect radial_coordinates_
bool disable_probe_weak_gradient_
Matrice identity_matrix_subproblems_
Matrice radial_diffusion_matrix_
bool debug_probe_collision_
bool diffusive_flux_correction_
bool implicit_solver_from_previous_probe_field_
bool conserve_max_interfacial_fluxes_
bool neighbours_last_faces_colinearity_face_weighting_
bool compute_radial_displacement_
IJK_Field_double probe_collision_debug_field_
bool source_terms_correction_
FixedVector< ArrOfInt, 6 > first_indices_sparse_matrix_
bool reconstruct_previous_probe_field_
bool enable_resize_probe_collision_
bool enable_probe_collision_detection_
bool advected_frame_of_reference_
IJK_Finite_Difference_One_Dimensional_Matrix_Assembler finite_difference_assembler_
Matrice radial_first_order_operator_
bool find_reachable_fluxes_
IJK_Field_int zero_liquid_neighbours_
int points_per_thermal_subproblem_
bool use_normal_gradient_for_flux_corr_
double delta_T_subcooled_overheated_
bool compute_normal_derivatives_on_reference_probes_
DoubleVect thermal_subproblems_temperature_solution_ini_
bool fluxes_correction_conservations_
Matrice radial_convection_matrix_
int fluxes_corrections_weighting_
int neighbours_corrected_rank_
bool neighbours_colinearity_weighting_
Matrice radial_second_order_operator_
bool find_temperature_cell_neighbours_
Matrice radial_second_order_operator_raw_
bool neighbours_last_faces_distance_colinearity_face_weighting_
double mean_liquid_temperature_
bool pre_initialise_thermal_subproblems_list_
bool disable_probe_weak_gradient_gfm_
bool neighbours_distance_weighting_
bool first_time_step_explicit_
DoubleVect thermal_subproblems_temperature_solution_
Matrice identity_matrix_explicit_implicit_
bool use_velocity_cartesian_grid_
Matrice radial_first_order_operator_raw_
bool find_cell_neighbours_for_fluxes_spherical_correction_
bool neighbours_colinearity_distance_weighting_
double coeff_distance_diagonal_
bool neighbours_last_faces_distance_weighting_
bool first_time_step_varying_probes_
bool use_corrected_velocity_convection_
bool convective_flux_correction_
bool first_time_step_temporal_
bool neighbours_last_faces_colinearity_weighting_
int compute_tangential_variables_
bool neighbours_last_faces_distance_colinearity_weighting_
DoubleVect thermal_subproblems_rhs_assembly_
const IJK_Field_double * eulerian_interfacial_area_ns_
const IJK_Field_double * eulerian_curvature_ns_
IJK_Field_vector3_double grad_T_elem_smooth_
IJK_Field_double temperature_ft_
IJK_Field_vector3_double hess_diag_T_elem_
const IJK_Field_double * eulerian_distance_ns_
const IJK_Field_vector3_double * eulerian_facets_barycentre_ns_
IJK_Field_vector3_double grad_T_elem_
int latastep_reprise_ini_
IJK_Field_vector3_double hess_cross_T_elem_
const DoubleTab * rising_vectors_
IJK_Field_double temperature_before_extrapolation_
IJK_Field_double eulerian_grad_T_interface_ns_
const ArrOfDouble * bubbles_volume_
bool disable_relative_velocity_energy_balance_
std::shared_ptr< IJK_Field_double > temperature_
const IJK_Field_vector3_double * eulerian_normal_vectors_ns_
static void produit_matriciel(const Matrice33 &m1, const Matrice33 &m2, Matrice33 &res)
static double inverse(const Matrice33 &m, Matrice33 &resu, int exit_on_error=1)
calcul de l'inverse.
Classe Matrice Classe generique de la hierarchie des matrices.
class Nom Une chaine de caractere pour nommer les objets de TRUST
classe Objet_U Cette classe est la classe de base des Objets de TRUST
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Classe de base des flux de sortie.
void append_array(_TYPE_ valeur)
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
void resize(_SIZE_, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
static double produit_scalaire(const Vecteur3 &x, const Vecteur3 &y)
static void produit_vectoriel(const Vecteur3 &x, const Vecteur3 &y, Vecteur3 &resu)