DGOperation< dim, number, n_species > Class Template Reference

Developer Documentation: MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species > Class Template Reference
Developer Documentation
MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species > Class Template Reference

Operation that performs a full time step for the compressible Navier-Stokes. More...

#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)
 Constructor.
 
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 VectorTypeget_solution () const
 Constant getter function for the current solution vector.
 
VectorTypeget_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_operator ()
 Set up the operator to suit the specified time integration scheme.
 

Private Attributes

OperationScratchData< dim, number > flow_scratch_data
 Scratch data for compressible flows.
 
std::unique_ptr< DGOperatorBase< dim, number, n_species > > comp_flow_operator
 Compressible flow operator object.
 
OutputManager< dim, number > output_manager
 Object containing the data post processor for the different output options.
 

Detailed Description

template<int dim, typename number, int n_species = 1>
class MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >

Operation that performs a full time step for the compressible Navier-Stokes.

Member Typedef Documentation

◆ VectorType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>

Constructor & Destructor Documentation

◆ DGOperation()

template<int dim, typename number , int n_species>
MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::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 
)
explicit

Constructor.

Initializes all internal data structures required to simulate compressible Navier-Stokes flows.

Parameters
scratch_dataReference to the used ScratchData object.
flow_dataReference to the compressible flow data struct used.
material_data_inReference to the material data struct.
flow_dof_idxIndex of the used dof handler in scratch_data_in.
flow_quad_idxIndex of the used quadrature object in scratch_data_in.
external_forcesPointer to a struct implementing external forces acting on the fluid.

Member Function Documentation

◆ add_external_force()

template<int dim, typename number , int n_species>
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 
)

◆ attach_output_vectors()

template<int dim, typename number , int n_species>
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_outObject to which the solution vector is attached.

◆ compute_convective_time_step_limit()

template<int dim, typename number , int n_species>
number MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::compute_convective_time_step_limit ( ) const
private

Compute the convective time step limit for the current mesh and flow field.

Returns
Maximum convective time step size.

◆ compute_minimum_density()

template<int dim, typename number , int n_species>
number MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::compute_minimum_density ( ) const
private

Compute the minimum density currently occurring in the flow field.

Returns
Minimum density.

◆ compute_time_step_size()

template<int dim, typename number , int n_species>
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_printIf true, the time step limit is printed to the console.
Returns
The computed maximum time step size.

◆ distribute_dofs()

template<int dim, typename number , int n_species = 1>
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_handlerDof handler object used for the compressible flow solver.

◆ get_dof_handler()

template<int dim, typename number , int n_species>
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]

template<int dim, typename number , int n_species>
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]

template<int dim, typename number , int n_species>
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()

template<int dim, typename number , int n_species>
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()

template<int dim, typename number , int n_species = 1>
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_inFunction specifying the body force.
Note
The function simply passes the parameters to the corresponding operator function.

◆ set_boundary_conditions()

template<int dim, typename number , int n_species>
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_casedealii::Pointer to the considered simulation case class.
operation_nameString 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()

template<int dim, typename number , int n_species>
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
functionInitial condition of the flow field.

◆ setup_operator()

template<int dim, typename number , int n_species>
void MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::setup_operator ( )
private

Set up the operator to suit the specified time integration scheme.

Parameters
external_forcesPointer to a struct implementing external forces acting on the fluid.

◆ solve()

template<int dim, typename number , int n_species>
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_timeCurrent time at t^n.
time_stepCurrent time step size.

Member Data Documentation

◆ comp_flow_operator

template<int dim, typename number , int n_species = 1>
std::unique_ptr<DGOperatorBase<dim, number, n_species> > MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::comp_flow_operator
private

Compressible flow operator object.

◆ flow_scratch_data

template<int dim, typename number , int n_species = 1>
OperationScratchData<dim, number> MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::flow_scratch_data
private

Scratch data for compressible flows.

◆ output_manager

template<int dim, typename number , int n_species = 1>
OutputManager<dim, number> MeltPoolDG::CompressibleFlow::DGOperation< dim, number, n_species >::output_manager
private

Object containing the data post processor for the different output options.


The documentation for this class was generated from the following files: