DGOperation< dim, number, n_species > Class Template Reference
|
Developer Documentation
|
#include <dg_operation.hpp>
Public Types | |
| using | VectorType = dealii::LinearAlgebra::distributed::Vector< number > |
Public Member Functions | |
| DGOperation (const ScratchData< dim, dim, number > &scratch_data, const OperationData< number > &flow_data, const MaterialPhaseData< number > &material_data_in, unsigned int flow_dof_idx=0, unsigned int flow_quad_idx=0) | |
| void | reinit () |
| Set up the required internal data structures. | |
| void | solve (const number current_time, const number time_step) |
| Solves the compressible Navier-Stokes equations for a single time step. | |
| void | distribute_dofs (dealii::DoFHandler< dim > &dof_handler) const |
| Distribute the degrees of freedom to the passed dof handler object. | |
| void | set_boundary_conditions (const std::shared_ptr< SimulationCaseBase< dim, number > > &simulation_case, const std::string &operation_name) |
| Set the boundary conditions. | |
| void | set_body_force (std::unique_ptr< dealii::Function< dim > > body_force_in) |
| Set a body force, e.g. gravity, specified by the passed function. | |
| void | add_external_force (std::shared_ptr< ExternalFlowForce< dim, number, n_species > > external_force_residuum, std::shared_ptr< ExternalFlowForceJacobian< dim, number, n_species > > external_force_jacobian) |
| number | compute_time_step_size (bool do_print=false) const |
| Compute the maximum time step size. | |
| void | set_initial_condition (const dealii::Function< dim > &function) |
| Set the solution vector to the passed initial flow field state. | |
| void | attach_output_vectors (GenericDataOut< dim, number > &data_out) const |
| Attach the solution to the passed data out object. | |
| const VectorType & | get_solution () const |
| Constant getter function for the current solution vector. | |
| VectorType & | get_solution () |
| Getter function for the current solution vector. | |
| const dealii::DoFHandler< dim > & | get_dof_handler () const |
| Constant getter function for the DoFHandler. | |
Private Member Functions | |
| number | compute_convective_time_step_limit () const |
| Compute the convective time step limit for the current mesh and flow field. | |
| number | compute_minimum_density () const |
| Compute the minimum density currently occurring in the flow field. | |
| void | setup_time_integrator () |
Static Private Member Functions | |
| static std::variant< DGOperatorExplicit< dim, number, n_species >, DGOperatorImplicit< dim, number >, DGOperatorImplicitExplicit< dim, number > > | setup_operator (OperationScratchData< dim, number > &flow_scratch_data) |
Private Attributes | |
| OperationScratchData< dim, number > | flow_scratch_data |
| Scratch data for compressible flows. | |
| std::unique_ptr< TimeIntegration::TimeIntegratorBase< number > > | time_integrator |
| std::variant< DGOperatorExplicit< dim, number, n_species >, DGOperatorImplicit< dim, number >, DGOperatorImplicitExplicit< dim, number > > | flow_operator |
| OutputManager< dim, number > | output_manager |
| Object containing the data post processor for the different output options. | |
Detailed Description
class MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >
This operation solves, i.e., perform a full time step for the compressible Navier-Stokes equations, comprising the primary variables
- density (ρ)
- momentum (ρ u)
- volume-specific energy (ρ E)
It is an extension of deal.II step-67 and is based on the paper
Fehn, N., Wall, W. A., & Kronbichler, M. (2019). A matrix‐free high‐order discontinuous Galerkin compressible Navier‐Stokes solver: A performance comparison of compressible and incompressible formulations for turbulent incompressible flows. International Journal for Numerical Methods in Fluids, 89(3), 71-102.
Member Typedef Documentation
◆ VectorType
| using MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::VectorType = dealii::LinearAlgebra::distributed::Vector<number> |
Constructor & Destructor Documentation
◆ DGOperation()
|
explicit |
Initializes all internal data structures required to simulate compressible Navier-Stokes flows.
- Parameters
-
scratch_data Reference to the used ScratchData object. flow_data Reference to the compressible flow data struct used. material_data_in Reference to the material data struct. flow_dof_idx Index of the used dof handler in scratch_data_in.flow_quad_idx Index of the used quadrature object in scratch_data_in.
Member Function Documentation
◆ add_external_force()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::add_external_force | ( | std::shared_ptr< ExternalFlowForce< dim, number, n_species > > | external_force_residuum, |
| std::shared_ptr< ExternalFlowForceJacobian< dim, number, n_species > > | external_force_jacobian | ||
| ) |
Adds an external force to the right-hand side of the governing equations. The external force can be specified by providing a pointer to an object implementing the external flow force. To see what is expected from the interface of the external flow force, please refer to the ExternalFlowForce and ExternalFlowForceJacobian classes.
Independent of the time integration scheme, the external force residuum must be provided. If the time integration scheme is implicit or implicit-explicit, the external force jacobian must also be provided. In the case of an explicit time integration scheme, the external force jacobian is not required and can be set to nullptr.
- Parameters
-
external_force_residuum Pointer to an object implementing the external force residuum, i.e., the contribution of the external force to the right-hand side of the compressible flow governing equations. external_force_jacobian Pointer to an object implementing the external force jacobian, i.e., the contribution of the external force to the jacobian of the compressible flow governing equations. This parameter can be set to nullptr if the time integration scheme is explicit.
◆ attach_output_vectors()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::attach_output_vectors | ( | GenericDataOut< dim, number > & | data_out | ) | const |
Attach the solution to the passed data out object.
- Parameters
-
data_out Object to which the solution vector is attached.
◆ compute_convective_time_step_limit()
|
private |
Compute the convective time step limit for the current mesh and flow field.
- Returns
- Maximum convective time step size.
◆ compute_minimum_density()
|
private |
Compute the minimum density currently occurring in the flow field.
- Returns
- Minimum density.
◆ compute_time_step_size()
| number MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::compute_time_step_size | ( | bool | do_print = false | ) | const |
Compute the maximum time step size.
The maximum time step size arises from the convective and viscous time step limits. Optionally, it is printed to the console.
- Parameters
-
do_print If true, the time step limit is printed to the console.
- Returns
- The computed maximum time step size.
◆ distribute_dofs()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::distribute_dofs | ( | dealii::DoFHandler< dim > & | dof_handler | ) | const |
Distribute the degrees of freedom to the passed dof handler object.
- Parameters
-
dof_handler Dof handler object used for the compressible flow solver.
◆ get_dof_handler()
| const dealii::DoFHandler< dim > & MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::get_dof_handler | ( | ) | const |
Constant getter function for the DoFHandler.
◆ get_solution() [1/2]
| dealii::LinearAlgebra::distributed::Vector< number > & MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::get_solution | ( | ) |
Getter function for the current solution vector.
◆ get_solution() [2/2]
| const dealii::LinearAlgebra::distributed::Vector< number > & MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::get_solution | ( | ) | const |
Constant getter function for the current solution vector.
inlined functions
◆ reinit()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::reinit | ( | ) |
Set up the required internal data structures.
After a call to this function the solve() function of the class can be utilized.
◆ set_body_force()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::set_body_force | ( | std::unique_ptr< dealii::Function< dim > > | body_force_in | ) |
Set a body force, e.g. gravity, specified by the passed function.
- Parameters
-
body_force_in Function specifying the body force.
- Note
- The function simply passes the parameters to the corresponding operator function.
◆ set_boundary_conditions()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::set_boundary_conditions | ( | const std::shared_ptr< SimulationCaseBase< dim, number > > & | simulation_case, |
| const std::string & | operation_name | ||
| ) |
Set the boundary conditions.
- Parameters
-
simulation_case dealii::Pointer to the considered simulation case class. operation_name String for the name of the considered operation.
- Note
- The function simply passes the parameters to the set_boundary_conditions function in the CompressibleFlowBoundaryConditions class.
◆ set_initial_condition()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::set_initial_condition | ( | const dealii::Function< dim > & | function | ) |
Set the solution vector to the passed initial flow field state.
- Parameters
-
function Initial condition of the flow field.
◆ setup_operator()
|
staticprivate |
Set up the operator based on the time integration scheme.
- Parameters
-
flow_scratch_data Scratch data for the compressible flow.
- Returns
- The initialized operator.
◆ setup_time_integrator()
|
private |
Set up the time integration schemes as requested by the input data.
◆ solve()
| void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::solve | ( | const number | current_time, |
| const number | time_step | ||
| ) |
Solves the compressible Navier-Stokes equations for a single time step.
- Parameters
-
current_time Current time at t^n. time_step Current time step size.
Member Data Documentation
◆ flow_operator
|
private |
The flow operator used for the time integration of the compressible flow equations. This includes explicit, implicit, and implicit-explicit flow operators. A variant is used here in order to allow for the use of different flow operators depending on the time integration scheme.
◆ flow_scratch_data
|
private |
Scratch data for compressible flows.
◆ output_manager
|
private |
Object containing the data post processor for the different output options.
◆ time_integrator
|
private |
A pointer to the time integrator used for the time integration of the compressible flow equations. This includes explicit, implicit, and implicit-explicit time integration schemes.
The documentation for this class was generated from the following files:
- include/meltpooldg/compressible_flow/dg_operation.hpp
- source/compressible_flow/dg_operation.cpp
Generated by