ConservativeVariablesFunction< dim, number > Class Template Reference
|
Developer Documentation
|
#include <boundary_condition_functions.hpp>
Classes | |
| struct | RampUpParameters |
Public Member Functions | |
| ConservativeVariablesFunction (const number initial_time, const std::shared_ptr< dealii::Function< dim, number > > density, const std::shared_ptr< dealii::Function< dim, number > > velocity, const std::shared_ptr< dealii::Function< dim, number > > inner_energy, const std::shared_ptr< dealii::Function< dim, number > > mass_fractions) | |
| ConservativeVariablesFunction (const number initial_time, const std::shared_ptr< dealii::Function< dim, number > > density, const std::shared_ptr< dealii::Function< dim, number > > velocity, const std::shared_ptr< dealii::Function< dim, number > > inner_energy) | |
| ConservativeVariablesFunction (const number initial_time, const std::string &density_function_string, const std::string &velocity_function_string, const std::string &inner_energy_function_string, const std::string &mass_fraction_functions_string, const unsigned n_mass_fractions) | |
| ConservativeVariablesFunction (const number initial_time, const std::string &density_function_string, const std::string &velocity_function_string, const std::string &inner_energy_function_string) | |
| void | set_velocity_ramp_up (const number duration, const RampUpType type) |
| void | set_time (const number new_time) override |
| number | value (const dealii::Point< dim, number > &loc, const unsigned int component) const override |
| Evaluates the conservative variable value for a given component at a specified location. | |
Private Attributes | |
| const std::shared_ptr< dealii::Function< dim, number > > | density |
| Function describing the density field. | |
| const std::shared_ptr< dealii::Function< dim, number > > | velocity |
| Vectorial function describing the velocity field. | |
| const std::shared_ptr< dealii::Function< dim, number > > | inner_energy |
| Function describing the field of the specific total energy. | |
| const std::shared_ptr< dealii::Function< dim, number > > | mass_fractions |
| Function describing the mass fractions for multi-component flow cases. | |
| RampUpParameters | velocity_ramp_up |
| Ramp-up parameters for the velocity function. | |
Detailed Description
class MeltPoolDG::CompressibleFlow::ConservativeVariablesFunction< dim, number >
A function class that computes the conservative variable values for the compressible Navier–Stokes equations based on provided functions for the primitive variables: density, velocity, specific inner energy and species mass fractions.
Optionally, a time-dependent ramp-up can be applied to the velocity.
Constructor & Destructor Documentation
◆ ConservativeVariablesFunction() [1/4]
| MeltPoolDG::CompressibleFlow::ConservativeVariablesFunction< dim, number >::ConservativeVariablesFunction | ( | const number | initial_time, |
| const std::shared_ptr< dealii::Function< dim, number > > | density, | ||
| const std::shared_ptr< dealii::Function< dim, number > > | velocity, | ||
| const std::shared_ptr< dealii::Function< dim, number > > | inner_energy, | ||
| const std::shared_ptr< dealii::Function< dim, number > > | mass_fractions | ||
| ) |
Constructor, stores the passed arguments internally.
- Parameters
-
initial_time Initial time used to initialize the function. density Function representing the density field. velocity Function representing the velocity field. inner_energy Function representing the specific inner energy field. mass_fractions Function representing the species mass fractions.
◆ ConservativeVariablesFunction() [2/4]
| MeltPoolDG::CompressibleFlow::ConservativeVariablesFunction< dim, number >::ConservativeVariablesFunction | ( | const number | initial_time, |
| const std::shared_ptr< dealii::Function< dim, number > > | density, | ||
| const std::shared_ptr< dealii::Function< dim, number > > | velocity, | ||
| const std::shared_ptr< dealii::Function< dim, number > > | inner_energy | ||
| ) |
As above, stores the passed arguments internally but for single-species flow cases.
- Parameters
-
initial_time Initial time used to initialize the function. density Function representing the density field. velocity Function representing the velocity field. inner_energy Function representing the specific inner energy field.
◆ ConservativeVariablesFunction() [3/4]
| MeltPoolDG::CompressibleFlow::ConservativeVariablesFunction< dim, number >::ConservativeVariablesFunction | ( | const number | initial_time, |
| const std::string & | density_function_string, | ||
| const std::string & | velocity_function_string, | ||
| const std::string & | inner_energy_function_string, | ||
| const std::string & | mass_fraction_functions_string, | ||
| const unsigned | n_mass_fractions | ||
| ) |
Constructor for the multi-component case, where the individual primitive variable functions are passed as strings and initialized as FunctionParser objects within the constructor.
- Parameters
-
initial_time Initial time used to initialize the function. density_function_string String representing the function for the density field. velocity_function_string String representing the function for the velocity field. inner_energy_function_string String representing the function for the specific inner energy field. mass_fraction_functions_string String representing the functions for the mass fractions. The mass fractions should be provided as a semicolon-separated list of functions. n_mass_fractions The total number of mass fractions in the simulation.
◆ ConservativeVariablesFunction() [4/4]
| MeltPoolDG::CompressibleFlow::ConservativeVariablesFunction< dim, number >::ConservativeVariablesFunction | ( | const number | initial_time, |
| const std::string & | density_function_string, | ||
| const std::string & | velocity_function_string, | ||
| const std::string & | inner_energy_function_string | ||
| ) |
Constructor for single-species flow cases. As above the individual primitive variable functions are passed as strings and initialized as FunctionParser objects within the constructor.
- Parameters
-
initial_time Initial time used to initialize the function. density_function_string String representing the function for the density field. velocity_function_string String representing the function for the velocity field. inner_energy_function_string String representing the function for the specific inner energy field.
Member Function Documentation
◆ set_time()
|
override |
Set the time for the function.
- Parameters
-
new_time Time to be set.
◆ set_velocity_ramp_up()
|
inline |
Sets the velocity ramp-up parameters. If this function is never called or if a ramp-up duration of zero is specified, no ramp-up is applied and the returned values correspond directly to the fully developed velocity field.
- Parameters
-
duration The duration of the ramp-up. type The type of ramp-up function.
◆ value()
|
override |
Evaluates the conservative variable value for a given component at a specified location.
This function returns the value of the conservative variable corresponding to the specified component at the given spatial location loc. The value is computed using the density, velocity, and energy functions provided to the object during construction.
If a ramp-up duration is defined, the velocity components are scaled according to the selected ramp-up function depending on the current time.
If no inflow ramp-up duration is specified (i.e., inflow_ramp_up_duration = 0), the returned value corresponds directly to the fully developed flow field.
- Parameters
-
loc Coordinates at which the function value is evaluated. component The index of the conservative variable component to evaluate.
- Returns
- The value of the specified conservative variable component at
loc.
Member Data Documentation
◆ density
|
private |
Function describing the density field.
◆ inner_energy
|
private |
Function describing the field of the specific total energy.
◆ mass_fractions
|
private |
Function describing the mass fractions for multi-component flow cases.
◆ velocity
|
private |
Vectorial function describing the velocity field.
◆ velocity_ramp_up
|
private |
Ramp-up parameters for the velocity function.
The documentation for this class was generated from the following files:
- include/meltpooldg/compressible_flow/boundary_condition_functions.hpp
- source/compressible_flow/boundary_condition_functions.cpp
Generated by