Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
initial_conditions.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#ifndef lethe_initial_conditions_h
5#define lethe_initial_conditions_h
6
8
9#include <deal.II/base/parameter_acceptor.h>
10#include <deal.II/base/parameter_handler.h>
11#include <deal.II/base/parsed_function.h>
12
13using namespace dealii;
14
15namespace Parameters
16{
17 // Type of initial conditions for fluid dynamics
26
27 // Type of initial conditions for CLS
29 {
30 none, // Uses the function as is
31 diffusive, // Uses a L2 projection with a smoothing coefficient
32 geometric // Uses geometric redistanciation
33 };
34
35 struct Ramp_n
36 {
37 double n_init = 1.0;
38 int n_iter = 0;
39 double alpha = 0.5;
40
41 /**
42 * @brief Declares parameters for the ramped power-law exponent.
43 *
44 * @param[in,out] prm The parameter handler object.
45 */
46 void
47 declare_parameters(ParameterHandler &prm);
48
49 /**
50 * @brief Parses parameters for the ramped power-law exponent.
51 *
52 * @param[in] prm The parameter handler object.
53 */
54 void
55 parse_parameters(ParameterHandler &prm);
56 };
57
59 {
61 int n_iter = 0;
62 double alpha = 0.5;
63
64 /**
65 * @brief Declares parameters for the ramped kinematic viscosity.
66 *
67 * @param[in,out] prm The parameter handler object.
68 */
69 void
70 declare_parameters(ParameterHandler &prm);
71
72 /**
73 * @brief Parses parameters for the ramped kinematic viscosity.
74 *
75 * @param[in] prm The parameter handler object.
76 */
77 void
78 parse_parameters(ParameterHandler &prm);
79 };
80
81 struct Ramp
82 {
85
86 /**
87 * @brief Declares parameters for all ramp functions.
88 *
89 * @param[in,out] prm The parameter handler object.
90 */
91 void
92 declare_parameters(ParameterHandler &prm);
93
94 /**
95 * @brief Parses parameters for all ramp functions.
96 *
97 * @param[in] prm The parameter handler object.
98 */
99 void
100 parse_parameters(ParameterHandler &prm);
101 };
102
103 template <int dim>
105 {
106 public:
108 : uvwp(dim + 1)
109 {}
110
113
114 // Velocity components
115 Functions::ParsedFunction<dim> uvwp;
116
117 // Artificial kinematic viscosity
119
120 // Temperature
121 Functions::ParsedFunction<dim> temperature;
122
123 // Tracer
124 Functions::ParsedFunction<dim> tracer;
125
126 // CLS
127 Functions::ParsedFunction<dim> CLS;
128
129
133
134 // QMOM: scalars and particle size distribution of the moments
136
137 // Non-Newtonian
139
140 // Cahn-Hilliard
141 Functions::ParsedFunction<dim> cahn_hilliard =
142 Functions::ParsedFunction<dim>(2);
143
144 // Time-Harmonic Maxwell
145 Functions::ParsedFunction<dim> electromagnetics =
146 Functions::ParsedFunction<dim>(4 * dim);
147
148 // Path to the checkpointed average velocity profile
149 std::string average_velocity_folder = "./";
150 std::string average_velocity_file_name = "restart";
151
152 /**
153 * @brief Declares initial-condition parameters.
154 *
155 * @param[in,out] prm The parameter handler object.
156 */
157 void
158 declare_parameters(ParameterHandler &prm);
159
160 /**
161 * @brief Parses initial-condition parameters.
162 *
163 * @param[in] prm The parameter handler object.
164 */
165 void
166 parse_parameters(ParameterHandler &prm);
167 };
168} // namespace Parameters
169
170#endif
CLSInitialConditionType cls_initial_condition_smoothing
FluidDynamicsInitialConditionType type
Functions::ParsedFunction< dim > electromagnetics
Functions::ParsedFunction< dim > temperature
Functions::ParsedFunction< dim > uvwp
void declare_parameters(ParameterHandler &prm)
Declares initial-condition parameters.
Functions::ParsedFunction< dim > CLS
void parse_parameters(ParameterHandler &prm)
Parses initial-condition parameters.
Functions::ParsedFunction< dim > tracer
Functions::ParsedFunction< dim > cahn_hilliard
Functions of space and time prescribing the fields of the QMOM physics. They are used for the initial...
void declare_parameters(ParameterHandler &prm)
Declares parameters for the ramped power-law exponent.
void parse_parameters(ParameterHandler &prm)
Parses parameters for the ramped power-law exponent.
void parse_parameters(ParameterHandler &prm)
Parses parameters for the ramped kinematic viscosity.
void declare_parameters(ParameterHandler &prm)
Declares parameters for the ramped kinematic viscosity.
Ramp_viscosity ramp_viscosity
void declare_parameters(ParameterHandler &prm)
Declares parameters for all ramp functions.
void parse_parameters(ParameterHandler &prm)
Parses parameters for all ramp functions.