9#include <deal.II/base/exceptions.h>
14 PhaseChangeIntervalError,
17 <<
"Liquidus temperature : " << arg1
18 <<
" is not strictly superior to Solidus temperature: " << arg2
19 <<
" The liquidus temperature specific is below or equal to the solidus temperature."
20 <<
" The phase change specific heat model requires that T_liquidus>T_solidus.");
25 <<
"Number of fluids: " << arg1
26 <<
" is not 1 (single phase simulation) or 2 (CLS/Cahn-Hilliard simulations). This is currently not supported.");
30 <<
"Number of solids: " << arg1
31 <<
" is larger than 1. This is currently not supported.");
35 <<
"Number of unresolved dispersed phases: " << arg1
36 <<
" is larger than 1. This is currently not supported.");
40 <<
"Number of material interactions: " << arg1
41 <<
" is larger than 3. This is currently not supported.");
47 <<
"The first fluid's id is " << arg1 <<
" and the id of the second fluid is "
48 << arg2 <<
". The first fluid's id should be lower than the second fluid's.");
51 MaterialInteractionTypeError,
52 "Invalid material interaction type. The choices are <fluid_fluid|fluid_solid|fluid_dispersed_phase>.");
55 TwoDimensionalLaserError,
57 <<
"Laser beam orientation in : " << arg1
58 <<
"-dimensional simulations cannot be defined in the z direction");
64 <<
"Error in 'mesh adaptation' : number of '" << arg1 <<
"' ("
65 << arg2 <<
") does not correspond to the number of 'variables' ("
72 <<
"The parameter '" << arg1 <<
"' is set to: " << arg2
73 <<
". However, it should be strictly greater than " << arg3
77 ListSizeIncoherentWithDeclaredNumber,
82 <<
"'" << arg1 <<
"' was set to " << arg2 <<
" and the list '" << arg3
83 <<
"' has a size of " << arg4
84 <<
". However, the list size should correspond to the number declared.");
91 <<
"There is a size mismatch between 2 lists. The list '" << arg1
92 <<
"' and the list '" << arg2 <<
"' have respectively sizes of "
93 << arg3 <<
" and " << arg4
94 <<
". However, they should be of the same size.");
109 const std::vector<Verbosity> &
126 const std::vector<FluidIndicator> &
136 const bool require_subsection_size)
150 deprecated_bdf_startup_method_names = {
151 {
"multiple step bdf",
161 prm.enter_subsection(
"simulation control");
166 "The time integration scheme.");
170 "bdf startup method",
172 "The kind of method used to startup high order bdf methods.",
173 deprecated_bdf_startup_method_names);
175 prm.declare_entry(
"time step",
176 Patterns::Tools::Convert<double>::to_string(
182 Patterns::Tools::Convert<double>::to_string(defaults.
time_end),
184 "Time value at which a transient simulation ends. Only used when the "
185 "end control is set to time");
188 Patterns::Tools::Convert<unsigned int>::to_string(
190 Patterns::Integer(0),
191 "Transient iteration number at which a transient simulation ends. "
192 "Only used when the end control is set to iteration");
193 prm.declare_entry(
"startup time scaling",
194 Patterns::Tools::Convert<double>::to_string(
197 "Scaling factor used in the iterations necessary to "
198 "start-up the BDF schemes.");
200 "adapt time step to respect CFL",
201 Patterns::Tools::Convert<bool>::to_string(defaults.
adapt_with_cfl),
203 "Adapt the time step to respect the maximum CFL condition. When multiple conditions are applied to the time step, this ensures that the CFL condition is also respected (Δt ≤ Δt_{CFL}). <true|false>");
205 "override time step on restart",
206 Patterns::Tools::Convert<bool>::to_string(
209 "Override checkpointed time step upon restart <true|false>");
211 "time step independent of end time",
212 Patterns::Tools::Convert<bool>::to_string(
215 "Ensures that the correct time step is kept when using adaptive time step simulations");
216 prm.declare_entry(
"number mesh adapt",
217 Patterns::Tools::Convert<unsigned int>::to_string(
220 "Number of mesh adaptation (for steady simulations)");
221 prm.declare_entry(
"max cfl",
222 Patterns::Tools::Convert<double>::to_string(
225 "Maximum CFL value");
226 prm.declare_entry(
"max time step",
227 Patterns::Tools::Convert<double>::to_string(
230 "Maximum time step value");
232 "adapt time step to respect CTR",
233 Patterns::Tools::Convert<bool>::to_string(
236 "By setting to 'true', it ensures that the imposed maximum capillary time-step ratio (CTR) is respected throughout the simulation (Δt ≤ Δt_{CTR}). <true|false>");
238 "max capillary time-step ratio",
239 Patterns::Tools::Convert<double>::to_string(
242 "The capillary time-step ratio (CTR) corresponds to the ratio of the time step over capillary time-step constraint (Δt/Δt_σ)");
243 prm.declare_entry(
"stop tolerance",
244 Patterns::Tools::Convert<double>::to_string(
247 "Tolerance at which the simulation is stopped");
249 prm.declare_entry(
"adaptative time step scaling",
250 Patterns::Tools::Convert<double>::to_string(
253 "Adaptative time step scaling");
257 Patterns::FileName(),
258 "Path of the folder where the output files are written");
260 prm.declare_entry(
"output name",
262 Patterns::FileName(),
263 "File output prefix");
266 prm.declare_entry(
"output frequency",
267 Patterns::Tools::Convert<unsigned int>::to_string(
270 "Output iteration frequency");
272 prm.declare_entry(
"output time frequency",
273 Patterns::Tools::Convert<double>::to_string(
276 "Output time frequency");
282 "Output the boundaries of the domain along with their ID");
284 prm.declare_entry(
"log frequency",
285 Patterns::Tools::Convert<unsigned int>::to_string(
290 prm.declare_entry(
"log precision",
291 Patterns::Tools::Convert<unsigned int>::to_string(
294 "Display precision when writing to log",
295 "This setting percolates to all output to the log");
299 Patterns::Tools::Convert<std::vector<double>>::to_string(
301 Patterns::List(Patterns::Double()),
302 "List of specific output times separated with a comma");
308 "The control for the end of a transient simulation. The end "
309 "condition is either a maximum time value (time end) or a maximum "
310 "number of transient iterations (iteration end).");
316 "The control for the output of the simulation results. "
317 "Results can be either outputted at constant iteration frequency or at constant time.");
320 "output time interval",
321 Patterns::Tools::Convert<std::vector<double>>::to_string(
323 Patterns::List(Patterns::Double()),
324 "Output files for a desired time interval");
326 prm.declare_entry(
"subdivision",
327 Patterns::Tools::Convert<unsigned int>::to_string(
330 "Subdivision of mesh cell in postprocessing");
332 prm.declare_entry(
"group files",
333 Patterns::Tools::Convert<unsigned int>::to_string(
336 "Maximal number of vtu output files");
338 prm.leave_subsection();
344 prm.enter_subsection(
"simulation control");
349 deprecated_bdf_startup_method_names,
350 "bdf startup method");
355 dt = prm.get_double(
"time step");
356 time_end = prm.get_double(
"time end");
360 prm.get_bool(
"time step independent of end time");
361 maxCFL = prm.get_double(
"max cfl");
362 max_dt = prm.get_double(
"max time step");
364 prm.get_bool(
"adapt time step to respect CTR");
366 prm.get_double(
"max capillary time-step ratio");
369 prm.get_double(
"adaptative time step scaling");
373 prm.get_bool(
"override time step on restart");
393 prm.leave_subsection();
399 const Timer defaults;
400 prm.enter_subsection(
"timer");
405 "Clock monitoring methods.");
407 "write time in error table",
408 Patterns::Tools::Convert<bool>::to_string(
411 "Boolean to define if the time is written in the error table");
413 prm.leave_subsection();
419 prm.enter_subsection(
"timer");
424 prm.leave_subsection();
431 prm.enter_subsection(
"power-law");
433 prm.declare_entry(
"K",
434 Patterns::Tools::Convert<double>::to_string(defaults.
K),
436 "Fluid consistency index");
437 prm.declare_entry(
"n",
438 Patterns::Tools::Convert<double>::to_string(defaults.
n),
440 "Flow behavior index");
441 prm.declare_entry(
"shear rate min",
442 Patterns::Tools::Convert<double>::to_string(
445 "Minimal shear rate magnitude");
447 prm.leave_subsection();
454 prm.enter_subsection(
"power-law");
456 K = prm.get_double(
"K");
461 n = prm.get_double(
"n");
467 prm.leave_subsection();
474 prm.enter_subsection(
"carreau");
476 prm.declare_entry(
"viscosity_0",
477 Patterns::Tools::Convert<double>::to_string(
480 "Kinematic viscosity at rest");
481 prm.declare_entry(
"viscosity_inf",
482 Patterns::Tools::Convert<double>::to_string(
485 "Kinematic viscosity for an infinite shear rate");
486 prm.declare_entry(
"lambda",
487 Patterns::Tools::Convert<double>::to_string(
491 prm.declare_entry(
"a",
492 Patterns::Tools::Convert<double>::to_string(defaults.
a),
494 "Carreau parameter");
495 prm.declare_entry(
"n",
496 Patterns::Tools::Convert<double>::to_string(defaults.
n),
500 prm.leave_subsection();
507 prm.enter_subsection(
"carreau");
516 lambda = prm.get_double(
"lambda");
522 a = prm.get_double(
"a");
523 n = prm.get_double(
"n");
525 prm.leave_subsection();
531 prm.enter_subsection(
"non newtonian");
536 prm.leave_subsection();
543 prm.enter_subsection(
"non newtonian");
548 prm.leave_subsection();
556 prm.enter_subsection(
"immersed solid tanh");
558 prm.declare_entry(
"tracer diffusivity inside",
559 Patterns::Tools::Convert<double>::to_string(
562 "Tracer diffusivity inside the immersed solid");
563 prm.declare_entry(
"tracer diffusivity outside",
564 Patterns::Tools::Convert<double>::to_string(
567 "Tracer diffusivity outside the immersed solid");
568 prm.declare_entry(
"tracer reaction constant inside",
569 Patterns::Tools::Convert<double>::to_string(
572 "Tracer reaction constant inside the immersed solid");
573 prm.declare_entry(
"tracer reaction constant outside",
574 Patterns::Tools::Convert<double>::to_string(
577 "Tracer reaction constant outside the immersed solid");
578 prm.declare_entry(
"thickness",
579 Patterns::Tools::Convert<double>::to_string(
582 "Thickness to be used with the tanh function");
584 prm.leave_subsection();
589 ParameterHandler &prm,
592 prm.enter_subsection(
"immersed solid tanh");
597 prm.get_double(
"tracer reaction constant inside");
599 prm.get_double(
"tracer reaction constant outside");
606 prm.leave_subsection();
613 prm.enter_subsection(
"immersed solid gaussian");
615 prm.declare_entry(
"tracer diffusivity interface",
616 Patterns::Tools::Convert<double>::to_string(
619 "Tracer diffusivity at the immersed solid interface");
620 prm.declare_entry(
"tracer diffusivity bulk",
621 Patterns::Tools::Convert<double>::to_string(
624 "Tracer diffusivity in the phase bulk");
626 "tracer reaction constant interface",
627 Patterns::Tools::Convert<double>::to_string(
630 "Tracer reaction constant at the immersed solid interface");
631 prm.declare_entry(
"tracer reaction constant bulk",
632 Patterns::Tools::Convert<double>::to_string(
635 "Tracer reaction constant in the phase bulk");
636 prm.declare_entry(
"thickness",
637 Patterns::Tools::Convert<double>::to_string(
640 "Thickness to be used with the Gaussian function");
642 prm.leave_subsection();
647 ParameterHandler &prm,
650 prm.enter_subsection(
"immersed solid gaussian");
653 prm.get_double(
"tracer diffusivity interface");
656 prm.get_double(
"tracer reaction constant interface");
658 prm.get_double(
"tracer reaction constant bulk");
665 prm.leave_subsection();
674 prm.enter_subsection(
"isothermal_ideal_gas");
678 Patterns::Tools::Convert<double>::to_string(defaults.
density_ref),
680 "Reference density of the gas in SI units for isothermal ideal gas equation of state in density calculation");
684 Patterns::Tools::Convert<double>::to_string(defaults.
R),
686 "Specific gas constant in SI units for isothermal ideal gas equation of state in density calculation");
690 Patterns::Tools::Convert<double>::to_string(defaults.
T),
692 "Absolute temperature of the gas in kelvin (K) for isothermal ideal gas equation of state in density calculation");
694 prm.leave_subsection();
699 ParameterHandler &prm,
702 prm.enter_subsection(
"isothermal_ideal_gas");
710 R = prm.get_double(
"R");
714 T = prm.get_double(
"T");
717 prm.leave_subsection();
725 "surface tension coefficient",
726 Patterns::Tools::Convert<double>::to_string(
729 "Surface tension coefficient for the corresponding pair of fluids or fluid-solid pair");
731 "reference state temperature",
732 Patterns::Tools::Convert<double>::to_string(defaults.
T_0),
734 "Temperature of the reference state corresponding to the surface tension coefficient");
736 "temperature-driven surface tension gradient",
737 Patterns::Tools::Convert<double>::to_string(
740 "Surface tension gradient with respect to the temperature for the corresponding pair of fluids or fluid-solid pair");
742 "solidus temperature",
743 Patterns::Tools::Convert<double>::to_string(defaults.
T_solidus),
745 "Temperature of the solidus for the corresponding pair of fluids or fluid-solid pair");
747 "liquidus temperature",
748 Patterns::Tools::Convert<double>::to_string(defaults.
T_liquidus),
750 "Temperature of the liquidus for the corresponding pair of fluids or fluid-solid pair");
755 const ParameterHandler &prm,
760 T_0 = prm.get_double(
"reference state temperature");
763 prm.get_double(
"temperature-driven surface tension gradient");
765 T_solidus = prm.get_double(
"solidus temperature");
767 T_liquidus = prm.get_double(
"liquidus temperature");
775 dealii::ParameterHandler &prm)
779 "cahn hilliard mobility constant",
780 Patterns::Tools::Convert<double>::to_string(
783 "Cahn-Hilliard mobility constant for the corresponding pair of fluids");
788 const ParameterHandler &prm,
792 prm.get_double(
"cahn hilliard mobility constant");
800 dealii::ParameterHandler &prm,
801 const unsigned int max_number_of_constraints)
803 prm.enter_subsection(
"constrain stasis");
807 Patterns::Tools::Convert<bool>::to_string(this->
enable),
809 "Enable/disable (true/false) the solid domain constraining feature.");
812 "enable domain restriction with plane",
813 Patterns::Tools::Convert<bool>::to_string(
816 "Enable/disable (true/false) the definition of a plane for geometrical\n"
817 " restrictions on the domain where the solid domain constraining feature\n"
819 prm.declare_entry(
"restriction plane point",
820 Patterns::Tools::Convert<Point<dim>>::to_string(
822 Patterns::List(Patterns::Double()),
823 "Domain restriction plane point coordinates.");
825 "restriction plane normal vector",
826 Patterns::Tools::Convert<Tensor<1, dim>>::to_string(
828 Patterns::List(Patterns::Double()),
829 "Domain restriction plane outward pointing normal vector.");
832 "number of constraints",
833 Patterns::Tools::Convert<unsigned int>::to_string(
836 "Number of solid constraints (maximum of 1 per fluid).");
839 this->
fluid_ids.resize(max_number_of_constraints);
841 max_number_of_constraints);
846 for (
unsigned int c_id = 0; c_id < max_number_of_constraints; ++c_id)
848 prm.enter_subsection(
"constraint " + std::to_string(c_id));
852 prm.leave_subsection();
855 prm.leave_subsection();
861 dealii::ParameterHandler &prm)
863 prm.declare_entry(
"fluid id",
866 "Identifier of the fluid material that is constrained.");
867 prm.declare_entry(
"phase indicator tolerance",
870 "Absolute filtered phase indicator tolerance used in "
871 "conjunction with CLS simulations to select the cells "
872 "on which the constraint is applied.");
873 prm.declare_entry(
"min temperature",
876 "Minimum temperature value of the fluid for it be "
877 "considered as a solid.");
878 prm.declare_entry(
"max temperature",
881 "Maximum temperature value of the fluid for it be "
882 "considered as a solid.");
889 prm.enter_subsection(
"constrain stasis");
891 this->
enable = prm.get_bool(
"enable");
895 prm.get_bool(
"enable domain restriction with plane");
912 prm.enter_subsection(
"constraint " + std::to_string(c_id));
916 prm.leave_subsection();
918 prm.leave_subsection();
925 const dealii::ParameterHandler &prm,
926 const unsigned int constraint_id)
928 this->
fluid_ids[constraint_id] = prm.get_integer(
"fluid id");
930 prm.get_double(
"phase indicator tolerance");
932 prm.get_double(
"min temperature");
934 prm.get_double(
"max temperature");
941 prm.enter_subsection(
"stabilization");
944 "use default stabilization",
945 Patterns::Tools::Convert<bool>::to_string(
948 "Use the default stabilization method provided by the solver");
953 "Type of stabilization used for the Navier-Stokes equations.");
956 "heat transfer dcdd stabilization",
957 Patterns::Tools::Convert<bool>::to_string(
960 "Apply Discontinuity-Capturing Directional Dissipation (DCDD) "
961 "stabilization term on heat transfer <true|false>");
964 "cls dcdd stabilization",
965 Patterns::Tools::Convert<bool>::to_string(
968 "Apply Discontinuity-Capturing Directional Dissipation (DCDD) "
969 "stabilization term on the CLS phase indicator <true|false>");
972 "cls dcdd diffusion factor",
973 Patterns::Tools::Convert<double>::to_string(
976 "Diffusion factor scaling the DCDD stabilization term in the CLS "
980 "pressure scaling factor",
981 Patterns::Tools::Convert<double>::to_string(
984 "This parameter can be used to change the scale of pressure in the "
985 "Navier-Stokes equations. When the velocity and pressure scales are very "
986 "different, using this parameter allows to reduce the condition number"
987 " and reach a solution.");
993 "Type of scalar limiter. The limiters are only appropriate with the DG versions of the solvers and should only be used for advection-dominated problem.");
995 prm.leave_subsection();
1001 prm.enter_subsection(
"stabilization");
1011 prm.get_bool(
"heat transfer dcdd stabilization");
1017 prm.leave_subsection();
1024 prm.enter_subsection(
"phase change");
1026 T_solidus = prm.get_double(
"solidus temperature");
1030 T_liquidus = prm.get_double(
"liquidus temperature");
1037 cp_l = prm.get_double(
"specific heat liquid");
1040 cp_s = prm.get_double(
"specific heat solid");
1063 penalty_l = prm.get_double(
"Darcy penalty liquid");
1064 penalty_s = prm.get_double(
"Darcy penalty solid");
1070 prm.leave_subsection();
1078 prm.enter_subsection(
"phase change");
1080 prm.declare_entry(
"solidus temperature",
1081 Patterns::Tools::Convert<double>::to_string(
1084 "Temperature of the solidus");
1085 prm.declare_entry(
"liquidus temperature",
1086 Patterns::Tools::Convert<double>::to_string(
1089 "Temperature of the liquidus");
1090 prm.declare_entry(
"latent enthalpy",
1091 Patterns::Tools::Convert<double>::to_string(
1094 "Enthalpy of the phase change");
1096 prm.declare_entry(
"specific heat liquid",
1097 Patterns::Tools::Convert<double>::to_string(
1100 "Specific heat of the liquid phase");
1102 prm.declare_entry(
"specific heat solid",
1103 Patterns::Tools::Convert<double>::to_string(
1106 "Specific heat of the solid phase");
1108 prm.declare_entry(
"thermal conductivity liquid",
1109 Patterns::Tools::Convert<double>::to_string(
1112 "Thermal conductivity of the liquid phase");
1114 prm.declare_entry(
"thermal conductivity solid",
1115 Patterns::Tools::Convert<double>::to_string(
1118 "Thermal conductivity of the solid phase");
1120 prm.declare_entry(
"thermal expansion liquid",
1121 Patterns::Tools::Convert<double>::to_string(
1124 "Thermal expansion coefficient of the liquid phase");
1126 prm.declare_entry(
"thermal expansion solid",
1127 Patterns::Tools::Convert<double>::to_string(
1130 "Thermal expansion coefficient of the solid phase");
1132 prm.declare_entry(
"viscosity liquid",
1133 Patterns::Tools::Convert<double>::to_string(
1136 "Kinematic viscosity of the liquid phase");
1138 prm.declare_entry(
"viscosity solid",
1139 Patterns::Tools::Convert<double>::to_string(
1142 "Kinematic viscosity of the solid phase");
1144 prm.declare_entry(
"Darcy penalty liquid",
1145 Patterns::Tools::Convert<double>::to_string(
1148 "Darcy penalty of the liquid phase");
1150 prm.declare_entry(
"Darcy penalty solid",
1151 Patterns::Tools::Convert<double>::to_string(
1154 "Darcy penalty of the solid phase");
1156 prm.leave_subsection();
1169 prm.enter_subsection(
"physical properties");
1171 prm.declare_entry(
"number of fluids",
1172 Patterns::Tools::Convert<unsigned int>::to_string(
1174 Patterns::Integer(),
1175 "Number of fluids");
1178 for (
unsigned int i_fluid = 0; i_fluid <
max_fluids; ++i_fluid)
1180 fluids[i_fluid].declare_parameters(prm,
"fluid", i_fluid);
1183 prm.declare_entry(
"number of solids",
1184 Patterns::Tools::Convert<unsigned int>::to_string(
1186 Patterns::Integer(),
1187 "Number of solids");
1190 for (
unsigned int i_solid = 0; i_solid <
max_solids; ++i_solid)
1192 solids[i_solid].declare_parameters(prm,
"solid", i_solid);
1196 for (
unsigned int i_dispersed_phase = 0;
1198 ++i_dispersed_phase)
1201 prm,
"unresolved dispersed phase", i_dispersed_phase);
1204 prm.declare_entry(
"number of unresolved dispersed phases",
1205 Patterns::Tools::Convert<unsigned int>::to_string(
1207 Patterns::Integer(),
1208 "Number of unresolved dispersed phases");
1211 "reference temperature",
1214 "Reference temperature used for the calculation of physical properties and thermal expansion");
1219 "number of material interactions",
1220 Patterns::Tools::Convert<unsigned int>::to_string(
1222 Patterns::Integer(),
1223 "Number of material interactions (fluid-fluid, fluid-solid or fluid-dispersed phase)");
1225 for (
unsigned int i_material_interaction = 0;
1227 ++i_material_interaction)
1230 prm, i_material_interaction);
1233 prm.leave_subsection();
1240 prm.enter_subsection(
"physical properties");
1249 fluids[i_fluid].parse_parameters(prm,
"fluid", i_fluid, dimensions);
1256 solids[i_solid].parse_parameters(prm,
"solid", i_solid, dimensions);
1262 prm.get_integer(
"number of unresolved dispersed phases");
1265 NumberOfUnresolvedDispersedPhasesError(
1267 for (
unsigned int i_dispersed_phase = 0;
1269 ++i_dispersed_phase)
1272 prm,
"unresolved dispersed phase", i_dispersed_phase, dimensions);
1277 prm.get_integer(
"number of material interactions");
1279 NumberOfMaterialInteractionsError(
1282 for (
unsigned int i_material_interaction = 0;
1284 ++i_material_interaction)
1287 prm, i_material_interaction, dimensions);
1291 .material_interaction_type ==
1295 .fluid_fluid_interaction_with_material_interaction_id);
1299 .material_interaction_type ==
1303 .fluid_solid_interaction_with_material_interaction_id);
1307 .material_interaction_type ==
1313 .fluid_dispersed_phase_interaction_with_material_interaction_id);
1316 AssertThrow(
false, MaterialInteractionTypeError());
1321 prm.leave_subsection();
1328 deprecated_rheological_model_names = {
1333 deprecated_tracer_diffusivity_model_names = {
1334 {
"immersed solid tanh",
1336 {
"immersed solid gaussian",
1341 deprecated_tracer_reaction_prefactor_model_names = {
1342 {
"immersed solid tanh",
1344 {
"immersed solid gaussian",
1350 const std::string &material_prefix,
1351 const unsigned int id)
const
1353 prm.enter_subsection(material_prefix +
" " +
1354 Utilities::int_to_string(
id, 1));
1356 prm.declare_entry(
"density",
1357 Patterns::Tools::Convert<double>::to_string(
density),
1359 "Density for the fluid corresponding to Phase = " +
1360 Utilities::int_to_string(
id, 1));
1362 "kinematic viscosity",
1365 "Kinematic viscosity for the fluid corresponding to Phase = " +
1366 Utilities::int_to_string(
id, 1));
1371 "Specific heat for the fluid corresponding to Phase = " +
1372 Utilities::int_to_string(
id, 1));
1374 "thermal conductivity",
1377 "Thermal conductivity for the fluid corresponding to Phase = " +
1378 Utilities::int_to_string(
id, 1));
1380 "thermal expansion",
1383 "Thermal expansion coefficient for the fluid corresponding to Phase = " +
1384 Utilities::int_to_string(
id, 1));
1388 "tracer diffusivity model",
1390 "Model used for the calculation of the tracer diffusivity.",
1391 deprecated_tracer_diffusivity_model_names);
1394 "tracer diffusivity",
1397 "Tracer diffusivity for the fluid corresponding to Phase = " +
1398 Utilities::int_to_string(
id, 1));
1402 "tracer reaction constant model",
1404 "Model used for the calculation of the tracer reaction constant.",
1405 deprecated_tracer_reaction_prefactor_model_names);
1408 "tracer reaction constant",
1411 "Tracer reaction constant for the fluid corresponding to Phase = " +
1412 Utilities::int_to_string(
id, 1));
1415 "tracer reaction order",
1418 "Tracer reaction order for the fluid corresponding to Phase = " +
1419 Utilities::int_to_string(
id, 1));
1422 "tracer reaction threshold",
1425 "Tracer reaction threshold for the fluid corresponding to Phase = " +
1426 Utilities::int_to_string(
id, 1) +
". " +
1427 "Lower values are more realistic but lead to stiffer linear systems when n < 1. ");
1434 "rheological model",
1436 "Rheological model.",
1437 deprecated_rheological_model_names);
1445 "Model used for the calculation of the density.");
1451 "specific heat model",
1453 "Model used for the calculation of the specific heat.");
1459 "thermal conductivity model",
1461 "Model used for the calculation of the thermal conductivity.");
1465 "thermal expansion model",
1467 "Model used for the calculation of the thermal expansion coefficient.");
1469 prm.declare_entry(
"k_A0",
1470 Patterns::Tools::Convert<double>::to_string(
k_A0),
1472 "k_A0 parameter for linear conductivity model");
1474 prm.declare_entry(
"k_A1",
1475 Patterns::Tools::Convert<double>::to_string(
k_A1),
1477 "k_A1 parameter for linear conductivity model");
1484 "electric conductivity model",
1486 "Model used for the calculation of the electric conductivity.");
1488 "electric conductivity",
1491 "Electric conductivity for the material corresponding to: " +
1492 material_prefix +
" " + Utilities::int_to_string(
id, 1));
1495 "electric conductivity polynomial coefficients",
1496 Patterns::Tools::Convert<std::vector<double>>::to_string(
1498 Patterns::List(Patterns::Double(), 1),
1499 "Coefficients of the polynomial model for the electric conductivity of the material corresponding to: " +
1500 material_prefix +
" " + Utilities::int_to_string(
id, 1) +
1501 ". The coefficients are given in decreasing order of the polynomial degree and need to be separated by commas.");
1505 "electric permittivity model",
1507 "Model used for the calculation of the electric permittivity.");
1509 "electric permittivity real part",
1512 "Real part of the electric permittivity for the fluid corresponding to Phase = " +
1513 Utilities::int_to_string(
id, 1));
1515 "electric permittivity imag part",
1518 "Imaginary part of the electric permittivity for the fluid corresponding to Phase = " +
1519 Utilities::int_to_string(
id, 1));
1521 "electric permittivity real part polynomial coefficients",
1522 Patterns::Tools::Convert<std::vector<double>>::to_string(
1524 Patterns::List(Patterns::Double(), 1),
1525 "Coefficients of the polynomial model for the real part of the electric permittivity of the material corresponding to: " +
1526 material_prefix +
" " + Utilities::int_to_string(
id, 1) +
1527 ". The coefficients are given in decreasing order of the polynomial degree and need to be separated by commas.");
1530 "electric permittivity imag part polynomial coefficients",
1531 Patterns::Tools::Convert<std::vector<double>>::to_string(
1533 Patterns::List(Patterns::Double(), 1),
1534 "Coefficients of the polynomial model for the imaginary part of the electric permittivity of the material corresponding to: " +
1535 material_prefix +
" " + Utilities::int_to_string(
id, 1) +
1536 ". The coefficients are given in decreasing order of the polynomial degree and need to be separated by commas.");
1540 "magnetic permeability model",
1542 "Model used for the calculation of the magnetic permeability.");
1544 "magnetic permeability real part",
1547 "Real part of the magnetic permeability for the fluid corresponding to Phase = " +
1548 Utilities::int_to_string(
id, 1));
1550 "magnetic permeability imag part",
1553 "Imaginary part of the magnetic permeability for the fluid corresponding to Phase = " +
1554 Utilities::int_to_string(
id, 1));
1556 "magnetic permeability real part polynomial coefficients",
1557 Patterns::Tools::Convert<std::vector<double>>::to_string(
1559 Patterns::List(Patterns::Double(), 1),
1560 "Coefficients of the polynomial model for the real part of the magnetic permeability of the material corresponding to: " +
1561 material_prefix +
" " + Utilities::int_to_string(
id, 1) +
1562 ". The coefficients are given in decreasing order of the polynomial degree and need to be separated by commas.");
1564 "magnetic permeability imag part polynomial coefficients",
1565 Patterns::Tools::Convert<std::vector<double>>::to_string(
1567 Patterns::List(Patterns::Double(), 1),
1568 "Coefficients of the polynomial model for the imaginary part of the magnetic permeability of the material corresponding to: " +
1569 material_prefix +
" " + Utilities::int_to_string(
id, 1) +
1570 ". The coefficients are given in decreasing order of the polynomial degree and need to be separated by commas.");
1572 prm.leave_subsection();
1577 const std::string &material_prefix,
1578 const unsigned int id,
1581 prm.enter_subsection(material_prefix +
" " +
1582 Utilities::int_to_string(
id, 1));
1588 density = prm.get_double(
"density");
1598 deprecated_rheological_model_names,
1599 "rheological model");
1621 prm.get(
"thermal conductivity model"));
1629 k_A0 = prm.get_double(
"k_A0");
1633 k_A1 = prm.get_double(
"k_A1");
1642 prm.get(
"thermal expansion model"));
1652 prm.get(
"tracer diffusivity model"),
1653 deprecated_tracer_diffusivity_model_names,
1654 "tracer diffusivity model");
1664 prm.get(
"tracer reaction constant model"),
1665 deprecated_tracer_reaction_prefactor_model_names,
1666 "tracer reaction constant model");
1684 prm.get(
"electric conductivity model"));
1694 prm,
"electric conductivity polynomial coefficients");
1698 prm.get(
"electric permittivity model"));
1702 prm.get_double(
"electric permittivity real part");
1704 prm.get_double(
"electric permittivity imag part");
1711 prm,
"electric permittivity real part polynomial coefficients");
1715 prm,
"electric permittivity imag part polynomial coefficients");
1718 prm.get(
"magnetic permeability model"));
1722 prm.get_double(
"magnetic permeability real part");
1724 prm.get_double(
"magnetic permeability imag part");
1731 prm,
"magnetic permeability real part polynomial coefficients");
1735 prm,
"magnetic permeability imag part polynomial coefficients");
1738 prm.leave_subsection();
1745 deprecated_material_interactions_type_names = {
1753 deprecated_surface_tension_model_names = {
1760 const unsigned int id)
const
1762 prm.enter_subsection(
"material interaction " +
1763 Utilities::int_to_string(
id, 1));
1768 "Type of materials interacting.",
1769 deprecated_material_interactions_type_names);
1772 prm.enter_subsection(
"fluid-fluid interaction");
1777 Patterns::Integer(),
1778 "ID of the first fluid interacting with the second fluid. This value should be lower than the second fluid's id.");
1782 Patterns::Integer(),
1783 "ID of the second fluid interacting with the first fluid. This value should be greater than the first fluid's id.");
1788 "surface tension model",
1790 "Model used for the calculation of the surface tension coefficient.",
1791 deprecated_surface_tension_model_names);
1797 "cahn hilliard mobility model",
1799 "Model used for the calculation of the mobility in the Cahn-Hilliard equations.");
1802 prm.leave_subsection();
1805 prm.enter_subsection(
"fluid-solid interaction");
1807 prm.declare_entry(
"fluid id",
1809 Patterns::Integer(),
1810 "ID of the fluid interacting with the solid");
1811 prm.declare_entry(
"solid id",
1813 Patterns::Integer(),
1814 "ID of the solid interacting with the fluid");
1819 "surface tension model",
1821 "Model used for the calculation of the surface tension coefficient.",
1822 deprecated_surface_tension_model_names);
1828 "cahn hilliard mobility model",
1830 "Model used for the calculation of the mobility in the Cahn-Hilliard equations.");
1833 prm.leave_subsection();
1836 prm.enter_subsection(
"fluid-dispersed phase interaction");
1841 Patterns::Integer(),
1842 "ID of the fluid hosting the unresolved dispersed phase");
1844 "dispersed phase id",
1846 Patterns::Integer(),
1847 "ID of the unresolved dispersed phase mixed with the fluid");
1852 "electric permittivity effective medium model",
1854 "Model used for the calculation of the effective electric properties.");
1857 "magnetic permeability effective medium model",
1859 "Model used for the calculation of the effective magnetic properties.");
1861 prm.leave_subsection();
1863 prm.leave_subsection();
1868 ParameterHandler &prm,
1872 prm.enter_subsection(
"material interaction " +
1873 Utilities::int_to_string(
id, 1));
1876 prm.get(
"type"), deprecated_material_interactions_type_names,
"type");
1880 prm.enter_subsection(
"fluid-fluid interaction");
1882 std::pair<unsigned int, unsigned int> fluid_fluid_interaction;
1883 fluid_fluid_interaction.first = prm.get_integer(
"first fluid id");
1884 fluid_fluid_interaction.second = prm.get_integer(
"second fluid id");
1885 AssertThrow(fluid_fluid_interaction.first <=
1886 fluid_fluid_interaction.second,
1887 OrderOfFluidIDsError(fluid_fluid_interaction.first,
1888 fluid_fluid_interaction.second));
1890 fluid_fluid_interaction;
1895 prm.get(
"surface tension model"),
1896 deprecated_surface_tension_model_names,
1897 "surface tension model");
1902 prm.get(
"cahn hilliard mobility model"));
1906 prm.leave_subsection();
1911 prm.enter_subsection(
"fluid-solid interaction");
1912 std::pair<unsigned int, unsigned int> fluid_solid_interaction;
1913 fluid_solid_interaction.first = prm.get_integer(
"fluid id");
1914 fluid_solid_interaction.second = prm.get_integer(
"solid id");
1916 fluid_solid_interaction;
1921 prm.get(
"surface tension model"),
1922 deprecated_surface_tension_model_names,
1923 "surface tension model");
1926 prm.leave_subsection();
1931 prm.enter_subsection(
"fluid-dispersed phase interaction");
1932 std::pair<unsigned int, unsigned int>
1933 fluid_dispersed_phase_interaction;
1934 fluid_dispersed_phase_interaction.first = prm.get_integer(
"fluid id");
1935 fluid_dispersed_phase_interaction.second =
1936 prm.get_integer(
"dispersed phase id");
1938 fluid_dispersed_phase_interaction;
1945 prm.get(
"electric permittivity effective medium model"));
1948 prm.get(
"magnetic permeability effective medium model"));
1949 prm.leave_subsection();
1953 AssertThrow(
false, MaterialInteractionTypeError());
1956 prm.leave_subsection();
1963 prm.enter_subsection(
"FEM");
1965 prm.declare_entry(
"velocity degree",
1966 Patterns::Tools::Convert<unsigned int>::to_string(
1968 Patterns::Integer(0),
1969 "interpolation degree for velocity");
1970 prm.declare_entry(
"pressure degree",
1971 Patterns::Tools::Convert<unsigned int>::to_string(
1973 Patterns::Integer(0),
1974 "interpolation degree for pressure");
1975 prm.declare_entry(
"void fraction degree",
1976 Patterns::Tools::Convert<unsigned int>::to_string(
1978 Patterns::Integer(0),
1979 "interpolation degree for void fraction");
1980 prm.declare_entry(
"temperature degree",
1981 Patterns::Tools::Convert<unsigned int>::to_string(
1983 Patterns::Integer(0),
1984 "interpolation degree for temperature");
1985 prm.declare_entry(
"tracer degree",
1986 Patterns::Tools::Convert<unsigned int>::to_string(
1988 Patterns::Integer(0),
1989 "interpolation degree for tracer");
1990 prm.declare_entry(
"cls degree",
1991 Patterns::Tools::Convert<unsigned int>::to_string(
1993 Patterns::Integer(0),
1994 "interpolation degree for cls");
1996 "phase cahn hilliard degree",
1997 Patterns::Tools::Convert<unsigned int>::to_string(
1999 Patterns::Integer(),
2000 "interpolation degree phase parameter for the Cahn-Hilliard equations");
2002 "potential cahn hilliard degree",
2003 Patterns::Tools::Convert<unsigned int>::to_string(
2005 Patterns::Integer(),
2006 "interpolation degree chemical potential for the Cahn-Hilliard equations");
2008 "electromagnetics trial degree",
2009 Patterns::Tools::Convert<unsigned int>::to_string(
2011 Patterns::Integer(),
2012 "interpolation degree for the trial space of the electromagnetics physics (time-harmonic Maxwell equations).");
2014 "electromagnetics test degree",
2015 Patterns::Tools::Convert<unsigned int>::to_string(
2017 Patterns::Integer(),
2018 "interpolation degree for the test space of the electromagnetics physics (time-harmonic Maxwell equations).");
2021 "solid velocity degree",
2022 Patterns::Tools::Convert<unsigned int>::to_string(
2024 Patterns::Integer(1),
2025 "interpolation degree of the solid velocity of the Euler-Euler model.");
2027 "solid volume fraction degree",
2028 Patterns::Tools::Convert<unsigned int>::to_string(
2030 Patterns::Integer(1),
2031 "interpolation degree of the solid volume fraction of the Euler-Euler model.");
2035 Patterns::Tools::Convert<unsigned int>::to_string(defaults.
qmom_degree),
2036 Patterns::Integer(0),
2037 "interpolation degree of the discontinuous Galerkin discretization of the scalars and of the moments of the QMOM physics. A degree of 0 corresponds to a finite volume discretization.");
2041 Patterns::Tools::Convert<bool>::to_string(defaults.
tracer_uses_dg),
2043 "Switch tracer to Discontinuous Galerkin (DG) formulation");
2047 Patterns::Tools::Convert<bool>::to_string(defaults.
CLS_uses_dg),
2049 "Switch CLS to Discontinuous Galerkin (DG) formulation");
2052 "enable bubble function velocity",
2053 Patterns::Tools::Convert<bool>::to_string(
2056 "Enable bubble enrichment function for the velocity field");
2059 "enable bubble function pressure",
2060 Patterns::Tools::Convert<bool>::to_string(
2063 "Enable bubble enrichment function for the pressure field");
2065 prm.leave_subsection();
2071 prm.enter_subsection(
"FEM");
2082 prm.get_integer(
"phase cahn hilliard degree");
2084 prm.get_integer(
"potential cahn hilliard degree");
2086 prm.get_integer(
"electromagnetics trial degree");
2088 prm.get_integer(
"electromagnetics test degree");
2090 prm.get_bool(
"enable bubble function velocity");
2092 prm.get_bool(
"enable bubble function pressure");
2095 prm.get_integer(
"solid volume fraction degree");
2098 prm.leave_subsection();
2105 prm.enter_subsection(
"forces");
2111 "State whether from the non-linear solver should be printed.",
2114 prm.declare_entry(
"calculate force",
2115 Patterns::Tools::Convert<bool>::to_string(
2118 "Enable calculation of force");
2119 prm.declare_entry(
"calculate torque",
2120 Patterns::Tools::Convert<bool>::to_string(
2123 "Enable calculation of torque");
2124 prm.declare_entry(
"force name",
2126 Patterns::FileName(),
2127 "File output force prefix");
2128 prm.declare_entry(
"torque name",
2130 Patterns::FileName(),
2131 "File output torque prefix");
2132 prm.declare_entry(
"output precision",
2133 Patterns::Tools::Convert<unsigned int>::to_string(
2135 Patterns::Integer(),
2136 "Precision of the values outputted.");
2137 prm.declare_entry(
"calculation frequency",
2138 Patterns::Tools::Convert<unsigned int>::to_string(
2140 Patterns::Integer(),
2141 "Calculation frequency");
2142 prm.declare_entry(
"output frequency",
2143 Patterns::Tools::Convert<unsigned int>::to_string(
2145 Patterns::Integer(),
2146 "Output frequency");
2148 prm.leave_subsection();
2154 prm.enter_subsection(
"forces");
2167 prm.leave_subsection();
2174 prm.enter_subsection(
"free surface radiation");
2180 "Enable radiation at the free surface (air/metal interface) <true|false>");
2181 prm.declare_entry(
"Stefan-Boltzmann constant",
2182 Patterns::Tools::Convert<double>::to_string(
2185 "Stefan-Boltzmann constant");
2186 prm.declare_entry(
"emissivity",
2187 Patterns::Tools::Convert<double>::to_string(
2190 "Emissivity of the free surface (air/metal interface)");
2193 Patterns::Tools::Convert<double>::to_string(defaults.
Tinf),
2195 "Temperature (Double) of environment for radiation term at the free surface (air/metal interface)");
2197 prm.leave_subsection();
2203 prm.enter_subsection(
"free surface radiation");
2208 Tinf = prm.get_double(
"Tinf");
2210 prm.leave_subsection();
2217 prm.enter_subsection(
"laser parameters");
2219 prm.declare_entry(
"enable",
2220 Patterns::Tools::Convert<bool>::to_string(
2226 "enable angle of incidence dependence",
2227 Patterns::Tools::Convert<bool>::to_string(
2230 "Enable the multiplication of the laser heat flux by the cosine of the angle of incidence of the laser with respect to the surface.");
2231 prm.declare_entry(
"concentration factor",
2232 Patterns::Tools::Convert<double>::to_string(
2235 "Concentration factor");
2236 prm.declare_entry(
"power",
2237 Patterns::Tools::Convert<double>::to_string(
2241 prm.declare_entry(
"absorptivity",
2242 Patterns::Tools::Convert<double>::to_string(
2245 "Laser absorptivity");
2246 prm.declare_entry(
"penetration depth",
2247 Patterns::Tools::Convert<double>::to_string(
2250 "Penetration depth");
2251 prm.declare_entry(
"beam radius",
2252 Patterns::Tools::Convert<double>::to_string(
2255 "Laser beam radius");
2258 prm.enter_subsection(
"path");
2259 laser_scan_path = std::make_shared<Functions::ParsedFunction<dim>>(dim);
2261 prm.leave_subsection();
2263 prm.declare_entry(
"start time",
2264 Patterns::Tools::Convert<double>::to_string(
start_time),
2266 "Start time of laser");
2267 prm.declare_entry(
"end time",
2268 Patterns::Tools::Convert<double>::to_string(
end_time),
2270 "End time of laser");
2275 prm.declare_entry(
"beam orientation",
2277 Patterns::Selection(
"x+|x-|y+|y-|z+|z-"),
2278 "Laser beam orientation "
2279 "Choices are <x+|x-|y+|y-|z+|z->.");
2282 "beam rotation angle",
2285 "Angle of rotation in rad of the beam axis with respect to the axis defined by the beam orientation parameter");
2290 "beam rotation axis",
2292 Patterns::List(Patterns::Double()),
2293 "Axis around which the laser beam is rotated, only used in 3D");
2295 prm.leave_subsection();
2302 prm.enter_subsection(
"laser parameters");
2307 prm.get_bool(
"enable angle of incidence dependence");
2318 ParameterStrictlyGreaterThanError(
"penetration depth",
2326 prm.enter_subsection(
"path");
2329 prm.leave_subsection();
2332 end_time = prm.get_double(
"end time");
2335 op = prm.get(
"beam orientation");
2343 if constexpr (dim == 3)
2349 else if (op ==
"x-")
2356 if constexpr (dim == 3)
2362 else if (op ==
"y+")
2369 if constexpr (dim == 3)
2375 else if (op ==
"y-")
2382 if constexpr (dim == 3)
2388 else if (op ==
"z+")
2390 if constexpr (dim == 3)
2400 else if constexpr (dim == 2)
2401 Assert(dim == 2, TwoDimensionalLaserError(dim));
2403 else if (op ==
"z-")
2405 if constexpr (dim == 3)
2415 else if constexpr (dim == 2)
2416 Assert(dim == 2, TwoDimensionalLaserError(dim));
2419 if constexpr (dim == 3)
2425 if constexpr (dim == 2)
2427 Physics::Transformations::Rotations::rotation_matrix_2d(
2429 if constexpr (dim == 3)
2431 Physics::Transformations::Rotations::rotation_matrix_3d(
2436 prm.leave_subsection();
2446 const std::vector<Variable> probing_point_variables = {
2456 ParameterHandler &prm)
2458 prm.enter_subsection(
"isocontour bounding box");
2460 prm.declare_entry(
"number of isocontour bounding boxes",
2461 Patterns::Tools::Convert<unsigned int>::to_string(
2463 Patterns::Integer(0),
2464 "Number of monitored isocontours");
2468 Patterns::List(Patterns::Selection(
2470 "Variable(s) of monitored isocontour(s). " +
2472 " Each entry corresponds to a different isocontour. "
2473 "When multiple isocontours are defined, the different variables must "
2474 "be separated by commas (e.g., ``set variable = phase, temperature, temperature``) "
2475 "and follow the same order as ``isovalue`` and ``bounding box filename``.");
2479 Patterns::List(Patterns::Double()),
2480 "Isovalue(s) of monitored isocontour(s). "
2481 "When multiple isocontours are defined, the different isovalues "
2482 "must be separated by commas (e.g., ``set isovalue = 0.5, 300, 500``) "
2483 "and follow the same order as ``variable`` and ``bounding box filename``.");
2485 "bounding box filename",
2486 "isocontour_bounding_box",
2487 Patterns::List(Patterns::FileName()),
2488 "Filename(s) for outputted isocontour(s). "
2489 "When multiple isocontours are defined, the different filenames must be "
2490 "separated by commas (e.g., ``set bounding box filename = interface_bounding_box, solidus_bounding_box, liquidus_bounding_box``) "
2491 "and follow the same order as ``variable`` and ``isovalue``.");
2493 prm.leave_subsection();
2499 ParameterHandler &prm)
2501 prm.enter_subsection(
"isocontour bounding box");
2504 prm.get_integer(
"number of isocontour bounding boxes");
2507 const std::string variables_list = prm.get(
"variable");
2508 std::vector<std::string> variables_vec =
2509 Utilities::split_string_list(variables_list);
2510 const std::string isovalue_list = prm.get(
"isovalue");
2511 std::vector<std::string> isovalue_vec =
2512 Utilities::split_string_list(isovalue_list);
2513 const std::string filename_list = prm.get(
"bounding box filename");
2514 std::vector<std::string> filename_vec =
2515 Utilities::split_string_list(filename_list);
2520 ListSizeIncoherentWithDeclaredNumber(
2521 "number of isocontour bounding boxes",
2524 variables_vec.size()));
2525 AssertThrow(variables_vec.size() == isovalue_vec.size(),
2526 ListsSizeMismatch(
"variable",
2528 variables_vec.size(),
2529 isovalue_vec.size()));
2530 AssertThrow(variables_vec.size() == filename_vec.size(),
2531 ListsSizeMismatch(
"variable",
2532 "bounding box filename",
2533 variables_vec.size(),
2534 filename_vec.size()));
2539 for (
unsigned int i = 0; i < variables_vec.size(); ++i)
2546 Utilities::string_to_double(isovalue_vec[i]);
2552 std::make_pair(i, isocontour)});
2556 prm.leave_subsection();
2563 prm.enter_subsection(
"probing points");
2565 prm.declare_entry(
"number of probing points",
2566 Patterns::Tools::Convert<unsigned int>::to_string(
2568 Patterns::Integer(0),
2569 "Number of probing points");
2571 const std::string default_point_entry_string =
2572 (dim == 2) ?
"0., 0." :
"0., 0., 0.";
2576 prm.enter_subsection(
"probe " + Utilities::int_to_string(i));
2580 default_point_entry_string,
2581 Patterns::List(Patterns::Double(), dim, dim),
2582 "Probe point location in the mesh's reference frame. "
2583 "The different components of the point must be separated by commas (e.g., ``set location = 0.0, 0.0, 0.0``). ");
2587 Patterns::List(Patterns::Selection(
2589 "Variable(s) evaluated at the probing point. " +
2591 " When multiple variables are defined, the different variables must "
2592 "be separated by commas (e.g., ``set variable = velocity, pressure, temperature``).");
2593 prm.declare_entry(
"probing point filename",
2594 "probe_" + Utilities::int_to_string(i, 2),
2595 Patterns::FileName(),
2596 "Filename for outputted probing point values.");
2598 prm.leave_subsection();
2601 prm.leave_subsection();
2608 prm.enter_subsection(
"probing points");
2613 "The current maximum of probing points allowed is " +
2615 ". Please adjust 'number of probing points'."));
2619 prm.enter_subsection(
"probe " + Utilities::int_to_string(
id));
2621 const std::string variables_list = prm.get(
"variable");
2622 std::vector<std::string> variables_vec =
2623 Utilities::split_string_list(variables_list);
2625 const Point<dim> point(
2628 for (
const std::string &variable : variables_vec)
2635 const std::string filename = prm.get(
"probing point filename");
2638 prm.leave_subsection();
2641 prm.leave_subsection();
2648 prm.enter_subsection(
"post-processing");
2654 "State whether from the post-processing values should be printed.",
2659 "calculate kinetic energy",
2662 "Enable calculation of total kinetic energy. The total kinetic "
2663 "energy is calculated from the volumetric integral of the kinetic energy over the domain.");
2666 "calculate enstrophy",
2669 "Enable calculation of total enstrophy. The total enstrophy "
2670 "is calculated from the volumetric integral of the enstrophy over the domain.");
2673 "calculate pressure power",
2676 "Enable calculation of the pressure power. The pressure power "
2677 "is calculated from the volumetric integral of u.grad(p) over the domain.");
2680 "calculate viscous dissipation",
2681 Patterns::Tools::Convert<bool>::to_string(
2684 "Enable calculation of the viscous dissipation. The viscous dissipation "
2685 "is calculated from the volumetric integral of grad(u).tau over the domain.");
2687 prm.declare_entry(
"calculate apparent viscosity",
2688 Patterns::Tools::Convert<bool>::to_string(
2691 "Enable calculation of apparent viscosity");
2693 prm.declare_entry(
"calculate average velocities",
2694 Patterns::Tools::Convert<bool>::to_string(
2697 "Enable calculation of average velocities.");
2700 "calculate average temperature and heat flux",
2701 Patterns::Tools::Convert<bool>::to_string(
2704 "Enable calculation of time average temperature and time average heat flux");
2707 "calculate pressure drop",
2710 "Enable calculation of pressure drop between two boundaries.");
2712 prm.declare_entry(
"inlet boundary id",
2713 Patterns::Tools::Convert<unsigned int>::to_string(
2715 Patterns::Integer(),
2716 "Inlet boundary ID for pressure drop calculation");
2718 prm.declare_entry(
"outlet boundary id",
2719 Patterns::Tools::Convert<unsigned int>::to_string(
2721 Patterns::Integer(),
2722 "Outlet boundary ID for pressure drop calculation");
2724 prm.declare_entry(
"calculate flow rate",
2725 Patterns::Tools::Convert<bool>::to_string(
2728 "Enable calculation of flow rate at boundaries.");
2731 "calculate tracer flow rate",
2734 "Enable calculation of tracer flow rate at boundaries.");
2737 "initial time for average velocity",
2738 Patterns::Tools::Convert<double>::to_string(
2741 "Initial time to start calculations for average velocities");
2744 "initial time for average temperature and heat flux",
2745 Patterns::Tools::Convert<double>::to_string(
2748 "Initial time to start calculations for average temperature");
2750 prm.declare_entry(
"kinetic energy name",
2752 Patterns::FileName(),
2753 "File output kinetic energy");
2755 prm.declare_entry(
"pressure drop name",
2757 Patterns::FileName(),
2758 "File output pressure drop");
2760 prm.declare_entry(
"flow rate name",
2762 Patterns::FileName(),
2763 "File output volumetric flux");
2765 prm.declare_entry(
"tracer flow rate name",
2767 Patterns::FileName(),
2768 "Output file name for tracer flow rate");
2770 prm.declare_entry(
"enstrophy name",
2772 Patterns::FileName(),
2773 "File output enstrophy");
2775 prm.declare_entry(
"pressure power name",
2777 Patterns::FileName(),
2778 "File output pressure power");
2780 prm.declare_entry(
"viscous dissipation name",
2782 Patterns::FileName(),
2783 "File output viscous dissipation");
2785 prm.declare_entry(
"apparent viscosity name",
2787 Patterns::FileName(),
2788 "File output apparent viscosity");
2790 prm.declare_entry(
"output frequency",
2791 Patterns::Tools::Convert<unsigned int>::to_string(
2793 Patterns::Integer(),
2794 "Output frequency");
2796 prm.declare_entry(
"calculation frequency",
2797 Patterns::Tools::Convert<unsigned int>::to_string(
2799 Patterns::Integer(),
2800 "Calculation frequency of post-processed quantities.");
2802 prm.declare_entry(
"calculate tracer statistics",
2803 Patterns::Tools::Convert<bool>::to_string(
2806 "Enable calculation of tracer statistics.");
2808 prm.declare_entry(
"tracer statistics name",
2810 Patterns::FileName(),
2811 "File name output tracer statistics");
2814 "calculate phase statistics",
2817 "Enable calculation of phase statistics: maximum, minimum, average and integral over the domain (Cahn-Hilliard).");
2819 prm.declare_entry(
"phase statistics name",
2821 Patterns::FileName(),
2822 "File name output phase statistics (Cahn-Hilliard)");
2824 prm.declare_entry(
"calculate temperature statistics",
2825 Patterns::Tools::Convert<bool>::to_string(
2828 "Enable calculation of temperature statistics.");
2830 prm.declare_entry(
"temperature statistics name",
2832 Patterns::FileName(),
2833 "File name output temperature statistics");
2836 "monitored fluid with phase change",
2838 "Fluid with phase change properties.",
2843 "calculate algebraic melt volume",
2844 Patterns::Tools::Convert<bool>::to_string(
2847 "Enable calculation of the algebraic (phase indicator and liquid fraction weighted) melt volume in the domain. In the case of CLS simulations, the fluid of interest is selected with 'monitored fluid with phase change.'");
2849 prm.declare_entry(
"algebraic melt volume name",
2851 Patterns::FileName(),
2852 "Filename of the algebraic melt volume output file");
2855 "calculate geometric melt volume",
2856 Patterns::Tools::Convert<bool>::to_string(
2859 "Enable calculation of the geometric melt volume. "
2860 "The melt volume is computed as the volume of fluid over the 'melting temperature'. "
2861 "In the case of CLS simulations, the volume is the geometrical volume within the 'monitored fluid with phase change.'");
2863 prm.declare_entry(
"geometric melt volume name",
2865 Patterns::FileName(),
2866 "Filename of the geometric melt volume output file");
2869 "melting temperature",
2871 Patterns::Double(0),
2872 "Temperature used to define the melting point of the fluid for volume calculation.");
2874 prm.declare_entry(
"calculate heat flux",
2875 Patterns::Tools::Convert<bool>::to_string(
2878 "Enable calculation of heat flux.");
2880 prm.declare_entry(
"heat flux name",
2882 Patterns::FileName(),
2883 "File name output for the heat flux");
2887 "postprocessed fluid",
2889 "Fluid domain used for thermal postprocesses "
2890 "in the heat equation.",
2894 "calculate barycenter",
2897 "Enable calculation of the barycenter location and velocity of fluid 1 in CLS and Cahn-Hilliard simulations.");
2902 Patterns::FileName(),
2903 "Name of barycenter information output file in CLS or Cahn-Hilliard simulations");
2906 "calculate mass conservation",
2909 "Enable calculation of the mass and momentum of both fluids in CLS simulations.");
2912 "mass conservation name",
2914 Patterns::FileName(),
2915 "Name of mass conservation output file in CLS simulations");
2918 "calculate phase energy",
2921 "Enable calculation of phase energies, including: total energy, bulk energy, and interface energy");
2924 "phase energy name",
2926 Patterns::FileName(),
2927 "Name of energy output file in Cahn-Hilliard simulations. The file is stored in the output folder specified in the simulation control subsection");
2930 "calculate phase volumes",
2933 "Enable calculation of total volume each phases in cfd-dem simulation, including: total volume of fluid, and total volume of particles");
2936 "phase volumes name",
2938 Patterns::FileName(),
2939 "Name of phases volume output file in cfd-dem simulations. The file is stored in the output folder specified in the simulation control subsection");
2941 prm.declare_entry(
"output qcriterion",
2942 Patterns::Tools::Convert<bool>::to_string(
2945 "Enable output of Q-criterion field <true|false>");
2947 prm.declare_entry(
"output vorticity",
2948 Patterns::Tools::Convert<bool>::to_string(
2951 "Enable output of vorticity field <true|false>");
2954 "output velocity gradient",
2957 "Enable output of velocity gradient field <true|false>");
2962 prm.leave_subsection();
2969 prm.enter_subsection(
"post-processing");
2979 prm.get_bool(
"calculate viscous dissipation");
2981 prm.get_bool(
"calculate apparent viscosity");
2983 prm.get_bool(
"calculate average velocities");
2985 prm.get_bool(
"calculate average temperature and heat flux");
2992 prm.get_double(
"initial time for average velocity");
2994 prm.get_double(
"initial time for average temperature and heat flux");
3009 "The post-processing 'output frequency' must be a multiple of the 'calculation frequency'."));
3016 prm.get_bool(
"calculate temperature statistics");
3019 "monitored fluid with phase change"),
3021 "monitored fluid with phase change");
3023 prm.get_bool(
"calculate algebraic melt volume");
3026 prm.get_bool(
"calculate geometric melt volume");
3048 "postprocessed fluid");
3053 prm.leave_subsection();
3058 const std::string &physics_name)
3061 prm.enter_subsection(
"non-linear solver");
3063 prm.enter_subsection(physics_name);
3069 "State whether the outputs from the non-linear solver should be printed.",
3077 "Non-linear solver that will be used."
3078 " The newton solver is a traditional newton solver with "
3079 "an analytical jacobian formulation. The jacobian matrix and the preconditioner "
3080 "are assembled every iteration. In the kinsol_newton method, the nonlinear solver "
3081 "Kinsol from the SUNDIALS library is used. This solver has an internal algorithm "
3082 "that decides whether to reassemble the Jacobian matrix or not.");
3088 "Strategy that will be used by the kinsol newton solver.");
3090 prm.declare_entry(
"tolerance",
3091 Patterns::Tools::Convert<double>::to_string(
3094 "Newton solver tolerance");
3095 prm.declare_entry(
"max iterations",
3096 Patterns::Tools::Convert<unsigned int>::to_string(
3098 Patterns::Integer(),
3099 "Maximum number of Newton Iterations");
3103 Patterns::Tools::Convert<double>::to_string(defaults.
step_tolerance),
3105 "Newton solver relative tolerance between steps."
3106 " If a newton iteration leads to a residual > step tolerance"
3107 " * previous residual then the theta relaxation"
3108 " is applied until this criteria is satisfied");
3112 Patterns::Tools::Convert<double>::to_string(
3115 "This parameter controls the frequency at which the matrix is refreshed in the inexact Newton solvers. "
3116 "If the residual after a newton step < previous residual * matrix tolerance, the matrix is not re-assembled");
3119 "force rhs calculation",
3120 Patterns::Tools::Convert<bool>::to_string(
3123 "This is required if there is a fixed point component to the non-linear "
3124 "solver that is changed at the beginning of every newton iteration. "
3125 "This is notably the case of the sharp edge method. "
3126 "The default value of this parameter is false.");
3131 Patterns::Tools::Convert<bool>::to_string(defaults.
reuse_matrix),
3133 "Reuse the last jacobian matrix for the next non-linear problem solution");
3136 "reuse preconditioner",
3137 Patterns::Tools::Convert<bool>::to_string(
3140 "Reuse the last preconditioner for the next non-linear problem solution");
3143 "abort at convergence failure",
3144 Patterns::Tools::Convert<bool>::to_string(
3147 "Aborts Lethe by throwing an exception if non-linear solver convergence has failed");
3149 prm.leave_subsection();
3151 prm.leave_subsection();
3156 const std::string &physics_name)
3158 prm.enter_subsection(
"non-linear solver");
3160 prm.enter_subsection(physics_name);
3171 tolerance = prm.get_double(
"tolerance");
3179 prm.get_bool(
"abort at convergence failure");
3181 prm.leave_subsection();
3183 prm.leave_subsection();
3186 template <
int dim,
int spacedim>
3190 const Mesh defaults;
3191 prm.enter_subsection(
"mesh");
3195 prm.declare_entry(
"file name",
3197 Patterns::FileName(),
3200 prm.declare_entry(
"initial refinement",
3201 Patterns::Tools::Convert<unsigned int>::to_string(
3203 Patterns::Integer(),
3204 "Initial refinement of the mesh");
3207 "initial boundary refinement",
3208 Patterns::Tools::Convert<unsigned int>::to_string(
3210 Patterns::Integer(),
3211 "Initial refinement of the mesh at the boundaries specified by the user");
3214 "boundaries refined",
3216 Patterns::List(Patterns::Integer()),
3217 "Boundary ids of the boundaries to be initially refined");
3220 "enable target size",
3221 Patterns::Tools::Convert<bool>::to_string(
3224 "Enable initial refinement until target size is reached.");
3228 Patterns::Tools::Convert<bool>::to_string(defaults.
simplex),
3230 "Indicates that the mesh used is a mesh made of only simplex elements.");
3233 "check diamond cells",
3234 Patterns::Tools::Convert<bool>::to_string(
3237 "Enables checking the input grid for diamond-shaped cells.");
3240 "expand particle-wall contact search",
3241 Patterns::Tools::Convert<bool>::to_string(
3244 "Enables adding the boundary neighbor cells of boundary cells to the "
3245 "particle-wall contact search list. This feature should only be "
3246 "activated in geometries with concave boundaries. (For example, for "
3247 "particles flow inside a cylinder or sphere). In geometries with "
3248 "convex boundaries, this feature MUST NOT be activated");
3250 prm.declare_entry(
"target size",
3251 Patterns::Tools::Convert<double>::to_string(
3254 "Target size of the initial refinement");
3256 prm.declare_entry(
"grid type", defaults.
grid_type);
3260 "initial translation",
3261 Patterns::Tools::Convert<Tensor<1, spacedim>>::to_string(
3263 Patterns::List(Patterns::Double()),
3264 "Component of the desired translation of the mesh at initialization.");
3267 "initial rotation axis",
3268 Patterns::Tools::Convert<Tensor<1, spacedim>>::to_string(
3270 Patterns::List(Patterns::Double()),
3271 "Component of the desired rotation of the mesh at initialization.\n"
3272 "In 2D, this parameter is not used, and a counter-clockwise rotation around the origin \n "
3273 "of the coordinate system is applied according to the prescribed rotation angle.");
3276 "initial rotation angle",
3277 Patterns::Tools::Convert<double>::to_string(defaults.
rotation_angle),
3279 "Angle of rotation of the mesh at initialization around the axis in radian");
3281 prm.declare_entry(
"scale",
3282 Patterns::Tools::Convert<double>::to_string(
3284 Patterns::Double(0),
3285 "Scaling factor used for the mesh.");
3287 prm.leave_subsection();
3290 template <
int dim,
int spacedim>
3294 prm.enter_subsection(
"mesh");
3302 prm.get_integer(
"initial boundary refinement");
3311 simplex = prm.get_bool(
"simplex");
3314 prm.get_bool(
"expand particle-wall contact search");
3318 "Lethe DEM does not currently support the simultaneous use of the 'check diamond "
3319 "cells' and 'expand particle-wall contact search' options. Please set one of "
3320 "these two options to false."));
3335 scale = prm.get_double(
"scale");
3337 prm.leave_subsection();
3340 template <
int dim,
int spacedim>
3344 prm.enter_subsection(
"box refinement");
3346 prm.declare_entry(
"number of refinement boxes",
3347 Patterns::Tools::Convert<unsigned int>::to_string(
3349 Patterns::Integer(0),
3350 "Number of refinement boxes specified");
3354 prm.enter_subsection(
"box " + Utilities::int_to_string(i_box, 1));
3356 (*refinement_boxes_meshes)[i_box].declare_parameters(prm);
3358 "additional refinement",
3360 Patterns::Integer(0),
3361 "Additional refinements of the principal mesh within the area delimited by the 'box' mesh.");
3363 prm.leave_subsection();
3366 prm.leave_subsection();
3369 template <
int dim,
int spacedim>
3373 prm.enter_subsection(
"box refinement");
3376 prm.get_integer(
"number of refinement boxes");
3380 "The current implementation limits the number of refinement boxes up to " +
3382 " refinement boxes.\n You have declared " +
3384 " refinement boxes.\n Please reduce the number of refinement boxes."));
3388 prm.enter_subsection(
"box " + Utilities::int_to_string(i_box, 1));
3390 (*refinement_boxes_meshes)[i_box].parse_parameters(prm);
3392 prm.get_integer(
"additional refinement");
3394 prm.leave_subsection();
3397 prm.leave_subsection();
3404 MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType>
3405 deprecated_mg_p_coarsening_type_names = {
3407 MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType::
3410 MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType::
3415 deprecated_mg_smoother_preconditioner_type_names = {
3416 {
"inverse diagonal",
3418 {
"additive schwarz method",
3419 LinearSolver::MultigridSmootherPreconditionerType::
3420 additive_schwarz_method}};
3425 const std::string &physics_name)
3428 prm.enter_subsection(
"linear solver");
3430 prm.enter_subsection(physics_name);
3436 "State whether output from solver runs should be printed.",
3442 "The iterative solver for the linear system of equations.");
3446 Patterns::Tools::Convert<bool>::to_string(
3449 "Rescale the residual by the square root of the volume of the triangulation");
3450 prm.declare_entry(
"relative residual",
3451 Patterns::Tools::Convert<double>::to_string(
3454 "Linear solver residual");
3455 prm.declare_entry(
"minimum residual",
3456 Patterns::Tools::Convert<double>::to_string(
3459 "Linear solver minimum residual");
3460 prm.declare_entry(
"max iters",
3461 Patterns::Tools::Convert<int>::to_string(
3463 Patterns::Integer(),
3464 "Maximum solver iterations");
3466 prm.declare_entry(
"max krylov vectors",
3467 Patterns::Tools::Convert<int>::to_string(
3469 Patterns::Integer(),
3470 "Maximum number of krylov vectors for GMRES");
3473 "enable hessians in jacobian",
3474 Patterns::Tools::Convert<bool>::to_string(
3477 "Turns off the terms involving the hessian in the Jacobian");
3480 "enable hessians in residual",
3481 Patterns::Tools::Convert<bool>::to_string(
3484 "Turns off the terms involving the hessian in the rhs");
3489 "The preconditioner for the linear solver.");
3492 prm.declare_entry(
"ilu preconditioner fill",
3493 Patterns::Tools::Convert<unsigned int>::to_string(
3495 Patterns::Integer(0),
3496 "Ilu preconditioner fill");
3498 prm.declare_entry(
"ilu preconditioner absolute tolerance",
3499 Patterns::Tools::Convert<double>::to_string(
3502 "Ilu preconditioner tolerance");
3504 prm.declare_entry(
"ilu preconditioner relative tolerance",
3505 Patterns::Tools::Convert<double>::to_string(
3508 "Ilu relative tolerance");
3510 prm.declare_entry(
"amg preconditioner ilu fill",
3511 Patterns::Tools::Convert<unsigned int>::to_string(
3513 Patterns::Integer(0),
3514 "amg preconditioner ilu smoother fill");
3516 prm.declare_entry(
"amg preconditioner ilu absolute tolerance",
3517 Patterns::Tools::Convert<double>::to_string(
3520 "amg preconditioner ilu smoother absolute tolerance");
3522 prm.declare_entry(
"amg preconditioner ilu relative tolerance",
3523 Patterns::Tools::Convert<double>::to_string(
3526 "amg preconditioner ilu smoother relative tolerance");
3528 prm.declare_entry(
"amg aggregation threshold",
3529 Patterns::Tools::Convert<double>::to_string(
3532 "amg aggregation threshold");
3533 prm.declare_entry(
"amg n cycles",
3534 Patterns::Tools::Convert<unsigned int>::to_string(
3536 Patterns::Integer(),
3537 "amg number of cycles");
3538 prm.declare_entry(
"amg w cycles",
3539 Patterns::Tools::Convert<bool>::to_string(
3542 "amg w cycling. If this is set to true, W cycling is "
3543 "used. Otherwise, V cycling is used.");
3544 prm.declare_entry(
"amg smoother sweeps",
3545 Patterns::Tools::Convert<unsigned int>::to_string(
3547 Patterns::Integer(),
3548 "amg smoother sweeps");
3549 prm.declare_entry(
"amg smoother overlap",
3550 Patterns::Tools::Convert<unsigned int>::to_string(
3552 Patterns::Integer(),
3553 "amg smoother overlap");
3555 "force linear solver continuation",
3556 Patterns::Tools::Convert<bool>::to_string(
3559 "A boolean that will force the linear solver to continue even if it fails");
3561 prm.declare_entry(
"mg min level",
3562 Patterns::Tools::Convert<int>::to_string(
3564 Patterns::Integer(),
3567 prm.declare_entry(
"mg level min cells",
3568 Patterns::Tools::Convert<int>::to_string(
3570 Patterns::Integer(),
3571 "mg minimum number of cells for coarse level");
3573 prm.declare_entry(
"mg int level",
3574 Patterns::Tools::Convert<int>::to_string(
3576 Patterns::Integer(),
3580 "mg enable hessians in jacobian",
3581 Patterns::Tools::Convert<bool>::to_string(
3584 "Turns off the terms involving the hessian in the Jacobian of mg operators");
3586 prm.declare_entry(
"mg smoother iterations",
3587 Patterns::Tools::Convert<int>::to_string(
3589 Patterns::Integer(),
3590 "mg smoother iterations for lsmg or gcmg");
3592 prm.declare_entry(
"mg smoother relaxation",
3593 Patterns::Tools::Convert<double>::to_string(
3596 "mg smoother relaxation for lsmg or gcmg");
3599 "mg smoother preconditioner type",
3601 "Preconditioner of smoother.",
3602 deprecated_mg_smoother_preconditioner_type_names);
3604 prm.declare_entry(
"mg smoother chebyshev degree",
3605 Patterns::Tools::Convert<unsigned int>::to_string(
3607 Patterns::Integer(0),
3608 "polynomial degree of the Chebyshev smoother");
3611 "mg smoother chebyshev smoothing range",
3612 Patterns::Tools::Convert<double>::to_string(
3614 Patterns::Double(1.0),
3615 "smoothing range (lambda_max/lambda_min) of the Chebyshev smoother");
3618 "mg smoother chebyshev eig cg n iterations",
3619 Patterns::Tools::Convert<unsigned int>::to_string(
3621 Patterns::Integer(1),
3622 "cg/Lanczos iterations to estimate the maximum eigenvalue for the "
3623 "Chebyshev smoother");
3625 prm.declare_entry(
"mg smoother eig estimation",
3626 Patterns::Tools::Convert<bool>::to_string(
3629 "estimate eigenvalues for relaxation parameter");
3631 prm.declare_entry(
"eig estimation smoothing range",
3632 Patterns::Tools::Convert<double>::to_string(
3635 "sets range between largest and smallest eig");
3637 prm.declare_entry(
"eig estimation cg n iterations",
3638 Patterns::Tools::Convert<int>::to_string(
3640 Patterns::Integer(),
3641 "cg iterations performed to find eigenvalue");
3645 "eig estimation verbosity",
3647 "State whether MG should print max and min eigenvalue.",
3652 "mg coarse grid solver",
3654 "The coarse grid solver for lsmg or gcmg.");
3657 "mg coarse grid use fe q iso q1",
3658 Patterns::Tools::Convert<bool>::to_string(
3661 "use elements with linear interpolation for coarse grid");
3664 "mg coarsening type",
3666 "mg coarsening type for gcmg.");
3669 "mg p coarsening type",
3671 "mg p coarsening type for gcmg.",
3672 deprecated_mg_p_coarsening_type_names);
3674 prm.declare_entry(
"mg p min coarsening degree",
3675 Patterns::Tools::Convert<unsigned int>::to_string(
3677 Patterns::Integer(),
3678 "mg p minimum coarsening degree for gcmg");
3680 prm.declare_entry(
"mg gmres max iterations",
3681 Patterns::Tools::Convert<int>::to_string(
3683 Patterns::Integer(),
3684 "mg gmres iterations for lsmg or gcmg");
3686 prm.declare_entry(
"mg gmres tolerance",
3687 Patterns::Tools::Convert<double>::to_string(
3690 "mg gmres tolerance n for lsmg or gcmg");
3692 prm.declare_entry(
"mg gmres reduce",
3693 Patterns::Tools::Convert<double>::to_string(
3696 "mg gmres reduce for lsmg or gcmg");
3698 prm.declare_entry(
"mg gmres max krylov vectors",
3699 Patterns::Tools::Convert<int>::to_string(
3701 Patterns::Integer(),
3702 "mg gmres max krylov vectors for lsmg or gcmg");
3705 "mg gmres preconditioner",
3707 "The preconditioner for the mg gmres solver.",
3709 {PreconditionerType::amg, PreconditionerType::ilu});
3711 prm.declare_entry(
"mg amg use default parameters",
3712 Patterns::Tools::Convert<bool>::to_string(
3715 "Use default parameters for Trilinos AMG");
3721 "State whether LSMG or GCMG should print information about levels.",
3724 prm.leave_subsection();
3726 prm.leave_subsection();
3730 const std::string &physics_name)
3732 prm.enter_subsection(
"linear solver");
3734 prm.enter_subsection(physics_name);
3751 ExcNotImplemented());
3759 prm.get_double(
"ilu preconditioner absolute tolerance");
3761 prm.get_double(
"ilu preconditioner relative tolerance");
3765 prm.get_double(
"amg preconditioner ilu absolute tolerance");
3767 prm.get_double(
"amg preconditioner ilu relative tolerance");
3775 prm.get_bool(
"force linear solver continuation");
3781 prm.get_bool(
"mg enable hessians in jacobian");
3783 ExcNotImplemented());
3790 prm.get(
"mg smoother preconditioner type"),
3791 deprecated_mg_smoother_preconditioner_type_names,
3792 "mg smoother preconditioner type");
3795 prm.get_integer(
"mg smoother chebyshev degree");
3797 prm.get_double(
"mg smoother chebyshev smoothing range");
3799 prm.get_integer(
"mg smoother chebyshev eig cg n iterations");
3803 prm.get_double(
"eig estimation smoothing range");
3805 prm.get_integer(
"eig estimation cg n iterations");
3810 "eig estimation verbosity");
3813 prm.get(
"mg coarse grid solver"));
3819 prm.get(
"mg coarsening type"));
3822 MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType>(
3823 prm.get(
"mg p coarsening type"),
3824 deprecated_mg_p_coarsening_type_names,
3825 "mg p coarsening type");
3828 prm.get_integer(
"mg p min coarsening degree");
3833 ExcNotImplemented());
3839 ExcNotImplemented());
3845 prm.get_integer(
"mg gmres max krylov vectors");
3848 prm.get(
"mg gmres preconditioner"));
3851 prm.get_bool(
"mg amg use default parameters");
3857 prm.leave_subsection();
3859 prm.leave_subsection();
3876 prm.enter_subsection(
"mesh adaptation");
3878 prm.declare_entry(
"initial refinement steps",
3879 Patterns::Tools::Convert<unsigned int>::to_string(
3881 Patterns::Integer(),
3882 "Number of pre-solve adaptive mesh refinement steps");
3887 "Type of mesh adaptation.");
3892 Patterns::List(Patterns::Selection(
3894 "Error estimator for adaptive mesh refinement. For multi-variables refinement, separate the different strategies with a comma. They should follow the same order as what is specified in the variable parameter. " +
3898 "fraction refinement",
3899 Patterns::Tools::Convert<double>::to_string(
3901 Patterns::List(Patterns::Double()),
3902 "Fraction of refined elements. "
3903 "For multi-variables refinement, separate the different fractions with a comma "
3904 "(ex/ 'set fraction refinement = 0.1,0.1')");
3907 "fraction coarsening",
3908 Patterns::Tools::Convert<double>::to_string(
3910 Patterns::List(Patterns::Double()),
3911 "Fraction of coarsened elements. "
3912 "For multi-variables refinement, separate the different fractions with a comma "
3913 "(ex/ 'set fraction coarsening = 0.05,0.05')");
3918 Patterns::List(Patterns::Selection(
3921 " For multi-variables refinement, separate the different variables with a comma "
3922 "(ex/ 'set variable = velocity,temperature')");
3928 "How the fraction of refinement/coarsening are interpreted.");
3929 prm.declare_entry(
"max number elements",
3930 Patterns::Tools::Convert<unsigned int>::to_string(
3932 Patterns::Integer(),
3933 "Maximum number of elements");
3934 prm.declare_entry(
"max refinement level",
3935 Patterns::Tools::Convert<unsigned int>::to_string(
3937 Patterns::Integer(),
3938 "Maximum refinement level");
3939 prm.declare_entry(
"min refinement level",
3940 Patterns::Tools::Convert<unsigned int>::to_string(
3942 Patterns::Integer(),
3943 "Minimum refinement level");
3944 prm.declare_entry(
"frequency",
3945 Patterns::Tools::Convert<unsigned int>::to_string(
3947 Patterns::Integer(),
3948 "Frequency of the mesh refinement");
3950 "mesh refinement controller",
3951 Patterns::Tools::Convert<bool>::to_string(
3954 "Enable a controller that will target a specific number of elements in the mesh equal to the maximum number of elements");
3955 prm.declare_entry(
"fix boundary refinement",
3956 Patterns::Tools::Convert<bool>::to_string(
3959 "Enable fix boundary refinement");
3960 prm.declare_entry(
"boundaries fixed",
3962 Patterns::List(Patterns::Integer()),
3963 "Boundary ids of the boundaries to be fixed");
3965 prm.leave_subsection();
3971 prm.enter_subsection(
"mesh adaptation");
3978 const std::string var_op = prm.get(
"variable");
3979 std::vector<std::string> var_vec = Utilities::split_string_list(var_op);
3980 const std::string strategy_op = prm.get(
"error estimator");
3981 std::vector<std::string> strategy_vec =
3982 Utilities::split_string_list(strategy_op);
3983 const std::string coars_op = prm.get(
"fraction coarsening");
3984 std::vector<std::string> coars_vec =
3985 Utilities::split_string_list(coars_op);
3986 const std::string refin_op = prm.get(
"fraction refinement");
3987 std::vector<std::string> refin_vec =
3988 Utilities::split_string_list(refin_op);
3991 AssertThrow(strategy_vec.size() == var_vec.size(),
3992 MultipleAdaptationSizeError(
"error estimator",
3993 strategy_vec.size(),
3995 AssertThrow(coars_vec.size() == var_vec.size(),
3996 MultipleAdaptationSizeError(
"fraction coarsening",
3999 AssertThrow(refin_vec.size() == var_vec.size(),
4000 MultipleAdaptationSizeError(
"fraction refinement",
4005 for (std::vector<int>::size_type i = 0; i != var_vec.size(); ++i)
4010 deprecated_adaptation_variable_names,
4020 Utilities::string_to_double(coars_vec[i]);
4022 Utilities::string_to_double(refin_vec[i]);
4025 variables[variable] = adaptation_parameters;
4038 AssertThrow(!(has_em && (has_e || has_h)),
4040 "Invalid mesh adaptation configuration: "
4041 "electromagnetic_fields is mutually exclusive with "
4042 "electric_field and magnetic_field."));
4048 frequency = prm.get_integer(
"frequency");
4061 "The parameter 'fix boundary refinement' is enabled, but the "
4062 "parameter 'boundaries fixed' is empty. No boundary would be fixed. "
4063 "Specify the boundary IDs to fix using 'boundaries fixed'."));
4065 prm.leave_subsection();
4072 prm.enter_subsection(
"test");
4076 Patterns::Tools::Convert<bool>::to_string(defaults.
enabled),
4078 "Enable testing mode of a solver. Some solvers have a specific "
4079 "testing mode which enables the output of debug variables. This "
4080 "testing mode is generally used only for the automatic testing bench using ctest.");
4085 "Output type for testing mode. Currently, particles type will output "
4086 "each particle with some information and mobility_status or subdomain output results "
4087 "in deal.II format.");
4089 prm.leave_subsection();
4095 prm.enter_subsection(
"test");
4097 enabled = prm.get_bool(
"enable");
4103 prm.leave_subsection();
4110 prm.enter_subsection(
"restart");
4112 prm.declare_entry(
"filename",
4114 Patterns::FileName(),
4115 "Prefix for the filename of checkpoints");
4118 Patterns::Tools::Convert<bool>::to_string(defaults.
restart),
4120 "Restart the simulation from the last checkpoint <true|false>");
4123 Patterns::Tools::Convert<bool>::to_string(defaults.
checkpoint),
4125 "Enable checkpointing. Checkpointing creates a restart "
4126 "point from which the simulation can be restarted from.");
4128 prm.declare_entry(
"frequency",
4129 Patterns::Tools::Convert<unsigned int>::to_string(
4131 Patterns::Integer(),
4132 "Frequency for checkpointing");
4134 prm.leave_subsection();
4140 prm.enter_subsection(
"restart");
4144 restart = prm.get_bool(
"restart");
4145 frequency = prm.get_integer(
"frequency");
4147 prm.leave_subsection();
4154 deprecated_permeability_model_names = {
4155 {
"darcy phase change",
4157 {
"carman-kozeny phase change",
4165 prm.enter_subsection(
"velocity source");
4169 "rotating frame type",
4171 "Rotating frame velocity-dependent source terms. "
4173 "for single rotating frame and adds "
4174 "the coriolis and the centrifugal force to the Navier-Stokes equations.");
4178 Patterns::Tools::Convert<double>::to_string(defaults.
omega_x),
4180 "X component of the angular velocity vector of the frame of reference");
4184 Patterns::Tools::Convert<double>::to_string(defaults.
omega_y),
4186 "Y component of the angular velocity vector of the frame of reference");
4190 Patterns::Tools::Convert<double>::to_string(defaults.
omega_z),
4192 "Z component of the angular velocity vector of the frame of reference");
4195 "enable Darcy multiply by density",
4196 Patterns::Tools::Convert<bool>::to_string(
4199 "Enable the multiplication of the Darcy force term by the density for dimensional consistency when solving the pressure rather than the kinematic pressure in the momentum balance.");
4202 "permeability model",
4204 "Permeability models for phase change modelling.",
4205 deprecated_permeability_model_names);
4208 "Carman-Kozeny fluid with phase change",
4210 "Select which fluids have phase change.",
4214 "Carman-Kozeny division tolerance",
4215 Patterns::Tools::Convert<double>::to_string(
4217 Patterns::List(Patterns::Double()),
4218 "This tolerance avoids a division by zero in the Carman-Kozeny source term. For multiple fluids with phase change, separate values with a comma.");
4221 "Carman-Kozeny permeability area",
4222 Patterns::Tools::Convert<double>::to_string(
4224 Patterns::List(Patterns::Double()),
4225 "This represents the permeability area of the pseudo-porous bed in the Carman-Kozeny source term. For multiple fluids with phase change, separate values with a comma.");
4227 prm.leave_subsection();
4233 prm.enter_subsection(
"velocity source");
4240 deprecated_permeability_model_names,
4241 "permeability model");
4244 prm.get(
"Carman-Kozeny fluid with phase change"),
4246 "Carman-Kozeny fluid with phase change");
4248 const std::vector<double> permeability_area_values =
4250 "Carman-Kozeny permeability area");
4251 const std::vector<double> tolerance_values =
4253 "Carman-Kozeny division tolerance");
4256 AssertThrow(permeability_area_values.size() == tolerance_values.size(),
4257 dealii::ExcDimensionMismatch(permeability_area_values.size(),
4258 tolerance_values.size()));
4263 const unsigned int expected_size =
4265 const unsigned int first_fluid =
4268 permeability_area_values.size() == expected_size,
4270 "The expected size of the 'Carman-Kozeny permeability area' list of " +
4271 std::to_string(expected_size) +
" is not met."));
4273 tolerance_values.size() == expected_size,
4275 "The expected size of the 'Carman-Kozeny division tolerance' list of " +
4276 std::to_string(expected_size) +
" is not met."));
4277 for (
unsigned int i = 0; i < expected_size; ++i)
4280 permeability_area_values[i];
4290 "The chosen value of 'Carman-Kozeny permeability area' has to be strictly positive."));
4295 "The 'Carman-Kozeny division tolerance' should be strictly positive."));
4299 prm.get_bool(
"enable Darcy multiply by density");
4305 "Inconsistency in parameters, 'enable Darcy multiply by density' is set to 'true', but 'permeability model' is not set to 'darcy_phase_change'."));
4307 omega_x = prm.get_double(
"omega_x");
4308 omega_y = prm.get_double(
"omega_y");
4309 omega_z = prm.get_double(
"omega_z");
4311 prm.leave_subsection();
4323 "Bool to define if the particle trajectory is integrated meaning its velocity and position will be updated at each time step according to the hydrodynamic force applied to it");
4325 "mesh-based precalculations",
4328 "Bool to define if precalculations should be performed between refinements. Precalculations can introduce shape deformation when the type is RBF and some nodes are located outside the background mesh.");
4330 prm.enter_subsection(
"position");
4332 std::make_shared<Functions::ParsedFunction<dim>>(dim);
4333 particles[index].f_position->declare_parameters(prm, dim);
4334 prm.leave_subsection();
4336 prm.enter_subsection(
"orientation");
4338 std::make_shared<Functions::ParsedFunction<dim>>(3);
4339 particles[index].f_orientation->declare_parameters(prm, 3);
4340 prm.leave_subsection();
4342 prm.enter_subsection(
"velocity");
4344 std::make_shared<Functions::ParsedFunction<dim>>(dim);
4345 particles[index].f_velocity->declare_parameters(prm, dim);
4346 prm.leave_subsection();
4348 prm.enter_subsection(
"omega");
4350 std::make_shared<Functions::ParsedFunction<dim>>(3);
4351 particles[index].f_omega->declare_parameters(prm, 3);
4352 prm.leave_subsection();
4358 "The type of shape considered. "
4359 "The parameter for a sphere is: radius. "
4360 "The parameters for a hyper rectangle are, in order: x half length, "
4361 "y half length, z half length. "
4362 "The parameters for an ellipsoid are, in order: x radius, "
4363 "y radius, z radius. "
4364 "The parameters for a torus are, in order: torus radius, "
4365 "torus thickness radius. "
4366 "The parameters for a cone are, in order: tan(base angle),"
4368 "The parameters for a cylinder are, in order: radius, half-length. "
4369 "It is aligned to the z axis by default. "
4370 "The parameters for a cylindrical tube are, in order: inside radius, "
4371 "outside radius, half-length. It is aligned to the z axis by default. "
4372 "The parameters for a cylindrical helix are, in order: helix radius, "
4373 "tube radius, helix total height, pitch (height between two consecutive "
4375 "The parameters for a cut hollow sphere are, in order: sphere radius, "
4376 "cut thickness, wall thickness. "
4377 "The parameters for a death star are, in order: sphere radius, "
4378 "smaller sphere radius, distance between centers. "
4379 "The parameters for a superquadric are, in order: "
4380 "a, b, c, r, s, t, epsilon. "
4381 "The first three are half-lengths in x, y, and z. "
4382 "The next three are the blockiness in the x, y, and z directions. "
4383 "The last is the tolerance of the found surface. "
4384 "The parameter for an rbf is the file name. "
4385 "The parameter for a composite is the file name.",
4388 prm.declare_entry(
"shape arguments",
4390 Patterns::Anything(),
4391 "Arguments defining the geometry");
4397 "Thickness (positive or negative) of uniform additional layer of solid on particle. "
4398 "A negative value will decrease the particle's thickness by subtracting a layer of specified width.");
4401 "pressure location",
4403 Patterns::Anything(),
4404 "position relative to the center of the particle for the location of the point where the pressure is imposed inside the particle");
4408 prm.enter_subsection(
"physical properties");
4410 prm.declare_entry(
"density",
4413 "density of the particle ");
4418 "The volume occupied by the particle. If it is left empty, the volume is automatically calculated if possible otherwise the volume of a sphere is used instead");
4421 "1 ;0 ;0 ;0 ;1 ;0 ;0 ;0 ;1",
4422 Patterns::Anything(),
4423 "Moments of inertia of the particle in the reference frame of the fluid. The entry sequence corresponds to : I_xx ;I_xy ;I_xz ;I_yx ;I_yy ;I_yz ;I_zx ;I_zy ;I_zz");
4424 prm.declare_entry(
"youngs modulus",
4427 "The Young's modulus of particle in case of contact");
4428 prm.declare_entry(
"poisson ratio",
4431 "The poisson ratio of particle in case of contact");
4433 "restitution coefficient",
4436 "The restitution coefficient of particle in case of contact");
4438 "friction coefficient",
4441 "The friction coefficient of particle in case of contact");
4443 "rolling friction coefficient",
4446 "The rolling friction coefficient of particle in case of contact");
4447 prm.leave_subsection();
4455 prm.enter_subsection(
"particles");
4458 "number of particles",
4459 Patterns::Tools::Convert<unsigned int>::to_string(
nb_particles),
4460 Patterns::Integer(),
4461 "The number of particles represented by IB. The maximal number of particles is equal to 10 when defined individually. If particles are loaded from a file, this parameter is overridden, and there is no limit to the number of particles.");
4464 "assemble Navier-Stokes inside particles",
4465 Patterns::Tools::Convert<bool>::to_string(
4468 "Bool to define if you assemble the inside of particles with the NS equation.");
4470 prm.enter_subsection(
"extrapolation function");
4474 Patterns::Tools::Convert<unsigned int>::to_string(
stencil_degree),
4475 Patterns::Integer(1),
4476 "The polynomial degree used in the extrapolation function");
4479 Patterns::Tools::Convert<double>::to_string(
length_ratio),
4481 "The length ratio used to define the points for the IB stencil. See definition of epsilon_n in the paper on sharp IB.");
4483 "enable extrapolation",
4486 "Bool to define if extrapolation should be enabled (default). If disabled, all velocity degrees of freedom "
4487 "in a cell will be set to the particle velocity if that cell is cut. Setting to false is intended for "
4488 "debugging purposes.");
4490 prm.leave_subsection();
4493 prm.enter_subsection(
"input file");
4496 "load particles from file",
4499 "Bool to define if particles are loaded from an external file");
4500 prm.declare_entry(
"particles file",
4502 Patterns::FileName(),
4503 "The file name from which we load the particles");
4504 prm.leave_subsection();
4507 prm.enter_subsection(
"local mesh refinement");
4510 "initial refinement",
4512 Patterns::Integer(),
4513 "Number of refinements around the particles before the start of the simulation ");
4515 "enable distance based coarsening",
4518 "Enable distance-based coarsening away from immersed boundary particles");
4520 "refine mesh inside radius factor",
4521 Patterns::Tools::Convert<double>::to_string(
4524 "The factor that multiplies the radius to define the inside bound for the refinement of the mesh");
4526 "refine mesh outside radius factor",
4527 Patterns::Tools::Convert<double>::to_string(
4530 "The factor that multiplies the radius to define the outside bound for the refinement of the mesh");
4532 "coarsen mesh outside radius factor",
4533 Patterns::Tools::Convert<double>::to_string(
4536 "The factor that multiplies the radius to define the outside bound beyond which distance-based coarsening is allowed");
4538 "refinement zone extrapolation",
4539 Patterns::Tools::Convert<bool>::to_string(
4542 "This parameter enables the extrapolation in time of the refinement zone. This means that it will try to refine where the particle will be at the end of the time step instead of the initial position.");
4543 prm.leave_subsection();
4546 prm.enter_subsection(
"output");
4552 "Bool to define if the force is evaluated on each particle ");
4554 "ib force output file",
4556 Patterns::FileName(),
4557 "The name of the file where the data on the force of each particle is stored");
4559 "ib particles pvd file",
4561 Patterns::FileName(),
4562 "The output files of the pvd data for the ib particles");
4565 Patterns::Tools::Convert<bool>::to_string(
print_dem),
4567 "Bool to define if particles' information are printed on the terminal when particles' time step is finished");
4569 "enable extra sharp interface vtu output field",
4570 Patterns::Tools::Convert<bool>::to_string(
4573 "This parameter enables the output of more information related to the particles in the vtu file.");
4574 prm.leave_subsection();
4577 prm.enter_subsection(
"DEM");
4580 "contact search radius factor",
4581 Patterns::Tools::Convert<double>::to_string(
4584 "The factor that multiplies the radius to define the region of contact search around the particle");
4586 "contact search frequency",
4588 Patterns::Integer(),
4589 "The frequency of update in the contact candidates list");
4591 "particle nonlinear tolerance",
4592 Patterns::Tools::Convert<double>::to_string(
4595 "The nonlinear tolerance for the coupling of the particle dynamics and the fluid");
4596 prm.declare_entry(
"DEM coupling frequency",
4597 Patterns::Tools::Convert<unsigned int>::to_string(
4599 Patterns::Integer(),
4600 "The number of DEM time steps per CFD time step");
4601 prm.declare_entry(
"alpha",
4602 Patterns::Tools::Convert<double>::to_string(
alpha),
4604 "relaxation parameter");
4606 prm.declare_entry(
"enable lubrication force",
4607 Patterns::Tools::Convert<bool>::to_string(
4610 "Bool to enable or disable the lubrication force");
4612 "lubrication range max",
4615 "Gap require to consider the lubrication force. This value is multiplied the smallest cell size");
4617 "lubrication range min",
4620 "Smallest gap considered for the lubrification force calculation. This value is multiplied by the smallest cell size");
4623 "explicit contact impulsion",
4624 Patterns::Tools::Convert<bool>::to_string(
4627 "Bool to enable or disable the use of explicit contact impulsion evaluation in the resolution of the coupling of the particle. When it is set to true, this parameter results in the code only performing the DEM calculation once per CFD time step and using the resulting contact impulsion to evaluate all the other Newton's iterations. This reduces the number of times the DEM calculation is made.");
4630 "explicit position integration",
4631 Patterns::Tools::Convert<bool>::to_string(
4634 "Bool to enable or disable the explicit position integration. This means that the particle position is obtained directly by the integration of the previous velocities only. This avoids multiple cut cell mapping for each newton iteration. Note that this limits the order of convergence in time to one.");
4637 "approximate radius for contact",
4638 Patterns::Tools::Convert<bool>::to_string(
4641 "Bool to turn on or off using the approximate radius of the particles during contact. If activated, the radius used in the contact calculation is constant and fixed to the effective radius of the shape. If not, the radius of curvature of the shape at the contact point is evaluated. For some shapes, this can be numerically expensive to evaluate.");
4645 prm.enter_subsection(
"wall physical properties");
4648 "wall youngs modulus",
4651 "The wall Young's modulus if IB particles are in contact with it");
4654 "wall poisson ratio",
4657 "The wall poisson ratio if IB particles are in contact with it");
4660 "wall rolling friction coefficient",
4661 Patterns::Tools::Convert<double>::to_string(
4664 "The wall rolling friction coefficient if IB particles are in contact with it");
4667 "wall friction coefficient",
4668 Patterns::Tools::Convert<double>::to_string(
4671 "The wall friction coefficient if IB particles are in contact with it");
4674 "wall restitution coefficient",
4675 Patterns::Tools::Convert<double>::to_string(
4678 "The wall restitution coefficient if IB particles are in contact with it");
4679 prm.leave_subsection();
4682 prm.enter_subsection(
"gravity");
4683 f_gravity->declare_parameters(prm, dim);
4684 prm.leave_subsection();
4686 prm.leave_subsection();
4689 unsigned int max_ib_particles = 20;
4691 for (
unsigned int i = 0; i < max_ib_particles; ++i)
4693 std::string section =
"particle info " + std::to_string(i);
4694 prm.enter_subsection(section);
4698 prm.leave_subsection();
4701 prm.leave_subsection();
4709 prm.enter_subsection(
"particles");
4711 prm.enter_subsection(
"extrapolation function");
4716 prm.leave_subsection();
4719 prm.enter_subsection(
"input file");
4723 prm.leave_subsection();
4726 prm.enter_subsection(
"local mesh refinement");
4731 prm.get_double(
"refine mesh inside radius factor");
4733 prm.get_double(
"refine mesh outside radius factor");
4735 prm.get_double(
"coarsen mesh outside radius factor");
4737 prm.get_bool(
"refinement zone extrapolation");
4743 "The parameter 'coarsen mesh outside radius factor' must be greater than or equal to 'refine mesh outside radius factor'."));
4745 prm.leave_subsection();
4748 prm.enter_subsection(
"output");
4754 prm.get_bool(
"enable extra sharp interface vtu output field");
4756 prm.leave_subsection();
4758 prm.enter_subsection(
"DEM");
4760 alpha = prm.get_double(
"alpha");
4763 prm.get_double(
"contact search radius factor");
4765 throw(std::logic_error(
4766 "Error, the parameter 'contact search radius factor' cannot be < 1."));
4769 prm.get_double(
"particle nonlinear tolerance");
4775 prm.get_bool(
"explicit contact impulsion");
4777 prm.get_bool(
"explicit position integration");
4779 prm.get_bool(
"approximate radius for contact");
4781 prm.enter_subsection(
"wall physical properties");
4786 prm.get_double(
"wall rolling friction coefficient");
4788 prm.get_double(
"wall friction coefficient");
4790 prm.get_double(
"wall restitution coefficient");
4791 prm.leave_subsection();
4793 f_gravity = std::make_shared<Functions::ParsedFunction<dim>>(dim);
4794 prm.enter_subsection(
"gravity");
4796 prm.leave_subsection();
4797 prm.leave_subsection();
4803 prm.get_bool(
"assemble Navier-Stokes inside particles");
4809 std::string section =
"particle info " + std::to_string(i);
4810 prm.enter_subsection(section);
4812 particles[i].integrate_motion = prm.get_bool(
"integrate motion");
4813 particles[i].mesh_based_precalculations =
4814 prm.get_bool(
"mesh-based precalculations");
4816 prm.enter_subsection(
"position");
4817 particles[i].f_position->parse_parameters(prm);
4819 prm.leave_subsection();
4820 prm.enter_subsection(
"orientation");
4821 particles[i].f_orientation->parse_parameters(prm);
4822 particles[i].f_orientation->set_time(0);
4823 prm.leave_subsection();
4825 prm.enter_subsection(
"velocity");
4826 particles[i].f_velocity->parse_parameters(prm);
4828 prm.leave_subsection();
4829 prm.enter_subsection(
"omega");
4830 particles[i].f_omega->parse_parameters(prm);
4832 prm.leave_subsection();
4856 std::string pressure_location_str = prm.get(
"pressure location");
4857 std::vector<std::string> pressure_location_str_list(
4858 Utilities::split_string_list(pressure_location_str,
";"));
4859 std::vector<double> pressure_list =
4860 Utilities::string_to_double(pressure_location_str_list);
4861 particles[i].pressure_location[0] = pressure_list[0];
4862 particles[i].pressure_location[1] = pressure_list[1];
4871 particles[i].pressure_location[2] = pressure_list[2];
4879 std::string shape_arguments_str = prm.get(
"shape arguments");
4881 shape_arguments_str);
4883 particles[i].set_layer_thickening(prm.get_double(
"layer thickening"));
4886 prm.enter_subsection(
"physical properties");
4888 std::string inertia_str = prm.get(
"inertia");
4889 std::vector<std::string> inertia_str_list(
4890 Utilities::split_string_list(inertia_str,
";"));
4891 const std::vector<double> inertia_list =
4892 Utilities::string_to_double(inertia_str_list);
4893 if (inertia_str_list.size() == 9)
4895 particles[i].inertia[0][0] = inertia_list[0];
4896 particles[i].inertia[0][1] = inertia_list[1];
4897 particles[i].inertia[0][2] = inertia_list[2];
4898 particles[i].inertia[1][0] = inertia_list[3];
4899 particles[i].inertia[1][1] = inertia_list[4];
4900 particles[i].inertia[1][2] = inertia_list[5];
4901 particles[i].inertia[2][0] = inertia_list[6];
4902 particles[i].inertia[2][1] = inertia_list[7];
4903 particles[i].inertia[2][2] = inertia_list[8];
4905 else if (inertia_str_list.size() == 1)
4909 particles[i].inertia[0][0] = inertia_list[0];
4913 particles[i].inertia[1][1] = inertia_list[0];
4917 particles[i].inertia[2][2] = inertia_list[0];
4921 throw(std::runtime_error(
4922 " Invalid inertia matrix. The inertia is given as a 3 by 3 matrix or a single value if the inertia is uniform around each axis."));
4925 particles[i].youngs_modulus = prm.get_double(
"youngs modulus");
4927 prm.get_double(
"restitution coefficient");
4929 prm.get_double(
"friction coefficient");
4930 particles[i].poisson_ratio = prm.get_double(
"poisson ratio");
4931 particles[i].rolling_friction_coefficient =
4932 prm.get_double(
"rolling friction coefficient");
4934 double volume = prm.get_double(
"volume");
4938 volume =
particles[i].shape->displaced_volume();
4947 volume = 4.0 / 3.0 * PI *
particles[i].radius *
4955 particles[i].initialize_previous_solution();
4959 prm.leave_subsection();
4961 prm.leave_subsection();
4963 prm.leave_subsection();
4971 prm.enter_subsection(
"flow control");
4973 prm.declare_entry(
"enable",
4974 Patterns::Tools::Convert<bool>::to_string(
4977 "Enable flow rate control");
4978 prm.declare_entry(
"average velocity",
4979 Patterns::Tools::Convert<double>::to_string(
4982 "The target average velocity");
4983 prm.declare_entry(
"inlet boundary id",
4984 Patterns::Tools::Convert<unsigned int>::to_string(
4986 Patterns::Integer(0),
4987 "Boundary id of the inlet flow");
4990 Patterns::Tools::Convert<unsigned int>::to_string(
4992 Patterns::Integer(0, 2),
4993 "Flow direction at flow inlet (0 for x, 1 for y and 2 for z)");
4994 prm.declare_entry(
"initial beta",
4995 Patterns::Tools::Convert<double>::to_string(
4998 "Beta coefficient value for the first step time");
4999 prm.declare_entry(
"alpha",
5000 Patterns::Tools::Convert<double>::to_string(
5002 Patterns::Double(0.),
5003 "Relaxation coefficient for flow controller");
5004 prm.declare_entry(
"enable beta particle",
5005 Patterns::Tools::Convert<bool>::to_string(
5008 "Enable beta force for particles");
5011 Patterns::Tools::Convert<double>::to_string(defaults.
beta_threshold),
5012 Patterns::Double(0.),
5013 "Relative threshold on the change of the beta force below which the previous beta force is kept");
5018 "State whether from the flow control information should be printed.",
5022 prm.leave_subsection();
5028 prm.enter_subsection(
"flow control");
5039 beta_0 = prm.get_double(
"initial beta");
5040 alpha = prm.get_double(
"alpha");
5052 prm.leave_subsection();
5059 prm.enter_subsection(
"evaporation");
5063 "evaporation mass flux model",
5065 "Model used for the calculation of the evaporative mass flux.");
5067 "enable evaporative cooling",
5068 Patterns::Tools::Convert<bool>::to_string(
5071 "Enable the evaporative cooling at the free surface (gas/liquid interface) in the energy equation <true|false>");
5073 "enable recoil pressure",
5074 Patterns::Tools::Convert<bool>::to_string(
5077 "Enable the recoil pressure due to evaporation at the free surface (gas/liquid interface) in the momentum equation <true|false>");
5079 "evaporation mass flux",
5080 Patterns::Tools::Convert<double>::to_string(
5083 "Evaporation mass flux used if the constant evaporation model is selected in M*L^-2*T^-1");
5085 "evaporation coefficient",
5086 Patterns::Tools::Convert<double>::to_string(
5089 "Evaporation coefficient corresponding to the ratio between the net mass flux (evaporation-condensation) and the mass flux of evaporation");
5091 "recoil pressure coefficient",
5092 Patterns::Tools::Convert<double>::to_string(
5095 "Recoil pressure coefficient corresponding to the factor applied to the saturation pressure to compute the recoil pressure in an out of equilibrium evaporation");
5096 prm.declare_entry(
"molar mass",
5097 Patterns::Tools::Convert<double>::to_string(
5100 "Molar mass of the material in M*N^-1");
5101 prm.declare_entry(
"boiling temperature",
5102 Patterns::Tools::Convert<double>::to_string(
5105 "Boiling temperature in Theta");
5106 prm.declare_entry(
"evaporation latent heat",
5107 Patterns::Tools::Convert<double>::to_string(
5110 "Latent heat of evaporation in L^2*T^-2");
5111 prm.declare_entry(
"ambient pressure",
5112 Patterns::Tools::Convert<double>::to_string(
5115 "Pressure of the ambient gas in M*L^-1*T^-2");
5116 prm.declare_entry(
"ambient gas density",
5117 Patterns::Tools::Convert<double>::to_string(
5120 "Ambient gas density in M*L^-3");
5121 prm.declare_entry(
"liquid density",
5122 Patterns::Tools::Convert<double>::to_string(
5125 "Liquid density in M*L^-3");
5126 prm.declare_entry(
"universal gas constant",
5127 Patterns::Tools::Convert<double>::to_string(
5130 "Universal gas constant in M*L^2*T^-2*Theta^-1*N^-1");
5132 prm.leave_subsection();
5138 prm.enter_subsection(
"evaporation");
5142 prm.get(
"evaporation mass flux model"));
5150 prm.get_double(
"recoil pressure coefficient");
5159 prm.leave_subsection();
5166 prm.enter_subsection(
"mortar");
5168 prm.declare_entry(
"enable",
5169 Patterns::Tools::Convert<bool>::to_string(
enable),
5171 "Enable mortar interface <true|false>");
5175 "Type of mortar interface.");
5178 prm.declare_entry(
"rotor boundary id",
5179 Patterns::Tools::Convert<unsigned int>::to_string(
5181 Patterns::Integer(),
5182 "Rotor boundary ID # of the mortar matching interface");
5184 "stator boundary id",
5186 Patterns::Integer(),
5187 "Stator boundary ID # of the mortar matching interface");
5188 prm.declare_entry(
"center of rotation",
5189 Patterns::Tools::Convert<Point<dim>>::to_string(
5191 Patterns::List(Patterns::Double()),
5192 "Center of rotation coordinates of rotor domain");
5194 prm.declare_entry(
"rotation axis direction",
5195 Patterns::Tools::Convert<unsigned int>::to_string(
5197 Patterns::Integer(0, 2),
5198 "Direction of the rotation axis. Choices are <0|1|2>.");
5200 prm.enter_subsection(
"rotor rotation angle");
5203 prm.leave_subsection();
5205 prm.enter_subsection(
"rotor angular velocity");
5207 std::make_shared<Functions::ParsedFunction<dim>>();
5209 prm.leave_subsection();
5211 prm.declare_entry(
"penalty factor",
5212 Patterns::Tools::Convert<double>::to_string(
sip_factor),
5214 "Penalty factor for mortar elements");
5215 prm.declare_entry(
"oversampling factor",
5216 Patterns::Tools::Convert<unsigned int>::to_string(
5218 Patterns::Integer(),
5219 "Oversampling factor for quadrature points");
5220 prm.declare_entry(
"radius tolerance",
5221 Patterns::Tools::Convert<double>::to_string(
5224 "Tolerance used for the interface radius computation");
5225 prm.declare_entry(
"cell weight",
5226 Patterns::Tools::Convert<unsigned int>::to_string(
5228 Patterns::Integer(),
5229 "Cell weight for load balancing of mortar cells");
5234 "State whether from the mortar information should be printed.",
5237 prm.leave_subsection();
5244 prm.enter_subsection(
"mortar");
5246 enable = prm.get_bool(
"enable");
5254 prm.enter_subsection(
"rotor rotation angle");
5257 prm.leave_subsection();
5259 prm.enter_subsection(
"rotor angular velocity");
5262 prm.leave_subsection();
5264 sip_factor = prm.get_double(
"penalty factor");
5274 prm.leave_subsection();
Class used to rescale physical properties for cases where the main dimensions of the problems (Length...
double specific_heat_scaling
double surface_tension_gradient_scaling
double surface_tension_scaling
double diffusivity_scaling
double cahn_hilliard_mobility_scaling
double specific_gas_constant_scaling
double thermal_expansion_scaling
double thermal_conductivity_scaling
void declare_parameters(ParameterHandler &prm)
Declare the parameters.
unsigned int nb_particles
bool enable_extra_sharp_interface_vtu_output_field
int contact_search_frequency
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
double wall_poisson_ratio
bool time_extrapolation_of_refinement_zone
void declare_default_entry(ParameterHandler &prm, unsigned int index)
Declare the default parameters.
unsigned int coupling_frequency
std::string ib_force_output_file
std::vector< IBParticle< dim > > particles
bool enable_lubrication_force
double lubrication_range_min
bool explicit_contact_impulsion_calculation
double refinement_inside_distance_factor
std::shared_ptr< Functions::ParsedFunction< dim > > f_gravity
unsigned int initial_refinement
bool load_particles_from_file
unsigned int stencil_degree
bool explicit_position_integration_calculation
bool assemble_navier_stokes_inside
std::string ib_particles_pvd_file
double coarsening_distance_factor
double wall_restitution_coefficient
std::string particles_file
bool approximate_radius_for_contact
double refinement_outside_distance_factor
bool enable_extrapolation
double wall_youngs_modulus
double contact_search_radius_factor
double wall_rolling_friction_coefficient
double wall_friction_coefficient
double lubrication_range_max
double particle_nonlinear_tolerance
Laser parameters - Defines the parameters for the laser heat source.
bool enable_angle_of_incidence_dependence
unsigned int perpendicular_plane_coordinate_one
enum Parameters::Laser::LaserType laser_type
unsigned int beam_orientation_coordinate
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
std::shared_ptr< Functions::ParsedFunction< dim > > laser_scan_path
Tensor< 1, dim > rotation_axis
Tensor< 2, dim > rotation_matrix
unsigned int perpendicular_plane_coordinate_two
double concentration_factor
Tensor< 1, dim > beam_axis
Laser_FreeSurfaceRadiation radiation
void declare_parameters(ParameterHandler &prm)
Declare the parameters.
double laser_absorptivity
enum Parameters::MaterialInteractions::MaterialInteractionsType material_interaction_type
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > fluid_fluid_interaction_with_material_interaction_id
EffectiveMediumModelType magnetic_permeability_effective_medium_model
void parse_parameters(ParameterHandler &prm, const unsigned int id, const Parameters::Dimensionality &dimensions)
Parse the parameters.
MobilityCahnHilliardParameters mobility_cahn_hilliard_parameters
enum Parameters::MaterialInteractions::MobilityCahnHilliardModel mobility_cahn_hilliard_model
void declare_parameters(ParameterHandler &prm, unsigned int id) const
Declare the parameters.
SurfaceTensionParameters surface_tension_parameters
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > fluid_solid_interaction_with_material_interaction_id
EffectiveMediumModelType electric_permittivity_effective_medium_model
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > fluid_dispersed_phase_interaction_with_material_interaction_id
enum Parameters::MaterialInteractions::SurfaceTensionModel surface_tension_model
double tracer_reaction_constant
enum Parameters::Material::MagneticPermeabilityModel magnetic_permeability_model
double tracer_diffusivity
enum Parameters::Material::DensityModel density_model
double magnetic_permeability_real
Magnetic_permeability.
double tracer_reaction_threshold
IsothermalIdealGasDensityParameters isothermal_ideal_gas_density_parameters
enum Parameters::Material::RheologicalModel rheological_model
ImmersedSolidGaussianParameters immersed_solid_gaussian_parameters
enum Parameters::Material::ThermalExpansionModel thermal_expansion_model
void parse_parameters(ParameterHandler &prm, const std::string &material_prefix, const unsigned int id, const Dimensionality &dimensions)
Parse the parameters for a material.
void declare_parameters(ParameterHandler &prm, const std::string &material_prefix, unsigned int id) const
Declare the parameters for a material.
@ immersed_boundary_gaussian
double electric_permittivity_real
Electric_permittivity.
enum Parameters::Material::TracerDiffusivityModel tracer_diffusivity_model
ImmersedSolidTanhParameters immersed_solid_tanh_parameters
enum Parameters::Material::ElectricConductivityModel electric_conductivity_model
std::vector< double > electric_permittivity_imag_polynomial_coefficients
double electric_conductivity
Electric_conductivity.
enum Parameters::Material::ThermalConductivityModel thermal_conductivity_model
double thermal_conductivity
enum Parameters::Material::SpecificHeatModel specific_heat_model
std::vector< double > magnetic_permeability_real_polynomial_coefficients
PhaseChange phase_change_parameters
std::vector< double > electric_conductivity_polynomial_coefficients
double kinematic_viscosity
double electric_permittivity_imag
double magnetic_permeability_imag
NonNewtonian non_newtonian_parameters
enum Parameters::Material::ElectricPermittivityModel electric_permittivity_model
std::vector< double > magnetic_permeability_imag_polynomial_coefficients
std::vector< double > electric_permittivity_real_polynomial_coefficients
double tracer_reaction_order
enum Parameters::Material::TracerReactionPrefactorModel tracer_reaction_prefactor_model
@ immersed_boundary_gaussian
Mesh - Parameters that control mesh reading and mesh generation.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
unsigned int initial_refinement_at_boundaries
bool simplex
Allow the use of a simplex mesh.
std::string file_name
File name of the mesh.
Tensor< 1, spacedim > translation
double target_size
Target size when automatically refining initial mesh.
Tensor< 1, spacedim > rotation_axis
bool refine_until_target_size
Enable fixing initial refinement from a target size.
std::vector< int > boundaries_to_refine
List of boundary ids to refine.
bool check_for_diamond_cells
Enable checking the input grid for diamond-shaped cells.
unsigned int initial_refinement
Initial refinement level of primitive mesh.
std::string grid_arguments
Arguments of the GridTools.
bool expand_particle_wall_contact_search
std::string grid_type
Name of the grid in GridTools.
double scale
Rescale the grid by the scale factor.
std::map< std::pair< unsigned int, unsigned int >, unsigned int > fluid_dispersed_phase_interactions_with_material_interaction_ids
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions=Dimensionality())
Parse the parameters.
double reference_temperature
static constexpr unsigned int max_material_interactions
static constexpr unsigned int max_solids
void declare_parameters(ParameterHandler &prm)
Declare the parameters.
std::vector< Material > unresolved_dispersed_phases
std::map< std::pair< unsigned int, unsigned int >, unsigned int > fluid_solid_interactions_with_material_interaction_ids
static constexpr unsigned int max_unresolved_dispersed_phases
unsigned int number_of_unresolved_dispersed_phases
unsigned int number_of_solids
unsigned int number_of_fluids
std::vector< Material > fluids
std::vector< Material > solids
unsigned int number_of_material_interactions
std::map< std::pair< unsigned int, unsigned int >, unsigned int > fluid_fluid_interactions_with_material_interaction_ids
std::vector< MaterialInteractions > material_interactions
static constexpr unsigned int max_fluids
Postprocessing - Defines the parameters for the post-processing. In Lethe, post-processing implies th...
unsigned int inlet_boundary_id
The inlet boundary ID for pressure drop calculation.
bool calculate_pressure_drop
Enable pressure drop post-processing.
bool calculate_geometric_melt_volume
Enable calculation of geometric melt volume in phase change problems.
unsigned int outlet_boundary_id
The outlet boundary ID for pressure drop calculation.
double initial_time_for_average_temp_and_hf
std::string barycenter_output_name
Prefix for the CLS and Cahn-Hilliard barycenter output.
std::string phase_energy_output_name
Prefix for the energy output in Cahn-Hilliard simulations.
bool output_q_criterion
Enable output of Q-criterion field.
std::string phase_output_name
Prefix for the phase output.
std::string kinetic_energy_output_name
Prefix for kinetic energy output.
std::string mass_conservation_output_name
Prefix for the CLS mass conservation output.
bool output_velocity_gradient
Enable output of velocity gradient field.
bool calculate_phase_volumes
Verbosity verbosity
Verbosity level of the post-processed quantities.
bool calculate_pressure_power
Enable pressure power post-processing.
bool calculate_mass_conservation
Enable mass conservation calculation for both fluids in CLS simulations.
std::string algebraic_melt_volume_output_name
Prefix for the algebraic melt volume output.
std::string pressure_power_output_name
Prefix for the pressure power output.
bool calculate_phase_statistics
Enable phase statistics.
bool calculate_kinetic_energy
Enable total kinetic energy post-processing.
unsigned int calculation_frequency
Frequency of the calculation of post-processed quantities.
bool calculate_flow_rate
Enable flow rate post-processing.
bool calculate_tracer_statistics
Enable tracer statistics.
Parameters::FluidIndicator postprocessed_fluid
Fluid domain, used when post-processing a multiphase simulation.
bool calculate_enstrophy
Enable total enstrophy post-processing.
std::string apparent_viscosity_output_name
Prefix for the apparent viscosity output.
void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
std::string geometric_melt_volume_output_name
Prefix for the geometric melt volume output.
Parameters::FluidIndicator monitored_fluid_with_phase_change
FluidIndicator corresponding to the fluid which has phase change.
bool calculate_tracer_flow_rate
Enable tracer flow rate post-processing.
bool calculate_temperature_statistics
Enable temperature statistics.
bool calculate_viscous_dissipation
Enable viscous dissipation post-processing.
unsigned int output_frequency
Frequency of the output.
bool calculate_barycenter
IsocontourBoundingBoxes isocontour_bounding_boxes
Contains all isocontour bounding boxes.
bool calculate_phase_energy
Enable energies calculation on the domain in Cahn-Hilliard simulations.
std::string tracer_flow_rate_output_name
Prefix for tracer flow rate output.
ProbingPoints probing_points
Contains all probing points.
std::string enstrophy_output_name
Prefix for the enstrophy output.
std::string viscous_dissipation_output_name
Prefix for the viscous dissipation output.
std::string temperature_output_name
Prefix for the temperature output.
double initial_time_for_average_velocities
Set initial time to start calculations for velocities.
std::string pressure_drop_output_name
Prefix for pressure drop output.
bool calculate_algebraic_melt_volume
Enable calculation of algebraic melt volume in phase change problems.
bool calculate_apparent_viscosity
Enable calculating apparent viscosity.
double melting_temperature
Melting temperature iso-value.
bool calculate_average_velocities
Enable velocity post-processing.
std::string flow_rate_output_name
Prefix for flow rate output.
bool calculate_heat_flux
Enable heat flux calculation.
std::string heat_flux_output_name
Prefix for the total heat flux output.
bool calculate_average_temp_and_hf
Enable average temperature and average heat flux post-processing.
std::string tracer_output_name
Prefix for the tracer output.
bool output_vorticity
Enable output of vorticity field.
std::string phase_volumes_output_name
prefix for the total volume output in cfd-dem simulation
ShapeType
enum class that associate an integer index tp each type of shape. The enumerator names are the values...
Tensor< 1, spacedim > value_string_to_tensor(const std::string &value_string)
Return the tensor corresponding to the value_string. If the dimension correspondence of the value_str...
std::vector< std::pair< std::string, EnumType > > DeprecatedEnumNames
Deprecated strings of an enum parameter, each paired with the enumerator it stands for....
std::string enum_to_string(const EnumType value)
Return the name of an enumerator, e.g. to derive the default value string of a parameter entry from t...
std::vector< T > convert_string_to_vector(const ParameterHandler &prm, const std::string &entry_string)
Return the vector of size N of entry @entry_string. If the entry is specified in the ....
int get_max_subsection_size(const std::string &file_name, const bool require_subsection_size=true)
Extract the maximum value between the number of boundary conditions and the number of manifolds from ...
EnumType string_to_enum(const std::string &name)
Return the enumerator whose identifier is name, e.g. to parse the value of a parameter entry into its...
std::string enum_to_selection(const DeprecatedEnumNames< EnumType > &deprecated_names={}, const std::vector< EnumType > &allowed_values={})
Return the selection string (e.g. "quiet|verbose|extra_verbose") of an enum parameter,...
std::string enum_to_choices(const std::vector< EnumType > &allowed_values={})
Return the sentence listing the choices of an enum parameter (e.g. "Choices are <quiet|verbose|extra_...
void declare_enum_entry(ParameterHandler &prm, const std::string &entry_name, const EnumType default_value, const std::string &description, const DeprecatedEnumNames< EnumType > &deprecated_names={}, const std::vector< EnumType > &allowed_values={})
Declare a parameter entry whose value is an enumerator. The default value, the accepted values and th...
Variable
Solution fields of the different physics that are used as an indicator for multiple purposes (e....
@ electromagnetic_fields
Combination of both electric and magnetic fields from electromagnetics.
@ phase
Phase indicator scalar field from CLS.
@ magnetic_field
Magnetic field vector field from electromagnetics.
@ electric_field
Electric field vector field from electromagnetics.
@ velocity
Velocity vector field from fluid dynamics.
@ pressure
Pressure scalar field from fluid dynamics.
@ temperature
Temperature scalar field from heat transfer.
const std::vector< Verbosity > & quiet_or_verbose()
Return the verbosity levels accepted by the parameters which do not support Verbosity::extra_verbose.
const DeprecatedEnumNames< FluidIndicator > & deprecated_fluid_indicator_names()
Return the deprecated strings of the parameters parsed into a FluidIndicator, which remain accepted i...
SizeOfSubsections get_size_of_subsections(const std::string &file_name, const bool require_subsection_size=true)
Extract the maximum number of all variable size sections within the parameter file.
const std::vector< FluidIndicator > & single_fluid_indicators()
Return the fluid indicators accepted by the parameters which designate a single fluid.
const DeprecatedEnumNames< Verbosity > & deprecated_verbosity_names()
Return the deprecated strings of the parameters parsed into a Verbosity, which remain accepted in par...
const DeprecatedEnumNames< typename Shape< dim >::ShapeType > & deprecated_shape_type_names()
Return the deprecated strings of the shape types, which remain accepted in parameter files,...
DeclException1(NumberOfFluidsError, int,<< "Number of fluids: "<< arg1<< " is not 1 (single phase simulation) or 2 (CLS/Cahn-Hilliard simulations). This is currently not supported.")
DeclException4(ListSizeIncoherentWithDeclaredNumber, std::string, unsigned int, std::string, unsigned int,<< "'"<< arg1<< "' was set to "<< arg2<< " and the list '"<< arg3<< "' has a size of "<< arg4<< ". However, the list size should correspond to the number declared.")
DeclException3(MultipleAdaptationSizeError, std::string, unsigned int, unsigned int,<< "Error in 'mesh adaptation' : number of '"<< arg1<< "' ("<< arg2<< ") does not correspond to the number of 'variables' ("<< arg3<< ")")
DeclException2(PhaseChangeIntervalError, double, double,<< "Liquidus temperature : "<< arg1<< " is not strictly superior to Solidus temperature: "<< arg2<< " The liquidus temperature specific is below or equal to the solidus temperature."<< " The phase change specific heat model requires that T_liquidus>T_solidus.")
DeclExceptionMsg(MaterialInteractionTypeError, "Invalid material interaction type. The choices are <fluid_fluid|fluid_solid|fluid_dispersed_phase>.")
Carreau model to solve for non-Newtonian flows.
double kinematic_viscosity_inf
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the Carreau rheology parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the Carreau rheology parameters.
double kinematic_viscosity_0
Set of parameters constraining a certain portion of a fluid domain to null velocity and pressure fiel...
std::vector< unsigned int > fluid_ids
Identifiers of fluids that are constrained.
std::vector< double > filtered_phase_indicator_tolerance
std::vector< double > temperature_max_values
Upper threshold values of the constraining field (temperature).
bool enable_domain_restriction_with_plane
static void declare_default_entries(ParameterHandler &prm)
Declare the default parameters for each constraint.
std::vector< double > temperature_min_values
Lower threshold values of the constraining field (temperature).
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
Tensor< 1, dim > restriction_plane_normal_vector
void parse_constraint_parameters(const ParameterHandler &prm, const unsigned int constraint_id)
Parse parameters for each constraint.
unsigned int number_of_constraints
Total number of constraints (maximum of 1 per fluid).
bool enable
Enable/disable (true/false) the solid domain constraining feature.
Point< dim > restriction_plane_point
void declare_parameters(ParameterHandler &prm, const unsigned int max_number_of_constraints)
Declare the parameters.
FlowControl - Set average velocity on a boundary (CFD) or the domain (CFD-DEM).
double average_velocity_0
bool enable_beta_particle
unsigned int flow_direction
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the default parameters.
unsigned int boundary_flow_id
Evaporation - Defines the subparameters for the evaporation cooling and recoil pressure at the free s...
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
double universal_gas_constant
double recoil_pressure_coefficient
double latent_heat_evaporation
bool enable_evaporation_cooling
double evaporation_mass_flux
double ambient_gas_density
double evaporation_coefficient
static void declare_parameters(ParameterHandler &prm)
Declare the default parameters.
bool enable_recoil_pressure
enum Parameters::Evaporation::EvaporativeMassFluxModelType evaporative_mass_flux_model_type
double boiling_temperature
FEM - The finite element section controls the properties of the finite element method....
unsigned int electromagnetics_test_degree
unsigned int void_fraction_degree
unsigned int solid_volume_fraction_degree
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
unsigned int velocity_degree
unsigned int solid_velocity_degree
Polynomial degree of the solid velocity of the Euler-Euler model.
unsigned int tracer_degree
bool enable_bubble_function_velocity
unsigned int temperature_degree
unsigned int electromagnetics_trial_degree
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
unsigned int phase_cahn_hilliard_degree
unsigned int potential_cahn_hilliard_degree
unsigned int pressure_degree
bool enable_bubble_function_pressure
Forces - Defines the parameters for the force calculation on boundaries of the domain.
unsigned int calculation_frequency
std::string torque_output_name
unsigned int output_frequency
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
unsigned int output_precision
std::string force_output_name
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
Gaussian-based physical properties model to handle properties at the interface of immersed solids and...
double tracer_reaction_constant_bulk
double tracer_diffusivity_bulk
double tracer_reaction_constant_interface
double tracer_diffusivity_interface
static void declare_parameters(ParameterHandler &prm)
Declare the immersed-solid Gaussian model parameters.
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the immersed-solid Gaussian model parameters.
Tanh-based physical properties model to handle properties in/out of immersed solids.
double tracer_reaction_constant_inside
double tracer_reaction_constant_outside
double tracer_diffusivity_inside
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the immersed-solid tanh model parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the immersed-solid tanh model parameters.
double tracer_diffusivity_outside
Isothermal ideal gas model to solve for isothermal weakly compressible fluid flows.
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the isothermal ideal-gas density parameters.
double density_ref
Reference state density of the gas in kg/m^3.
static void declare_parameters(ParameterHandler &prm)
Declare the isothermal ideal-gas density parameters.
double R
Specific gas constant in J/kg/K.
double T
Absolute temperature of the ideal gas in K.
Laser_FreeSurfaceRadiation - Defines the subparameters for the radiation sink at the free surface (ai...
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
double Stefan_Boltzmann_constant
LinearSolver - Parameters that control the solution of the linear system of equations that arise from...
MultigridCoarseningSequenceType mg_coarsening_type
double amg_precond_ilu_rtol
ILU relative tolerance for smoother.
bool amg_w_cycles
AMG W_cycle.
double amg_aggregation_threshold
AMG aggregation threshold.
double mg_gmres_tolerance
MG coarse-grid solver tolerance.
unsigned int amg_precond_ilu_fill
ILU fill for smoother.
bool enable_hessians_jacobian
Enable hessians in jacobian.
bool rescale_residual_by_volume
unsigned int mg_p_min_coarsening_degree
Minimum polynomial degree for p coarsening sequence.
CoarseGridSolverType mg_coarse_grid_solver
bool mg_enable_hessians_jacobian
MG enable hessians in jacobian.
MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType mg_p_coarsening_type
Type of p coarsening sequence.
unsigned int ilu_precond_fill
ILU fill.
int mg_gmres_max_iterations
MG coarse-grid solver maximum number of iterations.
double ilu_precond_rtol
ILU relative tolerance.
PreconditionerType preconditioner
double mg_smoother_relaxation
MG smoother relaxation parameter.
double relative_residual
Relative residuals of the iterative solver.
int max_iterations
Maximum number of iterations.
int max_krylov_vectors
Maximum number of krylov vectors.
int eig_estimation_cg_n_iterations
MG number of cg iterations to find eigenvalue.
bool mg_amg_use_default_parameters
MG use default parameters for AMG.
int mg_gmres_max_krylov_vectors
MG coarse-grid solver maximum number of krylov vectors.
bool mg_smoother_eig_estimation
MG eigenvalue estimation for smoother relaxation parameter.
unsigned int mg_smoother_chebyshev_degree
Chebyshev smoother polynomial degree.
unsigned int amg_smoother_overlap
AMG Smoother overlap.
double minimum_residual
Minimum residual of the iterative solver.
MultigridSmootherPreconditionerType mg_smoother_preconditioner_type
unsigned int amg_n_cycles
AMG number of cycles.
double mg_gmres_reduce
MG coarse-grid solver reduce.
int mg_min_level
MG min level.
Verbosity mg_verbosity
MG information about levels.
int mg_int_level
MG intermediate level.
unsigned int mg_smoother_chebyshev_eig_cg_n_iterations
Chebyshev smoother eigenvalue-estimation CG/Lanczos iterations.
PreconditionerType mg_gmres_preconditioner
MG coarse-grid solver preconditioner.
double eig_estimation_smoothing_range
MG smoothing range to set range between eigenvalues.
unsigned int amg_smoother_sweeps
AMG Smoother sweeps.
Verbosity verbosity
Verbosity of linear solver.
static void declare_parameters(ParameterHandler &prm, const std::string &physics_name)
Declare the parameters.
@ lsmg
Local-Smoothing Geometric Multigrid.
double ilu_precond_atol
ILU absolute tolerance.
int mg_level_min_cells
MG minimum number of cells per level.
double mg_smoother_chebyshev_smoothing_range
Chebyshev smoother smoothing range (lambda_max / lambda_min).
bool mg_use_fe_q_iso_q1
MG use FE_Q_iso_Q1 elements for coarse grid.
bool enable_hessians_residual
Enable hessians in residual.
double amg_precond_ilu_atol
ILU absolute tolerance for smoother.
void parse_parameters(ParameterHandler &prm, const std::string &physics_name)
Parse the parameters.
bool force_linear_solver_continuation
Block linear solver to throw error.
int mg_smoother_iterations
MG smoother number of iterations.
Verbosity eig_estimation_verbose
MG print max, min, eigenvalues.
MeshAdaption - Parameters that control dynamic mesh adaptation. Dynamic mesh adaptation in Lethe is v...
bool is_boundary_refinement_fixed
enum Parameters::MeshAdaptation::Type type
std::map< Variable, MultipleAdaptationParameters > variables
bool mesh_controller_is_enabled
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
bool refinement_at_frequency
enum Parameters::MeshAdaptation::FractionType fractionType
unsigned int initial_refinement
unsigned int maximum_number_elements
unsigned int maximum_refinement_level
std::vector< int > boundaries_to_fix
unsigned int minimum_refinement_level
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
unsigned int number_of_refinement_boxes
Number of boxes delimiting refinement regions.
void declare_parameters(ParameterHandler &prm)
Declare the parameters.
std::vector< unsigned int > box_additional_refinements
Vector of additional refinement values of the different boxes.
const unsigned int max_number_of_refinement_boxes
MobilityCahnHilliardParameters - Defines parameters for the mobility models used in the Cahn-Hilliard...
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(const ParameterHandler &prm, const Parameters::Dimensionality &dimensions)
Parse the parameters.
double mobility_cahn_hilliard_constant
Mortar - Defines parameters used to construct mortar elements.
Point< dim > center_of_rotation
Center of rotation of the rotor domain.
bool enable
Indicates whether mortar elements are enabled.
std::shared_ptr< Functions::ParsedFunction< dim > > rotor_angular_velocity
Angular velocity of the rotor domain.
void declare_parameters(ParameterHandler &prm)
Declare the default parameters.
unsigned int stator_boundary_id
Boundary ID # of the stator at the rotor-stator interface.
double sip_factor
Penalty factor for mortar elements.
unsigned int rotor_boundary_id
Boundary ID # of the rotor at the rotor-stator interface.
unsigned int cell_weight
Cell weight for load balancing of cells with mortar interfaces.
Verbosity verbosity
Type of verbosity for mortar.
unsigned int rotation_axis_direction
Rotation axis direction.
std::shared_ptr< Functions::ParsedFunction< dim > > rotor_rotation_angle
Rotation angle of the rotor domain in radians.
unsigned int oversampling_factor
Oversampling factor for quadrature points.
double radius_tolerance
Tolerance used for rotor-stator interface radius computation.
std::shared_ptr< Mesh< dim > > rotor_mesh
Mesh parameters for the rotor part.
enum Parameters::Mortar::InterfaceType interface_type
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
Mesh Adaptation Parameters that can differ for each refinement variable.
double refinement_fraction
enum Parameters::MultipleAdaptationParameters::ErrorEstimator error_estimator
double coarsening_fraction
NonLinearSolver - Parameter that controls the solution of the non-linear problems.
unsigned int max_iterations
bool force_rhs_calculation
bool abort_at_convergence_failure
KinsolStrategy kinsol_strategy
bool reuse_preconditioner
static void declare_parameters(ParameterHandler &prm, const std::string &physics_name)
Declare the parameters.
void parse_parameters(ParameterHandler &prm, const std::string &physics_name)
Parse the parameters.
void declare_parameters(ParameterHandler &prm) const
Declare the parameters for the selected non-Newtonian model.
PowerLawParameters powerlaw_parameters
CarreauParameters carreau_parameters
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the parameters for the selected non-Newtonian model.
Phase change model for melting/freezing liquids The model assumes that the phase change occurs betwee...
double thermal_conductivity_l
Thermal conductivity of liquid - Units in W/(m*K).
double cp_l
Specific heat of liquid - Units in J/(kg*K).
double T_liquidus
Liquidus temperature - Units in K.
double penalty_l
Darcy penalty of liquid - Units in 1/(s).
double thermal_conductivity_s
Thermal conductivity of solid - Units in W/(m*K).
double kinematic_viscosity_l
kinematic viscosity of liquid - Units in m^2/(s)
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the phase change parameters.
double cp_s
Specific heat of solid - Units in J/(kg*K).
static void declare_parameters(ParameterHandler &prm)
Declare the phase change parameters.
double thermal_expansion_l
Thermal expansion coefficient of liquid - Units in 1/K.
double penalty_s
Darcy penalty of solid - Units in 1/(s).
double T_solidus
Solidus temperature - Units in K.
double kinematic_viscosity_s
kinematic viscosity of solid - Units in m^2/(s)
double thermal_expansion_s
Thermal expansion coefficient of solid - Units in 1/K.
double latent_enthalpy
Latent enthalpy for the phase change - Units in J/kg.
std::string output_name
Isocontour output filename.
double isovalue
Isocontour value.
void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
unsigned int number_of_isocontour_bounding_boxes
Number of monitored isocontours.
std::multimap< Variable, std::pair< unsigned int, Isocontour > > ids_and_isocontours_per_variable
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
void declare_parameters(ParameterHandler &prm)
Declare the parameters in the parameter handler.
unsigned int max_number_of_probing_points
Maximum number of probing points.
void parse_parameters(ParameterHandler &prm)
Parse the parameters from the parameter handler.
void add_probing_point(const Variable &variable, const unsigned int &id, const Point< dim > &point)
Adds an entry to probing_points_per_variable.
std::vector< std::string > probing_points_output_names
Probing point output names ordered by ID.
unsigned int number_of_probing_points
Number of probing points.
Power-law rheological model to solve for non-Newtonian flows.
static void declare_parameters(ParameterHandler &prm)
Declare the power-law rheology parameters.
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the power-law rheology parameters.
Restart - Controls writing and reading simulation checkpoints.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
SimulationControl - Defines the parameter that control the flow of the simulation as well as the freq...
unsigned int subdivision
Subdivisions of the results in the output.
unsigned int iteration_end
unsigned int log_frequency
Frequency of the log output to the terminal.
enum Parameters::SimulationControl::OutputControl output_control
double adaptative_time_step_scaling
bool time_step_adaptation_required
double output_time_frequency
Time frequency of the output (for time output control).
bool override_time_step_on_restart
static void declare_parameters(ParameterHandler &prm)
Declare the simulation control parameters.
bool time_step_independent_of_end_time
unsigned int group_files
Number of vtu files written at an output step.
unsigned int number_mesh_adaptation
enum Parameters::SimulationControl::EndControl end_control
unsigned int output_iteration_frequency
Frequency of the output (for iteration output control).
enum Parameters::SimulationControl::BDFStartupMethods bdf_startup_method
void parse_parameters(ParameterHandler &prm)
Parse the simulation control parameters.
std::string output_folder
double startup_timestep_scaling
std::vector< double > output_times_vector
Output at specific times (for time output control).
unsigned int log_precision
Display precision of the log output to the terminal.
double max_capillary_time_step_ratio
std::vector< double > output_time_interval
Time window for file output (for both iteration and time output control).
bool output_boundaries
Enable output of the boundaries in a separate VTU file.
bool adapt_with_capillary_time_step_ratio
enum Parameters::SimulationControl::TimeSteppingMethod method
Stabilization - Defines parameters for an advanced control over the stabilization strategy used by th...
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
bool heat_transfer_dcdd_stabilization
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
enum Parameters::Stabilization::ScalarLimiters scalar_limiter
double pressure_scaling_factor
double dcdd_diffusion_coeff
bool cls_dcdd_stabilization
enum Parameters::Stabilization::NavierStokesStabilization stabilization
bool use_default_stabilization
Defines if default stabilization parameters should be used.
SurfaceTensionParameters - Defines parameters for surface tension models.
void parse_parameters(const ParameterHandler &prm, const Parameters::Dimensionality &dimensions)
Parse the parameters.
double surface_tension_gradient
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
double surface_tension_coefficient
Testing - Some solvers have a specific testing mode that can be enabled to output more variables to t...
enum Parameters::Testing::TestType test_type
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
Timer - Defines the parameters that control the timing of the simulation. Lethe supports advanced tim...
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
bool write_time_in_error_table
VelocitySource - Adds velocity-dependent source term to the Navier-Stokes equations with the appropri...
std::vector< double > carman_kozeny_permeability_area
Permeability area of the pseudo-porous bed (solid phase).
PermeabilityModel permeability_model
Type of permeability model applied to the Navier-Stokes equations.
std::vector< double > carman_kozeny_tolerance
Tolerance in the Carman-Kozeny source term that avoids division by zero.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
@ carman_kozeny_phase_change
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
bool enable_darcy_multiply_by_density
FluidIndicator fluid_with_phase_change
Indicates which fluids are with liquid-solid phase change.
RotatingFrameType rotating_frame_type