Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
parameters_multiphysics.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2021-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 parameters in the parameter namespace
6 * that pertain to multiphysics simulations
7 */
8
9#ifndef lethe_parameters_multiphysics_h
10#define lethe_parameters_multiphysics_h
11
12#include <core/parameters.h>
13
14#include <deal.II/base/parameter_handler.h>
15#include <deal.II/base/parsed_function.h>
16#include <deal.II/base/utilities.h>
17
18#include <memory>
19#include <numbers>
20#include <string>
21#include <vector>
22
23using namespace dealii;
24
25namespace Parameters
26{
27 /**
28 * @brief Different interface reinitialization method types:
29 * - none
30 * - projection_based_sharpening: projection-based interface sharpening
31 * - pde_based: PDE-based reinitialization
32 * - geometric: geometric redistanciation
33 */
41
42 /**
43 * @brief Different projection-based interface sharpening types:
44 * - constant: the sharpening threshold is the same throughout the
45 * simulation,
46 * - adaptive: the sharpening threshold is determined by binary search, to
47 * ensure mass conservation of the monitored phase
48 */
49 enum class SharpeningType : std::int8_t
50 {
53 };
54
55 /**
56 * @brief Different transformation function types for the signed distance:
57 * - tanh: hyperbolic tangent
58 * - piecewise_polynomial: 4th degree piecewise polynomial. The latter takes
59 * the following form:
60 *
61 * if \f$d < 0 \f$
62 * \f$\phi = 0.5 - 0.5(4d' + 6d'^2 + 4*d'^3 + d'^4)\f$
63 *
64 * else
65 * \f$\phi = 0.5 - 0.5(4d' - 6d'^2 + 4*d'^3 - d'^4)\f$
66 *
67 * with \f$d' = d/d_\mathrm{max}\f$, where \f$\phi\f$ is the phase
68 * fraction, \f$d\f$ the signed distance and \f$d_\mathrm{max}\f$ the
69 * maximum redistanciation distance. This transformation clamps the phase
70 * fraction to 0 or 1 when \f$d = \pm d_\mathrm{max}\f$.
71 */
77
78 /**
79 * @brief Different phase indicator filtering types:
80 * - none: no filter wil be applied on the calculated phase indicator
81 * - tanh: the tanh filter function will be applied to the phase indicator,
82 * a \f$\beta\f$ parameter influencing the interface definition must be
83 * defined
84 */
85 enum class FilterType : std::int8_t
86 {
90 };
91
92 enum class EpsilonSetMethod : std::int8_t
93 {
96 };
97
98 /**
99 * @brief Verbosity options for the epsilon parameter.
100 */
101 enum class EpsilonVerbosity : std::int8_t
102 {
103 /// Epsilon related information will not be displayed on terminal
105 /// Epsilon value will be displayed on terminal for every steady and
106 /// transient iteration.
108 };
109
110 /**
111 * @brief Types of waveguide port modes:
112 * - Transverse Electric (TE): the electric field is transverse to the
113 * direction of propagation.
114 * - Transverse Magnetic (TM): the magnetic field is transverse to the
115 * direction of propagation.
116 */
117 enum class WaveguideMode : std::int8_t
118 {
119 /// Transverse Electric mode
121 /// Transverse Magnetic mode
123 };
124
125 /**
126 * @brief Type of electromagnetic scaling to apply to the solution of the time-harmonic Maxwell solver after solving the linear system. This is relevant when the user wants to recover the physical solution in dimensional units from the dimensionless solution.
127 * - none: no scaling will be applied to the solution after solving the linear
128 * system, so the solution will be in dimensionless units.
129 * - electric_field: the solution will be scaled by the electric scaling
130 * factor given from the user input parameter. This factor needs to match the
131 * dimensionality of the problem.
132 * - magnetic_field: the solution will be scaled by the magnetic scaling
133 * factor given from the user input parameter. This factor needs to match the
134 * dimensionality of the problem.
135 * - power: the solution will be scaled by the power given from the user input
136 * parameter in waveguide inlets. This option is only relevant when there is
137 * at least one waveguide inlet in the problem. Note that it is the user's
138 * responsibility to ensure that if the problem also applies non-zero electric
139 * or magnetic field Dirichlet boundary conditions, those need to be scaled
140 * accordingly.
141 */
149
150 /**
151 * @brief Parameters for the time coupling strategy of the time-harmonic Maxwell solver with the other physics solvers.
152 * - none: the time-harmonic Maxwell solver will only be solved at the first
153 * iteration of the time integration and will not be solved in the subsequent
154 * iterations.
155 * - iteration: the time-harmonic Maxwell solver will be solved every N time
156 * iterations, where N is given by the user input parameter "coupling
157 * iteration".
158 * - time: the time-harmonic Maxwell solver will be solved when crossing a
159 * time multiple, e.g. every T seconds, where the time multiple is given by
160 * the user input parameter "coupling time".
161 * - threshold: the time-harmonic Maxwell solver will be solved when the
162 * maximum change in the material properties of the problem change beyond a
163 * certain threshold, where the threshold value is given by the user input
164 * parameter "coupling threshold".
165 */
173
174 /**
175 * @brief CahnHilliard_PhaseFilter - Defines the parameters for the phase filtration of CahnHilliard physics
176 */
178 {
179 // Type of filter
181
182 // \f$beta\f$ value for the tanh filter
183 double beta = 20;
184
185 // Type of verbosity for the phase filter
187
188 /**
189 * @brief Declare the Cahn-Hilliard phase-filter parameters.
190 *
191 * @param[in,out] prm Parameter handler object.
192 */
193 static void
194 declare_parameters(ParameterHandler &prm);
195
196 /**
197 * @brief Parse the Cahn-Hilliard phase-filter parameters.
198 *
199 * @param[in] prm Parameter handler object.
200 */
201 void
202 parse_parameters(ParameterHandler &prm);
203 };
204
205 /**
206 * @brief CLS_InterfaceSharpening - Defines the parameters for
207 * interface sharpening in the CLS solver.
208 */
210 {
211 // Interface sharpening parameters. The sharpening method and parameters are
212 // explained in the dam break CLS example:
213 // https://chaos-polymtl.github.io/lethe/examples/multiphysics/dam-break-CLS/dam-break-CLS.html
214
215 bool enable = false;
216
218
219 // Parameters for constant sharpening
220 double threshold = 0.5;
221
222 // Parameters for adaptive sharpening
225
226 // Other sharpening parameters
228
229 bool monitoring = false;
230
231 /// Conservation tolerance on the fluid monitored,
232 /// used with adaptive sharpening
233 double tolerance = 1e-6;
234
237
238 /**
239 * @brief Declare the CLS interface-sharpening parameters.
240 *
241 * @param[in,out] prm Parameter handler object.
242 */
243 static void
244 declare_parameters(ParameterHandler &prm);
245
246 /**
247 * @brief Parsesthe CLS interface-sharpening parameters.
248 *
249 * @param[in] prm Parameter handler object.
250 */
251 void
252 parse_parameters(ParameterHandler &prm);
253 };
254
255 /**
256 * @brief Parameters for the calculation of surface tension
257 * force in the CLS solver.
258 */
260 {
261 bool enable = false;
262
265
267
268 // Type of verbosity for the surface tension force calculation
270
271 // Enable marangoni effect
273
274 /**
275 * @brief Declare the CLS surface-tension force parameters.
276 *
277 * @param[in,out] prm The parameter handler object.
278 */
279 static void
280 declare_parameters(ParameterHandler &prm);
281
282 /**
283 * @brief Parse the CLS surface-tension force parameters.
284 *
285 * @param[in] prm The parameter handler object.
286 */
287 void
288 parse_parameters(ParameterHandler &prm);
289 };
290
291 /**
292 * @brief Parameters for the phase filtration
293 */
295 {
296 // Type of filter
298
299 // $$\beta$$ value for the tanh filter
300 double beta = 20;
301
302 // Type of verbosity for the phase filter
304
305 /**
306 * @brief Declare the CLS phase-filter parameters.
307 *
308 * @param[in,out] prm The parameter handler object.
309 */
310 static void
311 declare_parameters(ParameterHandler &prm);
312
313 /**
314 * @brief Parse the CLS phase-filter parameters.
315 *
316 * @param[in] prm The parameter handler object.
317 */
318 void
319 parse_parameters(ParameterHandler &prm);
320 };
321
322 /**
323 * @brief Parameters for PDE-based reinitialization of the interface
324 * used with the CLS solver.
325 */
327 {
328 /// Enables/Disables the PDE-based interface reinitialization.
329 bool enable = false;
330 /**
331 * Enables/Disables @p pvtu format outputs of the PDE-based interface
332 * reinitialization steps of the last simulated time step.
333 * The files are stored in a folder named
334 * @p pde-based-reinitialization-steps-output located inside the
335 * <tt>output path</tt> folder specified in the <tt>simulation control</tt>
336 * subsection.
337 * */
339 /// Constant multiplying the mesh-size in the evaluation of the diffusion
340 /// coefficient.
342 /// Constant representing the power to which the mesh-size is elevated in
343 /// the evaluation of the diffusion coefficient.
344 double diffusivity_power = 1.;
345 /// Constant factor used in the computation of the artificial time step of
346 /// the reinitialization equation
347 double dtau_factor = 0.25;
348 /// Steady-state criterion used for the artificial time-stepping scheme.
350 /// Maximum number of reinitialization steps.
351 double max_steps_number = 10000;
352
353 /**
354 * @brief Declare the parameters.
355 *
356 * @param[in,out] prm The ParameterHandler.
357 */
358 static void
359 declare_parameters(ParameterHandler &prm);
360
361 /**
362 * @brief Parse the parameters.
363 *
364 * @param[in] prm The ParameterHandler.
365 */
366 void
367 parse_parameters(ParameterHandler &prm);
368 };
369
370 /**
371 * @brief Parameters for geometric reinitialization of the interface
372 * used with the CLS solver.
373 */
375 {
376 /// Enables/Disables the geometric interface reinitialization.
377 bool enable = false;
378 /// Enables/Disables the output of the signed distance field
380 /// Maximum reinitialization distance value
382 /// Transformation type transforming the signed distance to a phase
383 /// indicator
386 /// Interface thickness for the tanh transformation
387 double tanh_thickness = 1.;
388
389 /**
390 * @brief Declare the parameters.
391 *
392 * @param[in,out] prm The ParameterHandler.
393 */
394 static void
395 declare_parameters(ParameterHandler &prm);
396
397 /**
398 * @brief Parse the parameters.
399 *
400 * @param[in] prm The ParameterHandler.
401 */
402 void
403 parse_parameters(ParameterHandler &prm);
404 };
405
406 /**
407 * @brief Parameters for interface reinitialization methods
408 * used within the CLS solver. It stores the parameters for the three
409 * available methods (projection-, PDE-, and geometric based
410 * reinitialization).
411 */
413 {
414 /// Reinitialization method type
417
418 /// Reinitialization frequency at every \f$x\f$ time steps the CLS phase
419 /// fraction field will be regularized
420 int frequency = 10;
421
422 /// Type of verbosity of the PDE-based interface reinitialization solver.
424
425 /// Interface sharpening parameters
427
428 /// PDE-based interface reinitialization parameters
431
432 /// Geometric interface reinitialization parameters
435
436 /**
437 * @brief Declare the parameters.
438 *
439 * @param[in,out] prm The ParameterHandler.
440 */
441 void
442 declare_parameters(ParameterHandler &prm) const;
443
444 /**
445 * @brief Parse the parameters.
446 *
447 * @param[in] prm The ParameterHandler.
448 */
449 void
450 parse_parameters(ParameterHandler &prm);
451 };
452
453 /**
454 * @brief CLS - Defines the parameters for free surface simulations
455 * using the CLS method.
456 * Has to be declared before member creation in Multiphysics structure.
457 */
458 struct CLS
459 {
463
466
467 // artificial diffusivity (diffusion coefficient) (in L^2/s) added to the
468 // CLS transport equation. This parameter is zero by default, and can be
469 // increased to improve the wetting of the phases in the vicinity of
470 // boundaries
471 double diffusivity = 0;
472
473 bool compressible = false;
474
475 /**
476 * @brief Declare the CLS parameters.
477 *
478 * @param[in,out] prm The parameter handler object.
479 */
480 void
481 declare_parameters(ParameterHandler &prm) const;
482
483 /**
484 * @brief Parse the CLS parameters.
485 *
486 * @param[in] prm The parameter handler object.
487 */
488 void
489 parse_parameters(ParameterHandler &prm);
490 };
491
493 {
494 // Smoothing parameter \f$\xi\f$ in the Cahn-Hilliard equations (potential
495 // equation)
497
498 // Epsilon set strategy (automatic|manual)
501
502 // Epsilon verbosity
504
505 // Epsilon value in the Cahn-Hilliard equations
506 double epsilon = 1.0;
507
508 // Phase filtration parameters
510
511 /**
512 * @brief Declare the Cahn-Hilliard parameters.
513 *
514 * @param[in,out] prm The parameter handler object.
515 */
516 void
517 declare_parameters(ParameterHandler &prm) const;
518
519 /**
520 * @brief Parse the Cahn-Hilliard parameters.
521 *
522 * @param[in] prm The parameter handler object.
523 * @param[in] dimensions Dimensionality used to interpret the parameter
524 * units.
525 */
526 void
527 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
528 };
529
530 /**
531 * @brief Parameters of the phase-space evolution of the QMOM moments, which
532 * is delegated to QMOMKit.
533 */
535 {
536 /// Enable the adaptive number of quadrature nodes
538
539 /**
540 * @brief Declare the "phase evolution" subsection.
541 *
542 * @param[in,out] prm Parameter handler.
543 */
544 void
545 declare_parameters(ParameterHandler &prm) const;
546
547 /**
548 * @brief Parse the "phase evolution" subsection.
549 *
550 * @param[in] prm Parameter handler.
551 */
552 void
553 parse_parameters(ParameterHandler &prm);
554 };
555
556 /**
557 * @brief Operator splitting scheme between the physical-space transport (T)
558 * and the phase-space evolution (P) of the QMOM fields:
559 * - lie: T then P over the whole time step (first order);
560 * - strang: P over half a time step, T, then P over half a time step
561 * (second order).
562 */
563 enum class QMOMSplittingScheme : std::int8_t
564 {
567 };
568
569 /**
570 * @brief Process simulated with the QMOM physics. A process other than
571 * generic imposes the scalars and the number of moments.
572 */
573 enum class QMOMProcess : std::int8_t
574 {
575 generic,
577 };
578
579 /**
580 * @brief Process parameters of the lipid nanoparticle (LNP) production
581 * simulated with the QMOM physics: operating conditions, properties of the
582 * aqueous and organic phases and shape factor of the particles. All of them
583 * are in SI units.
584 */
586 {
587 /* Operating conditions */
588 /// Operating temperature [K]
590 /// Ratio of the aqueous phase flow rate to the organic phase flow rate [-]
591 double flow_rate_ratio = 3.;
592 /// Total flow rate of the aqueous and organic phases [m^3/s]
593 double total_flow_rate = 2e-7;
594 /// Mixing time scale of the aqueous and organic phases [s]
595 double mixing_time_scale = 0.;
596 /// Initial lipid concentration in the organic phase [mol/m^3]
598 /// Ion concentration in the mixture [mol/m^3]
600
601 /* Aqueous phase */
602 /// Density of the aqueous phase [kg/m^3]
603 double density_aqueous = 997.;
604 /// Molar mass of the aqueous phase [kg/mol]
605 double molar_mass_aqueous = 0.018015;
606 /// Mole fraction solubility of the lipid in the pure aqueous phase [-]
608 /// Relative permittivity of the aqueous phase [-]
609 double permittivity_aqueous = 78.2;
610
611 /* Organic phase */
612 /// Density of the organic phase [kg/m^3]
613 double density_organic = 789.;
614 /// Molar mass of the organic phase [kg/mol]
615 double molar_mass_organic = 0.046069;
616 /// Mole fraction solubility of the lipid in the pure organic phase [-]
618 /// Relative permittivity of the organic phase [-]
619 double permittivity_organic = 24.3;
620
621 /* Mixture and particles */
622 /// Dynamic viscosity of the aqueous and organic mixture [Pa s]
623 double viscosity_mixture = 2e-3;
624 /// Volume shape factor of the particles, pi/6 for spheres [-]
625 double shape_factor = std::numbers::pi / 6.;
626
627 /**
628 * @brief Declare the "lipid nanoparticle production" subsection.
629 *
630 * @param[in,out] prm Parameter handler.
631 */
632 void
633 declare_parameters(ParameterHandler &prm) const;
634
635 /**
636 * @brief Parse the "lipid nanoparticle production" subsection.
637 *
638 * @param[in] prm Parameter handler.
639 */
640 void
641 parse_parameters(ParameterHandler &prm);
642 };
643
644 /**
645 * @brief Physical constants used by the QMOM physics, in SI units. Their
646 * default values are the exact values of the 2019 redefinition of the SI
647 * base units and the CODATA 2022 value of the vacuum permittivity.
648 */
650 {
651 /// Boltzmann constant [J/K]
652 double boltzmann_constant = 1.380649e-23;
653 /// Avogadro number [1/mol]
654 double avogadro_number = 6.02214076e23;
655 /// Elementary charge [C]
656 double elementary_charge = 1.602176634e-19;
657 /// Vacuum permittivity [F/m]
658 double permittivity_vacuum = 8.8541878188e-12;
659
660 /**
661 * @brief Declare the "physical constants" subsection.
662 *
663 * @param[in,out] prm Parameter handler.
664 */
665 void
666 declare_parameters(ParameterHandler &prm) const;
667
668 /**
669 * @brief Parse the "physical constants" subsection.
670 *
671 * @param[in] prm Parameter handler.
672 */
673 void
674 parse_parameters(ParameterHandler &prm);
675 };
676
677 /**
678 * @brief Family of the particle size distribution from which the moments of
679 * the QMOM physics are computed. The raw moments of each family are computed
680 * analytically by QMOMKit:
681 * - none: no particles, all the moments are zero;
682 * - normal: mean and standard deviation;
683 * - lognormal: mean and standard deviation of the logarithm of the size;
684 * - gamma: shape and scale;
685 * - weibull: shape and scale;
686 * - beta: shape parameters alpha and beta, on the interval [0, 1];
687 * - chi: number of degrees of freedom;
688 * - chi_squared: number of degrees of freedom.
689 */
701
702 /**
703 * @brief Number of parameters of a particle size distribution family, not
704 * counting the number density.
705 *
706 * @param[in] distribution_type Family of the distribution.
707 *
708 * @return Number of parameters of the family.
709 */
710 unsigned int
712 const QMOMDistributionType distribution_type);
713
714 /**
715 * @brief Functions of space and time prescribing the fields of the QMOM
716 * physics. They are used for the initial conditions, the Dirichlet boundary
717 * conditions, the analytical solution and the source terms.
718 *
719 * The scalars are given as a list of expressions, one per scalar, in the
720 * "scalars" subsection. The moments are not given one by one: they are the
721 * raw moments of a particle size distribution, defined in the "distribution"
722 * subsection by its family and by a list of expressions whose first entry is
723 * the number density, in particles per m^3, followed by the parameters of
724 * the family.
725 *
726 * The number of scalars is not known when the parameters are declared. The
727 * number of components of the scalars function is therefore the number of
728 * expressions given, and the QMOM physics verifies that it matches the
729 * number of scalars once it is known. The scalars function is ignored if
730 * the number of scalars is 0.
731 *
732 * @tparam dim Number of spatial dimensions.
733 */
734 template <int dim>
736 {
737 /// Scalars, one component per scalar
738 std::shared_ptr<Functions::ParsedFunction<dim>> scalars;
739
740 /// Family of the particle size distribution
742
743 /// Number density, in particles per m^3, followed by the parameters of
744 /// the particle size distribution. Ignored if the distribution type is
745 /// none.
746 std::shared_ptr<Functions::ParsedFunction<dim>> distribution;
747
748 /**
749 * @brief Declare the "scalars" and "distribution" subsections in the
750 * current subsection. All the functions are zero and the distribution type
751 * is none by default.
752 *
753 * @param[in,out] prm Parameter handler.
754 */
755 static void
756 declare_parameters(ParameterHandler &prm);
757
758 /**
759 * @brief Parse the "scalars" and "distribution" subsections of the
760 * current subsection. The number of components of each function is the
761 * number of expressions separated by semicolons. The number of expressions
762 * of the distribution must be one (the number density) plus the number of
763 * parameters of its family.
764 *
765 * @param[in,out] prm Parameter handler.
766 */
767 void
768 parse_parameters(ParameterHandler &prm);
769
770 /**
771 * @brief Set the time of all the functions.
772 *
773 * @param[in] time New time.
774 */
775 void
776 set_time(const double time);
777 };
778
779 /**
780 * @brief Parameters of the quadrature method of moments (QMOM) physics,
781 * declared in the "QMOM" subsection.
782 */
783 struct QMOM
784 {
785 /// Process simulated, which may impose the scalars and the number of
786 /// moments
788
789 /// Number of scalars transported together with the moments
790 unsigned int number_of_scalars = 0;
791
792 /// Names of the scalars, used for the output. scalar_0, scalar_1, ... if
793 /// they are not given in the parameter file.
794 std::vector<std::string> scalar_names;
795
796 /// Number of transported raw moments M_0 to M_{number_of_moments - 1}
797 unsigned int number_of_moments = 4;
798
799 /// Number of nodes of the quadrature that uses all the transported
800 /// moments. N nodes are defined by 2N moments, so an odd number of moments
801 /// requires one more node. It is computed from number_of_moments when the
802 /// parameters are parsed.
803 unsigned int number_of_nodes = (number_of_moments + 1) / 2;
804
805 /// Operator splitting scheme between the physical-space transport and
806 /// the phase-space evolution
808
809 /// Include the nucleation source
810 bool enable_nucleation = false;
811 /// Include the coalescence source
812 bool enable_coalescence = false;
813 /// Include the growth source
814 bool enable_growth = false;
815
816 /// Phase-space evolution ("phase evolution" subsection)
818
819 /// Process parameters of the lipid nanoparticle production ("lipid
820 /// nanoparticle production" subsection)
822
823 /// Physical constants ("physical constants" subsection)
825
826 /**
827 * @brief Declare the "QMOM" subsection.
828 *
829 * @param[in,out] prm Parameter handler.
830 */
831 void
832 declare_parameters(ParameterHandler &prm) const;
833
834 /**
835 * @brief Parse the "QMOM" subsection.
836 *
837 * @param[in] prm Parameter handler.
838 */
839 void
840 parse_parameters(ParameterHandler &prm);
841 };
842
843
844 /**
845 * @brief TimeHarmonicMaxwell - Defines the parameters for
846 * time-harmonic Maxwell simulations.
847 */
848 template <int dim>
850 {
851 // Integration method for the time coupling of the time-harmonic Maxwell
852 // solver
855
856 // Coupling parameter for the time coupling strategy. If the time coupling
857 // strategy is based on the iteration count, this parameter represents the
858 // number of time iterations between two consecutive resolutions of the
859 // electromagnetic fields.
860 unsigned int coupling_iteration = 1;
861
862 // If the time coupling strategy is based on time, this parameter represents
863 // the real time interval between two consecutive resolutions of the
864 // electromagnetic fields.
865 double coupling_time = 1;
866
867 // If the time coupling strategy is based on a threshold, this parameter
868 // represents the change in the electromagnetic properties of the medium
869 // (i.e., permittivity, permeability or conductivity) that triggers the
870 // recomputation of the electromagnetic fields.
871 double coupling_threshold = 0.1;
872
873 // We use vectors in the following to be able to define multiple waveguides
874 // in the same simulation.
876
877 // Frequency of the electromagnetic wave (in Hz)
879
880 // Boundary ids where waveguide ports are applied so the port can be linked
881 // to the right boundary
882 std::vector<int> waveguide_boundary_ids;
883
884 // Waveguide power (in W, time-averaged) to be able to link the amplitude
885 // of the electromagnetic wave to the power injected in the waveguide
886 std::vector<double> waveguide_power;
887
888 // Electric field amplitude used for the normalization of the solution (in
889 // V/m)
891
892 // Magnetic field amplitude used for the normalization of the solution (in
893 // A/m)
895
896 // Type of scaling to apply to the solution after solving the linear system
899
900 // Waveguide mode to simulate (TE|TM)
901 std::vector<Parameters::WaveguideMode> waveguide_mode;
902
903 // Waveguide modes order (m,n) to simulate
904 std::vector<unsigned int> mode_order_m;
905 std::vector<unsigned int> mode_order_n;
906
907 // Waveguide corners locations
908 std::vector<std::array<Tensor<1, dim>, Utilities::fixed_power<2>(dim - 1)>>
910
911 /**
912 * @brief Declare the time-harmonic Maxwell parameters.
913 *
914 * @param[in,out] prm The parameter handler object.
915 */
916 void
917 declare_parameters(ParameterHandler &prm) const;
918
919 /**
920 * @brief Parse the time-harmonic Maxwell parameters.
921 *
922 * @param[in] prm The parameter handler object.
923 * @param[in] dimensions Dimensionality used to interpret the parameter
924 * units.
925 */
926 void
927 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
928 };
929
930 /**
931 * @brief Multiphysics - the parameters for multiphysics simulations
932 * and handles sub-physics parameters.
933 */
934 template <int dim>
936 {
937 bool fluid_dynamics = true;
938 bool heat_transfer = false;
939 bool tracer = false;
940 bool CLS = false;
941 bool cahn_hilliard = false;
942 bool electromagnetics = false;
944 bool qmom = false;
945
946 // subparameters for heat_transfer
949 bool microwave_heating = false;
950
955
956 /**
957 * @brief Declare the multiphysics parameters.
958 *
959 * @param[in,out] prm The parameter handler object.
960 */
961 void
962 declare_parameters(ParameterHandler &prm) const;
963
964 /**
965 * @brief Parse the multiphysics parameters.
966 *
967 * @param[in] prm The parameter handler object.
968 * @param[in] dimensions Dimensionality used to interpret the parameter
969 * units.
970 */
971 void
972 parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions);
973 };
974} // namespace Parameters
975#endif
Class used to rescale physical properties for cases where the main dimensions of the problems (Length...
T clip(const T &n, const T &lower, const T &upper)
Clip a property between a lower and a higher value.
Definition utilities.h:361
SharpeningType
Different projection-based interface sharpening types:
EpsilonVerbosity
Verbosity options for the epsilon parameter.
@ quiet
Epsilon related information will not be displayed on terminal.
RedistanciationTransformationType
Different transformation function types for the signed distance:
WaveguideMode
Types of waveguide port modes:
@ TE
Transverse Electric mode.
@ TM
Transverse Magnetic mode.
unsigned int get_number_of_distribution_parameters(const QMOMDistributionType distribution_type)
Number of parameters of a particle size distribution family, not counting the number density.
TimeHarmonicMaxwellCouplingStrategy
Parameters for the time coupling strategy of the time-harmonic Maxwell solver with the other physics ...
QMOMProcess
Process simulated with the QMOM physics. A process other than generic imposes the scalars and the num...
ReinitializationMethodType
Different interface reinitialization method types:
QMOMDistributionType
Family of the particle size distribution from which the moments of the QMOM physics are computed....
ElectromagneticScalingType
Type of electromagnetic scaling to apply to the solution of the time-harmonic Maxwell solver after so...
QMOMSplittingScheme
Operator splitting scheme between the physical-space transport (T) and the phase-space evolution (P) ...
FluidIndicator
Class to account for different fluid indicators. This is used for multiphase simulations in PostProce...
Definition parameters.h:75
FilterType
Different phase indicator filtering types:
Parameters for geometric reinitialization of the interface used with the CLS solver.
double max_reinitialization_distance
Maximum reinitialization distance value.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
bool enable
Enables/Disables the geometric interface reinitialization.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
double tanh_thickness
Interface thickness for the tanh transformation.
bool output_signed_distance
Enables/Disables the output of the signed distance field.
CLS_InterfaceSharpening - Defines the parameters for interface sharpening in the CLS solver.
void parse_parameters(ParameterHandler &prm)
Parsesthe CLS interface-sharpening parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the CLS interface-sharpening parameters.
Parameters for PDE-based reinitialization of the interface used with the CLS solver.
static void declare_parameters(ParameterHandler &prm)
Declare the parameters.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
bool enable
Enables/Disables the PDE-based interface reinitialization.
double steady_state_criterion
Steady-state criterion used for the artificial time-stepping scheme.
double max_steps_number
Maximum number of reinitialization steps.
Parameters for the phase filtration.
void parse_parameters(ParameterHandler &prm)
Parse the CLS phase-filter parameters.
static void declare_parameters(ParameterHandler &prm)
Declare the CLS phase-filter parameters.
Parameters for interface reinitialization methods used within the CLS solver. It stores the parameter...
Parameters::CLS_InterfaceSharpening sharpening
Interface sharpening parameters.
Parameters::CLS_PDEBasedInterfaceReinitialization pde_based_interface_reinitialization
PDE-based interface reinitialization parameters.
Parameters::Verbosity verbosity
Type of verbosity of the PDE-based interface reinitialization solver.
void declare_parameters(ParameterHandler &prm) const
Declare the parameters.
Parameters::ReinitializationMethodType reinitialization_method_type
Reinitialization method type.
void parse_parameters(ParameterHandler &prm)
Parse the parameters.
Parameters::CLS_GeometricInterfaceReinitialization geometric_interface_reinitialization
Geometric interface reinitialization parameters.
Parameters for the calculation of surface tension force in the CLS solver.
static void declare_parameters(ParameterHandler &prm)
Declare the CLS surface-tension force parameters.
void parse_parameters(ParameterHandler &prm)
Parse the CLS surface-tension force parameters.
CLS - Defines the parameters for free surface simulations using the CLS method. Has to be declared be...
Parameters::FluidIndicator viscous_dissipative_fluid
Parameters::CLS_SurfaceTensionForce surface_tension_force
void declare_parameters(ParameterHandler &prm) const
Declare the CLS parameters.
void parse_parameters(ParameterHandler &prm)
Parse the CLS parameters.
Parameters::CLS_PhaseFilter phase_filter
Parameters::CLS_ReinitializationMethod reinitialization_method
CahnHilliard_PhaseFilter - Defines the parameters for the phase filtration of CahnHilliard physics.
static void declare_parameters(ParameterHandler &prm)
Declare the Cahn-Hilliard phase-filter parameters.
void parse_parameters(ParameterHandler &prm)
Parse the Cahn-Hilliard phase-filter parameters.
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the Cahn-Hilliard parameters.
void declare_parameters(ParameterHandler &prm) const
Declare the Cahn-Hilliard parameters.
Parameters::EpsilonVerbosity epsilon_verbosity
Parameters::EpsilonSetMethod epsilon_set_method
Parameters::CahnHilliard_PhaseFilter cahn_hilliard_phase_filter
Multiphysics - the parameters for multiphysics simulations and handles sub-physics parameters.
Parameters::CahnHilliard cahn_hilliard_parameters
void declare_parameters(ParameterHandler &prm) const
Declare the multiphysics parameters.
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the multiphysics parameters.
Parameters::TimeHarmonicMaxwell< dim > time_harmonic_maxwell_parameters
Functions of space and time prescribing the fields of the QMOM physics. They are used for the initial...
void parse_parameters(ParameterHandler &prm)
Parse the "scalars" and "distribution" subsections of the current subsection. The number of component...
std::shared_ptr< Functions::ParsedFunction< dim > > scalars
Scalars, one component per scalar.
void set_time(const double time)
Set the time of all the functions.
std::shared_ptr< Functions::ParsedFunction< dim > > distribution
QMOMDistributionType distribution_type
Family of the particle size distribution.
static void declare_parameters(ParameterHandler &prm)
Declare the "scalars" and "distribution" subsections in the current subsection. All the functions are...
Process parameters of the lipid nanoparticle (LNP) production simulated with the QMOM physics: operat...
double molar_mass_aqueous
Molar mass of the aqueous phase [kg/mol].
double density_organic
Density of the organic phase [kg/m^3].
double mole_fraction_solubility_aqueous
Mole fraction solubility of the lipid in the pure aqueous phase [-].
double initial_concentration_organic
Initial lipid concentration in the organic phase [mol/m^3].
double permittivity_aqueous
Relative permittivity of the aqueous phase [-].
double mole_fraction_solubility_organic
Mole fraction solubility of the lipid in the pure organic phase [-].
double total_flow_rate
Total flow rate of the aqueous and organic phases [m^3/s].
double ion_concentration_mixture
Ion concentration in the mixture [mol/m^3].
void parse_parameters(ParameterHandler &prm)
Parse the "lipid nanoparticle production" subsection.
double molar_mass_organic
Molar mass of the organic phase [kg/mol].
double density_aqueous
Density of the aqueous phase [kg/m^3].
double operating_temperature
Operating temperature [K].
double viscosity_mixture
Dynamic viscosity of the aqueous and organic mixture [Pa s].
double shape_factor
Volume shape factor of the particles, pi/6 for spheres [-].
void declare_parameters(ParameterHandler &prm) const
Declare the "lipid nanoparticle production" subsection.
double flow_rate_ratio
Ratio of the aqueous phase flow rate to the organic phase flow rate [-].
double mixing_time_scale
Mixing time scale of the aqueous and organic phases [s].
double permittivity_organic
Relative permittivity of the organic phase [-].
Parameters of the phase-space evolution of the QMOM moments, which is delegated to QMOMKit.
void parse_parameters(ParameterHandler &prm)
Parse the "phase evolution" subsection.
void declare_parameters(ParameterHandler &prm) const
Declare the "phase evolution" subsection.
bool enable_adaptive_node_count
Enable the adaptive number of quadrature nodes.
Physical constants used by the QMOM physics, in SI units. Their default values are the exact values o...
double elementary_charge
Elementary charge [C].
double boltzmann_constant
Boltzmann constant [J/K].
double avogadro_number
Avogadro number [1/mol].
void parse_parameters(ParameterHandler &prm)
Parse the "physical constants" subsection.
double permittivity_vacuum
Vacuum permittivity [F/m].
void declare_parameters(ParameterHandler &prm) const
Declare the "physical constants" subsection.
Parameters of the quadrature method of moments (QMOM) physics, declared in the "QMOM" subsection.
std::vector< std::string > scalar_names
bool enable_growth
Include the growth source.
unsigned int number_of_scalars
Number of scalars transported together with the moments.
QMOMLipidNanoparticleProduction lipid_nanoparticle_production
void declare_parameters(ParameterHandler &prm) const
Declare the "QMOM" subsection.
QMOMPhysicalConstants physical_constants
Physical constants ("physical constants" subsection).
bool enable_nucleation
Include the nucleation source.
QMOMSplittingScheme splitting_scheme
bool enable_coalescence
Include the coalescence source.
unsigned int number_of_moments
Number of transported raw moments M_0 to M_{number_of_moments - 1}.
void parse_parameters(ParameterHandler &prm)
Parse the "QMOM" subsection.
QMOMPhaseEvolution phase_evolution
Phase-space evolution ("phase evolution" subsection).
TimeHarmonicMaxwell - Defines the parameters for time-harmonic Maxwell simulations.
std::vector< unsigned int > mode_order_n
std::vector< std::array< Tensor< 1, dim >, Utilities::fixed_power< 2 >(dim - 1)> > waveguide_corners
std::vector< Parameters::WaveguideMode > waveguide_mode
Parameters::TimeHarmonicMaxwellCouplingStrategy time_coupling_strategy
std::vector< unsigned int > mode_order_m
void declare_parameters(ParameterHandler &prm) const
Declare the time-harmonic Maxwell parameters.
void parse_parameters(ParameterHandler &prm, const Dimensionality &dimensions)
Parse the time-harmonic Maxwell parameters.
Parameters::ElectromagneticScalingType electromagnetic_scaling_type