Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
parameters.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2019-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4/*
5 * This file defines the parameter namespace. This namespace
6 * contains the classical structures which are used to structure
7 * the various simulations that can be carried out using Lethe.
8 * The parameters structures are constructed in logical building
9 * blocks so that a solver can adequately choose which blocks
10 * are required.
11 */
12
13#ifndef lethe_parameters_h
14#define lethe_parameters_h
15
16#include <core/dimensionality.h>
17#include <core/ib_particle.h>
18#include <core/multiphysics.h>
19#include <core/utilities.h>
20
21#include <deal.II/base/parameter_handler.h>
22#include <deal.II/base/parsed_function.h>
23
24#include <deal.II/multigrid/mg_transfer_global_coarsening.h>
25
26#include <limits>
27
28using namespace dealii;
29
30namespace Parameters
31{
33 {
35 int manifolds = 0;
36 };
37
38
39 /**
40 * @brief Extract the maximum number of all variable size sections within the parameter file
41 *
42 * @param[in] file_name Name of the parameter file from which the sizes are
43 * parsed
44 *
45 * @param[in] require_subsection_size If true, the parameter file must
46 * indicate the size of at least one variable size subsection, which is the
47 * case for every solver for which a "boundary conditions" subsection is
48 * mandatory. The DEM solvers, whose boundary conditions are declared in a
49 * "DEM boundary conditions" subsection with a "number of boundary
50 * conditions" entry, set this to false and consequently obtain a size of
51 * zero for parameter files that do not declare any manifold.
52 *
53 * //TODO make the size of the DEM boundary conditions parsed instead.
54 *
55 * @return The size of the variable size subsections of the parameter file.
56 */
58 get_size_of_subsections(const std::string &file_name,
59 const bool require_subsection_size = true);
60
61 enum class Verbosity : std::uint8_t
62 {
66 };
67
68 /**
69 * @brief Class to account for different fluid indicators.
70 * This is used for multiphase simulations in PostProcessing, in
71 * CLS (see parameter_multiphysics.h), and in VelocitySource (phase change
72 * Carman-Kozeny permeability model).
73 */
74 enum class FluidIndicator : std::uint8_t
75 {
76 fluid_0, ///< fluid 0 only
77 fluid_1, ///< fluid 1 only
78 both ///< both fluids
79 };
80
81 /**
82 * @brief SimulationControl - Defines the parameter that control the flow of the simulation
83 * as well as the frequency of the output of the solutions.
84 */
85
87 {
88 // Method used for time progression of eulerian solvers (steady, unsteady)
100
101 // Initial time step
102 double dt = 1.;
103
104 // End time
105 double time_end = 1.;
106
107 // End iteration (only used when end_control is EndControl::iteration)
108 unsigned int iteration_end = 10;
109
110 // Boolean to keep the time step for the last iteration regardless of the
111 // end time specified. Both for fixed time step and adaptive time step.
113
114 /**
115 * Boolean indicating if adaptive time-stepping is enabled.
116 * To enable it, enable either SimulationControl::adapt_with_cfl or
117 * SimulationControl::adapt_with_capillary_time_step_ratio.
118 *
119 * @remark By default, this is set to @p false since both
120 * SimulationControl::adapt_with_cfl and
121 * SimulationControl::adapt_with_capillary_time_step_ratio are set to
122 * @p false by default.
123 */
125
126 /**
127 * Boolean indicating if the CFL condition should be controlling the
128 * simulation time step.
129 *
130 * @remark By default, this is set to @p false.
131 */
132 bool adapt_with_cfl = false;
133
134 // Max CFL
135 double maxCFL = 1.;
136
137 // Max time step
138 double max_dt = 1e6;
139
140 /**
141 * Boolean indicating if the capillary time-step ratio should be controlling
142 * the simulation time step
143 *
144 * @remark By default, this is set to @p false.
145 */
147
148 /**
149 * The capillary time-step ratio (CTR) corresponds to the imposed value for
150 * the ratio between the current time step and the capillary time-step
151 * constraint (Δt/Δt_σ) to be maximally respected when
152 * SimulationControl::adapt_with_capillary_time_step_ratio
153 * is set to @p true.
154 *
155 * @remark By default, this is set to 1.
156 */
158
159 // Aimed tolerance at which simulation is stopped
160 double stop_tolerance = 1e-10;
161
162 // Rate of increase of the time step value
164
165 // BDF startup time scaling
167
168 // True if the time step should be overridden upon restart
170
171 // Number of mesh adaptation (steady simulations)
172 unsigned int number_mesh_adaptation = 0;
173
174 // Folder for simulation output
175 std::string output_folder = "./";
176
177 // Prefix for simulation output
178 std::string output_name = "out";
179
180 /**
181 * Criterion used to end a transient simulation: either a maximum time
182 * (SimulationControl::time_end) or a maximum number of transient
183 * iterations (SimulationControl::iteration_end).
184 *
185 * @remark By default, this is set to @p EndControl::time. The default value
186 * matters since this structure is also filled programmatically (e.g. in
187 * unit tests) instead of being parsed from a parameter file.
188 */
189 enum class EndControl : std::uint8_t
190 {
194
200
206
207 /// Frequency of the output (for iteration output control)
209
210 /// Time frequency of the output (for time output control)
212
213 /// Output at specific times (for time output control)
214 std::vector<double> output_times_vector{-1.};
215
216 /// Time window for file output (for both iteration and time output control)
217 std::vector<double> output_time_interval{
218 0.,
219 std::numeric_limits<double>::max()};
220
221 /// Enable output of the boundaries in a separate VTU file
222 bool output_boundaries = false;
223
224 /// Frequency of the log output to the terminal
225 unsigned int log_frequency = 1;
226
227 /// Display precision of the log output to the terminal
228 unsigned int log_precision = 6;
229
230 /// Subdivisions of the results in the output
231 unsigned int subdivision = 1;
232
233 /// Number of vtu files written at an output step
234 unsigned int group_files = 1;
235
236 /**
237 * @brief Declare the simulation control parameters.
238 *
239 * @param[in,out] prm The parameter handler object.
240 */
241 static void
242 declare_parameters(ParameterHandler &prm);
243
244 /**
245 * @brief Parse the simulation control parameters.
246 *
247 * @param[in] prm The parameter handler object.
248 */
249 void
250 parse_parameters(ParameterHandler &prm);
251 };
252
253
254
255 /**
256 * @brief Phase change model for melting/freezing liquids
257 * The model assumes that the phase change occurs between
258 * a solidus and liquidus temperature. This defines a solidification
259 * interval which is used to smooth the non-linearity of the melting problem
260 * or to fit the real thermodynamics of the melting process.
261 *
262 */
264 {
265 /// Solidus temperature - Units in K
266 double T_solidus = 0.;
267
268 /// Liquidus temperature - Units in K
269 double T_liquidus = 1.;
270
271 /// Latent enthalpy for the phase change - Units in J/kg
272 double latent_enthalpy = 1.;
273
274 /// Specific heat of liquid - Units in J/(kg*K)
275 double cp_l = 1.;
276
277 /// Specific heat of solid - Units in J/(kg*K)
278 double cp_s = 1.;
279
280 /// Thermal conductivity of liquid - Units in W/(m*K)
282
283 /// Thermal conductivity of solid - Units in W/(m*K)
285
286 /// Thermal expansion coefficient of liquid - Units in 1/K
288
289 /// Thermal expansion coefficient of solid - Units in 1/K
291
292 /// kinematic viscosity of liquid - Units in m^2/(s)
294
295 /// kinematic viscosity of solid - Units in m^2/(s)
297
298 /// Darcy penalty of liquid - Units in 1/(s)
299 double penalty_l = 0.;
300
301 /// Darcy penalty of solid - Units in 1/(s)
302 double penalty_s = 0.;
303
304 /**
305 * @brief Declare the phase change parameters.
306 *
307 * @param[in,out] prm The parameter handler object.
308 */
309 static void
310 declare_parameters(ParameterHandler &prm);
311
312 /**
313 * @brief Parse the phase change parameters.
314 *
315 * @param[in] prm The parameter handler object.
316 * @param[in] dimensions Dimensionality used to interpret the parameter
317 * units.
318 */
319 void
320 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
321 };
322
323 /**
324 * @brief Power-law rheological model to solve for non-Newtonian
325 * flows.
326 */
328 {
329 // Fluid consistency index
330 double K = 1.0;
331 // Flow behavior index
332 double n = 0.5;
333 // Minimal shear rate magnitude for which we calculate kinematic viscosity,
334 // since power-law does not allow for minimal kinematic viscosity
335 double shear_rate_min = 0.001;
336
337 /**
338 * @brief Declare the power-law rheology parameters.
339 *
340 * @param[in,out] prm The parameter handler object.
341 */
342 static void
343 declare_parameters(ParameterHandler &prm);
344
345 /**
346 * @brief Parse the power-law rheology parameters.
347 *
348 * @param[in] prm The parameter handler object.
349 * @param[in] dimensions Dimensionality used to interpret the parameter
350 * units.
351 */
352 void
353 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
354 };
355
356 /**
357 * @brief Carreau model to solve for non-Newtonian
358 * flows.
359 */
361 {
362 // Kinematic viscosity of the flow when the shear rate tends to 0
364 // Hypothetical kinematic viscosity of the flow when the shear rate is very
365 // high
367 // Relaxation time
368 double lambda = 1.0;
369 // Carreau parameter
370 double a = 2.0;
371 // Power parameter
372 double n = 0.5;
373
374 /**
375 * @brief Declare the Carreau rheology parameters.
376 *
377 * @param[in,out] prm The parameter handler object.
378 */
379 static void
380 declare_parameters(ParameterHandler &prm);
381
382 /**
383 * @brief Parse the Carreau rheology parameters.
384 *
385 * @param[in] prm The parameter handler object.
386 * @param[in] dimensions Dimensionality used to interpret the parameter
387 * units.
388 */
389 void
390 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
391 };
392
393 /**
394 * @brief non-Newtonian - Defines the parameters for non-Newtonian flows
395 * according to the chosen rheological model.
396 */
398 {
401
402 /**
403 * @brief Declare the parameters for the selected non-Newtonian model.
404 *
405 * @param[in,out] prm The parameter handler object.
406 */
407 void
408 declare_parameters(ParameterHandler &prm) const;
409
410 /**
411 * @brief Parse the parameters for the selected non-Newtonian model.
412 *
413 * @param[in] prm The parameter handler object.
414 * @param[in] dimensions Dimensionality used to interpret the parameter
415 * units.
416 */
417 void
418 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
419 };
420
421 /**
422 * @brief Tanh-based physical properties model to handle properties in/out of immersed solids
423 */
425 {
426 // Properties that apply to the tracer physics with immersed solids
431 double thickness = 1.0;
432
433 /**
434 * @brief Declare the immersed-solid tanh model parameters.
435 *
436 * @param[in,out] prm The parameter handler object.
437 */
438 static void
439 declare_parameters(ParameterHandler &prm);
440
441 /**
442 * @brief Parse the immersed-solid tanh model parameters.
443 *
444 * @param[in] prm The parameter handler object.
445 * @param[in] dimensions Dimensionality used to interpret the parameter
446 * units.
447 */
448 void
449 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
450 };
451
452 /**
453 * @brief Gaussian-based physical properties model to handle properties at the
454 * interface of immersed solids and in the bulk of each phase
455 */
457 {
458 // Properties that apply to the tracer physics with immersed solids
463 double thickness = 1.0;
464
465 /**
466 * @brief Declare the immersed-solid Gaussian model parameters.
467 *
468 * @param[in,out] prm The parameter handler object.
469 */
470 static void
471 declare_parameters(ParameterHandler &prm);
472
473 /**
474 * @brief Parse the immersed-solid Gaussian model parameters.
475 *
476 * @param[in] prm The parameter handler object.
477 * @param[in] dimensions Dimensionality used to interpret the parameter
478 * units.
479 */
480 void
481 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
482 };
483
484 /**
485 * @brief Isothermal ideal gas model to solve for isothermal weakly
486 * compressible fluid flows.
487 */
489 {
490 /// Reference state density of the gas in kg/m^3
491 double density_ref = 1.2;
492 /// Specific gas constant in J/kg/K
493 double R = 287.05;
494 /// Absolute temperature of the ideal gas in K
495 double T = 293.15;
496
497 /**
498 * @brief Declare the isothermal ideal-gas density parameters.
499 *
500 * @param[in,out] prm The parameter handler object.
501 */
502 static void
503 declare_parameters(ParameterHandler &prm);
504
505 /**
506 * @brief Parse the isothermal ideal-gas density parameters.
507 *
508 * @param[in] prm The parameter handler object.
509 * @param[in] dimensions Dimensionality used to interpret the parameter
510 * units.
511 */
512 void
513 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
514 };
515
516 /**
517 * @brief SurfaceTensionParameters - Defines parameters for surface tension
518 * models
519 */
521 {
522 // Surface tension coefficient (sigma or sigma_0) in N/m
524 // Temperature of the reference state corresponding to the surface tension
525 // coefficient (T_0) in K
526 double T_0 = 0.0;
527 // Surface tension gradient with respect to the temperature (dsigma/dT) in
528 // N/(m*K)
530
531 // Solidus temperature - Units in K
532 double T_solidus = 0.;
533
534 // Liquidus temperature - Units in K
535 double T_liquidus = 1.;
536
537 /**
538 * @brief Declare the parameters.
539 *
540 * @param[in,out] prm The ParameterHandler.
541 */
542 static void
543 declare_parameters(ParameterHandler &prm);
544 void
545 /**
546 * @brief Parse the parameters.
547 *
548 * @param[in] prm The ParameterHandler.
549 *
550 * @param[in] dimensions The Dimensionality object controlling the
551 * fundamental dimensions (length, time, mass, temperature) of the problem.
552 */
553 parse_parameters(const ParameterHandler &prm,
554 const Parameters::Dimensionality &dimensions);
555 };
556
557 /**
558 * @brief MobilityCahnHilliardParameters - Defines parameters for the mobility
559 * models used in the Cahn-Hilliard equations.
560 */
562 {
563 // Mobility constant (M) in m^2/s
565
566 /**
567 * @brief Declare the parameters.
568 *
569 * @param[in,out] prm The ParameterHandler.
570 */
571 static void
572 declare_parameters(ParameterHandler &prm);
573
574 /**
575 * @brief Parse the parameters.
576 *
577 * @param[in] prm The ParameterHandler.
578 *
579 * @param[in] dimensions The Dimensionality object controlling the
580 * fundamental dimensions (length, time, mass, temperature) of the problem.
581 */
582 void
583 parse_parameters(const ParameterHandler &prm,
584 const Parameters::Dimensionality &dimensions);
585 };
586
587
588 /**
589 * @brief Material - Class that defines the physical property of a material.
590 * Generally a material will be a fluid, but for conjugated heat transfer,
591 * this may also be a solid.
592 */
594 {
595 public:
596 Material() = default;
597
598 /**
599 * @brief Declare the parameters for a material.
600 *
601 * @param[in,out] prm The parameter handler object.
602 * @param[in] material_prefix Prefix used for this material's subsection.
603 * @param[in] id Identifier of the material.
604 */
605 void
606 declare_parameters(ParameterHandler &prm,
607 const std::string &material_prefix,
608 unsigned int id) const;
609
610 /**
611 * @brief Parse the parameters for a material.
612 *
613 * @param[in] prm The parameter handler object.
614 * @param[in] material_prefix Prefix used for this material's subsection.
615 * @param[in] id Identifier of the material.
616 * @param[in] dimensions Dimensionality used to interpret the parameter
617 * units.
618 */
619 void
620 parse_parameters(ParameterHandler &prm,
621 const std::string &material_prefix,
622 const unsigned int id,
623 const Dimensionality &dimensions);
624
625 // Kinematic viscosity (nu = mu/rho) in units of L^2/s
627 // volumetric mass density (rho) in units of kg/m^3
628 double density = 1.;
629 // specific heat capacity (cp) in J/K/kg
630 double specific_heat = 1.;
631 // thermal conductivity (k) in W/m/K
633 // thermal expansion coefficient (alpha) in 1/K
634 double thermal_expansion = 1.;
635
636 // tracer diffusivity in L^2/s
638
639 // tracer reaction constant in 1/s^[order]
641 // tracer reaction order
643 // When the reaction order <1, concentrations are used in the denominator of
644 // a few terms. This threshold prevents the introduction of NaN entries as
645 // long as it is set above 0.
647
648 // Phase change parameters
650
651 // non-Newtonian model parameters
660
667
673
680
686
693
701
707
713
719
720 // Struct that contains the parameters to handle physical properties when
721 // immersed solids tanh models are used
723
724 // Struct that contains the parameters to handle physical properties when
725 // immersed solids Gaussian models are used
727
728 // Linear thermal conductivity parameters: k = k_A0 + k_A1 * T
729 double k_A0 = 0.;
730 double k_A1 = 0.;
731
732 /// Material parameters for the electromagnetics solver. Only the
733 /// permittivity and the permeability are complex-valued because they can
734 /// store electromagnetic energy in the medium and also dissipate it.
735
736 /// Electric_conductivity
739
740 /// Magnetic_permeability
745
746 /// Electric_permittivity
751 };
752
753 /**
754 * @brief MaterialInteractions - Class that defines physical properties due to interactions between two different materials (either fluid-fluid or fluid-solid).
755 */
757 {
758 public:
760
767
768 // Surface tension models
776
777 // Cahn-Hilliard mobility models
784
785 // Effective medium model for calculating effective properties of a
786 // composite material.
787 enum class EffectiveMediumModelType : std::int8_t
788 {
789 /// No effective medium model is applied; the properties of the fluid
790 /// phase are used directly.
792 /// Bruggeman effective medium model
794 };
795
800
801 std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
803 std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
805 std::pair<std::pair<unsigned int, unsigned int>, unsigned int>
807
808 /**
809 * @brief Declare the parameters.
810 *
811 * @param[in,out] prm The ParameterHandler.
812 * @param[in] id The material id.
813 */
814 void
815 declare_parameters(ParameterHandler &prm, unsigned int id) const;
816
817 /**
818 * @brief Parse the parameters.
819 *
820 * @param[in] prm The ParameterHandler.
821 * @param[in] id The material id.
822 * @param[in] dimensions The Dimensionality object controlling the
823 * fundamental dimensions (length, time, mass, temperature) of the problem.
824 */
825 void
826 parse_parameters(ParameterHandler &prm,
827 const unsigned int id,
828 const Parameters::Dimensionality &dimensions);
829 };
830
831 /**
832 * @brief PhysicalProperties - Define the possible physical properties.
833 * All continuum equations share the same physical properties object but only
834 * take the subset of properties they require
835 * Defined as a class with public attributes in order to use a non-static
836 * declare_parameters methods (useful for multiple fluid simulations).
837 */
839 {
840 public:
842
843 // Fluid objects for multiphase simulations
844 std::vector<Material> fluids;
845 unsigned int number_of_fluids = 1;
846 static constexpr unsigned int max_fluids = 2;
847
848 // Solid objects for conjugated simulations
849 std::vector<Material> solids;
850 unsigned int number_of_solids = 0;
851 static constexpr unsigned int max_solids = 1;
852
853 // Unresolved dispersed phase objects that live in a host. The host can
854 // only be a fluid for now.
855 std::vector<Material> unresolved_dispersed_phases;
857 static constexpr unsigned int max_unresolved_dispersed_phases =
858 1; // Only one (monodisperse) phase for now.
859
860 // Fluid-fluid, fluid-solid, or fluid-dispersed phase interactions
861 std::vector<MaterialInteractions> material_interactions;
863 static constexpr unsigned int max_material_interactions = 3;
864 std::map<std::pair<unsigned int, unsigned int>, unsigned int>
866 std::map<std::pair<unsigned int, unsigned int>, unsigned int>
868 std::map<std::pair<unsigned int, unsigned int>, unsigned int>
870 /*
871 * Reference Temperature for all physical properties of fluids and solids.
872 * Currently, this is only used by the thermal expansion models.
873 */
875
876 /**
877 * @brief Declare the parameters.
878 *
879 * @param[in,out] prm The ParameterHandler.
880 * @param[in] id The material id.
881 */
882 void
883 declare_parameters(ParameterHandler &prm);
884
885 /**
886 * @brief Parse the parameters.
887 *
888 * @param[in] prm The ParameterHandler.
889 * @param[in] dimensions The Dimensionality object controlling the
890 * fundamental dimensions (length, time, mass, temperature) of the problem.
891 */
892 void
893 parse_parameters(ParameterHandler &prm,
894 const Dimensionality &dimensions = Dimensionality());
895 };
896
897 /**
898 * @brief Set of parameters constraining a certain portion of a fluid domain
899 * to null velocity and pressure fields to mimic a solid subdomain.
900 *
901 * @remark Pressure DOFs in "solid" cells that are next to "fluid" cells are
902 * not constrained.
903 *
904 * @tparam dim Number of dimensions of the problem (2D or 3D).
905 *
906 * @note At the moment, only the temperature field is used to constrain the
907 * "solid" domain.
908 */
909 template <int dim>
911 {
912 /// Enable/disable (@p true/false) the solid domain constraining feature.
913 bool enable = false;
914
915 /// Total number of constraints (maximum of 1 per fluid)
916 unsigned int number_of_constraints = 0;
917
918 /// Identifiers of fluids that are constrained
919 std::vector<unsigned int> fluid_ids;
920
921 /// Absolute tolerance applied on filtered phase indicator for
922 /// constrained cell selection
924
925 /// Lower threshold values of the constraining field (temperature)
926 std::vector<double> temperature_min_values;
927
928 /// Upper threshold values of the constraining field (temperature)
929 std::vector<double> temperature_max_values;
930
931 /// Enable/disable (@p true/false) the definition of a plane for geometrical
932 /// restrictions on the domain where the stasis constraint is applied.
934
935 /// Coordinates of a point on the restriction plane for the stasis
936 /// constraint application domain
938
939 /// Outward-pointing normal vector from the restricted domain to define the
940 /// restriction plane for the stasis constraint application domain
942
943 /**
944 * @brief Declare the parameters.
945 *
946 * @param[in,out] prm ParameterHandler object.
947 * @param[in] max_number_of_constraints Maximum number of zero velocity
948 * constraints applied to the domain.
949 */
950 void
951 declare_parameters(ParameterHandler &prm,
952 const unsigned int max_number_of_constraints);
953
954 /**
955 * @brief Parse the parameters.
956 *
957 * @param[in] prm ParameterHandler object.
958 */
959 void
960 parse_parameters(ParameterHandler &prm);
961
962 /**
963 *
964 * @brief Declare the default parameters for each constraint.
965 *
966 * @param[in,out] prm ParameterHandler object.
967 */
968 static void
969 declare_default_entries(ParameterHandler &prm);
970
971 /**
972 *
973 * @brief Parse parameters for each constraint.
974 *
975 * @param[in] prm ParameterHandler object.
976 * @param[in] constraint_id Identifiers of the constraint (1 per fluid). The
977 * numbering starts at 0.
978 */
979 void
980 parse_constraint_parameters(const ParameterHandler &prm,
981 const unsigned int constraint_id);
982 };
983
984 /**
985 * @brief Stabilization - Defines parameters for an advanced control over the stabilization strategy used by the solvers.
986 */
988 {
989 /// Defines if default stabilization parameters should be used
991
992 /// Indicates if DCDD stabilization should be used for the heat transfer
993 /// equation
995
996 /// Boolean indicating if the DCDD stabilization term for the CLS phase
997 /// indicator should be assembled (@p true) or not (@p false).
999
1000 // Diffusion factor scaling the DCDD stabilization term in the CLS equation
1002
1003 // Pressure scaling factor used to facilitate the linear solving when
1004 // pressure and velocity have very different scales
1006
1013
1019
1020 /**
1021 * @brief Declare the parameters.
1022 *
1023 * @param[in,out] prm ParameterHandler object.
1024 */
1025 static void
1026 declare_parameters(ParameterHandler &prm);
1027
1028 /**
1029 * @brief Parse the parameters.
1030 *
1031 * @param[in] prm The ParameterHandler.
1032 */
1033 void
1034 parse_parameters(ParameterHandler &prm);
1035 };
1036
1037 /**
1038 * @brief Timer - Defines the parameters that control the timing of the simulation.
1039 * Lethe supports advanced timing features which supports the monitoring of
1040 * specific subsections of the software to evaluate the relative
1041 * workload.
1042 */
1043 struct Timer
1044 {
1045 // Time measurement in the simulation. None, at each iteration, only at the
1046 // end
1047 enum class Type : std::int8_t
1048 {
1052 };
1053
1055
1057
1058 /**
1059 * @brief Declare the parameters.
1060 *
1061 * @param[in,out] prm ParameterHandler object.
1062 */
1063 static void
1064 declare_parameters(ParameterHandler &prm);
1065
1066 /**
1067 * @brief Parse the parameters.
1068 *
1069 * @param[in] prm The ParameterHandler.
1070 */
1071 void
1072 parse_parameters(ParameterHandler &prm);
1073 };
1074
1075 /**
1076 * @brief Forces - Defines the parameters for the
1077 * force calculation on boundaries of the domain.
1078 */
1079 struct Forces
1080 {
1081 // Type of verbosity for the force calculation
1083
1084 // Enable force post-processing
1085 bool calculate_force = false;
1086
1087 // Enable torque post-processing
1088 bool calculate_torque = false;
1089
1090 // Frequency of the output
1091 unsigned int calculation_frequency = 1;
1092
1093 // Frequency of the output
1094 unsigned int output_frequency = 1;
1095
1096 // Output precision
1097 unsigned int output_precision = 10;
1098
1099 // Prefix for simulation output
1100 std::string force_output_name = "force";
1101
1102 // Prefix for the torque output
1103 std::string torque_output_name = "torque";
1104
1105 /**
1106 * @brief Declare the parameters.
1107 *
1108 * @param[in,out] prm ParameterHandler object.
1109 */
1110 static void
1111 declare_parameters(ParameterHandler &prm);
1112
1113 /**
1114 * @brief Parse the parameters.
1115 *
1116 * @param[in] prm The ParameterHandler.
1117 */
1118 void
1119 parse_parameters(ParameterHandler &prm);
1120 };
1121
1122 /**
1123 * @brief Laser_FreeSurfaceRadiation - Defines the subparameters for
1124 * the radiation sink at the free surface (air/metal interface).
1125 */
1127 {
1128 bool enable_radiation = false;
1129
1130 // Parameters for the radiation term at the melt pool free surface
1131 double Stefan_Boltzmann_constant = 5.6703e-8;
1132 double emissivity = 0.6;
1133 double Tinf = 0.0;
1134
1135 /**
1136 * @brief Declare the parameters.
1137 *
1138 * @param[in,out] prm ParameterHandler object.
1139 */
1140 static void
1141 declare_parameters(ParameterHandler &prm);
1142
1143 /**
1144 * @brief Parse the parameters.
1145 *
1146 * @param[in] prm The ParameterHandler.
1147 */
1148 void
1149 parse_parameters(ParameterHandler &prm);
1150 };
1151
1152 /**
1153 * @brief Laser parameters - Defines the parameters for the
1154 * laser heat source.
1155 */
1156 template <int dim>
1157 class Laser
1158 {
1159 public:
1160 // A boolean parameter that enables the calculations of laser heat source
1161 bool activate_laser = false;
1162
1163 // Type of laser model used in simulations. With "exponential_decay", the
1164 // laser acts as a volumetric source, whereas, with
1165 // "heat_flux_cls_interface", the laser behaves as a surface flux at the
1166 // interface between fluids (CLS auxiliary physic must be enabled to use
1167 // this model).
1174
1175 /** Activates the angle of incidence dependence. The heat flux
1176 * term is multiplied by a factor \f$ \boldsymbol{n_\Gamma} \cdot
1177 * \boldsymbol{d_\mathrm{laser}}\f$ where \f$ \boldsymbol{n_\Gamma}\f$ is
1178 * the surface unit normal vector and \f$\boldsymbol{d_\mathrm{laser}}\f$ is
1179 * the unit direction vector of the laser.*/
1181
1182 // Laser concentration factor indicates the definition of the beam radius.
1183 // In almost all the articles, it is assumed equal to 2.0
1185
1186 // Laser power in W
1187 double laser_power = 0.0;
1188
1189 // Absorptivity is defined as the fraction of the amount of incident
1190 // radiation that is absorbed by the surface, and it is measured using
1191 // diffuse reflectance spectroscopy (DRS). Generally, a constant value in
1192 // the range of 0.3-0.8 (for welding processes with titanium) are used
1193 // in the literature. However, recent studies show that it varies with
1194 // powder particle size distribution, and the angle of incidence that
1195 // changes due to the dynamic melt pool surface [Zhang, Z., Huang, Y.,
1196 // Kasinathan, A.R., Shahabad, S.I., Ali, U., Mahmoodkhani, Y. and
1197 // Toyserkani, E., 2019. 3-Dimensional heat transfer modeling for laser
1198 // powder-bed fusion additive manufacturing with volumetric heat sources
1199 // based on varied thermal conductivity and absorptivity. Optics & Laser
1200 // Technology, 109, pp.297-312.]
1202
1203 // Penetration depth of the laser
1204 double penetration_depth = 1.0;
1205
1206 // Laser beam radius on the melt pool surface
1207 double beam_radius = 0.0;
1208
1209 // The beam orientation parameter (x+, x-, y+, y-, z+ or z-) gives the
1210 // orientation of the laser beam. For instance, if a laser beam is emitted
1211 // perpendicular on a plane in x-y coordinates, the orientation of the laser
1212 // beam will be in the z direction. Note that this parameter cannot be equal
1213 // to z in two-dimensional simulations. It is not stored as such, but
1214 // through the members below. Their defaults correspond to the "z-"
1215 // default orientation in 3D (and to "y-" in 2D).
1216
1217 // beam_orientation_coordinate parameter stores the integer (x = 0, y = 1,
1218 // z =2) value of the beam orientation parameter
1219 unsigned int beam_orientation_coordinate = dim - 1;
1220
1221 // beam_direction shows the direction of laser beam (either in positive
1222 // (true) or negative (false) direction
1223 bool beam_direction = false;
1224
1225 // Based on the laser beam orientation, the integer values of a
1226 // perpendicular plane to the laser beam orientation are stored in the
1227 // following parameters (x = 0, y = 1, z = 2)
1229
1230 // Beam axis
1231 Tensor<1, dim> beam_axis = [] {
1232 Tensor<1, dim> axis;
1233 axis[dim - 1] = -1.;
1234 return axis;
1235 }();
1236
1238
1239 // rotation angle of the laser axis in rad
1240 double rotation_angle = 0.0;
1241
1242 // rotation axis of the laser beam, only used in 3D where it matches the
1243 // "0.0, 0.0, 1.0" default of the beam rotation axis parameter
1244 Tensor<1, dim> rotation_axis = [] {
1245 Tensor<1, dim> axis;
1246 axis[dim - 1] = 1.;
1247 return axis;
1248 }();
1249
1250 // rotation matrix
1251 Tensor<2, dim> rotation_matrix;
1252
1253 // Laser scan path indicates the path of the laser focal point during a
1254 // simulation
1255 std::shared_ptr<Functions::ParsedFunction<dim>> laser_scan_path;
1256
1257 // Start and end time of the laser operation
1258 double start_time = 0.0;
1259 double end_time = 1.0;
1260
1261 // Parameters for the radiation term at the melt pool free surface
1263
1264 /**
1265 * @brief Declare the parameters.
1266 *
1267 * @param[in,out] prm ParameterHandler object.
1268 */
1269 void
1270 declare_parameters(ParameterHandler &prm);
1271
1272 /**
1273 * @brief Parse the parameters.
1274 *
1275 * @param[in] prm The ParameterHandler.
1276 */
1277 void
1278 parse_parameters(ParameterHandler &prm);
1279 };
1280
1281 /**
1282 * @brief Postprocessing - Defines the parameters
1283 * for the post-processing. In Lethe, post-processing
1284 * implies the calculation of quantities derived from the principal
1285 * variables. For example, the integral kinetic energy or the integral
1286 * enstrophy.
1287 *
1288 * @tparam dim Denotes the number of spatial dimensions.
1289 */
1290 template <int dim>
1292 {
1293 public:
1294 /**
1295 * @brief Isocontour bounding box parameters. This is used to get the
1296 * evolution of the bounding values (In 2D: \f$x_\mathrm{min}\f$,
1297 * \f$x_\mathrm{max}\f$, \f$y_\mathrm{min}\f$, and \f$y_\mathrm{max}\f$;
1298 * In 3D: \f$x_\mathrm{min}\f$, \f$x_\mathrm{max}\f$, \f$y_\mathrm{min}\f$,
1299 * \f$y_\mathrm{max}\f$, \f$z_\mathrm{min}\f$, and \f$z_\mathrm{max}\f$) of
1300 * one or many specified isocontours.
1301 * The data of each isocontour is written in a separate file.
1302 *
1303 * @remark At the moment, this is only implemented for the variables
1304 * 'temperature' and 'phase' (CLS phase indicator).
1305 */
1307 {
1308 /**
1309 * Set of parameters related to an isocontour required for identifying the
1310 * bounding values (\f$x_\mathrm{min}\f$, \f$x_\mathrm{max}\f$,
1311 * \f$y_\mathrm{min}\f$, \f$y_\mathrm{max}\f$, \f$z_\mathrm{min}\f$, and
1312 * \f$z_\mathrm{max}\f$) and writing them in an output file.
1313 */
1315 {
1316 /// Isocontour value
1317 double isovalue = 0.;
1318
1319 /// Isocontour output filename
1320 std::string output_name;
1321 };
1322
1323 /// Number of monitored isocontours
1325
1326 /// Map that regroups all isocontours of a same variable under the same
1327 /// variable key
1328 std::multimap<Variable, std::pair<unsigned int, Isocontour>>
1330
1331 /**
1332 * @brief Declare the parameters in the parameter handler.
1333 *
1334 * @param[in,out] prm The parameter handler.
1335 */
1336 void
1337 declare_parameters(ParameterHandler &prm);
1338
1339 /**
1340 * @brief Parse the parameters from the parameter handler.
1341 *
1342 * @param[in] prm The parameter handler.
1343 */
1344 void
1345 parse_parameters(ParameterHandler &prm);
1346 };
1347
1348 /**
1349 * @brief Probing points parameters. This is used to monitor the evolution
1350 * of variables (e.g., temperature) at specified points in the domain.
1351 *
1352 * The probing points are grouped according the evaluated variables in the
1353 * map ProbingPoints::probing_points_per_variable for easier access when
1354 * postprocessing in the different physics. The names (output filenames) of
1355 * the probes are stored in the vector
1356 * ProbingPoints::probing_points_output_names. The indices of the vector
1357 * correspond to the probe IDs.
1358 *
1359 * @remark The points defined must be part of the domain.
1360 */
1362 {
1363 /**
1364 * @brief IDs and locations associated with probe points of a given
1365 * variable.
1366 */
1368 {
1369 /** Identifiers of the probe points. This is required since multiple
1370 * variable can be evaluated a same probing location, but all fields of
1371 * a same probe are written in the same file. */
1372 std::vector<unsigned int> ids;
1373
1374 /// Point locations where we want to evaluate values
1375 std::vector<Point<dim>> points;
1376 };
1377
1378 /// Number of probing points
1380
1381 /// Maximum number of probing points
1383
1384 /// Probing point output names ordered by ID
1385 std::vector<std::string> probing_points_output_names;
1386
1387 /**
1388 * Map that regroups all probing points information (ID and coordinates)
1389 * of a same variable under the same variable key. This map is used within
1390 * the physics to quickly identify the probes that request an evaluation
1391 * of one of its variables.
1392 *
1393 * @remark This is the only place where the probing points are stored.
1394 * They are directly parsed in this map from the parameter file.
1395 */
1396 std::map<Variable, ProbingPointsPerVariable> probing_points_per_variable;
1397
1398 /**
1399 * @brief Declare the parameters in the parameter handler.
1400 *
1401 * @param[in,out] prm The parameter handler.
1402 */
1403 void
1404 declare_parameters(ParameterHandler &prm);
1405
1406 /**
1407 * @brief Parse the parameters from the parameter handler.
1408 *
1409 * @param[in] prm The parameter handler.
1410 */
1411 void
1412 parse_parameters(ParameterHandler &prm);
1413
1414 /**
1415 * @brief Adds an entry to probing_points_per_variable.
1416 *
1417 * @param[in] variable Variable of the monitored quantity.
1418 * @param[in] id Identifier of the probe.
1419 * @param[in] point Location of the probe.
1420 */
1421 void inline add_probing_point(const Variable &variable,
1422 const unsigned int &id,
1423 const Point<dim> &point)
1424 {
1425 // Initialize new variable entry if there is none and get probes of the
1426 // variable
1427 ProbingPointsPerVariable &probes_of_variable =
1428 probing_points_per_variable.try_emplace(variable).first->second;
1429
1430 auto &ids = probes_of_variable.ids;
1431
1432 AssertThrow(std::find(ids.begin(), ids.end(), id) == ids.end(),
1433 ExcMessage(
1434 "For the probing point " + Utilities::int_to_string(id) +
1435 ", you are specifying multiple times the variable '" +
1436 get_variable_string(variable) +
1437 "'. Please only specify it once."));
1438
1439 // Emplace back id and point coordinates if entry is not duplicated
1440 ids.emplace_back(id);
1441 probes_of_variable.points.emplace_back(point);
1442 }
1443 };
1444
1445 /// Contains all isocontour bounding boxes
1447
1448 /// Contains all probing points
1450
1451 /// Verbosity level of the post-processed quantities
1453
1454 /// Enable total kinetic energy post-processing
1456
1457 /// Enable total enstrophy post-processing
1459
1460 /// Enable pressure power post-processing
1462
1463 /// Enable viscous dissipation post-processing
1465
1466 /// Enable calculating apparent viscosity
1468
1469 /// Enable velocity post-processing
1471
1472 /// Enable average temperature and average heat flux post-processing
1474
1475 /// Enable pressure drop post-processing
1477
1478 /// The inlet boundary ID for pressure drop calculation
1479 unsigned int inlet_boundary_id = 0;
1480
1481 /// The outlet boundary ID for pressure drop calculation
1482 unsigned int outlet_boundary_id = 1;
1483
1484 /// Enable flow rate post-processing
1486
1487 /// Enable tracer flow rate post-processing
1489
1490 /// Set initial time to start calculations for velocities
1492
1493 /// Set initial time to start calculations for average temperature and
1494 /// average heat flux
1496
1497 /// Frequency of the calculation of post-processed quantities
1498 unsigned int calculation_frequency = 1;
1499
1500 /// Frequency of the output
1501 unsigned int output_frequency = 1;
1502
1503 /// Prefix for kinetic energy output
1504 std::string kinetic_energy_output_name = "kinetic_energy";
1505
1506 /// Prefix for pressure drop output
1507 std::string pressure_drop_output_name = "pressure_drop";
1508
1509 /// Prefix for flow rate output
1510 std::string flow_rate_output_name = "flow_rate";
1511
1512 /// Prefix for tracer flow rate output
1513 std::string tracer_flow_rate_output_name = "tracer_flow_rate";
1514
1515 /// Prefix for the enstrophy output
1516 std::string enstrophy_output_name = "enstrophy";
1517
1518 /// Prefix for the pressure power output
1519 std::string pressure_power_output_name = "pressure_power";
1520
1521 /// Prefix for the viscous dissipation output
1522 std::string viscous_dissipation_output_name = "viscous_dissipation";
1523
1524 /// Prefix for the apparent viscosity output
1525 std::string apparent_viscosity_output_name = "apparent_viscosity";
1526
1527 /// Enable tracer statistics
1529
1530 /// Prefix for the tracer output
1531 std::string tracer_output_name = "tracer_statistics";
1532
1533 /// Enable temperature statistics
1535
1536 /// Prefix for the temperature output
1537 std::string temperature_output_name = "temperature_statistics";
1538
1539 /// Enable calculation of algebraic melt volume in phase change problems
1541
1542 /// Prefix for the algebraic melt volume output
1543 std::string algebraic_melt_volume_output_name = "melt_volume_alge";
1544
1545 /// Enable calculation of geometric melt volume in phase change problems
1547
1548 /// Prefix for the geometric melt volume output
1549 std::string geometric_melt_volume_output_name = "melt_volume_geo";
1550
1551 /// FluidIndicator corresponding to the fluid which has phase change
1554
1555 /// Melting temperature iso-value
1557
1558 /// Enable heat flux calculation
1560
1561 /// Prefix for the total heat flux output
1562 std::string heat_flux_output_name = "heat_flux";
1563
1564 /// Fluid domain, used when post-processing a multiphase simulation
1567
1568 /// Enable barycenter calculation for fluid 1 in CLS and Cahn-Hilliard
1569 /// simulations
1571
1572 /// Prefix for the CLS and Cahn-Hilliard barycenter output
1573 std::string barycenter_output_name = "barycenter_information";
1574
1575 /// Enable phase statistics
1577
1578 /// Prefix for the phase output
1579 std::string phase_output_name = "phase_statistics";
1580
1581 /// Enable mass conservation calculation for both fluids in CLS simulations
1583
1584 /// Prefix for the CLS mass conservation output
1585 std::string mass_conservation_output_name = "mass_conservation_information";
1586
1587 /// Enable energies calculation on the domain in Cahn-Hilliard simulations
1589
1590 /// Prefix for the energy output in Cahn-Hilliard simulations
1591 std::string phase_energy_output_name = "phase_energy";
1592
1593 /// Enable calculation of total fluid volume and total particles volume in
1594 /// cfd-dem simulation
1596
1597 /// prefix for the total volume output in cfd-dem simulation
1598 std::string phase_volumes_output_name = "phase_volumes";
1599
1600 /// Enable output of Q-criterion field
1602
1603 /// Enable output of vorticity field
1604 bool output_vorticity = true;
1605
1606 /// Enable output of velocity gradient field
1608
1609 /**
1610 * @brief Declare the parameters.
1611 *
1612 * @param[in,out] prm ParameterHandler object.
1613 */
1614 void
1615 declare_parameters(ParameterHandler &prm);
1616
1617 /**
1618 * @brief Parse the parameters.
1619 *
1620 * @param[in] prm The ParameterHandler.
1621 */
1622 void
1623 parse_parameters(ParameterHandler &prm);
1624 };
1625
1626 /**
1627 * @brief FEM - The finite element section
1628 * controls the properties of the finite element method. This section
1629 * controls the interpolation degree of polynomial integration
1630 * and the number of quadrature points within the cells.
1631 */
1632 struct FEM
1633 {
1634 // Interpolation degree velocity
1635 unsigned int velocity_degree = 1;
1636
1637 // Interpolation degree pressure
1638 unsigned int pressure_degree = 1;
1639
1640 // Interpolation degree void fraction
1641 unsigned int void_fraction_degree = 1;
1642
1643 // Interpolation degree temperature
1644 unsigned int temperature_degree = 1;
1645
1646 // Interpolation degree tracer
1647 unsigned int tracer_degree = 1;
1648
1649 // Switch tracer to DG formulation instead of CG
1650 bool tracer_uses_dg = false;
1651
1652 // Interpolation degree cls model
1653 unsigned int CLS_degree = 1;
1654
1655 // Switch cls to DG formulation instead of CG
1656 bool CLS_uses_dg = false;
1657
1658 // Interpolation degree Cahn-Hilliard
1661
1662 // Option for bubble enrichment functions
1665
1666 /// Polynomial degree for the different electromagnetics spaces.
1667 /// The trial degree sets the polynomial degree for the solution and the
1668 /// test degree is used for the computation of the cell matrix necessary
1669 /// when solving a system using the DPG method.
1672
1673 /// Polynomial degree of the solid velocity of the Euler-Euler model.
1674 unsigned int solid_velocity_degree = 1;
1675
1676 /// Polynomial degree of the solid volume fraction of the Euler-Euler
1677 /// model.
1679
1680 /// Polynomial degree of the discontinuous Galerkin discretization of all
1681 /// the fields of the QMOM physics (scalars and moments). A degree of 0 is a
1682 /// finite volume discretization.
1683 unsigned int qmom_degree = 1;
1684
1685 /**
1686 * @brief Declare the parameters.
1687 *
1688 * @param[in,out] prm ParameterHandler object.
1689 */
1690 static void
1691 declare_parameters(ParameterHandler &prm);
1692
1693 /**
1694 * @brief Parse the parameters.
1695 *
1696 * @param[in] prm The ParameterHandler.
1697 */
1698 void
1699 parse_parameters(ParameterHandler &prm);
1700 };
1701
1702
1703 /**
1704 * @brief NonLinearSolver - Parameter that controls the solution of the
1705 * non-linear problems.
1706 */
1708 {
1709 // Type of non-linear solver
1710 enum class SolverType : std::int8_t
1711 {
1715 };
1716
1717 // Kinsol solver strategy
1718 enum class KinsolStrategy : std::int8_t
1719 {
1723 };
1724
1726
1727 // Type of non-linear solver
1729
1730 // Kinsol solver strategy
1732
1733 // Tolerance
1734 double tolerance = 1e-6;
1735
1736 // Maximal number of iterations for the Newton solver
1737 unsigned int max_iterations = 10;
1738
1739 // Force RHS recalculation at the beginning of every non-linear steps
1740 // This is required if there is a fixed point component to the non-linear
1741 // solver that is changed at the beginning of every newton iteration.
1742 // This is notably the case of the sharp edge method.
1743 // The default value of this parameter is false.
1745
1746 // Matrix reconstruction tolerance
1747 // This parameter controls the reconstruction of the system matrix
1748 // If the residual after a newton step is lower than previous_residual *
1749 // matrix_tolerance then that iteration is considered sufficient and the
1750 // matrix is not reassembled at the next iteration.
1751 double matrix_tolerance = 0.1;
1752
1753 // Relative Tolerance
1754 double step_tolerance = 0.9;
1755
1756 // Carry jacobian matrix over to the new non-linear problem
1757 bool reuse_matrix = false;
1758
1759 // Reuse preconditioner for the next non-linear iterations
1761
1762 // Abort solver if non-linear solution has not reached tolerance
1764
1765 /**
1766 * @brief Declare the parameters.
1767 *
1768 * @param[in,out] prm ParameterHandler object.
1769 * @param[in] physics_name Name of the current physics
1770 */
1771 static void
1772 declare_parameters(ParameterHandler &prm, const std::string &physics_name);
1773
1774 /**
1775 * @brief Parse the parameters.
1776 *
1777 * @param[in] prm ParameterHandler object.
1778 * @param[in] physics_name Name of the current physics
1779 */
1780 void
1781 parse_parameters(ParameterHandler &prm, const std::string &physics_name);
1782 };
1783
1784 /**
1785 * @brief LinearSolver - Parameters that control the solution of the
1786 * linear system of equations that arise from the finite element problem for
1787 * each of the physics available in Lethe
1788 */
1790 {
1791 // Type of linear solver
1792 enum class SolverType : std::int8_t
1793 {
1797 };
1798
1800
1801 /// Verbosity of linear solver
1803
1804 /// Flag to rescale linear and non-linear residuals by the sqrt of the
1805 /// triangulation volume
1807
1808 /// Relative residuals of the iterative solver
1809 double relative_residual = 1e-3;
1810
1811 /// Minimum residual of the iterative solver
1812 double minimum_residual = 1e-12;
1813
1814 /// Maximum number of iterations
1815 int max_iterations = 1000;
1816
1817 /// Maximum number of krylov vectors
1819
1820 /// Enable hessians in jacobian
1822
1823 /// Enable hessians in residual
1825
1826 /// Type of preconditioner
1827 enum class PreconditionerType : std::int8_t
1828 {
1829 ilu, ///< Incomplete LU Factorization
1830 amg, ///< Algebraic Multigrid
1831 lsmg, ///< Local-Smoothing Geometric Multigrid
1832 gcmg, ///< Global-Coarsening Multigrid
1833 none ///< No preconditioner
1834 };
1836
1837 /// ILU fill
1838 unsigned int ilu_precond_fill = 0;
1839
1840 /// ILU absolute tolerance
1841 double ilu_precond_atol = 1e-12;
1842
1843 /// ILU relative tolerance
1844 double ilu_precond_rtol = 1.00;
1845
1846 /// AMG parameters either as linear solver preconditioner or as
1847 /// preconditioner of a coarse-grid solver for LSMG or GCMG
1848
1849 /// ILU fill for smoother
1850 unsigned int amg_precond_ilu_fill = 0;
1851
1852 /// ILU absolute tolerance for smoother
1853 double amg_precond_ilu_atol = 1e-12;
1854
1855 /// ILU relative tolerance for smoother
1857
1858 /// AMG aggregation threshold
1860
1861 /// AMG number of cycles
1862 unsigned int amg_n_cycles = 1;
1863
1864 /// AMG W_cycle
1865 bool amg_w_cycles = false;
1866
1867 /// AMG Smoother sweeps
1868 unsigned int amg_smoother_sweeps = 2;
1869
1870 /// AMG Smoother overlap
1871 unsigned int amg_smoother_overlap = 1;
1872
1873 /// Block linear solver to throw error.
1875
1876 /// MG min level
1878
1879 /// MG minimum number of cells per level
1881
1882 /// MG intermediate level
1884
1885 /// MG enable hessians in jacobian
1887
1888 /// Type of multigrid
1889 enum class MultigridCoarseningSequenceType : std::int8_t
1890 {
1895 };
1898
1899 /// Type of p coarsening sequence
1900 MGTransferGlobalCoarseningTools::PolynomialCoarseningSequenceType
1901 mg_p_coarsening_type = MGTransferGlobalCoarseningTools::
1902 PolynomialCoarseningSequenceType::decrease_by_one;
1903
1904 /// Minimum polynomial degree for p coarsening sequence
1906
1907 /// MG smoother number of iterations
1909
1910 /// MG smoother relaxation parameter
1912
1913 /// Type of preconditioner for the MG smoother
1922
1923 /// Chebyshev smoother polynomial degree
1925
1926 /// Chebyshev smoother smoothing range (lambda_max / lambda_min)
1928
1929 /// Chebyshev smoother eigenvalue-estimation CG/Lanczos iterations
1931
1932 /// MG eigenvalue estimation for smoother relaxation parameter
1934
1935 /// MG smoothing range to set range between eigenvalues
1937
1938 /// MG number of cg iterations to find eigenvalue
1940
1941 /// MG print max, min, eigenvalues
1943
1944 /// Type of coarse grid solver
1945 enum class CoarseGridSolverType : std::int8_t
1946 {
1951 };
1953
1954 /// MG use FE_Q_iso_Q1 elements for coarse grid
1956
1957 /// MG coarse-grid solver maximum number of iterations
1959
1960 /// MG coarse-grid solver tolerance
1961 double mg_gmres_tolerance = 1e-14;
1962
1963 /// MG coarse-grid solver reduce
1964 double mg_gmres_reduce = 1e-4;
1965
1966 /// MG coarse-grid solver maximum number of krylov vectors
1968
1969 /// MG coarse-grid solver preconditioner
1971
1972 /// MG use default parameters for AMG
1974
1975 /// MG information about levels
1977
1978 /**
1979 * @brief Declare the parameters.
1980 *
1981 * @param[in,out] prm ParameterHandler object.
1982 * @param[in] physics_name Name of the current physics
1983 */
1984 static void
1985 declare_parameters(ParameterHandler &prm, const std::string &physics_name);
1986
1987 /**
1988 * @brief Parse the parameters.
1989 *
1990 * @param[in] prm ParameterHandler object.
1991 * @param[in] physics_name Name of the current physics
1992 */
1993 void
1994 parse_parameters(ParameterHandler &prm, const std::string &physics_name);
1995 };
1996
1997 /**
1998 * @brief Mesh - Parameters that control mesh reading and mesh generation.
1999 */
2000 template <int dim, int spacedim = dim>
2001 class Mesh
2002 {
2003 public:
2004 // GMSH or dealii
2005 enum class Type : std::int8_t
2006 {
2010 };
2012
2013 /// File name of the mesh
2014 std::string file_name = "none";
2015
2016 /// Name of the grid in GridTools
2017 std::string grid_type = "hyper_cube";
2018
2019 /// Arguments of the GridTools
2020 std::string grid_arguments = "-1 : 1 : false";
2021
2022 /// Initial refinement level of primitive mesh
2023 unsigned int initial_refinement = 0;
2024
2025 /// Initial refinement level of primitive mesh near user-defined boundary
2026 /// conditions
2028
2029 /// List of boundary ids to refine
2030 std::vector<int> boundaries_to_refine;
2031
2032 /// Enable fixing initial refinement from a target size
2034
2035 /// Allow the use of a simplex mesh
2036 bool simplex = false;
2037
2038 /// Target size when automatically refining initial mesh
2039 double target_size = 1.;
2040
2041 /// Enable checking the input grid for diamond-shaped cells
2043
2044 /* A boolean parameter which enables adding the neighbor boundary cells of
2045 * boundary cells in DEM simulations. This parameter should only be enabled
2046 * for simulations with concave geometries (for instance particles inside a
2047 * drum). In simulations with convex geometries, it must not be enabled.
2048 * This is also reported to users in a warning in
2049 find_boundary_cells_information.*/
2051
2052 // Grid displacement at initiation
2053 Tensor<1, spacedim> translation;
2054
2055 // Grid rotation at initiation
2056 Tensor<1, spacedim> rotation_axis = [] {
2057 Tensor<1, spacedim> axis;
2058 axis[0] = 1.;
2059 return axis;
2060 }();
2061 double rotation_angle = 0.;
2062
2063 /// Rescale the grid by the scale factor
2064 double scale = 1.;
2065
2066 /**
2067 * @brief Declare the parameters.
2068 *
2069 * @param[in,out] prm ParameterHandler object.
2070 */
2071 static void
2072 declare_parameters(ParameterHandler &prm);
2073
2074 /**
2075 * @brief Parse the parameters.
2076 *
2077 * @param[in] prm ParameterHandler object.
2078 */
2079 void
2080 parse_parameters(ParameterHandler &prm);
2081 };
2082
2083 /**
2084 * @brief Mesh Adaptation Parameters that can differ for each refinement variable
2085 */
2087 {
2088 /// Error estimator for the variable
2094
2095 // Coarsening fraction
2096 double coarsening_fraction = 0.05;
2097
2098 // Refinement fraction
2100 };
2101
2102 /**
2103 * @brief MeshAdaption - Parameters that control dynamic mesh adaptation.
2104 * Dynamic mesh adaptation in Lethe is very flexible and can be both local
2105 * and global.
2106 */
2108 {
2109 // Initial adaptive refinement
2110 unsigned int initial_refinement = 0;
2111
2112 // Type of mesh adaptation
2113 enum class Type : std::int8_t
2114 {
2119
2120 // Map containing the refinement variables
2121 std::map<Variable, MultipleAdaptationParameters> variables;
2122
2123 /// Decision factor for adaptive refinement (number or fraction)
2129
2130 // Maximum number of elements
2131 unsigned int maximum_number_elements = 100000000;
2132
2133 // Maximum refinement level
2134 unsigned int maximum_refinement_level = 10;
2135
2136 // Minimum refinement level
2138
2139 // Refinement after frequency iter
2140 unsigned int frequency = 1;
2142
2143 // Enable the control of the mesh refinement to target a specific number of
2144 // elements equal to the maximum number of elements.
2146
2147 // Specifies if mesh adaptation can be used on certain boundaries
2149
2150 // List of boundary ids to fix to their initial refinement state
2151 std::vector<int> boundaries_to_fix;
2152
2153 /**
2154 * @brief Declare the parameters.
2155 *
2156 * @param[in,out] prm ParameterHandler object.
2157 */
2158 static void
2159 declare_parameters(ParameterHandler &prm);
2160
2161 /**
2162 * @brief Parse the parameters.
2163 *
2164 * @param[in] prm ParameterHandler object.
2165 */
2166 void
2167 parse_parameters(ParameterHandler &prm);
2168 };
2169
2170 /**
2171 * Container of the parameters for box refinements. The regions to refine can
2172 * be described by either a GMSH or a deal.II mesh.
2173 */
2174 template <int dim, int spacedim = dim>
2176 {
2177 /// Number of boxes delimiting refinement regions
2179
2180 /**
2181 * Maximum number of refinement boxes that can be defined by a user.
2182 *
2183 * @remark A maximal value has to be initialized to fill the vectors with
2184 * parameter declarations.
2185 */
2186 const unsigned int max_number_of_refinement_boxes = 20;
2187
2188 /**
2189 * Shared pointer of a vector of GMSH and deal.II meshes representing
2190 * refinement areas.
2191 */
2192 std::shared_ptr<std::vector<Mesh<dim, spacedim>>> refinement_boxes_meshes =
2193 std::make_shared<std::vector<Mesh<dim, spacedim>>>(
2195
2196 /// Vector of additional refinement values of the different boxes
2197 std::vector<unsigned int> box_additional_refinements =
2198 std::vector<unsigned int>(max_number_of_refinement_boxes);
2199
2200 /**
2201 * @brief Declare the parameters.
2202 *
2203 * @param[in,out] prm ParameterHandler object.
2204 */
2205 void
2206 declare_parameters(ParameterHandler &prm);
2207
2208 /**
2209 * @brief Parse the parameters.
2210 *
2211 * @param[in] prm ParameterHandler object.
2212 */
2213 void
2214 parse_parameters(ParameterHandler &prm);
2215 };
2216
2217
2218 /**
2219 * @brief Testing - Some solvers have a specific testing
2220 * mode that can be enabled to output more variables to the
2221 * terminal. This is enabled using the Testing parameters.
2222 */
2223 struct Testing
2224 {
2225 bool enabled = false;
2226
2233
2234 /**
2235 * @brief Declare the parameters.
2236 *
2237 * @param[in,out] prm ParameterHandler object.
2238 */
2239 static void
2240 declare_parameters(ParameterHandler &prm);
2241
2242 /**
2243 * @brief Parse the parameters.
2244 *
2245 * @param[in] prm ParameterHandler object.
2246 */
2247 void
2248 parse_parameters(ParameterHandler &prm);
2249 };
2250
2251
2252 /**
2253 * @brief Restart - Controls writing and reading
2254 * simulation checkpoints.
2255 */
2256
2257 struct Restart
2258 {
2259 std::string filename = "restart";
2260 bool restart = false;
2261 bool checkpoint = false;
2262 unsigned int frequency = 1;
2263
2264 /**
2265 * @brief Declare the parameters.
2266 *
2267 * @param[in,out] prm ParameterHandler object.
2268 */
2269 static void
2270 declare_parameters(ParameterHandler &prm);
2271
2272 /**
2273 * @brief Parse the parameters.
2274 *
2275 * @param[in] prm ParameterHandler object.
2276 */
2277 void
2278 parse_parameters(ParameterHandler &prm);
2279 };
2280
2281 /**
2282 * @brief VelocitySource - Adds velocity-dependent
2283 * source term to the Navier-Stokes equations with
2284 * the appropriate jacobian matrix. Currently only
2285 * a change to a rotating frame is supported, but additional
2286 * terms such as a Darcy force or similar could be easily
2287 * added.
2288 */
2289
2291 {
2292 enum class PermeabilityModel : std::int8_t
2293 {
2294 none, ///< No Darcy source term
2295 darcy_phase_change, /**< Phase change Darcy source term which applies a
2296 linear penalization depending on the phase change model */
2297 carman_kozeny_phase_change /**< Phase change Carman-Kozeny source term
2298 which applies a non-linear penalization depending on the
2299 phase change model */
2300 };
2301
2302 enum class RotatingFrameType : std::int8_t
2303 {
2306 };
2307
2309 double omega_x = 0.;
2310 double omega_y = 0.;
2311 double omega_z = 0.;
2312
2313 /// Type of permeability model applied to the Navier-Stokes equations
2315
2316 /// Indicates which fluids are with liquid-solid phase change.
2318
2319 /**
2320 * Enable the multiplication of the Darcy force term
2321 * (\f$\vec{F}_\mathrm{Darcy}\f$) by the density for dimensional consistency
2322 * when solving the pressure rather than the kinematic pressure in the
2323 * momentum balance.
2324 *
2325 * \f[
2326 * \vec{F}_\mathrm{Darcy} = \rho K \vec{u}
2327 * \f]
2328 *
2329 * with \f$\rho\f$ the density, \f$K\f$ the Darcy penalty, and \f$\vec{u}\f$
2330 * the velocity.
2331 */
2333
2334 /// Permeability area of the pseudo-porous bed (solid phase).
2335 std::vector<double> carman_kozeny_permeability_area{1e-3, 1e-3};
2336
2337 /// Tolerance in the Carman-Kozeny source term that avoids division by zero.
2338 std::vector<double> carman_kozeny_tolerance{1e-3, 1e-3};
2339
2340 /**
2341 * @brief Declare the parameters.
2342 *
2343 * @param[in,out] prm ParameterHandler object.
2344 */
2345 static void
2346 declare_parameters(ParameterHandler &prm);
2347
2348 /**
2349 * @brief Parse the parameters.
2350 *
2351 * @param[in] prm ParameterHandler object.
2352 */
2353 void
2354 parse_parameters(ParameterHandler &prm);
2355 };
2356
2357 template <int dim>
2359 {
2360 public:
2361 // Vector of particles
2362 std::vector<IBParticle<dim>> particles;
2363
2364 // Number of declared IB particles
2365 unsigned int nb_particles = 1;
2366 // Boolean to determine whether the Navier-Stokes equations are
2367 // solved inside the particles.
2369
2370 // Polynomial degree of the IB stencil
2371 unsigned int stencil_degree = 2;
2372 // The length ratio used for the stencil calculation of the IB condition.
2373 double length_ratio = 4;
2374 // Boolean controlling whether extrapolation is used to impose the
2375 // immersed boundary condition. If false, the IB condition is directly
2376 // imposed using nearest neighbors. the immersed boundary condition or not.
2377 // If it is set to false, all cut cells are fully imposed on the IB.
2379
2380 // Boolean for the calculation of the force at the IB
2382 // Boolean for extra vtu field output
2384 // The name of the output file for the forces on the IB.
2385 std::string ib_force_output_file = "ib_force";
2386 // Particles pvd file name
2387 std::string ib_particles_pvd_file = "ib_particles_data";
2388 // Boolean for printing DEM information
2389 bool print_dem = true;
2390
2391 // Number of initial refinements around each particle
2392 unsigned int initial_refinement = 0;
2393 // Boolean to enable distance-based coarsening away from particles
2394 bool enable_coarsening = false;
2395 // Inner distance factor of the refinement zone
2397 // Outer distance factor of the refinement zone
2399 // Outer distance factor beyond which distance-based coarsening is
2400 // allowed
2402 // Boolean for time-dependent mesh refinement according to the particle's
2403 // current position the refinement zone.
2405
2406 // Number of DEM time steps per CFD time step.
2407 unsigned int coupling_frequency = 1000;
2408 // Relaxation parameter for the CFD-DEM coupling.
2409 double alpha = 1;
2410 // Frequency at which the contact search is performed at the CFD time
2411 // scale (once every X CFD time steps)
2413 // Particles' radius multiplier used to calculate the effective radius of
2414 // contact search
2416 // Boolean for lubrication force
2418 // The maximal range for which the lubrication force is evaluated. This
2419 // variable multiplies the smallest cell diameter to obtain the actual
2420 // range.
2422 // The minimal range for which the lubrication force is evaluated. This
2423 // variable multiplies the smallest cell diameter to obtain the actual
2424 // range.
2426 // Tolerance for the particle dynamics nonlinear solver.
2428 // Boolean for the explicit calculation of the contact impulse in the
2429 // CFD-DEM coupling impulsion in the CFD-DEM coupling.
2431 // Boolean for explicit evaluation of the particle's position in the CFD-DEM
2432 // coupling
2434 // Boolean for approximation of the contact radius. If true, the effective
2435 // radius replaces the actual particle's local curvature radius in the
2436 // calculation.
2438 // Function defining the gravitational acceleration vector used by the
2439 // CFD-DEM calculation. Given a default so that declare_parameters() can
2440 // safely dereference it on a default-constructed instance.
2441 std::shared_ptr<Functions::ParsedFunction<dim>> f_gravity =
2442 std::make_shared<Functions::ParsedFunction<dim>>(dim);
2443 // Young's modulus of the wall
2444 double wall_youngs_modulus = 100000000;
2445 // Poisson ratio of the wall
2447 // Rolling friction coefficient of the wall
2449 // Sliding friction coefficient of the wall
2451 // Coefficient of restitution of the wall
2453
2454 // Boolean for loading particles from an independent file. If true, the
2455 // definition of the particles in the Particle subsection in the .prm file
2456 // is ignored. of the particle subsection.
2458 // Name of the independent file containing particles' information at
2459 // insertion. Only used if load_particles_from_file is true.
2460 std::string particles_file = "particles";
2461
2462 /**
2463 * @brief Declare the parameters.
2464 *
2465 * @param[in,out] prm ParameterHandler object.
2466 */
2467 void
2468 declare_parameters(ParameterHandler &prm);
2469
2470 /**
2471 * @brief Declare the default parameters.
2472 *
2473 * @param[in,out] prm ParameterHandler object.
2474 * @param[in] index Zero-based index of the immersed-boundary particle
2475 * whose default parameters are being declared.
2476 */
2477 void
2478 declare_default_entry(ParameterHandler &prm, unsigned int index);
2479
2480 /**
2481 * @brief Parse the parameters.
2482 *
2483 * @param[in] prm ParameterHandler object.
2484 */
2485 void
2486 parse_parameters(ParameterHandler &prm);
2487 };
2488
2489 /**
2490 * @brief FlowControl - Set average velocity on a boundary (CFD) or the domain
2491 * (CFD-DEM).
2492 */
2494 {
2495 // Enable flow control
2497
2498 // Average velocity target (L/t)
2500
2501 // Boundary id at flow inlet
2502 unsigned int boundary_flow_id = 0;
2503
2504 // Flow direction (x=0, y=1 ,z=2)
2505 unsigned int flow_direction = 0;
2506
2507 // Initial beta
2508 double beta_0 = 0.;
2509
2510 // Relaxation coefficient for beta force controller
2511 // beta_n+1 = beta_n + alpha * (...)
2512 double alpha = 1.;
2513
2514 // If beta at n+1 step is in this threshold over beta at n step, beta n+1
2515 // is kept as beta n. This avoids a new term of force in the matrix
2516 double beta_threshold = 0.0;
2517
2518 // Type of verbosity for the flow control
2520
2521 // Apply scaled beta force to particles
2523
2524 /**
2525 * @brief Declare the default parameters.
2526 *
2527 * @param[in,out] prm ParameterHandler object.
2528 */
2529 static void
2530 declare_parameters(ParameterHandler &prm);
2531
2532 /**
2533 * @brief Parse the parameters.
2534 *
2535 * @param[in] prm ParameterHandler object.
2536 */
2537 void
2538 parse_parameters(ParameterHandler &prm);
2539 };
2540
2541 /**
2542 * @brief Evaporation - Defines the subparameters for
2543 * the evaporation cooling and recoil pressure at the free surface
2544 * (air/metal interface).
2545 */
2547 {
2553
2556
2557 // Parameters for the evaporation terms at the melt pool free surface
2561 double molar_mass = 1.0;
2564 double ambient_pressure = 101325;
2566 double liquid_density = 10.0;
2567 double universal_gas_constant = 8.3145;
2568
2569 /**
2570 * @brief Declare the default parameters.
2571 *
2572 * @param[in,out] prm ParameterHandler object.
2573 */
2574 static void
2575 declare_parameters(ParameterHandler &prm);
2576
2577 /**
2578 * @brief Parse the parameters.
2579 *
2580 * @param[in] prm ParameterHandler object.
2581 */
2582 void
2583 parse_parameters(ParameterHandler &prm);
2584 };
2585
2586 /**
2587 * @brief Mortar - Defines parameters used to construct mortar elements.
2588 */
2589 template <int dim>
2590 struct Mortar
2591 {
2592 /// Indicates whether mortar elements are enabled
2593 bool enable = false;
2594 /// Type of mortar interface
2600 /// Mesh parameters for the rotor part
2601 std::shared_ptr<Mesh<dim>> rotor_mesh;
2602 /// Boundary ID # of the rotor at the rotor-stator interface
2603 unsigned int rotor_boundary_id = 1;
2604 /// Boundary ID # of the stator at the rotor-stator interface
2605 unsigned int stator_boundary_id = 2;
2606 /// Center of rotation of the rotor domain
2608 /// Rotation axis direction
2609 unsigned int rotation_axis_direction = 2;
2610 /// Rotation angle of the rotor domain in radians
2611 std::shared_ptr<Functions::ParsedFunction<dim>> rotor_rotation_angle;
2612 /// Angular velocity of the rotor domain
2613 std::shared_ptr<Functions::ParsedFunction<dim>> rotor_angular_velocity;
2614 /// Penalty factor for mortar elements
2615 double sip_factor = 1.;
2616 /// Oversampling factor for quadrature points
2617 unsigned int oversampling_factor = 1;
2618 /// Tolerance used for rotor-stator interface radius computation
2619 double radius_tolerance = 1e-8;
2620 /// Cell weight for load balancing of cells with mortar interfaces
2621 unsigned int cell_weight = 1000;
2622 /// Type of verbosity for mortar
2624
2625 /**
2626 * @brief Declare the default parameters.
2627 *
2628 * @param[in,out] prm ParameterHandler object.
2629 */
2630 void
2631 declare_parameters(ParameterHandler &prm);
2632
2633 /**
2634 * @brief Parse the parameters.
2635 *
2636 * @param[in] prm ParameterHandler object.
2637 */
2638 void
2639 parse_parameters(ParameterHandler &prm);
2640 };
2641
2642 /**
2643 * @brief Return the deprecated strings of the parameters parsed into a
2644 * Verbosity, which remain accepted in parameter files.
2645 *
2646 * @return The deprecated strings, each paired with its Verbosity.
2647 */
2650
2651 /**
2652 * @brief Return the verbosity levels accepted by the parameters which do
2653 * not support Verbosity::extra_verbose.
2654 *
2655 * @return Verbosity::quiet and Verbosity::verbose.
2656 */
2657 const std::vector<Verbosity> &
2659
2660 /**
2661 * @brief Return the deprecated strings of the parameters parsed into a
2662 * FluidIndicator, which remain accepted in parameter files.
2663 *
2664 * @return The deprecated strings, each paired with its FluidIndicator.
2665 */
2668
2669 /**
2670 * @brief Return the fluid indicators accepted by the parameters which
2671 * designate a single fluid.
2672 *
2673 * @return FluidIndicator::fluid_0 and FluidIndicator::fluid_1.
2674 */
2675 const std::vector<FluidIndicator> &
2677
2678} // namespace Parameters
2679#endif
Class used to rescale physical properties for cases where the main dimensions of the problems (Length...
void declare_parameters(ParameterHandler &prm)
Declare the parameters.
unsigned int nb_particles
bool enable_extra_sharp_interface_vtu_output_field
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
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 explicit_contact_impulsion_calculation
double refinement_inside_distance_factor
std::shared_ptr< Functions::ParsedFunction< dim > > f_gravity
unsigned int initial_refinement
unsigned int stencil_degree
bool explicit_position_integration_calculation
std::string ib_particles_pvd_file
double refinement_outside_distance_factor
double wall_rolling_friction_coefficient
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
Definition parameters.h:802
EffectiveMediumModelType magnetic_permeability_effective_medium_model
Definition parameters.h:798
void parse_parameters(ParameterHandler &prm, const unsigned int id, const Parameters::Dimensionality &dimensions)
Parse the parameters.
MobilityCahnHilliardParameters mobility_cahn_hilliard_parameters
Definition parameters.h:783
enum Parameters::MaterialInteractions::MobilityCahnHilliardModel mobility_cahn_hilliard_model
void declare_parameters(ParameterHandler &prm, unsigned int id) const
Declare the parameters.
SurfaceTensionParameters surface_tension_parameters
Definition parameters.h:775
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > fluid_solid_interaction_with_material_interaction_id
Definition parameters.h:804
EffectiveMediumModelType electric_permittivity_effective_medium_model
Definition parameters.h:796
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > fluid_dispersed_phase_interaction_with_material_interaction_id
Definition parameters.h:806
enum Parameters::MaterialInteractions::SurfaceTensionModel surface_tension_model
double tracer_reaction_constant
Definition parameters.h:640
enum Parameters::Material::MagneticPermeabilityModel magnetic_permeability_model
enum Parameters::Material::DensityModel density_model
double magnetic_permeability_real
Magnetic_permeability.
Definition parameters.h:741
double tracer_reaction_threshold
Definition parameters.h:646
IsothermalIdealGasDensityParameters isothermal_ideal_gas_density_parameters
Definition parameters.h:666
enum Parameters::Material::RheologicalModel rheological_model
ImmersedSolidGaussianParameters immersed_solid_gaussian_parameters
Definition parameters.h:726
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.
double electric_permittivity_real
Electric_permittivity.
Definition parameters.h:747
enum Parameters::Material::TracerDiffusivityModel tracer_diffusivity_model
ImmersedSolidTanhParameters immersed_solid_tanh_parameters
Definition parameters.h:722
enum Parameters::Material::ElectricConductivityModel electric_conductivity_model
std::vector< double > electric_permittivity_imag_polynomial_coefficients
Definition parameters.h:750
double electric_conductivity
Electric_conductivity.
Definition parameters.h:737
enum Parameters::Material::ThermalConductivityModel thermal_conductivity_model
enum Parameters::Material::SpecificHeatModel specific_heat_model
std::vector< double > magnetic_permeability_real_polynomial_coefficients
Definition parameters.h:743
PhaseChange phase_change_parameters
Definition parameters.h:649
std::vector< double > electric_conductivity_polynomial_coefficients
Definition parameters.h:738
double electric_permittivity_imag
Definition parameters.h:748
double magnetic_permeability_imag
Definition parameters.h:742
NonNewtonian non_newtonian_parameters
Definition parameters.h:659
enum Parameters::Material::ElectricPermittivityModel electric_permittivity_model
std::vector< double > magnetic_permeability_imag_polynomial_coefficients
Definition parameters.h:744
std::vector< double > electric_permittivity_real_polynomial_coefficients
Definition parameters.h:749
enum Parameters::Material::TracerReactionPrefactorModel tracer_reaction_prefactor_model
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
Definition parameters.h:869
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions=Dimensionality())
Parse the parameters.
static constexpr unsigned int max_material_interactions
Definition parameters.h:863
static constexpr unsigned int max_solids
Definition parameters.h:851
void declare_parameters(ParameterHandler &prm)
Declare the parameters.
std::vector< Material > unresolved_dispersed_phases
Definition parameters.h:855
std::map< std::pair< unsigned int, unsigned int >, unsigned int > fluid_solid_interactions_with_material_interaction_ids
Definition parameters.h:867
static constexpr unsigned int max_unresolved_dispersed_phases
Definition parameters.h:857
unsigned int number_of_unresolved_dispersed_phases
Definition parameters.h:856
std::vector< Material > fluids
Definition parameters.h:844
std::vector< Material > solids
Definition parameters.h:849
unsigned int number_of_material_interactions
Definition parameters.h:862
std::map< std::pair< unsigned int, unsigned int >, unsigned int > fluid_fluid_interactions_with_material_interaction_ids
Definition parameters.h:865
std::vector< MaterialInteractions > material_interactions
Definition parameters.h:861
static constexpr unsigned int max_fluids
Definition parameters.h:846
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.
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.
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
std::vector< std::pair< std::string, EnumType > > DeprecatedEnumNames
Deprecated strings of an enum parameter, each paired with the enumerator it stands for....
Definition utilities.h:765
Identifiers for multiphysics modules and their solution fields.
Variable
Solution fields of the different physics that are used as an indicator for multiple purposes (e....
std::string get_variable_string(Variable variable)
Gets for every available Variable the string corresponding to the variable.
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...
FluidIndicator
Class to account for different fluid indicators. This is used for multiphase simulations in PostProce...
Definition parameters.h:75
Carreau model to solve for non-Newtonian flows.
Definition parameters.h:361
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the Carreau rheology parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the Carreau rheology parameters.
Set of parameters constraining a certain portion of a fluid domain to null velocity and pressure fiel...
Definition parameters.h:911
std::vector< unsigned int > fluid_ids
Identifiers of fluids that are constrained.
Definition parameters.h:919
std::vector< double > filtered_phase_indicator_tolerance
Definition parameters.h:923
std::vector< double > temperature_max_values
Upper threshold values of the constraining field (temperature).
Definition parameters.h:929
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).
Definition parameters.h:926
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
Tensor< 1, dim > restriction_plane_normal_vector
Definition parameters.h:941
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).
Definition parameters.h:916
bool enable
Enable/disable (true/false) the solid domain constraining feature.
Definition parameters.h:913
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).
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the default parameters.
Evaporation - Defines the subparameters for the evaporation cooling and recoil pressure at the free s...
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the default parameters.
enum Parameters::Evaporation::EvaporativeMassFluxModelType evaporative_mass_flux_model_type
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
unsigned int CLS_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
unsigned int qmom_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...
Definition parameters.h:457
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.
Definition parameters.h:425
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.
Isothermal ideal gas model to solve for isothermal weakly compressible fluid flows.
Definition parameters.h:489
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.
Definition parameters.h:491
static void declare_parameters(ParameterHandler &prm)
Declare the isothermal ideal-gas density parameters.
double R
Specific gas constant in J/kg/K.
Definition parameters.h:493
double T
Absolute temperature of the ideal gas in K.
Definition parameters.h:495
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.
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.
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.
MultigridCoarseningSequenceType
Type of multigrid.
MultigridSmootherPreconditionerType mg_smoother_preconditioner_type
unsigned int amg_n_cycles
AMG number of cycles.
double mg_gmres_reduce
MG coarse-grid solver reduce.
MultigridSmootherPreconditionerType
Type of preconditioner for the MG smoother.
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.
CoarseGridSolverType
Type of coarse grid solver.
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.
PreconditionerType
Type of preconditioner.
@ lsmg
Local-Smoothing Geometric Multigrid.
@ ilu
Incomplete LU Factorization.
@ gcmg
Global-Coarsening 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...
FractionType
Decision factor for adaptive refinement (number or fraction).
enum Parameters::MeshAdaptation::Type type
std::map< Variable, MultipleAdaptationParameters > variables
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
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.
std::shared_ptr< std::vector< Mesh< dim, spacedim > > > refinement_boxes_meshes
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...
Definition parameters.h:562
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(const ParameterHandler &prm, const Parameters::Dimensionality &dimensions)
Parse the parameters.
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
InterfaceType
Type of mortar interface.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
Mesh Adaptation Parameters that can differ for each refinement variable.
ErrorEstimator
Error estimator for the variable.
enum Parameters::MultipleAdaptationParameters::ErrorEstimator error_estimator
NonLinearSolver - Parameter that controls the solution of the non-linear problems.
KinsolStrategy kinsol_strategy
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.
non-Newtonian - Defines the parameters for non-Newtonian flows according to the chosen rheological mo...
Definition parameters.h:398
void declare_parameters(ParameterHandler &prm) const
Declare the parameters for the selected non-Newtonian model.
PowerLawParameters powerlaw_parameters
Definition parameters.h:400
CarreauParameters carreau_parameters
Definition parameters.h:399
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...
Definition parameters.h:264
double thermal_conductivity_l
Thermal conductivity of liquid - Units in W/(m*K).
Definition parameters.h:281
double cp_l
Specific heat of liquid - Units in J/(kg*K).
Definition parameters.h:275
double T_liquidus
Liquidus temperature - Units in K.
Definition parameters.h:269
double penalty_l
Darcy penalty of liquid - Units in 1/(s).
Definition parameters.h:299
double thermal_conductivity_s
Thermal conductivity of solid - Units in W/(m*K).
Definition parameters.h:284
double kinematic_viscosity_l
kinematic viscosity of liquid - Units in m^2/(s)
Definition parameters.h:293
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).
Definition parameters.h:278
static void declare_parameters(ParameterHandler &prm)
Declare the phase change parameters.
double thermal_expansion_l
Thermal expansion coefficient of liquid - Units in 1/K.
Definition parameters.h:287
double penalty_s
Darcy penalty of solid - Units in 1/(s).
Definition parameters.h:302
double T_solidus
Solidus temperature - Units in K.
Definition parameters.h:266
double kinematic_viscosity_s
kinematic viscosity of solid - Units in m^2/(s)
Definition parameters.h:296
double thermal_expansion_s
Thermal expansion coefficient of solid - Units in 1/K.
Definition parameters.h:290
double latent_enthalpy
Latent enthalpy for the phase change - Units in J/kg.
Definition parameters.h:272
Isocontour bounding box parameters. This is used to get the evolution of the bounding values (In 2D: ...
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.
IDs and locations associated with probe points of a given variable.
std::vector< Point< dim > > points
Point locations where we want to evaluate values.
Probing points parameters. This is used to monitor the evolution of variables (e.g....
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.
std::map< Variable, ProbingPointsPerVariable > probing_points_per_variable
Power-law rheological model to solve for non-Newtonian flows.
Definition parameters.h:328
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.
unsigned int frequency
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
std::string filename
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...
Definition parameters.h:87
unsigned int subdivision
Subdivisions of the results in the output.
Definition parameters.h:231
unsigned int log_frequency
Frequency of the log output to the terminal.
Definition parameters.h:225
enum Parameters::SimulationControl::OutputControl output_control
double output_time_frequency
Time frequency of the output (for time output control).
Definition parameters.h:211
static void declare_parameters(ParameterHandler &prm)
Declare the simulation control parameters.
unsigned int group_files
Number of vtu files written at an output step.
Definition parameters.h:234
unsigned int number_mesh_adaptation
Definition parameters.h:172
enum Parameters::SimulationControl::EndControl end_control
unsigned int output_iteration_frequency
Frequency of the output (for iteration output control).
Definition parameters.h:208
enum Parameters::SimulationControl::BDFStartupMethods bdf_startup_method
void parse_parameters(ParameterHandler &prm)
Parse the simulation control parameters.
std::vector< double > output_times_vector
Output at specific times (for time output control).
Definition parameters.h:214
unsigned int log_precision
Display precision of the log output to the terminal.
Definition parameters.h:228
std::vector< double > output_time_interval
Time window for file output (for both iteration and time output control).
Definition parameters.h:217
bool output_boundaries
Enable output of the boundaries in a separate VTU file.
Definition parameters.h:222
enum Parameters::SimulationControl::TimeSteppingMethod method
Stabilization - Defines parameters for an advanced control over the stabilization strategy used by th...
Definition parameters.h:988
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
enum Parameters::Stabilization::ScalarLimiters scalar_limiter
enum Parameters::Stabilization::NavierStokesStabilization stabilization
bool use_default_stabilization
Defines if default stabilization parameters should be used.
Definition parameters.h:990
SurfaceTensionParameters - Defines parameters for surface tension models.
Definition parameters.h:521
void parse_parameters(const ParameterHandler &prm, const Parameters::Dimensionality &dimensions)
Parse the parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
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.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
FluidIndicator fluid_with_phase_change
Indicates which fluids are with liquid-solid phase change.
RotatingFrameType rotating_frame_type