16#include <IJK_Thermal_Subresolution.h>
18#include <IJK_Navier_Stokes_tools.h>
20#include <Perf_counters.h>
21#include <Probleme_FTD_IJK.h>
22#include <Corrige_flux_FT_base.h>
23#include <OpConvDiscQuickIJKScalar.h>
24#include <IJK_Ghost_Fluid_tools.h>
28IJK_Thermal_Subresolution::IJK_Thermal_Subresolution()
75 Nom front_space =
" ";
82 os << front_space <<
"# SUBRESOLUTION #" << escape;
88 os << front_space <<
"# SUBRESOLUTION FLAGS #" << escape;
92 os << front_space <<
"disable_probe_weak_gradient " << escape;
94 os << front_space <<
"disable_probe_weak_gradient_gfm " << escape;
96 os << front_space <<
"enable_probe_collision_detection " << escape;
98 os << front_space <<
"enable_resize_probe_collision " << escape;
100 os << front_space <<
"debug_probe_collision " << escape;
102 os << front_space <<
"reconstruct_previous_probe_field " << escape;
104 os << front_space <<
"implicit_solver_from_previous_probe_field " << escape;
106 os << front_space <<
"convective_flux_correction " << escape;
108 os << front_space <<
"diffusive_flux_correction " << escape;
110 os << front_space <<
"reference_gfm_on_probes " << escape;
112 os << front_space <<
"compute_normal_derivatives_on_reference_probes" << escape;
114 os << front_space <<
"disable_spherical_diffusion_start" << escape;
116 os << front_space <<
"disable_subresolution" << escape;
118 os << front_space <<
"disable_fo_flux_correction" << escape;
120 os << front_space <<
"override_vapour_mixed_values" << escape;
122 os << front_space <<
"enable_mixed_cells_increment" << escape;
124 os << front_space <<
"allow_temperature_correction_for_visu" << escape;
126 os << front_space <<
"impose_boundary_condition_interface_from_simulation" << escape;
128 os << front_space <<
"impose_user_boundary_condition_end_value" << escape;
130 os << front_space <<
"discrete_integral" << escape;
132 os << front_space <<
"advected_frame_of_reference" << escape;
134 os << front_space <<
"neglect_frame_of_reference_radial_advection" << escape;
136 os << front_space <<
"approximate_temperature_increment" << escape;
138 os << front_space <<
"first_time_step_temporal" << escape;
140 os << front_space <<
"first_time_step_implicit" << escape;
142 os << front_space <<
"local_diffusion_fourier_priority" << escape;
144 os << front_space <<
"first_time_step_varying_probes" << escape;
146 os << front_space <<
"probe_variations_priority" << escape;
148 os << front_space <<
"max_u_radial" << escape;
150 os << front_space <<
"disable_distance_cell_faces_from_lrs" << escape;
152 os << front_space <<
"pre_initialise_thermal_subproblems_list" << escape;
154 os << front_space <<
"remove_append_subproblems" << escape;
156 os << front_space <<
"use_sparse_matrix" << escape;
158 os << front_space <<
"correct_temperature_cell_neighbours_first_iter" << escape;
160 os << front_space <<
"find_temperature_cell_neighbours" << escape;
162 os << front_space <<
"correct_neighbours_using_probe_length" << escape;
164 os << front_space <<
"neighbours_colinearity_weighting" << escape;
166 os << front_space <<
"neighbours_distance_weighting" << escape;
168 os << front_space <<
"neighbours_colinearity_distance_weighting" << escape;
170 os << front_space <<
"smooth_temperature_field" << escape;
172 os << front_space <<
"readjust_probe_length_from_vertices" << escape;
174 os << front_space <<
"use_temperature_cell_neighbours" << escape;
176 os << front_space <<
"clip_temperature_values" << escape;
178 os << front_space <<
"disable_post_processing_probes_out_files" << escape;
180 os << front_space <<
"enforce_periodic_boundary_value" << escape;
182 os << front_space <<
"disable_post_processing_probes_out_files" << escape;
184 os << front_space <<
"enforce_periodic_boundary_value" << escape;
186 os << front_space <<
"store_cell_faces_corrected" << escape;
188 os << front_space <<
"find_cell_neighbours_for_fluxes_spherical_correction" << escape;
190 os << front_space <<
"use_cell_neighbours_for_fluxes_spherical_correction" << escape;
192 os << front_space <<
"find_reachable_fluxes" << escape;
194 os << front_space <<
"use_reachable_fluxes" << escape;
196 os << front_space <<
"keep_first_reachable_fluxes" << escape;
198 os << front_space <<
"post_process_all_probes" << escape;
200 os << front_space <<
"interp_eulerian" << escape;
202 os << front_space <<
"first_step_thermals_post" << escape;
204 os << front_space <<
"neighbours_last_faces_colinearity_weighting" << escape;
206 os << front_space <<
"neighbours_last_faces_colinearity_face_weighting" << escape;
208 os << front_space <<
"neighbours_last_faces_distance_weighting" << escape;
210 os << front_space <<
"neighbours_last_faces_distance_weighting" << escape;
212 os << front_space <<
"neighbours_last_faces_distance_colinearity_face_weighting" << escape;
214 os << front_space <<
"post_process_thermal_slices" << escape;
216 os << front_space <<
"disable_slice_to_nearest_plane" << escape;
218 os << front_space <<
"thermal_slices_regions" << escape;
220 os << front_space <<
"post_process_thermal_lines" << escape;
222 os << front_space <<
"use_corrected_velocity_convection" << escape;
224 os << front_space <<
"use_velocity_cartesian_grid" << escape;
226 os << front_space <<
"compute_radial_displacement" << escape;
228 os << front_space <<
"fluxes_correction_conservations" << escape;
230 os << front_space <<
"conserve_max_interfacial_fluxes" << escape;
232 os << front_space <<
"keep_max_flux_correction" << escape;
234 os << front_space <<
"use_normal_gradient_for_flux_corr" << escape;
240 os << front_space <<
"# SUBRESOLUTION PARAMS #" << escape;
255 os << front_space <<
"quadtree_levels" << end_space <<
quadtree_levels_ << escape;
256 os << front_space <<
"local_fourier" << end_space <<
local_fourier_ << escape;
257 os << front_space <<
"local_cfl" << end_space <<
local_cfl_ << escape;
263 os << front_space <<
"time_ini_user" << end_space <<
time_ini_user_ << escape;
264 os << front_space <<
"nb_theta_post_pro" << end_space <<
nb_theta_post_pro_ << escape;
265 os << front_space <<
"nb_phi_post_pro" << end_space <<
nb_phi_post_pro_ << escape;
268 os << front_space <<
"nb_slices" << end_space <<
nb_slices_ << escape;
269 os << front_space <<
"nb_diam_slice" << end_space <<
nb_diam_slice_ << escape;
271 os << front_space <<
"upstream_dir_line" << end_space <<
upstream_dir_line_ << escape;
272 os << front_space <<
"nb_thermal_lines" << end_space <<
nb_thermal_lines_ << escape;
359 param.
dictionnaire(
"tangential_conv_2D_tangential_diffusion_3D", 5);
360 param.
dictionnaire(
"tangential_conv_3D_tangentual_diffusion_3D", 6);
467 if (mot ==
"enforce_periodic_boundary_value")
470 Nom accolade_ouverte(
"{");
476 if (bloc_name_next == accolade_ouverte)
561 corrige_flux_.typer(
"Corrige_flux_FT_temperature_subresolution");
628 corrige_flux_->set_debug(
debug_);
661 for (
int c=0; c<3; c++)
688 is_first_time_step_ = (!ref_ijk_ft_->get_reprise()) && (ref_ijk_ft_->schema_temps_ijk().get_tstep()==0);
704 corrige_flux_->set_physical_parameters(
cp_liquid_ * ref_ijk_ft_->milieu_ijk().get_rho_liquid(),
705 cp_vapour_ * ref_ijk_ft_->milieu_ijk().get_rho_vapour(),
708 corrige_flux_->initialize_with_subproblems(
709 ref_ijk_ft_->get_domaine(),
711 ref_ijk_ft_->get_interface(),
713 ref_ijk_ft_->get_interface().get_set_intersection_ijk_face(),
714 ref_ijk_ft_->get_interface().get_set_intersection_ijk_cell(),
750 for (
int c=0; c<3; c++)
760 for (
int c=0; c<3; c++)
765 for (
int c=0; c<3; c++)
778 for (
int c=0; c<3; c++)
784 for (
int c=0; c<3; c++)
789 for (
int c=0; c<3; c++)
797 for (
int c=0; c<3; c++)
804 for (
int c=0; c<3; c++)
820 for (
int c=0; c<3; c++)
826 for (
int c=0; c<3; c++)
834 fo_ = 0.95 * pow((sqrt(2) / 2), 2);
838 Cout <<
"End of " <<
que_suis_je() <<
"::initialize()" << finl;
846 return ref_ijk_ft_->schema_temps_ijk().get_current_time();
849static int decoder_numero_bulle(
const int code)
851 const int num_bulle = code >> 6;
860 if (!ref_ijk_ft_->get_reprise() || ref_ijk_ft_->schema_temps_ijk().get_current_time() > 0.)
866 double time_ini = 0.;
867 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
875 double erf_inv_val = 1.;
878 time_ini = time_local;
883 const int max_attempt = 50;
884 int attempt_counter = 0;
886 double time_integral = 0.;
887 double temperature_end_next = 2 * temperature_end_prev;
888 while (abs(temperature_end_next - temperature_end_prev) > 0.01 && (attempt_counter < max_attempt))
892 temperature_end_prev = 0.5 * (temperature_end_prev + temperature_end_next);
895 time_ini = time_integral;
900 double time_derivative=0.;
901 const int max_attempt = 100;
902 int attempt_counter = 0;
905 double temperature_end_min = 0.;
907 double temperature_limit_left = temperature_end_min;
908 double temperature_limit_right = temperature_end_min + 0.25 * abs(temperature_end_min);
909 double temperature_middle = 0.5 * (temperature_limit_left + temperature_limit_right);
910 while (error > 1e-2 && (attempt_counter < max_attempt))
914 error = abs(temperature_limit_right - temperature_limit_left);
916 Cerr <<
"error: " << error << finl;
917 temperature_middle = 0.5 * (temperature_limit_right + temperature_limit_right);
920 time_ini = time_derivative;
932 Cerr <<
"Time ini: " << time_ini << finl;
933 const int nb_bubble_tot = ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bubbles_barycentre().dimension(0);
934 const int nb_bubbles_real = ref_ijk_ft_->get_interface().get_nb_bulles_reelles();
935 for (
int index_bubble=0; index_bubble<nb_bubble_tot; index_bubble++)
937 int index_bubble_real = index_bubble;
938 if (index_bubble>=nb_bubbles_real)
940 const int ighost = ref_ijk_ft_->get_interface().ghost_compo_converter(index_bubble-nb_bubbles_real);
941 index_bubble_real = decoder_numero_bulle(-ighost);
963 const int index_bubble,
964 const int index_bubble_real)
969 const DoubleTab& bubbles_centres = ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bubbles_barycentre();
971 x = bubbles_centres(index_bubble,0);
972 y = bubbles_centres(index_bubble,1);
973 z = bubbles_centres(index_bubble,2);
974 if (index_bubble != index_bubble_real)
976 const double x_real = bubbles_centres(index_bubble_real,0);
977 const double y_real = bubbles_centres(index_bubble_real,1);
978 const double z_real = bubbles_centres(index_bubble_real,2);
979 const double lx =
temperature_->get_domaine().get_domain_length(0);
980 const double ly =
temperature_->get_domaine().get_domain_length(0);
981 const double lz =
temperature_->get_domaine().get_domain_length(0);
982 x = (abs(x - x_real)< (lx / 2.)) ? x_real : ((x_real < (lx / 2.)) ? x_real + lx : x_real - lx);
983 y = (abs(y - y_real)< (ly / 2.)) ? y_real : ((y_real < (ly / 2.)) ? y_real + ly : y_real - ly);
984 z = (abs(z - z_real)< (lz / 2.)) ? z_real : ((z_real < (lz / 2.)) ? z_real + lz : z_real - lz);
1002 for (
int k = 0; k < nk; k++)
1003 for (
int j = 0; j < nj; j++)
1004 for (
int i = 0; i < ni; i++)
1006 const double indic = ref_ijk_ft_->get_interface().I()(i,j,k);
1007 if (indic > VAPOUR_INDICATOR_TEST)
1014 temperature(i,j,k) = temperature_per_bubble;
1022 temperature(i,j,k) = temperature_per_bubble;
1029void reinit_streamObj(std::ostringstream& streamObj,
const double& param)
1033 streamObj << (double) param;
1038 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
1040 std::ostringstream streamObj;
1041 Nom expression_T =
"(";
1043 expression_T += streamObj.str().c_str();
1044 expression_T +=
")-(";
1045 expression_T += streamObj.str().c_str();
1046 expression_T +=
")*(";
1048 expression_T += streamObj.str().c_str();
1049 Nom expression_tmp =
"sqrt((x-(";
1050 reinit_streamObj(streamObj, (signbit(x) ? x-1e-16 : x+1e-16));
1051 expression_tmp += streamObj.str().c_str();
1052 expression_tmp +=
"))^2+(y-(";
1053 reinit_streamObj(streamObj, (signbit(y) ? y-1e-16 : y+1e-16));
1054 expression_tmp += streamObj.str().c_str();
1055 expression_tmp +=
"))^2+(z-(";
1056 reinit_streamObj(streamObj, (signbit(z) ? z-1e-16 : z+1e-16));
1057 expression_tmp += streamObj.str().c_str();
1058 expression_tmp +=
"))^2)";
1059 expression_T +=
"/";
1060 expression_T += expression_tmp;
1061 expression_T +=
"*(1-erf((";
1062 expression_T += expression_tmp;
1063 expression_T +=
"-";
1065 expression_T += streamObj.str().c_str();
1066 expression_T +=
")/(2.*sqrt(";
1069 reinit_streamObj(streamObj, ((alpha_liq * time_scope) + 1e-16));
1070 expression_T += streamObj.str().c_str();
1071 expression_T +=
")))))";
1072 return expression_T;
1078 const double a = 18.75537;
1079 const double b = 2.47197;
1080 const double c = 0.25;
1081 const double d = 4.33074;
1082 const double e = 0.5;
1083 const double w = log(1-pow(x,2));
1084 res = sqrt(sqrt(a - b * w + c * pow(w,2)) - d - e * w);
1085 const double sign = signbit(x) ? -1. : 1.;
1091 double temperature_value;
1095 temperature_value = T1 + T1 * (r * R0 - R1 * R0) / (r * (R1 - R0));
1096 return temperature_value;
1101 double temperature_derivative;
1102 const double T1 = temperature_end_prev;
1105 temperature_derivative = T1 * (R1 * R0) / (pow(r, 2) * (R1 - R0));
1106 return temperature_derivative;
1111 double temperature_integral;
1112 const double T1 = temperature_end_prev;
1115 const double Delta_R = R1 - R0;
1116 temperature_integral = (T1 * R1) / (R1 - R0) * (Delta_R - R0 * (log(R1) - log(R0)));
1117 temperature_integral /= Delta_R;
1118 return temperature_integral;
1122 double& temperature_end_prev)
1125 const double time_integral = 100.;
1129 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
1130 const double Delta_R = R1 - R0;
1132 double time_tmp = time_integral / 2.;
1133 double left_time = 0.;
1134 double right_time = time_integral;
1135 double temperature_integral_eval = 1.e20;
1137 auto fflambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t)
1138 {
return R / r * (1 - erf( (r - R)/(2 * sqrt(alpha * t)))) ; };
1139 while(abs(temperature_integral_eval - temperature_integral) > 1e-6)
1141 temperature_integral_eval = 0.;
1142 time_tmp = (right_time + left_time) / 2;
1144 const int max_unknowns = 100;
1145 const double radial_incr = Delta_R / (max_unknowns - 1);
1146 for (
int i=0; i<max_unknowns-1; i++)
1147 temperature_integral_eval += (fflambda(R0 + radial_incr * i, R0, alpha_liq, time_tmp)
1148 + fflambda(R0 + radial_incr * (i+1), R0, alpha_liq, time_tmp))
1149 * (radial_incr / 2);
1150 temperature_integral_eval = T1 - T1 * temperature_integral_eval / Delta_R;
1152 if (temperature_integral_eval > temperature_integral)
1153 right_time = time_tmp;
1155 left_time = time_tmp;
1157 auto flambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1158 {
return Tinfty - Tinfty * R / r * (1- erf( (r - R)/(2 * sqrt(alpha * t)))) ; };
1159 auto glambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1160 {
return Tinfty * R / pow(r,2) * (1- erf( (r - R)/(2 * sqrt(alpha * t)))) ; };
1161 auto hlambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1162 {
return Tinfty * R / r / (2 * sqrt(alpha * t)) * (2 / sqrt(M_PI)) * (exp(-pow((r - R)/(2 * sqrt(alpha * t)),2))) ; };
1164 const double temperature_end = flambda(R1, R0, alpha_liq, time_tmp, T1);
1165 temperature_end_prev = temperature_end;
1166 const double temperature_derivative_end = glambda(R1, R0, alpha_liq, time_tmp, T1)
1167 + hlambda(R1, R0, alpha_liq, time_tmp, T1);
1170 Cerr <<
"Temperature at the probes end: " << temperature_end_prev << finl;
1171 Cerr <<
"Temperature at the probes end: " << temperature_end << finl;
1172 Cerr <<
"Temperature derivative at the probes end: " << temperature_derivative_end << finl;
1181 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
1183 auto glambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1184 {
return Tinfty * R / pow(r,2) * (1- erf( (r - R)/(2 * sqrt(alpha * (t + 1e-16))))) ; };
1185 auto hlambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1186 {
return Tinfty * R / r / (2 * sqrt(alpha * (t + 1e-16))) * (2 / sqrt(M_PI)) * (exp(-pow((r - R)/(2 * sqrt(alpha * (t + 1e-16))),2))) ; };
1187 const double temperature_derivative_interface = glambda(R0, R0, alpha_liq, ref_ijk_ft_->schema_temps_ijk().get_current_time(), T1)
1188 + hlambda(R0, R0, alpha_liq, ref_ijk_ft_->schema_temps_ijk().get_current_time(), T1);
1191 const double temperature_derivative_interface_liquid = glambda(R0, R0, alpha_liq, ref_ijk_ft_->schema_temps_ijk().get_current_time(),
mean_liquid_temperature_)
1203 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
1206 const double inflection_time_temperature_derivative = 0.5 * (pow(R0,2) * R1 - 2 * R0 * pow(R1,2) + pow(R1,3)) / (R0*alpha_liq);
1207 auto glambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1208 {
return - (-Tinfty) * R / pow(r,2) * (1- erf( (r - R)/(2 * sqrt(alpha * t)))) ; };
1209 auto hlambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1210 {
return - (-Tinfty) * R / r / (2 * sqrt(alpha * t)) * (2 / sqrt(M_PI)) * (exp(-pow((r - R)/(2 * sqrt(alpha * t)),2))) ; };
1211 const double inflection_temperature_derivative = glambda(R1, R0, alpha_liq, inflection_time_temperature_derivative, T1)
1212 + hlambda(R1, R0, alpha_liq, inflection_time_temperature_derivative, T1);
1213 temperature_end_min = (inflection_temperature_derivative * R1 * (R1 - R0)) / (R0);
1214 return inflection_time_temperature_derivative;
1218 double& temperature_limit_left,
1219 double& temperature_limit_right)
1221 const double time_max = 1000.;
1225 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
1227 double temperature_end_min = 0.;
1231 double time_tmp = 0.;
1232 double left_time = inflection_time_temperature_derivative;
1233 double right_time = time_max;
1234 double temperature_derivative_eval = 1.e20;
1235 auto flambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1236 {
return Tinfty - Tinfty * R / r * (1- erf( (r - R)/(2 * sqrt(alpha * t)))) ; };
1237 auto glambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1238 {
return - (-Tinfty) * R / pow(r,2) * (1- erf( (r - R)/(2 * sqrt(alpha * t)))) ; };
1239 auto hlambda = [](
const double& r,
const double& R,
const double& alpha,
const double& t,
const double& Tinfty)
1240 {
return - (-Tinfty) * R / r / (2 * sqrt(alpha * t)) * (2 / sqrt(M_PI)) * (exp(-pow((r - R)/(2 * sqrt(alpha * t)),2))) ; };
1241 const double inflection_temperature_derivative = glambda(R1, R0, alpha_liq, inflection_time_temperature_derivative, T1)
1242 + hlambda(R1, R0, alpha_liq, inflection_time_temperature_derivative, T1);
1243 const double inflection_temperature = flambda(R1, R0, alpha_liq, inflection_time_temperature_derivative, T1);
1246 Cerr <<
"Inflection temperature derivative init: " << inflection_temperature_derivative << finl;
1247 Cerr <<
"Temperature at the inflection point: " << inflection_temperature << finl;
1248 Cerr <<
"Temperature derivative: " << temperature_derivative << finl;
1250 while(abs(temperature_derivative_eval - temperature_derivative) > 1e-6)
1252 temperature_derivative_eval = 0.;
1253 time_tmp = (right_time + left_time) / 2;
1254 temperature_derivative_eval = glambda(R1, R0, alpha_liq, time_tmp, T1)
1255 + hlambda(R1, R0, alpha_liq, time_tmp, T1);
1256 if (abs(temperature_derivative_eval) > abs(inflection_temperature_derivative))
1258 time_tmp = inflection_time_temperature_derivative;
1261 if (abs(temperature_derivative_eval - temperature_derivative) > 1e-2 && abs(left_time-right_time) < 1e-2)
1262 right_time = 2 * right_time;
1264 if (abs(temperature_derivative_eval) < abs(temperature_derivative))
1265 right_time = time_tmp;
1267 left_time = time_tmp;
1269 const double temperature_end = flambda(R1, R0, alpha_liq, time_tmp, T1);
1270 double temperature_middle = 0.5 * (temperature_limit_right + temperature_limit_left);
1273 Cerr <<
"Temperature at the probes end: " << temperature_end << finl;
1274 Cerr <<
"Temperature left limit: " << temperature_limit_left << finl;
1275 Cerr <<
"Temperature right limit: " << temperature_limit_right << finl;
1276 Cerr <<
"Temperature middle: " << temperature_middle << finl;
1278 if (abs(temperature_end) > abs(temperature_middle))
1279 temperature_limit_left = temperature_middle;
1281 temperature_limit_right = temperature_middle;
1282 const double temperature_derivative_end = glambda(R1, R0, alpha_liq, time_tmp, T1)
1283 + hlambda(R1, R0, alpha_liq, time_tmp, T1);
1286 Cerr <<
"Temperature left limit: " << temperature_limit_left << finl;
1287 Cerr <<
"Temperature right limit: " << temperature_limit_right << finl;
1290 Cerr <<
"Temperature derivative at the probes end: " << temperature_derivative_end << finl;
1326 Cerr <<
"Compute mean liquid temperature" << finl;
1329 Cerr <<
"Compute Nusselt spherical diffusion" << finl;
1344 const int ni = div_coeff_grad_T_volume.
ni();
1345 const int nj = div_coeff_grad_T_volume.
nj();
1346 const int nk = div_coeff_grad_T_volume.
nk();
1347 const double rhocp_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid() *
cp_liquid_;
1348 const double rhocpVol = rhocp_l *
vol_;
1349 for (
int k = 0; k < nk; k++)
1350 for (
int j = 0; j < nj; j++)
1351 for (
int i = 0; i < ni; i++)
1353 const double ope = div_coeff_grad_T_volume(i,j,k);
1354 const double resu = ope / rhocpVol;
1355 div_coeff_grad_T_volume(i,j,k) = ope / rhocp_l;
1356 d_temperature(i,j,k) += resu;
1357 if (post_pro_div_lambda_grad_T)
1366 const int ni = temperature.
ni();
1367 const int nj = temperature.
nj();
1368 const int nk = temperature.
nk();
1369 for (
int k = 0; k < nk; k++)
1370 for (
int j = 0; j < nj; j++)
1371 for (
int i = 0; i < ni; i++)
1373 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1374 if (fabs(indic) < LIQUID_INDICATOR_TEST)
1375 temperature(i,j,k) = 0.;
1392 const int ni = temperature.
ni();
1393 const int nj = temperature.
nj();
1394 const int nk = temperature.
nk();
1395 for (
int k = 0; k < nk; k++)
1396 for (
int j = 0; j < nj; j++)
1397 for (
int i = 0; i < ni; i++)
1399 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1400 if (fabs(indic) > VAPOUR_INDICATOR_TEST)
1402 if (ref_ijk_ft_->schema_temps_ijk().get_current_time() == 0 && !ref_ijk_ft_->get_reprise())
1422 const int ni = d_temperature.
ni();
1423 const int nj = d_temperature.
nj();
1424 const int nk = d_temperature.
nk();
1427 for (
int k = 0; k < nk; k++)
1428 for (
int j = 0; j < nj; j++)
1429 for (
int i = 0; i < ni; i++)
1431 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1432 if (fabs(indic)<LIQUID_INDICATOR_TEST)
1433 { d_temperature(i,j,k) = 0; }
1439 const IJK_Field_double& temperature_ana,
1440 IJK_Field_double& error_temperature_ana,
1441 IJK_Field_double& error_temperature_ana_rel)
1443 const int ni = temperature.
ni();
1444 const int nj = temperature.
nj();
1445 const int nk = temperature.
nk();
1446 error_temperature_ana.
data() = 0.;
1447 for (
int k = 0; k < nk; k++)
1448 for (
int j = 0; j < nj; j++)
1449 for (
int i = 0; i < ni; i++)
1451 error_temperature_ana(i,j,k) = (temperature(i,j,k) - temperature_ana(i,j,k));
1452 error_temperature_ana_rel(i,j,k) = error_temperature_ana(i,j,k) / (temperature_ana(i,j,k) + 1.e-16) * 100.;
1457 double& total_parameter)
1459 const int ni = field.
ni();
1460 const int nj = field.
nj();
1461 const int nk = field.
nk();
1462 total_parameter = 0;
1463 double liquid_volume = 0.;
1464 for (
int k = 0; k < nk; k++)
1465 for (
int j = 0; j < nj; j++)
1466 for (
int i = 0; i < ni; i++)
1468 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1469 liquid_volume += (
vol_ * indic);
1470 total_parameter += abs(field(i,j,k)) * (
vol_ * indic);
1472 total_parameter =
mp_sum(total_parameter);
1473 liquid_volume =
mp_sum(liquid_volume);
1474 total_parameter = total_parameter / liquid_volume;
1478 double& total_parameter)
1480 const int ni = field.
ni();
1481 const int nj = field.
nj();
1482 const int nk = field.
nk();
1483 total_parameter = 0;
1484 double liquid_volume = 0.;
1485 for (
int k = 0; k < nk; k++)
1486 for (
int j = 0; j < nj; j++)
1487 for (
int i = 0; i < ni; i++)
1489 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1490 liquid_volume += (
vol_ * indic);
1491 total_parameter += pow(field(i,j,k) * (
vol_ * indic), 2);
1493 total_parameter =
mp_sum(total_parameter);
1494 liquid_volume =
mp_sum(liquid_volume);
1495 total_parameter = total_parameter / pow(liquid_volume, 2);
1500 const int ni = temperature.
ni();
1501 const int nj = temperature.
nj();
1502 const int nk = temperature.
nk();
1503 for (
int k = 0; k < nk; k++)
1504 for (
int j = 0; j < nj; j++)
1505 for (
int i = 0; i < ni; i++)
1507 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1509 if (indic < VAPOUR_INDICATOR_TEST)
1510 temperature(i,j,k) = 0;
1545 const double clip_threshold = 0.98;
1546 const int ni = temperature.
ni();
1547 const int nj = temperature.
nj();
1548 const int nk = temperature.
nk();
1549 for (
int k = 0; k < nk; k++)
1550 for (
int j = 0; j < nj; j++)
1551 for (
int i = 0; i < ni; i++)
1567 const double clip_threshold = 1.e-5;
1572 const int ni = temperature.
ni();
1573 const int nj = temperature.
nj();
1574 const int nk = temperature.
nk();
1575 for (
int k = 0; k < nk; k++)
1576 for (
int j = 0; j < nj; j++)
1577 for (
int i = 0; i < ni; i++)
1579 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1581 if ((temperature(i,j,k) + clip_threshold) > 0 && indic > LIQUID_INDICATOR_TEST)
1582 temperature(i,j,k) = 0;
1592 double vol_liq = 0.;
1594 const int ni = temperature.
ni();
1595 const int nj = temperature.
nj();
1596 const int nk = temperature.
nk();
1597 for (
int k = 0; k < nk; k++)
1598 for (
int j = 0; j < nj; j++)
1599 for (
int i = 0; i < ni; i++)
1601 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
1602 if (indic > VAPOUR_INDICATOR_TEST)
1604 vol_liq += (indic *
vol_);
1624 is_first_time_step_ = (!ref_ijk_ft_->get_reprise()) && (ref_ijk_ft_->schema_temps_ijk().get_tstep()==0);
1636 Cerr <<
"Initialise thermal subproblems" << finl;
1645 int varying_probes_length = 1;
1653 Cerr <<
"Interpolate the velocities on probes and compute local cfl fourier conditions" << finl;
1655 if (varying_probes_length)
1659 varying_probes_length--;
1665 Cerr <<
"Probes length is now fixed" << finl;
1674 Cerr <<
"Compute radial subresolution convection and diffusion operators" << finl;
1680 Cerr <<
"Compute local substep for the first iter" << finl;
1687 Cerr <<
"Prepare boundary conditions, compute source terms and impose boundary conditions" << finl;
1694 Cerr <<
"Solve thermal subproblems" << finl;
1700 Cerr <<
"Compute material derivative (modelling)" << finl;
1704 Cerr <<
"Store probe temperature" << finl;
1710 Cerr <<
"Prepare thermal flux correction" << finl;
1724 const int max_dx = (int) trunc(maximum_distance / dx + 1);
1725 const int max_dy = (int) trunc(maximum_distance / dy + 1);
1726 const int max_dz = (int) trunc(maximum_distance / dz + 1);
1727 ghost_cells = std::max(max_dx, std::max(max_dy, max_dz));
1729 if (ghost_cells < ghost_init)
1730 ghost_cells = ghost_init;
1759 Cerr <<
"Check_nb_elem: " << check_nb_elem << finl;
1771 Matrice& radial_second_order_operator_raw,
1772 Matrice& radial_first_order_operator,
1773 Matrice& radial_second_order_operator)
1780 radial_first_order_operator =
Matrice(radial_first_order_operator_raw);
1781 radial_second_order_operator =
Matrice(radial_second_order_operator_raw);
1798 Cerr <<
"Check_nb_elem: " << check_nb_elem << finl;
1804 const double dr_inv = 1 / dr;
1805 radial_first_order_operator *= dr_inv;
1816 Cerr <<
"Check_nb_elem: " << check_nb_elem << finl;
1821 const double dr_squared_inv = 1 / pow(dr, 2);
1822 radial_second_order_operator *= dr_squared_inv;
1839 const IJK_Field_double& indicator = ref_ijk_ft_->get_interface().I();
1844 for (
int k = 0; k < nk; k++)
1845 for (
int j = 0; j < nj; j++)
1846 for (
int i = 0; i < ni; i++)
1847 if (fabs(indicator(i,j,k)) > VAPOUR_INDICATOR_TEST && fabs(indicator(i,j,k)) < LIQUID_INDICATOR_TEST)
1851 Cerr <<
"Liquid Indicator (Old): " << indicator(i,j,k) << finl;
1852 Cerr <<
"Liquid Indicator (Next): " << ref_ijk_ft_->get_interface().In()(i,j,k) << finl;
1858 ref_ijk_ft_->schema_temps_ijk().get_timestep(),
1859 ref_ijk_ft_->schema_temps_ijk().get_current_time(),
1860 ref_ijk_ft_->get_interface(),
1861 ref_ijk_ft_->eq_ns().get_velocity(),
1862 ref_ijk_ft_->eq_ns().get_velocity_ft(),
1863 ref_ijk_ft_->eq_ns().get_pressure_ghost_cells());
1899 if (!(ref_ijk_ft_->eq_ns().get_disable_convection_qdm() && ref_ijk_ft_->eq_ns().get_disable_diffusion_qdm()))
1904 max_subproblems_predicted);
1907 max_subproblems_predicted);
1910 max_subproblems_predicted);
1914 max_subproblems_predicted);
1917 nb_subproblems_ini, max_subproblems_predicted);
1920 nb_subproblems_ini, max_subproblems_predicted);
1923 nb_subproblems_ini, max_subproblems_predicted);
1927 nb_subproblems_ini, max_subproblems_predicted);
2025 Matrice& identity_matrix_subproblems)
2031 Cerr <<
"Initialise the Identity matrix" << finl;
2039 Cerr <<
"Identity matrix has been initialised." << finl;
2043 Matrice& identity_matrix_subproblems)
2048 const int first_initialisation = (ref_ijk_ft_->schema_temps_ijk().get_tstep() == 0);
2050 Cerr <<
"Initialise the Identity sparse matrix" << finl;
2058 first_initialisation,
2061 Cerr <<
"Identity sparse matrix has been initialised." << finl;
2065 Matrice& radial_convection_matrix)
2071 Cerr <<
"Initialise the Radial convection operator" << finl;
2075 radial_first_order_operator,
2079 Cerr <<
"Radial convection operator has been initialised." << finl;
2083 Matrice& radial_convection_matrix)
2088 const int first_initialisation = (ref_ijk_ft_->schema_temps_ijk().get_tstep() == 0);
2090 Cerr <<
"Initialise the Radial convection sparse operator" << finl;
2094 radial_first_order_operator,
2098 first_initialisation,
2101 Cerr <<
"Radial convection sparse operator has been initialised." << finl;
2106 Matrice& radial_diffusion_matrix)
2112 Cerr <<
"Initialise the Radial diffusion operator" << finl;
2117 Cerr <<
"Radial diffusion operator has been initialised." << finl;
2121 Matrice& radial_diffusion_matrix)
2126 const int first_initialisation = (ref_ijk_ft_->schema_temps_ijk().get_tstep() == 0);
2128 Cerr <<
"Initialise the Radial diffusion sparse operator" << finl;
2132 radial_second_order_operator,
2136 first_initialisation,
2140 Cerr <<
"Radial diffusion sparse operator has been initialised." << finl;
2151 Cerr <<
"Local timestep: " << local_time_step << finl;
2163 Cerr <<
"Compare the thermal time-steps" << finl;
2164 Cerr <<
"Current time: "<< ref_ijk_ft_->schema_temps_ijk().get_current_time() << finl;
2171 Cerr <<
"dt_cfl: " << ref_ijk_ft_->schema_temps_ijk().get_dt_cfl_liq() << finl;
2226 Cerr <<
"Finite-difference Explicit thermal sub-resolution !" << finl;
2234 Cerr <<
"Finite-difference Explicit thermal sub-resolution has finished in "<<
nb_iter_explicit_local_ <<
"iterations!" << finl;
2244 Cerr <<
"Finite-difference thermal sub-resolution has started (Implicit)!" << finl;
2248 Cerr <<
"Finite-difference thermal sub-resolution has finished (Implicit)!" << finl;
2253 Cerr <<
"Finite-difference thermal sub-resolution has started !" << finl;
2257 Cerr <<
"Finite-difference thermal sub-resolution has finished !" << finl;
2283 sparse_matrix_solver_reduced,
2302 ArrOfInt pe_voisins_dummy;
2303 ArrsOfInt items_to_send_dummy;
2304 ArrsOfInt items_to_recv_dummy;
2305 ArrsOfInt blocs_to_recv_dummy;
2306 pe_voisins_dummy.
resize(0);
2307 items_to_send_dummy.
resize(0);
2308 items_to_recv_dummy.
resize(0);
2309 blocs_to_recv_dummy.
resize(0);
2313 pe_voisins_dummy, items_to_send_dummy,
2314 items_to_recv_dummy, blocs_to_recv_dummy);
2340 Cerr <<
"Check the modified RHS: INI" << finl;
2341 const double fd_second_order_magnitude = 1 / pow(
dr_,2) * 1e3;
2345 Cerr <<
"Check the modified RHS: END" << finl;
2352 corrige_flux_->update_intersections();
2358 corrige_flux_->update();
2395 corrige_flux_->initialise_cell_neighbours_indices_to_correct();
2396 corrige_flux_->compute_cell_neighbours_faces_indices_for_spherical_correction(
n_iter_distance_);
2431 const int discontinous_min_max_neighbours_faces = 1;
2432 const int remove_external_neighbour_values = 1;
2433 const int check_neighbour_cell_centre = !remove_external_neighbour_values;
2437 discontinous_min_max_neighbours_faces,
2438 check_neighbour_cell_centre,
2439 remove_external_neighbour_values,
2461 const double rho_cp = ref_ijk_ft_->milieu_ijk().get_rho_liquid() *
cp_liquid_;
2462 for (
int c=0; c<3; c++)
2464 const int ni_max = (c==0) ? ni + 1: ni;
2465 const int nj_max = (c==1) ? nj + 1: nj;
2466 const int nk_max = (c==2) ? nk + 1: nk;
2467 for (
int k = 0; k < nk_max; k++)
2468 for (
int j = 0; j < nj_max; j++)
2469 for (
int i = 0; i < ni_max; i++)
2472 u_T *= (*rising_velocity_overall_)[c];
2473 const double rho_cp_u_T = u_T * rho_cp;
2505 && ref_ijk_ft_->schema_temps_ijk().get_tstep() == 1
2506 && !ref_ijk_ft_->get_reprise());
2508 Cerr <<
"Set correction cell neighbours" << finl;
2522 Cerr <<
"Compute temperature cell centre" << finl;
2523 corrige_flux_->compute_temperature_cell_centre(*
temperature_);
2526 Cerr <<
"Compute temperature cell centre neighbours" << finl;
2540 Cerr <<
"Replace temperature cell centres neighbours" << finl;
2549 Cerr <<
"Apply second temperature correction (Case C)" << finl;
2557 && ref_ijk_ft_->schema_temps_ijk().get_tstep() == 0
2558 && !ref_ijk_ft_->get_reprise());
2563 if (correct_first_iter)
2565 corrige_flux_->replace_temperature_cell_centre_neighbours(*
temperature_,
2571 corrige_flux_->compute_temperature_cell_centre(*
temperature_);
2577 if (use_neighbours_temperature_to_correct_trimmed)
2578 corrige_flux_->replace_temperature_cell_centre_neighbours(*
temperature_,
2584 corrige_flux_->replace_temperature_cell_centre_neighbours(*
temperature_,
2590 corrige_flux_->compute_temperature_cell_centre(*
temperature_);
2594 corrige_flux_->compute_temperature_cell_centre(*
temperature_);
2604 const int ni = temperature.
ni();
2605 const int nj = temperature.
nj();
2606 const int nk = temperature.
nk();
2613 std::vector<double> indices_i_to_correct;
2614 std::vector<double> indices_j_to_correct;
2615 std::vector<double> indices_k_to_correct;
2617 for (
int i=0; i<stencil_to_correct; i++)
2619 indices_i_to_correct.push_back(i);
2620 indices_j_to_correct.push_back(i);
2621 indices_k_to_correct.push_back(i);
2622 indices_i_to_correct.push_back(ni_tot-1-i);
2623 indices_j_to_correct.push_back(nj_tot-1-i);
2624 indices_k_to_correct.push_back(nk_tot-1-i);
2627 for (k = 0; k < nk; k++)
2628 if (std::find(indices_k_to_correct.begin(), indices_k_to_correct.end(), k+offset_k) != indices_k_to_correct.end())
2629 for (j = 0; j < nj; j++)
2630 for (i = 0; i < ni; i++)
2632 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
2633 if (fabs(indic)>LIQUID_INDICATOR_TEST)
2636 for (j = 0; j < nj; j++)
2637 if (std::find(indices_j_to_correct.begin(), indices_j_to_correct.end(), j+offset_j) != indices_j_to_correct.end())
2638 for (k = 0; k < nk; k++)
2639 for (i = 0; i < ni; i++)
2641 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
2642 if (fabs(indic)>LIQUID_INDICATOR_TEST)
2645 for (i = 0; i < ni; i++)
2646 if (std::find(indices_i_to_correct.begin(), indices_i_to_correct.end(), i+offset_i) != indices_i_to_correct.end())
2647 for (k = 0; k < nk; k++)
2648 for (j = 0; j < nj; j++)
2650 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
2651 if (fabs(indic)>LIQUID_INDICATOR_TEST)
2666 for (
int k = 0; k < nk; k++)
2667 for (
int j = 0; j < nj; j++)
2668 for (
int i = 0; i < ni; i++)
2670 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
2671 if (fabs(indic)<LIQUID_INDICATOR_TEST)
2672 { div_coeff_grad_T_volume(i,j,k) = 0; }
2680 for (
int k = 0; k < nk; k++)
2681 for (
int j = 0; j < nj; j++)
2682 for (
int i = 0; i < ni; i++)
2684 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
2685 if (fabs(indic)<LIQUID_INDICATOR_TEST)
2697 corrige_flux_->compute_ijk_pure_faces_indices();
2698 corrige_flux_->sort_ijk_intersections_subproblems_indices_by_k_layers();
2722 if (ref_ijk_ft_->schema_temps_ijk().get_tstep() > 0)
2727 corrige_flux_->clear_vectors();
2734 corrige_flux_->clean();
2738 const Nom& shell_quantities_thermal_probes,
2739 const Nom& overall_bubbles_quantities,
2740 const Nom& local_quantities_thermal_probes_time_index_folder)
2745 Cerr <<
"Compute bubbles quantities" << finl;
2748 Cerr <<
"Sort spherical coords" << finl;
2753 Cerr <<
"Write post-processings" << finl;
2755 interfacial_quantities_thermal_probes,
2756 shell_quantities_thermal_probes,
2757 overall_bubbles_quantities,
2758 local_quantities_thermal_probes_time_index_folder);
2791 const int nb_real_bubbles = ref_ijk_ft_->get_interface().get_nb_bulles_reelles();
2794 int line_dir = ref_ijk_ft_->milieu_ijk().get_direction_gravite();
2800 nb_thermal_lines += (nb_thermal_lines % 2);
2809 ArrOfDouble linear_coord;
2811 std::vector<std::vector<FixedVector<ArrOfInt,3>>> indices_ijk;
2813 for (
int c=0; c<3; c++)
2817 double diameter_approx = 0.;
2818 std::vector<std::vector<FixedVector<ArrOfDouble,2>>> coordinates_sides;
2819 std::vector<std::vector<ArrOfInt>> is_point_on_proc;
2860 int linear_circle_line_index = 0;
2861 for (
int circle=0; circle<nb_thermal_circles; circle++)
2863 for (
int line=0; line<(int) nb_thermal_lines; line++)
2894 convective_term_line);
2903 diffusive_term_line);
2913 temperature_incr_line);
2917 linear_circle_line_index,
2928 convective_term_line,
2929 diffusive_term_line,
2930 temperature_incr_line);
2931 linear_circle_line_index++;
2940 const int& nb_thermal_circles,
2941 const int& nb_thermal_lines)
2943 parameters.resize(nb_thermal_circles);
2944 for (
int circle=0; circle<nb_thermal_circles; circle++)
2947 parameters[circle].resize(1);
2949 parameters[circle].resize(nb_thermal_lines);
2950 for (
int line=0; line< (int) parameters[circle].size(); line++)
2952 for (
int c=0; c<3; c++)
2961 const int& nb_thermal_circles,
2962 const int& nb_thermal_lines)
2964 parameters.resize(nb_thermal_circles);
2965 for (
int circle=0; circle<nb_thermal_circles; circle++)
2968 parameters[circle].resize(1);
2970 parameters[circle].resize(nb_thermal_lines);
2971 for (
int line=0; line< (int) parameters[circle].size(); line++)
2973 for (
int c=0; c<2; c++)
2982 const int& nb_thermal_circles,
2983 const int& nb_thermal_lines)
2985 parameters.resize(nb_thermal_circles);
2986 for (
int circle=0; circle<nb_thermal_circles; circle++)
2989 parameters[circle].resize(1);
2991 parameters[circle].resize(nb_thermal_lines);
2992 for (
int line=0; line< (int) parameters[circle].size(); line++)
3000 const int& nb_thermal_circles,
3001 const int& nb_thermal_lines)
3003 parameters.resize(nb_thermal_circles);
3004 for (
int circle=0; circle<nb_thermal_circles; circle++)
3007 parameters[circle].resize(1);
3009 parameters[circle].resize(nb_thermal_lines);
3010 for (
int line=0; line< (int) parameters[circle].size(); line++)
3018 ArrOfDouble& linear_coord,
3024 assert(ref_ijk_ft_->get_interface().get_nb_bulles_reelles() == 1);
3026 DoubleTab bounding_box;
3027 bounding_box = ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bounding_box();
3028 const double Dbdir = bounding_box(0, line_dir, 1) - bounding_box(0, line_dir, 0);
3029 const double dirb = (*bubbles_barycentre_)(0, line_dir);
3032 const double origin_dir = geom.
get_origin(line_dir) ;
3034 double maximum_probe_length = 0.;
3036 maximum_probe_length = ldir - Dbdir;
3038 maximum_probe_length = dirb - origin_dir - Dbdir/2;
3041 if (usr_probe_length > maximum_probe_length)
3043 usr_probe_length = int(maximum_probe_length / Dbdir) * Dbdir;
3051 linear_coord[point] = dx * point;
3052 for (
int c=0; c<3; c++)
3055 coordinates_line[c][point] = (*bubbles_barycentre_)(0, c);
3057 coordinates_line[c][point] = dirb + Dbdir_sign / 2.;
3060 ArrOfDouble linear_coord_tmp = linear_coord;
3062 linear_coord_tmp *= (-1);
3063 coordinates_line[line_dir] += linear_coord_tmp;
3067 if (coordinates_line[line_dir][point] < origin_dir)
3068 coordinates_line[line_dir][point] += ldir;
3069 if (coordinates_line[line_dir][point] > origin_dir + ldir)
3070 coordinates_line[line_dir][point] -= ldir;
3074 for (
int c=0; c<3; c++)
3076 diameter += (bounding_box(0, c, 1) - bounding_box(0, c, 0));
3081 const int& nb_thermal_lines,
3082 const double& diameter_approx,
3085 if (nb_thermal_circles == 1)
3093 const int& line_dir)
3097 double min_dir_x, max_dir_x;
3099 double min_dir_y, max_dir_y;
3101 double min_dir_z, max_dir_z;
3111 const int nb_i_max = offset_i + nb_i;
3112 const int nb_j_max = offset_j + nb_j;
3113 const int nb_k_max = offset_k + nb_k;
3123 const int nb_thermal_circles = (int) is_point_on_proc.size();
3124 for (
int circle=0; circle<nb_thermal_circles; circle++)
3126 const int nb_thermal_lines = (int) is_point_on_proc[circle].size();
3127 for (
int line=0; line<(int) nb_thermal_lines; line++)
3129 Cerr <<
"nb_thermal_lines:" << nb_thermal_lines << finl;
3130 const int nb_points = (int) is_point_on_proc[circle][0].size_array();
3131 assert(nb_points == coordinates_line[0].size_array());
3132 Cerr <<
"nb_points:" << nb_points << finl;
3133 for (
int point=0; point<nb_points; point++)
3135 double x = coordinates_line[0][point];
3136 double y = coordinates_line[1][point];
3137 double z = coordinates_line[2][point];
3150 const int ndx = (int) ((x - min_dir_x) / dx);
3151 const int ndy = (int) ((y - min_dir_y) / dy);
3152 const int ndz = (int) ((z - min_dir_z) / dz);
3156 const int ndx_ceil = (int) ceil((x - min_dir_x) / dx);
3157 const int ndy_ceil = (int) ceil((y - min_dir_y) / dy);
3158 const int ndz_ceil = (int) ceil((z - min_dir_z) / dz);
3165 const int in_x = (ndx_ceil > offset_i && ndx < nb_i_max);
3166 const int in_y = (ndy_ceil > offset_j && ndy < nb_j_max);
3167 const int in_z = (ndz_ceil > offset_k && ndz < nb_k_max);
3168 if (in_x && in_y && in_z)
3170 is_point_on_proc[circle][0][point] = 1;
3171 ijk_indices[circle][line][0][point] = ndx - offset_i;
3172 ijk_indices[circle][line][1][point] = ndy - offset_j;
3173 ijk_indices[circle][line][2][point] = ndz - offset_k;
3176 ArrOfInt i_indices = ijk_indices[circle][line][0];
3177 ArrOfInt j_indices = ijk_indices[circle][line][1];
3178 ArrOfInt k_indices = ijk_indices[circle][line][2];
3182 for (
int l=0; l<nb_points; l++)
3183 if (is_point_on_proc[circle][line][l])
3185 ijk_indices[circle][line][0][l] = i_indices[l];
3186 ijk_indices[circle][line][1][l] = j_indices[l];
3187 ijk_indices[circle][line][2][l] = k_indices[l];
3201 const double origin_dir = geom.
get_origin(dir);
3202 min_dir = origin_dir;
3203 max_dir = origin_dir + ldir;
3207 const int& nb_thermal_circles,
3208 const int& index_circle,
3209 const int& index_line,
3210 const std::vector<std::vector<ArrOfInt>>& is_point_on_proc,
3213 const IJK_Field_double& field,
3214 const IJK_Field_vector3_double& field_gradient,
3215 const IJK_Field_vector3_double& velocity,
3217 const int field_type)
3219 const int nb_points = coordinates_line[0].size_array();
3220 DoubleTab ijk_coords_interp(nb_points, 3);
3221 DoubleVect field_interp(nb_points);
3222 for (
int l=0; l<nb_points; l++)
3223 for (
int c=0; c<3; c++)
3224 ijk_coords_interp(l, c) = coordinates_line[c][l];
3226 if (index_circle > 0)
3231 for (
int l=0; l<nb_points; l++)
3233 ijk_coords_interp(l, 1) = coordinates_sides[index_circle-1][index_line][0][l];
3234 ijk_coords_interp(l, 2) = coordinates_sides[index_circle-1][index_line][1][l];
3238 for (
int l=0; l<nb_points; l++)
3240 ijk_coords_interp(l, 0) = coordinates_sides[index_circle-1][index_line][0][l];
3241 ijk_coords_interp(l, 2) = coordinates_sides[index_circle-1][index_line][1][l];
3245 for (
int l=0; l<nb_points; l++)
3247 ijk_coords_interp(l, 0) = coordinates_sides[index_circle-1][index_line][0][l];
3248 ijk_coords_interp(l, 1) = coordinates_sides[index_circle-1][index_line][1][l];
3259 ijk_interpolate_skip_unknown_points(field, ijk_coords_interp, field_interp, INVALID_INTERP);
3262 ijk_interpolate_skip_unknown_points(field_gradient[dir], ijk_coords_interp, field_interp, INVALID_INTERP);
3265 ijk_interpolate_skip_unknown_points(velocity[dir], ijk_coords_interp, field_interp, INVALID_INTERP);
3271 values = field_interp;
3272 for (
int l=0; l<nb_points; l++)
3273 if (!is_point_on_proc[index_circle][index_line][l])
3279 const int& nb_thermal_circles,
3280 const int& index_circle,
3281 const int& index_line,
3282 const std::vector<std::vector<ArrOfInt>>& is_point_on_proc,
3296 ref_ijk_ft_->eq_ns().get_velocity(),
3302 const int& nb_thermal_circles,
3303 const int& index_circle,
3304 const int& index_line,
3305 const std::vector<std::vector<ArrOfInt>>& is_point_on_proc,
3319 ref_ijk_ft_->eq_ns().get_velocity(),
3325 const int& nb_thermal_circles,
3326 const int& index_circle,
3327 const int& index_line,
3328 const std::vector<std::vector<ArrOfInt>>& is_point_on_proc,
3342 ref_ijk_ft_->eq_ns().get_velocity(),
3349 DoubleTab velocity_line(values.
size_array());
3359 ref_ijk_ft_->eq_ns().get_velocity(),
3362 DoubleTab velocity_line_frame_of_ref = velocity_line;
3367 velocity_line_frame_of_ref -= (*rising_velocity_overall_)[dir];
3370 Cerr <<
"Rising velocity on lines" << (*rising_velocity_overall_)[dir] << finl;
3371 Cerr <<
"Rising velocity magnitude" << (*rising_velocities_)(0) << finl;
3372 Cerr <<
"Rising vector sign" << (*rising_vectors_)(0, dir) << finl;
3374 values *= velocity_line_frame_of_ref;
3375 values *= (ref_ijk_ft_->milieu_ijk().get_rho_liquid() *
cp_liquid_);
3379 const int& nb_thermal_circles,
3380 const int& index_circle,
3381 const int& index_line,
3382 const std::vector<std::vector<ArrOfInt>>& is_point_on_proc,
3396 ref_ijk_ft_->eq_ns().get_velocity(),
3403 const int& nb_thermal_circles,
3404 const int& index_circle,
3405 const int& index_line,
3406 const std::vector<std::vector<ArrOfInt>>& is_point_on_proc,
3420 ref_ijk_ft_->eq_ns().get_velocity(),
3427 const int& line_dir,
3428 const int& linear_circle_line_index,
3429 const int& index_circle,
3430 const int& index_line,
3431 const double& diameter_approx,
3432 std::vector<std::vector<ArrOfInt>>& is_point_on_proc,
3434 const ArrOfDouble& linear_coord,
3437 const DoubleVect& temperature_line,
3438 const DoubleVect& velocity_line,
3439 const DoubleVect& convective_term_line,
3440 const DoubleVect& diffusive_term_line,
3441 const DoubleVect& temperature_incr_line)
3443 is_point_on_proc[index_circle][index_line] *= (int)
Process::me() + 1;
3444 ArrOfInt& is_on_proc_tmp = is_point_on_proc[index_circle][index_line];
3446 is_on_proc_tmp -= 1;
3449 Cerr <<
"Post-processing on the lines - INI" << finl;
3450 const int reset = 1;
3451 const double last_time = ref_ijk_ft_->schema_temps_ijk().get_current_time() - ref_ijk_ft_->schema_temps_ijk().get_timestep();
3453 const int max_digit = 3;
3454 const int max_digit_time = 8;
3455 const int max_rank_digit =
rank_ < 1 ? 1 : (int) (log10(
rank_) + 1);
3456 const int nb_digit_tstep = last_time_index < 1 ? 1 : (int) (log10(last_time_index) + 1);
3457 const int nb_digit_index_slice = linear_circle_line_index < 1 ? 1 : (int) (log10(linear_circle_line_index) + 1);
3458 Nom line_name =
Nom(
"_thermal_rank_") +
Nom(std::string(max_digit - max_rank_digit,
'0')) +
Nom(
rank_) +
3459 Nom(
"_line_index_") +
Nom(std::string(max_digit - nb_digit_index_slice,
'0')) +
Nom(linear_circle_line_index)
3460 +
Nom(
"_local_quantities_thermal_lines_time_index_")
3461 +
Nom(std::string(max_digit_time - nb_digit_tstep,
'0')) +
Nom(last_time_index) +
Nom(
".out");
3462 Nom line_header =
Nom(
"tstep\tthermal_rank\tpost_pro_index\tlinear_index"
3463 "\ttime\tcharacteristic_time\ttime_dimensionless"
3465 "\tindex_i\tindex_j\tindex_k"
3467 "\tx_coord\ty_coord\tz_coord"
3468 "\ttemperature\tvelocity"
3469 "\tconvective_term\tdiffusive_term"
3470 "\ttemperature_incr");
3471 SFichier fic = Open_file_folder(local_quantities_thermal_lines_time_index_folder, line_name, line_header, reset);
3472 const int nb_points = temperature_line.
size_array();
3473 const double gravite_norm = ref_ijk_ft_->milieu_ijk().get_gravite_norm();
3474 const double characteristic_time = (gravite_norm > 1e-6) ? last_time / sqrt(diameter_approx * gravite_norm) : last_time;
3475 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
3476 const double rho_v = ref_ijk_ft_->milieu_ijk().get_rho_vapour();
3477 const double archimedes_time = sqrt(gravite_norm * (rho_l - rho_v) / (diameter_approx * rho_l));
3478 const double dimensionless_time = (archimedes_time > 1e-6) ? last_time / archimedes_time : last_time;
3479 for (
int l=0; l<nb_points; l++)
3481 double x_coord = coordinates_line[0][l];
3482 double y_coord = coordinates_line[1][l];
3483 double z_coord = coordinates_line[2][l];
3484 if (index_circle > 0)
3489 y_coord = coordinates_sides[index_circle-1][index_line][0][l];
3490 z_coord = coordinates_sides[index_circle-1][index_line][1][l];
3493 x_coord = coordinates_sides[index_circle-1][index_line][0][l];
3494 z_coord = coordinates_sides[index_circle-1][index_line][1][l];
3497 x_coord = coordinates_sides[index_circle-1][index_line][0][l];
3498 y_coord = coordinates_sides[index_circle-1][index_line][1][l];
3504 fic << last_time_index <<
" ";
3505 fic <<
rank_ <<
" " << linear_circle_line_index <<
" " << l <<
" ";
3506 fic << last_time <<
" ";
3507 fic << characteristic_time <<
" ";
3508 fic << dimensionless_time <<
" ";
3509 fic << is_on_proc_tmp[l] <<
" ";
3510 fic << indices_ijk[index_circle][index_line][0][l] <<
" ";
3511 fic << indices_ijk[index_circle][index_line][1][l] <<
" ";
3512 fic << indices_ijk[index_circle][index_line][2][l] <<
" ";
3513 fic << linear_coord[l] <<
" ";
3514 fic << x_coord <<
" ";
3515 fic << y_coord <<
" ";
3516 fic << z_coord <<
" ";
3517 fic << temperature_line[l] <<
" ";
3518 fic << velocity_line[l] <<
" ";
3519 fic << convective_term_line[l] <<
" ";
3520 fic << diffusive_term_line[l] <<
" ";
3521 fic << temperature_incr_line[l] <<
" ";
3525 Cerr <<
"Post-processing on the lines - END" << finl;
3531 const int nb_real_bubbles = ref_ijk_ft_->get_interface().get_nb_bulles_reelles();
3534 ArrOfDouble nb_diam_slices;
3537 double diam_incr_int, diam_incr_ext;
3539 int nb_slices_int =
nb_slices_ - nb_slices_ext;
3542 diam_incr_int = 1. / (double) (
nb_slices_ - nb_slices_ext + 1);
3543 diam_incr_int = signbit(
nb_diam_slice_) ? -diam_incr_int : diam_incr_int;
3545 for (
int slice = nb_slices_ext - 2; slice >= 0; slice--)
3546 nb_diam_slices.
append_array((slice + 1) * diam_incr_ext);
3547 for (
int slice = nb_slices_int - 1; slice >= 0; slice--)
3548 nb_diam_slices.
append_array((slice + 1) * diam_incr_int);
3552 for (
int slice =
nb_slices_ - 2; slice >= 0; slice--)
3555 for (
int slice = 0; slice <
nb_slices_; slice++)
3557 nb_diam_slices[slice],
3558 local_quantities_thermal_slices_time_index_folder);
3563 const double& nb_diam_slice,
3564 const Nom& local_quantities_thermal_slices_time_index_folder)
3566 int index_dir_local = -1;
3567 int index_dir_global = -1;
3569 int n_cross_section_1, n_cross_section_2;
3570 double diameter_approx = 0.;
3578 ref_ijk_ft_->milieu_ijk().get_direction_gravite(),
3580 DoubleTab slice_values(n_cross_section_1, n_cross_section_2);
3581 DoubleTab slice_velocity_values(n_cross_section_1, n_cross_section_2);
3583 for (
int l=0; l<2; l++)
3584 ij_indices[l] = IntTab(n_cross_section_1, n_cross_section_2);
3586 for (
int c=0; c<3; c++)
3587 ij_coords[c] = DoubleTab(n_cross_section_1, n_cross_section_2);
3596 local_quantities_thermal_slices_time_index_folder);
3604 local_quantities_thermal_slices_time_index_folder);
3605 DoubleTab temperature_slice = slice_values;
3614 local_quantities_thermal_slices_time_index_folder);
3615 DoubleTab velocity_slice = slice_values;
3624 slice_velocity_values,
3625 local_quantities_thermal_slices_time_index_folder);
3626 DoubleTab convection_slice = slice_values;
3635 local_quantities_thermal_slices_time_index_folder);
3636 DoubleTab diffusion_slice = slice_values;
3645 local_quantities_thermal_slices_time_index_folder);
3646 DoubleTab temperature_incr_slice = slice_values;
3649 local_quantities_thermal_slices_time_index_folder,
3660 temperature_incr_slice);
3664 int& index_dir_global,
3665 int& n_cross_section_1,
3666 int& n_cross_section_2,
3668 const double& nb_diam,
3673 if (upstream_dir == -1)
3691 n_cross_section_1 = nb_j_layer_tot;
3692 n_cross_section_2 = nb_k_layer_tot;
3696 n_cross_section_1 = nb_k_layer_tot;
3697 n_cross_section_2 = nb_i_layer_tot;
3701 n_cross_section_1 = nb_i_layer_tot;
3702 n_cross_section_2 = nb_j_layer_tot;
3706 n_cross_section_1 = nb_i_layer_tot;
3707 n_cross_section_2 = nb_j_layer_tot;
3714 assert(ref_ijk_ft_->get_interface().get_nb_bulles_reelles() == 1);
3715 DoubleTab bounding_box;
3716 bounding_box = ref_ijk_ft_->get_interface().get_ijk_compo_connex().get_bounding_box();
3717 const double Dbdir = bounding_box(0, dir, 1) - bounding_box(0, dir, 0);
3718 const double dirb = (*bubbles_barycentre_)(0, dir);
3720 double nb_diam_tmp = nb_diam;
3721 if (nb_diam_tmp == 0.)
3722 nb_diam_tmp = (ldir / Dbdir) / 2;
3724 nb_diam_tmp = signbit(nb_diam_tmp) ? nb_diam_tmp - 0.5: nb_diam_tmp + 0.5;
3725 double dirobj = dirb + nb_diam_tmp * Dbdir;
3728 const double origin_dir = geom.
get_origin(dir) ;
3733 while (dirobj < origin_dir)
3735 while (dirobj > origin_dir + ldir)
3738 assert(((dirobj >= origin_dir) && (dirobj <= origin_dir + ldir)));
3740 const double x2 = (dirobj - origin_dir) / ddir;
3741 int index_dir = (int) (floor(x2)) - offset_dir;
3742 if ((index_dir >= 0) && (index_dir < ndir))
3744 index_dir_local = index_dir;
3745 index_dir_global = index_dir + offset_dir;
3749 for (
int c=0; c<3; c++)
3750 diameter += bounding_box(0, c, 1) - bounding_box(0, c, 0);
3751 diameter *= (1. / 3.);
3758 const double& slice_pos,
3761 const IJK_Field_double& field,
3762 const IJK_Field_vector3_double& field_gradient,
3763 const IJK_Field_vector3_double& velocity,
3765 const int field_type,
3766 const int slice_to_nearest_plane,
3767 const int compute_indices)
3770 if (index_dir_local != -1)
3773 int offset_cross_dir_1, offset_cross_dir_2;
3774 int n_local_cross_section_1, n_local_cross_section_2;
3775 int * index_i =
nullptr;
3776 int * index_j =
nullptr;
3777 int * index_k =
nullptr;
3785 n_local_cross_section_1 = field.
nj();
3786 n_local_cross_section_2 = field.
nk();
3789 index_i = &index_dir_local;
3797 n_local_cross_section_1 = field.
nk();
3798 n_local_cross_section_2 = field.
ni();
3802 index_j = &index_dir_local;
3809 n_local_cross_section_1 = field.
ni();
3810 n_local_cross_section_2 = field.
nj();
3815 index_k = &index_dir_local;
3821 n_local_cross_section_1 = field.
ni();
3822 n_local_cross_section_2 = field.
nj();
3827 index_k = &index_dir_local;
3834 if (compute_indices)
3836 for (i=0; i<n_local_cross_section_1; i++)
3837 for (j=0; j<n_local_cross_section_2; j++)
3840 ij_indices[0](i+offset_cross_dir_1, j+offset_cross_dir_2) = i+offset_cross_dir_1;
3841 ij_indices[1](i+offset_cross_dir_1, j+offset_cross_dir_2) = j+offset_cross_dir_2;
3845 ij_coords[0](i+offset_cross_dir_1, j+offset_cross_dir_2) = slice_pos;
3846 ij_coords[1](i+offset_cross_dir_1, j+offset_cross_dir_2) = ij_coord[1];
3847 ij_coords[2](i+offset_cross_dir_1, j+offset_cross_dir_2) = ij_coord[2];
3850 ij_coords[0](i+offset_cross_dir_1, j+offset_cross_dir_2) = ij_coord[0];
3851 ij_coords[1](i+offset_cross_dir_1, j+offset_cross_dir_2) = slice_pos;
3852 ij_coords[2](i+offset_cross_dir_1, j+offset_cross_dir_2) = ij_coord[2];
3855 ij_coords[0](i+offset_cross_dir_1, j+offset_cross_dir_2) = ij_coord[0];
3856 ij_coords[1](i+offset_cross_dir_1, j+offset_cross_dir_2) = ij_coord[1];
3857 ij_coords[2](i+offset_cross_dir_1, j+offset_cross_dir_2) = slice_pos;
3866 if (slice_to_nearest_plane)
3871 for (i=0; i<n_local_cross_section_1; i++)
3872 for (j=0; j<n_local_cross_section_2; j++)
3873 values(i+offset_cross_dir_1, j+offset_cross_dir_2) = field(*index_i, *index_j, *index_k);
3876 for (i=0; i<n_local_cross_section_1; i++)
3877 for (j=0; j<n_local_cross_section_2; j++)
3878 values(i+offset_cross_dir_1, j+offset_cross_dir_2) = field_gradient[dir](*index_i, *index_j, *index_k);
3881 for (i=0; i<n_local_cross_section_1; i++)
3882 for (j=0; j<n_local_cross_section_2; j++)
3887 values(i + offset_cross_dir_1, j + offset_cross_dir_2) = (velocity[dir](*index_i, *index_j, *index_k) +
3888 velocity[dir](*index_i+incr_i, *index_j+incr_j, *index_k+incr_k)) * 0.5;
3897 const int nb_val = (int) n_local_cross_section_1 * n_local_cross_section_2;
3898 DoubleTab ij_coords_interp = values;
3899 DoubleVect field_interp(nb_val);
3900 ij_coords_interp.
resize(nb_val,3);
3902 for (i=0; i<n_local_cross_section_1; i++)
3903 for (j=0; j<n_local_cross_section_2; j++)
3909 ij_coords_interp(counter, 0) = slice_pos;
3910 ij_coords_interp(counter, 1) = ij_coord[1];
3911 ij_coords_interp(counter, 2) = ij_coord[2];
3914 ij_coords_interp(counter, 0) = ij_coord[0];
3915 ij_coords_interp(counter, 1) = slice_pos;
3916 ij_coords_interp(counter, 2) = ij_coord[2];
3919 ij_coords_interp(counter, 0) = ij_coord[0];
3920 ij_coords_interp(counter, 1) = ij_coord[1];
3921 ij_coords_interp(counter, 2) = slice_pos;
3931 ijk_interpolate_skip_unknown_points(field, ij_coords_interp, field_interp, INVALID_INTERP);
3934 ijk_interpolate_skip_unknown_points(field_gradient[dir], ij_coords_interp, field_interp, INVALID_INTERP);
3937 ijk_interpolate_skip_unknown_points(velocity[dir], ij_coords_interp, field_interp, INVALID_INTERP);
3943 for (i=0; i<n_local_cross_section_1; i++)
3944 for (j=0; j<n_local_cross_section_2; j++)
3946 values(i + offset_cross_dir_1, j + offset_cross_dir_2) = field_interp(counter);
3952 if (!compute_indices)
3957 int& index_dir_local,
3959 const double& slice_pos,
3963 const Nom& local_quantities_thermal_slices_time_index_folder)
3965 for (
int l=0; l<2; l++)
3967 for (
int c=0; c<3; c++)
3969 if (index_dir_local != -1)
3978 ref_ijk_ft_->eq_ns().get_velocity(),
3984 for (
int l=0; l<2; l++)
3986 for (
int c=0; c<3; c++)
3991 int& index_dir_local,
3993 const double& slice_pos,
3997 const Nom& local_quantities_thermal_slices_time_index_folder)
4006 ref_ijk_ft_->eq_ns().get_velocity(),
4013 int& index_dir_local,
4015 const double& slice_pos,
4018 DoubleTab& velocity_values,
4019 const Nom& local_quantities_thermal_slices_time_index_folder)
4028 ref_ijk_ft_->eq_ns().get_velocity(),
4035 int& index_dir_local,
4037 const double& slice_pos,
4041 DoubleTab& velocity_values,
4042 const Nom& local_quantities_thermal_slices_time_index_folder)
4051 ref_ijk_ft_->eq_ns().get_velocity(),
4064 ref_ijk_ft_->eq_ns().get_velocity(),
4068 DoubleTab velocity_values_frame_of_ref = velocity_values;
4075 Cerr <<
"Rising velocity on slices" << (*rising_velocity_overall_)[dir] << finl;
4076 Cerr <<
"Rising velocity magnitude" << (*rising_velocities_)(0) << finl;
4077 Cerr <<
"Rising vector sign" << (*rising_vectors_)(0, dir) << finl;
4079 velocity_values_frame_of_ref -= (*rising_velocity_overall_)[dir];
4080 values *= velocity_values_frame_of_ref;
4081 values *= (ref_ijk_ft_->milieu_ijk().get_rho_liquid() *
cp_liquid_);
4085 int& index_dir_local,
4087 const double& slice_pos,
4091 const Nom& local_quantities_thermal_slices_time_index_folder)
4100 ref_ijk_ft_->eq_ns().get_velocity(),
4109 int& index_dir_local,
4111 const double& slice_pos,
4115 const Nom& local_quantities_thermal_slices_time_index_folder)
4124 ref_ijk_ft_->eq_ns().get_velocity(),
4133 const Nom& local_quantities_thermal_slices_time_index_folder,
4134 const double& diameter_approx,
4135 const double& nb_diam_slice,
4136 const int& n_cross_section_1,
4137 const int& n_cross_section_2,
4140 const DoubleTab& temperature_slice,
4141 const DoubleTab& velocity_slice,
4142 const DoubleTab& convection_slice,
4143 const DoubleTab& diffusion_slice,
4144 const DoubleTab& temperature_incr_slice)
4148 Cerr <<
"Post-processing on the slices - INI" << finl;
4149 const int reset = 1;
4150 const double last_time = ref_ijk_ft_->schema_temps_ijk().get_current_time() - ref_ijk_ft_->schema_temps_ijk().get_timestep();
4152 const int max_digit = 3;
4153 const int max_digit_time = 8;
4154 const int max_rank_digit =
rank_ < 1 ? 1 : (int) (log10(
rank_) + 1);
4155 const int nb_digit_tstep = last_time_index < 1 ? 1 : (int) (log10(last_time_index) + 1);
4156 const int nb_digit_index_slice = slice < 1 ? 1 : (int) (log10(slice) + 1);
4157 Nom slice_name =
Nom(
"_thermal_rank_") +
Nom(std::string(max_digit - max_rank_digit,
'0')) +
Nom(
rank_) +
4158 Nom(
"_slice_index_") +
Nom(std::string(max_digit - nb_digit_index_slice,
'0')) +
Nom(slice)
4159 +
Nom(
"_local_quantities_thermal_slices_time_index_")
4160 +
Nom(std::string(max_digit_time - nb_digit_tstep,
'0')) +
Nom(last_time_index) +
Nom(
".out");
4161 Nom slice_header =
Nom(
"tstep\tthermal_rank\tpost_pro_index\tlinear_index"
4162 "\ttime\tcharacteristic_time\ttime_dimensionless"
4163 "\tnb_diam_slice\tindex_i\tindex_j\tx_coord\ty_coord\tz_coord"
4164 "\ttemperature\tvelocity"
4165 "\tconvective_term\tdiffusive_term"
4166 "\ttemperature_incr");
4167 SFichier fic = Open_file_folder(local_quantities_thermal_slices_time_index_folder, slice_name, slice_header, reset);
4168 const int nb_elem = n_cross_section_1 * n_cross_section_2;
4170 Cerr <<
"Number of elements per slice" << nb_elem << finl;
4171 const double gravite_norm = ref_ijk_ft_->milieu_ijk().get_gravite_norm();
4172 const double characteristic_time = (gravite_norm > 1e-6) ? last_time / sqrt(diameter_approx * gravite_norm) : last_time;
4173 const double rho_l = ref_ijk_ft_->milieu_ijk().get_rho_liquid();
4174 const double rho_v = ref_ijk_ft_->milieu_ijk().get_rho_vapour();
4175 const double archimedes_time = sqrt(gravite_norm * (rho_l - rho_v) / (diameter_approx * rho_l));
4176 const double dimensionless_time = (archimedes_time > 1e-6) ? last_time / archimedes_time : last_time;
4178 for (
int i=0; i<n_cross_section_1; i++)
4179 for (
int j=0; j<n_cross_section_2; j++)
4181 fic << last_time_index <<
" ";
4182 fic <<
rank_ <<
" " << slice <<
" " << counter <<
" ";
4183 fic << last_time <<
" ";
4184 fic << characteristic_time <<
" ";
4185 fic << dimensionless_time <<
" ";
4186 fic << nb_diam_slice <<
" ";
4187 fic << ij_indices[0](i,j) <<
" ";
4188 fic << ij_indices[1](i,j) <<
" ";
4189 fic << ij_coords[0](i,j) <<
" ";
4190 fic << ij_coords[1](i,j) <<
" ";
4191 fic << ij_coords[2](i,j) <<
" ";
4192 fic << temperature_slice(i,j) <<
" ";
4193 fic << velocity_slice(i,j) <<
" ";
4194 fic << convection_slice(i,j) <<
" ";
4195 fic << diffusion_slice(i,j) <<
" ";
4196 fic << temperature_incr_slice(i,j) <<
" ";
4200 assert(counter == nb_elem);
4202 Cerr <<
"Post-processing on the slices - END" << finl;
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.
bool get_periodic_flag(int direction) const
Method returns true if periodic in this direction.
double get_domain_length(int direction) const
Returns the length of the entire domain in requested direction.
double get_constant_delta(int direction) const
Returns the size of cells in a direction.
double get_origin(int direction) const
Returns the coordinate of the first node (global) of the mesh in the requested 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 echange_espace_virtuel(int ghost)
Exchange data over "ghost" number of cells.
const Domaine_IJK & get_domaine() const
void update_thermal_properties() override
void reajust_probes_length_collisions()
void clip_max_temperature_values() override
bool disable_subresolution_
void prepare_thermal_flux_correction()
double local_dt_fourier_counter_
void compute_Nusselt_spherical_diffusion()
Motcles source_terms_type_dict_
Nom generate_expression_temperature_ini(const double &time_scope, const double x, const double y, const double z)
double compute_spherical_steady_dirichlet_left_right_value(const double &r)
bool use_cell_neighbours_for_fluxes_spherical_correction_
double end_boundary_condition_value_
Matrice thermal_subproblems_matrix_assembly_for_solver_
IJK_Field_vector3_double cell_faces_corrected_convective_
bool readjust_probe_length_from_vertices_
void complete_field_thermal_wake_slice_ij_convection(const int &slice, int &index_dir_local, const int &dir, const double &slice_pos, FixedVector< IntTab, 2 > &ij_indices, FixedVector< DoubleTab, 3 > &ij_coords, DoubleTab &values, DoubleTab &velocity_values, const Nom &local_quantities_thermal_slices_time_index_folder)
bool probe_variations_priority_
bool correct_neighbours_using_probe_length_
bool copy_fluxes_on_every_procs_
void set_zero_temperature_increment() override
void compute_second_order_operator(Matrice &radial_second_order_operator, double dr)
double get_modified_time() override
int first_step_thermals_post_
Matrice thermal_subproblems_matrix_assembly_
int distance_cell_faces_from_lrs_
void interpolate_temperature_on_downstream_line(const int &dir, const int &nb_thermal_circles, const int &index_circle, const int &index_line, const std::vector< std::vector< ArrOfInt > > &is_point_on_proc, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, DoubleVect &values)
bool computed_centred_bubble_start_
IJK_Field_double temperature_cell_neighbours_debug_
double nb_diam_thermal_line_length_
bool impose_user_boundary_condition_end_value_
void initialise_thermal_line_points(const int &line_dir, ArrOfDouble &linear_coord, FixedVector< ArrOfDouble, 3 > &coordinates_line, double &diameter)
double pre_factor_subproblems_number_
void clip_min_temperature_values() override
void compute_convective_fluxes_face_centre() override
IJK_Field_vector3_double interfacial_heat_flux_contrib_
double heat_flux_spherical_
bool reference_gfm_on_probes_
bool neglect_frame_of_reference_radial_advection_
bool keep_max_flux_correction_
void initialise_thermal_subproblems_list()
DoubleVect radial_coordinates_
bool clip_temperature_values_
bool approximate_temperature_increment_
bool disable_probe_weak_gradient_
void compute_diffusion_increment() override
ArrOfDouble thermal_flux_out_contrib_
void compute_min_max_reachable_fluxes()
void compute_first_order_operator_raw(Matrice &radial_first_order_operator)
void pre_initialise_thermal_subproblems_matrices()
void compute_first_order_operator(Matrice &radial_first_order_operator, double dr)
void store_previous_temperature_indicator_velocities()
Matrice identity_matrix_subproblems_
Motcles boundary_condition_end_dict_
double post_process_thermal_wake_slice_index_dir(int &index_dir_local, int &index_dir_global, int &n_cross_section_1, int &n_cross_section_2, int &dir, const double &nb_diam, int upstream_dir, int gravity_dir, double &diameter)
Matrice radial_diffusion_matrix_
Matrice * thermal_subproblems_matrix_assembly_for_solver_ref_
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
double nusselt_spherical_diffusion_
bool probe_variations_enabled_
bool post_process_thermal_lines_
IJK_Field_vector3_double cell_faces_neighbours_corrected_diffusive_
double get_probes_length()
double probes_end_value_coeff_
void compute_temperature_cell_centres_first_correction()
IJK_Field_int neighbours_temperature_to_correct_trimmed_
int initialise_sparse_indices_
IJK_Field_vector3_double interfacial_heat_flux_current_
void solve_thermal_subproblems()
bool disable_post_processing_probes_out_files_
bool post_process_all_probes_
void complete_field_thermal_wake_slice_ij_diffusion(const int &slice, int &index_dir_local, const int &dir, const double &slice_pos, FixedVector< IntTab, 2 > &ij_indices, FixedVector< DoubleTab, 3 > &ij_coords, DoubleTab &values, const Nom &local_quantities_thermal_slices_time_index_folder)
void prepare_ij_fluxes_k_layers() override
bool debug_probe_collision_
bool use_reachable_fluxes_
IJK_Field_vector3_int cell_faces_neighbours_corrected_min_max_bool_
void set_field_temperature_per_bubble(const int index_bubble)
int boundary_condition_end_
bool diffusive_flux_correction_
bool disable_fo_flux_correction_
void clean_ijk_intersections() override
double error_temperature_ana_rel_total_
int boundary_condition_interface_
double error_temperature_ana_squared_total_
bool implicit_solver_from_previous_probe_field_
void enforce_periodic_temperature_boundary_value() override
void evaluate_total_liquid_parameter_squared(const IJK_Field_double &field, double &total_parameter)
void compute_second_order_operator_raw(Matrice &radial_second_order_operator)
void compute_temperature_cell_centres(const int first_corr) override
int nb_iter_explicit_local_
IJK_Field_vector3_double neighbours_faces_weighting_colinearity_
IJK_SolveSys_FD_thermal one_dimensional_advection_diffusion_thermal_solver_implicit_
bool store_cell_faces_corrected_
void correct_temperature_for_eulerian_fluxes() override
bool conserve_max_interfacial_fluxes_
void interpolate_convective_term_on_downstream_line(const int &dir, const int &nb_thermal_circles, const int &index_circle, const int &index_line, const std::vector< std::vector< ArrOfInt > > &is_point_on_proc, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, DoubleVect &values)
void store_temperature_before_extrapolation() override
void complete_convective_flux_frame_of_reference()
bool neighbours_last_faces_colinearity_face_weighting_
void approximate_temperature_increment_material_derivative()
bool single_centred_bubble_
void initialize(const Domaine_IJK &splitting) override
bool compute_radial_displacement_
void complete_field_thermal_wake_slice_ij_values(int &index_dir_local, const int &dir, const double &slice_pos, FixedVector< IntTab, 2 > &ij_indices, FixedVector< DoubleTab, 3 > &ij_coords, const IJK_Field_double &field, const IJK_Field_vector3_double &field_gradient, const IJK_Field_vector3_double &velocity, DoubleTab &values, const int field_type, const int slice_to_nearest_plane, const int compute_indices=0)
bool smooth_temperature_field_
IJK_Field_double probe_collision_debug_field_
void detect_probe_collision()
double modified_time_init_
double interfacial_boundary_condition_value_
bool post_process_thermal_slices_
void update_intersections() override
bool source_terms_correction_
FixedVector< ArrOfInt, 6 > first_indices_sparse_matrix_
void retrieve_temperature_solution()
void find_points_on_proc(std::vector< std::vector< ArrOfInt > > &is_point_on_proc, std::vector< std::vector< FixedVector< ArrOfInt, 3 > > > &ijk_indices, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, const int &line_dir)
int neighbours_last_faces_weighting_
bool reconstruct_previous_probe_field_
void post_process_thermal_downstream_lines(const Nom &local_quantities_thermal_lines_time_index_folder) override
void initialise_identity_matrices(Matrice &identity_matrix, Matrice &identity_matrix_subproblems)
void compute_convective_diffusive_fluxes_face_centre() override
IJK_Field_double neighbours_temperature_colinearity_weighting_
bool first_time_step_implicit_
void min_max_ldir(const int &dir, const Domaine_IJK &geom, double &min_dir, double &max_dir)
bool enable_resize_probe_collision_
void reajust_probes_length()
int impose_fo_flux_correction_
bool enable_probe_collision_detection_
double single_centred_bubble_radius_ini_
void compute_source_terms_impose_subresolution_boundary_conditions()
Motcles boundary_condition_interface_dict_
double local_dt_cfl_min_delta_xyz_
void correct_operators_for_visu() override
bool advected_frame_of_reference_
IJK_Finite_Difference_One_Dimensional_Matrix_Assembler finite_difference_assembler_
Matrice radial_first_order_operator_
void compare_temperature_fields(const IJK_Field_double &temperature, const IJK_Field_double &temperature_ana, IJK_Field_double &error_temperature_ana, IJK_Field_double &error_temperature_ana_rel)
void post_process_after_temperature_increment() override
bool disable_slice_to_nearest_plane_
bool find_reachable_fluxes_
void set_param(Param ¶m) const override
IJK_Field_vector3_double cell_faces_corrected_diffusive_
IJK_Field_vector3_double cell_faces_neighbours_corrected_convective_frame_of_reference_
void correct_temperature_for_visu() override
void compute_mean_liquid_temperature()
bool copy_temperature_on_every_procs_
IJK_Field_vector3_int cell_faces_neighbours_corrected_all_bool_
void initialise_radial_diffusion_operator(Matrice &radial_second_order_operator, Matrice &radial_diffusion_matrix)
IJK_Field_int zero_liquid_neighbours_
IJK_Field_vector3_double cell_faces_neighbours_corrected_convective_
void post_processed_fields_on_downstream_line(const Nom &local_quantities_thermal_lines_time_index_folder, const int &line_dir, const int &linear_circle_line_index, const int &index_circle, const int &index_line, const double &diameter_approx, std::vector< std::vector< ArrOfInt > > &is_point_on_proc, const std::vector< std::vector< FixedVector< ArrOfInt, 3 > > > &indices_ijk, const ArrOfDouble &linear_coord, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, const DoubleVect &temperature_line, const DoubleVect &velocity_line, const DoubleVect &convective_term_line, const DoubleVect &diffusive_term_line, const DoubleVect &temperature_incr_line)
int nb_thermal_line_points_
int points_per_thermal_subproblem_
bool disable_distance_cell_faces_from_lrs_
bool override_vapour_mixed_values_
void prepare_temporal_schemes()
void reset_subresolution_distributed_vectors()
bool use_normal_gradient_for_flux_corr_
double find_time_dichotomy_derivative(const double &temperature_derivative, double &temperature_limit_left, double &temperature_limit_right)
void compute_thermal_subproblems() override
IJK_Field_double temperature_cell_neighbours_
IJK_Field_vector3_int cell_faces_corrected_bool_
double delta_T_subcooled_overheated_
void set_subproblems_interfaces_fields(const Domaine_IJK &splitting) override
void initialise_radial_diffusion_operator_sparse(Matrice &radial_second_order_operator, Matrice &radial_diffusion_matrix)
bool compute_normal_derivatives_on_reference_probes_
void post_process_thermal_wake_slices(const Nom &local_quantities_thermal_slices_time_index_folder) override
void interpolate_velocity_on_downstream_line(const int &dir, const int &nb_thermal_circles, const int &index_circle, const int &index_line, const std::vector< std::vector< ArrOfInt > > &is_point_on_proc, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, DoubleVect &values)
int correct_first_iter_deactivate_cell_neighbours_
DoubleVect thermal_subproblems_temperature_solution_ini_
bool use_temperature_cell_neighbours_
void compute_temperature_cell_centres_second_correction()
bool fluxes_correction_conservations_
Matrice radial_convection_matrix_
int fluxes_corrections_weighting_
bool remove_append_subproblems_
bool disable_spherical_diffusion_start_
int neighbours_corrected_rank_
bool neighbours_colinearity_weighting_
IJK_Field_vector3_double interfacial_heat_flux_dispatched_
Matrice radial_second_order_operator_
IJK_Field_vector3_int cell_faces_neighbours_corrected_diag_bool_
bool find_temperature_cell_neighbours_
void set_field_T_ana() override
double get_time_inflection_derivative(double &temperature_end_min)
void initialise_radial_convection_operator_sparse(Matrice &radial_first_order_operator, Matrice &radial_convection_matrix)
Matrice radial_second_order_operator_raw_
int temperature_ini_type_
void compute_local_substep()
bool disable_first_step_thermals_post_
double local_cfl_time_step_probe_length_
IJK_Field_int neighbours_temperature_to_correct_
bool correct_temperature_cell_neighbours_first_iter_
bool neighbours_last_faces_distance_colinearity_face_weighting_
Matrice thermal_subproblems_matrix_assembly_for_solver_reduced_
void approx_erf_inverse(const double &x, double &res)
void initialise_radial_convection_operator(Matrice &radial_first_order_operator, Matrice &radial_convection_matrix)
double mean_liquid_temperature_
void check_wrong_values_rhs()
bool pre_initialise_thermal_subproblems_list_
int neighbours_weighting_
void initialise_thermal_dowstreamlines_tabs(std::vector< std::vector< FixedVector< ArrOfInt, 3 > > > ¶meters, const int &nb_thermal_circles, const int &nb_thermal_lines)
void complete_field_thermal_wake_slice_ij_indices_coords(const int &slice, int &index_dir_local, const int &dir, const double &slice_pos, FixedVector< IntTab, 2 > &ij_indices, FixedVector< DoubleTab, 3 > &ij_coords, DoubleTab &values, const Nom &local_quantities_thermal_slices_time_index_folder)
void interpolate_indicator_on_probes()
Nom compute_quasi_static_spherical_diffusion_expression(const double &time_scope, const int index_bubble, const int index_bubble_real)
bool impose_boundary_condition_interface_from_simulation_
bool disable_probe_weak_gradient_gfm_
double error_temperature_ana_total_
bool neighbours_distance_weighting_
void interpolate_diffusive_term_on_downstream_line(const int &dir, const int &nb_thermal_circles, const int &index_circle, const int &index_line, const std::vector< std::vector< ArrOfInt > > &is_point_on_proc, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, DoubleVect &values)
bool first_time_step_explicit_
bool allow_temperature_correction_for_visu_
void compute_radial_first_second_order_operators(Matrice &radial_first_order_operator_raw, Matrice &radial_second_order_operator_raw, Matrice &radial_first_order_operator, Matrice &radial_second_order_operator)
bool keep_first_reachable_fluxes_
int stencil_periodic_boundary_value_
void compute_temperature_init() override
void initialise_identity_matrices_sparse(Matrice &identity_matrix, Matrice &identity_matrix_subproblems)
double compute_spherical_steady_dirichlet_left_right_integral(const double &temperature_end_prev)
DoubleVect thermal_subproblems_temperature_solution_
void complete_field_thermal_wake_slice_ij_velocity(const int &slice, int &index_dir_local, const int &dir, const double &slice_pos, FixedVector< IntTab, 2 > &ij_indices, FixedVector< DoubleTab, 3 > &ij_coords, DoubleTab &velocity_values, const Nom &local_quantities_thermal_slices_time_index_folder)
void pre_initialise_thermal_subproblems_any_matrices()
Matrice identity_matrix_explicit_implicit_
bool enable_mixed_cells_increment_
bool use_velocity_cartesian_grid_
void clean_thermal_subproblems() override
bool thermal_slices_regions_
void post_process_thermal_wake_slice(const int &slice, const double &nb_diam_slice, const Nom &local_quantities_thermal_slices_time_index_folder)
bool disable_mixed_cells_increment_
double nusselt_spherical_diffusion_liquid_
Matrice radial_first_order_operator_raw_
void interpolate_project_velocities_on_probes()
bool find_cell_neighbours_for_fluxes_spherical_correction_
double local_dt_cfl_counter_
void replace_temperature_cell_centres_neighbours(const int &use_neighbours_temperature_to_correct_trimmed)
bool neighbours_colinearity_distance_weighting_
double coeff_distance_diagonal_
void compute_ghost_cell_numbers_for_subproblems(const Domaine_IJK &splitting, int ghost_init) override
bool neighbours_last_faces_distance_weighting_
void correct_temperature_increment_for_interface_leaving_cell() override
double compute_spherical_steady_dirichlet_left_right_derivative_value(const double &r, const double &temperature_prev)
void compute_radial_subresolution_convection_diffusion_operators()
void set_thermal_subresolution_outputs(const Nom &interfacial_quantities_thermal_probes, const Nom &shell_quantities_thermal_probes, const Nom &overall_bubbles_quantities, const Nom &local_quantities_thermal_probes_time_index_folder) override
void compute_diffusive_fluxes_face_centre() override
double local_fourier_time_step_probe_length_
bool first_time_step_varying_probes_
double find_time_dichotomy_integral(const double &temperature_integral, double &temperature_end_prev)
IJK_Field_double debug_LRS_cells_
void find_cocentric_line_coordinates(const int &nb_thermal_circles, const int &nb_thermal_lines, const double &diameter_approx, std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides)
bool use_corrected_velocity_convection_
void compute_overall_probes_parameters()
void recompute_temperature_init() override
bool convective_flux_correction_
void evaluate_total_liquid_absolute_parameter(const IJK_Field_double &field, double &total_parameter)
bool first_time_step_temporal_
bool enforce_periodic_boundary_value_
bool neighbours_last_faces_colinearity_weighting_
void correct_any_temperature_fields_for_eulerian_fluxes(IJK_Field_double &temperature)
IJK_Field_vector3_double cell_faces_neighbours_corrected_velocity_temperature_
void complete_field_thermal_wake_slice_ij_temperature_incr(const int &slice, int &index_dir_local, const int &dir, const double &slice_pos, FixedVector< IntTab, 2 > &ij_indices, FixedVector< DoubleTab, 3 > &ij_coords, DoubleTab &values, const Nom &local_quantities_thermal_slices_time_index_folder)
void convert_into_sparse_matrix()
void complete_thermal_fluxes_face_centre(const int &fluxes_correction_conservations)
void initialise_thermal_subproblems()
void correct_any_temperature_field_for_visu(IJK_Field_double &temperature)
void clear_sort_problems_colliding_bubbles()
IJK_One_Dimensional_Subproblems thermal_local_subproblems_
FixedVector< ArrOfInt, 4 > ijk_indices_flux_contrib_
bool local_diffusion_fourier_priority_
void interpolate_fields_on_downstream_line(const int &dir, const int &nb_thermal_circles, const int &index_circle, const int &index_line, const std::vector< std::vector< ArrOfInt > > &is_point_on_proc, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, const IJK_Field_double &field, const IJK_Field_vector3_double &field_gradient, const IJK_Field_vector3_double &velocity, DoubleVect &values, const int field_type)
bool neighbours_last_faces_distance_colinearity_weighting_
void complete_field_thermal_wake_slice_ij_temperature(const int &slice, int &index_dir_local, const int &dir, const double &slice_pos, FixedVector< IntTab, 2 > &ij_indices, FixedVector< DoubleTab, 3 > &ij_coords, DoubleTab &values, const Nom &local_quantities_thermal_slices_time_index_folder)
DoubleVect thermal_subproblems_rhs_assembly_
void interpolate_temperature_increment_on_downstream_line(const int &dir, const int &nb_thermal_circles, const int &index_circle, const int &index_line, const std::vector< std::vector< ArrOfInt > > &is_point_on_proc, const FixedVector< ArrOfDouble, 3 > &coordinates_line, const std::vector< std::vector< FixedVector< ArrOfDouble, 2 > > > &coordinates_sides, DoubleVect &values)
int nb_thermal_concentric_circles_
IJK_SolveSys_FD_thermal one_dimensional_advection_diffusion_thermal_solver_
void compare_fluxes_thermal_subproblems() override
void post_processed_field_thermal_wake_slice_ij(const int &slice, const Nom &local_quantities_thermal_slices_time_index_folder, const double &diameter_approx, const double &nb_diam_slice, const int &n_cross_section_1, const int &n_cross_section_2, const FixedVector< IntTab, 2 > ij_indices, const FixedVector< DoubleTab, 3 > &ij_coords, const DoubleTab &temperature_slice, const DoubleTab &velocity_slice, const DoubleTab &convection_slice, const DoubleTab &diffusion_slice, const DoubleTab &temperature_incr_slice)
IJK_Field_vector3_double div_coeff_grad_T_raw_
OpHessFluxCentre2IJKScalar_double temperature_hess_flux_op_centre_
bool store_flux_operators_for_energy_balance_
std::shared_ptr< IJK_Field_double > div_coeff_grad_T_volume_
int compute_grad_T_interface_
Operateur_IJK_elem_conv temperature_convection_op_
IJK_Field_double u_T_convective_volume_
virtual void compute_temperature_init()
Operateur_IJK_elem_diff temperature_diffusion_op_
virtual void update_thermal_properties()
int compute_hess_diag_T_elem_
IJK_Field_double u_T_convective_
Motcles liste_post_instantanes_
IJK_Field_double temperature_ana_
virtual void initialize(const Domaine_IJK &splitting)
bool compute_eulerian_compo_
const IJK_Field_vector3_double * eulerian_normal_vectors_ns_normed_
IJK_Field_vector3_double grad_T_elem_
virtual void set_param(Param ¶m) const override
int latastep_reprise_ini_
IJK_Field_double temperature_before_extrapolation_
int compute_rising_velocities_
IJK_One_Dimensional_Subproblems_Interfaces_Fields thermal_local_subproblems_interfaces_fields_
bool conv_temperature_negligible_
IJK_Field_double div_coeff_grad_T_volume_uncorrected_
std::shared_ptr< IJK_Field_double > d_temperature_
bool diff_temperature_negligible_
virtual void post_process_after_temperature_increment()
IJK_Field_double div_coeff_grad_T_
IJK_Field_double ecart_t_ana_rel_
IJK_Field_double ecart_t_ana_
IJK_Field_double d_temperature_uncorrected_
IJK_Field_vector3_double rho_cp_u_T_convective_raw_
std::shared_ptr< IJK_Field_double > temperature_
IJK_Field_double temperature_for_ini_per_bubble_
void compute_cell_diagonal(const Domaine_IJK &splitting)
int compute_hess_cross_T_elem_
C'est le plus simple des descripteurs, utilise pour les tableaux de valeurs aux sommets,...
void block_to_morse(Matrice_Morse &matrix) const
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
Classe Matrice Classe generique de la hierarchie des matrices.
Une chaine de caractere (Nom) en majuscules.
class Nom Une chaine de caractere pour nommer les objets de TRUST
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter_flag(const char *keyword, const bool *value)
Register a boolean flag whose mere presence switches it to true.
void dictionnaire(const char *option_name, int value)
Add an (option name, integer value) entry to the dictionary attached to a previously registered integ...
int lire_sans_accolade(Entree &is)
Read all required keywords in the order they were registered, without enclosing braces.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
int lire_avec_accolades_depuis(Entree &is)
Parse the parameter block { ... } from is.
static int check_int_overflow(trustIdType)
static void mp_sum_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static double mp_sum(double)
Calcule la somme de x sur tous les processeurs du groupe courant.
static int me()
renvoie mon rang dans le groupe de communication courant.
static int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
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)
_SIZE_ size_array() const
void resize(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)