CutDGOperation< dim, number > Class Template Reference
|
Developer Documentation
|
Operation that performs a full time step for the compressible single-phase Navier-Stokes equations in a cutDG context. More...
#include <cutdg_operation.hpp>
Public Types | |
| using | VectorType = dealii::LinearAlgebra::distributed::Vector< number > |
| using | MappingInfoType = CutUtil::MappingInfoType< dim, number > |
| using | MappingInfoVectorType = CutUtil::MappingInfoVectorType< dim, number > |
| using | CutFlowOperatorVariant = std::variant< CutDGOperator< dim, number, true >, CutDGOperator< dim, number, false > > |
Public Member Functions | |
| CutDGOperation (const ScratchData< dim, dim, number > &scratch_data_in, const OperationData< number > &comp_flow_data_in, const MaterialPhaseData< number > &material_data_in, const CutSolverData< number > &cut_data_in, const TimeIntegration::TimeIterator< number > &time_iterator_in, const std::function< void()> &setup_dof_system_in, const VectorType &level_set_in, unsigned int comp_flow_dof_idx_in=dealii::numbers::invalid_unsigned_int, unsigned int level_set_dof_idx_in=dealii::numbers::invalid_unsigned_int, unsigned int comp_flow_quad_idx_in=dealii::numbers::invalid_unsigned_int) | |
| Constructor. | |
| void | reinit () |
| Set up the required internal data structures. | |
| 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. | |
| number | compute_time_step_size (bool do_print=false) const |
| Compute the maximum time step size. | |
| void | distribute_dofs (dealii::DoFHandler< dim > &dof_handler) const |
Distribute dofs needed for a finite element type given in CompressibleFlowData. | |
| void | solve (number current_time, number time_step) |
| Solves the compressible Navier-Stokes equations for a single time step. | |
| void | set_initial_condition (const dealii::Function< dim > &function) |
| Set the initial condition of the solution dof vector. | |
| void | set_inflow_field_unfitted_boundary (std::shared_ptr< dealii::Function< dim > > &inflow_function) |
| Set the inflow field function in the case of an unfitted inflow boundary. | |
| void | set_unfitted_object_velocity (std::shared_ptr< dealii::Function< dim > > &velocity_function) |
| Set the velocity function in the case of an unfitted (rigid) moving object. | |
| void | set_boundary_conditions (const std::shared_ptr< SimulationCaseBase< dim, number > > &simulation_case, const std::string &operation_name) |
| Set the (standard compressible flow, i.e. non-cut specific) boundary conditions. | |
| 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. | |
Static Public Member Functions | |
| static CutFlowOperatorVariant | create_cut_flow_operator_variant (bool is_viscous, OperationScratchData< dim, number > &flow_scratch_data, const MappingInfoType &mapping_info_surface_in, const MappingInfoVectorType &mapping_info_cells_in, const MappingInfoVectorType &mapping_info_faces_in) |
| Factory function to create a variant of the CutDGCompressibleFlowOperator depending on viscosity. | |
Private Member Functions | |
| void | adapt_to_new_interface_position () |
| Adapt the dof layout and solution vector to a new interface position, which is defined by the zero-level-set-isosurface. | |
| void | classify_cells () const |
| Classify cells according to the current state of the level-set field. | |
| 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 | compute_intersected_quadrature () |
| Compute the quadrature rules for intersected elements, intersected faces and immersed phase boundaries. | |
Private Attributes | |
| OperationScratchData< dim, number > | flow_scratch_data |
| Scratch data for compressible flows. | |
| const TimeIntegration::TimeIterator< number > & | time_iterator |
| Time iterator. | |
| const unsigned int | level_set_dof_idx |
| DoF index associated to the level set field. | |
| const VectorType & | level_set |
| Reference to the level-set field used to represent the immersed boundary. | |
| VectorType | rhs |
| Right-hand side vector. | |
| std::shared_ptr< dealii::NonMatching::MeshClassifier< dim > > | mesh_classifier |
| std::shared_ptr< dealii::NonMatching::MeshClassifier< dim > > | mesh_classifier_old |
| CutUtil::SolutionTransferOperator< dim, number > | cut_solution_transfer |
| std::function< void()> | setup_dof_system |
| Function to set up the DoF system. | |
| std::function< void(VectorType &)> | reinit_vector |
| Function for DoF vector reinitialization. | |
| dealii::FESystem< dim > | fe_point_temp |
| FESystem object, required by FEPointEvaluation. | |
| const unsigned int | n_dofs_per_cell |
| Number of DoFs per cell. | |
| MappingInfoType | mapping_info_surface |
| Mapping information for integration over immersed boundaries. | |
| MappingInfoVectorType | mapping_info_cells |
| Mapping information for integration over cut cells. | |
| MappingInfoVectorType | mapping_info_faces |
| Mapping information for integration over cut faces. | |
| CutFlowOperatorVariant | cut_flow_operator |
| Compressible flow operator object. | |
| OutputManager< dim, number > | output_manager |
| Object containing the data post processor for the different output options. | |
Detailed Description
class MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >
Operation that performs a full time step for the compressible single-phase Navier-Stokes equations in a cutDG context.
Member Typedef Documentation
◆ CutFlowOperatorVariant
| using MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::CutFlowOperatorVariant = std::variant<CutDGOperator<dim, number, true>, CutDGOperator<dim, number, false> > |
◆ MappingInfoType
| using MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::MappingInfoType = CutUtil::MappingInfoType<dim, number> |
◆ MappingInfoVectorType
| using MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::MappingInfoVectorType = CutUtil::MappingInfoVectorType<dim, number> |
◆ VectorType
| using MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::VectorType = dealii::LinearAlgebra::distributed::Vector<number> |
Constructor & Destructor Documentation
◆ CutDGOperation()
|
explicit |
Constructor.
Initializes all internal data structures required to simulate compressible single-phase Navier-Stokes flows using a cutDG approach.
- Parameters
-
scratch_data_in Reference to the used ScratchData object. comp_flow_data_in Reference to the compressible flow data struct used. material_data_in Reference to the material class. cut_data_in Reference to the class with cut-related parameters. time_iterator_in Reference to the used time stepping. setup_dof_system_in Reinit_matrix_free function, which is registered. level_set_in level-set dof vector. comp_flow_dof_idx_in Index of the used dof handler for solution in scratch_data_in.level_set_dof_idx_in Index of the used dof handler for level-set in scratch_data_in.comp_flow_quad_idx_in Index of the used quadrature object in scratch_data_in.
Member Function Documentation
◆ adapt_to_new_interface_position()
|
private |
Adapt the dof layout and solution vector to a new interface position, which is defined by the zero-level-set-isosurface.
The function contains following steps:
- classify cells according to current interface position
- adapt DoFHandler and solution vectors according to new interface position, extrapolate new DoF values via ghost-penalty extrapolation
- compute quadrature rules for intersected cells, intersected faces and the phase surface
- reinit matrix-free object, rhs and solution vectors
◆ attach_output_vectors()
| void MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::attach_output_vectors | ( | GenericDataOut< dim, number > & | data_out | ) | const |
Attach the solution to the passed data out object.
All output variables configured in the underlying CompressibleFlowData (via the given input parameter) are attached, such as density, momentum, total_energy, and any additional derived quantities that have been selected.
- Parameters
-
data_out Object to which the solution vector is attached.
◆ classify_cells()
|
private |
Classify cells according to the current state of the level-set field.
◆ 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_intersected_quadrature()
|
private |
Compute the quadrature rules for intersected elements, intersected faces and immersed phase boundaries.
◆ compute_minimum_density()
|
private |
Compute the minimum density currently occurring in the flow field.
- Returns
- Minimum density.
◆ compute_time_step_size()
| number MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::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.
◆ create_cut_flow_operator_variant()
|
inlinestatic |
Factory function to create a variant of the CutDGCompressibleFlowOperator depending on viscosity.
This function returns an instance of CutDGCompressibleFlowOperator templated on the viscosity flag. It selects the correct operator variant based on whether the flow is viscous or inviscid.
- Parameters
-
is_viscous Flag indicating whether the flow includes viscous terms. flow_scratch_data Data structure holding flow-related scratch data and parameters. mapping_info_surface_in Mapping information for integration over cut boundaries. mapping_info_cells_in Mapping information for integration over cut cells. mapping_info_faces_in Mapping information for integration over cut faces.
- Returns
- An instance of the appropriate
CutDGCompressibleFlowOperatorvariant.
◆ distribute_dofs()
| void MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::distribute_dofs | ( | dealii::DoFHandler< dim > & | dof_handler | ) | const |
Distribute dofs needed for a finite element type given in CompressibleFlowData.
A FECollection is created to distinguish between liquid phase, gas phase and intersected elements.
- Parameters
-
dof_handler Reference to the used DoFHandler object.
◆ get_dof_handler()
| const dealii::DoFHandler< dim > & MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::get_dof_handler | ( | ) | const |
Constant getter function for the DoFHandler.
◆ get_solution() [1/2]
| dealii::LinearAlgebra::distributed::Vector< number > & MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::get_solution | ( | ) |
Getter function for the current solution vector.
◆ get_solution() [2/2]
| const dealii::LinearAlgebra::distributed::Vector< number > & MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::get_solution | ( | ) | const |
Constant getter function for the current solution vector.
inlined functions
◆ reinit()
| void MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::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::CutDGOperation< dim, number >::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::CutDGOperation< dim, number >::set_boundary_conditions | ( | const std::shared_ptr< SimulationCaseBase< dim, number > > & | simulation_case, |
| const std::string & | operation_name | ||
| ) |
Set the (standard compressible flow, i.e. non-cut specific) 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 object.
◆ set_inflow_field_unfitted_boundary()
| void MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::set_inflow_field_unfitted_boundary | ( | std::shared_ptr< dealii::Function< dim > > & | inflow_function | ) |
Set the inflow field function in the case of an unfitted inflow boundary.
- Note
- The function simply passes the function to the corresponding cut operator function.
◆ set_initial_condition()
| void MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::set_initial_condition | ( | const dealii::Function< dim > & | function | ) |
Set the initial condition of the solution dof vector.
- Parameters
-
function Given function for initial condition.
◆ set_unfitted_object_velocity()
| void MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::set_unfitted_object_velocity | ( | std::shared_ptr< dealii::Function< dim > > & | velocity_function | ) |
Set the velocity function in the case of an unfitted (rigid) moving object.
- Note
- The function simply passes the function to the corresponding cut operator function.
◆ solve()
| void MeltPoolDG::CompressibleFlow::CutDGOperation< dim, number >::solve | ( | number | current_time, |
| 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
◆ cut_flow_operator
|
private |
Compressible flow operator object.
◆ cut_solution_transfer
|
private |
Solution transfer object for the interpolation between function spaces at two subsequent time steps with moving immersed boundaries.
◆ fe_point_temp
|
private |
FESystem object, required by FEPointEvaluation.
◆ flow_scratch_data
|
private |
Scratch data for compressible flows.
◆ level_set
|
private |
Reference to the level-set field used to represent the immersed boundary.
◆ level_set_dof_idx
|
private |
DoF index associated to the level set field.
◆ mapping_info_cells
|
private |
Mapping information for integration over cut cells.
◆ mapping_info_faces
|
private |
Mapping information for integration over cut faces.
◆ mapping_info_surface
|
private |
Mapping information for integration over immersed boundaries.
◆ mesh_classifier
|
private |
Mesh classifier, which contains information if a cell is inside or outside the physically relevant region, or cut by the immersed boundary. It corresponds to the current level set position.
◆ mesh_classifier_old
|
private |
Mesh classifier, which contains information if a cell is inside or outside the physically relevant region, or cut by the immersed boundary. It corresponds to the level set position at the previous time step.
◆ n_dofs_per_cell
|
private |
Number of DoFs per cell.
◆ output_manager
|
private |
Object containing the data post processor for the different output options.
◆ reinit_vector
|
private |
Function for DoF vector reinitialization.
◆ rhs
|
private |
Right-hand side vector.
◆ setup_dof_system
|
private |
Function to set up the DoF system.
◆ time_iterator
|
private |
Time iterator.
The documentation for this class was generated from the following files:
- include/meltpooldg/compressible_flow/cutdg_operation.hpp
- source/compressible_flow/cutdg_operation.cpp
Generated by