CompressibleFlow Namespace Reference

Developer Documentation: MeltPoolDG::CompressibleFlow Namespace Reference
Developer Documentation
MeltPoolDG::CompressibleFlow Namespace Reference

This file contains various functions that can be used to set and evaluate boundary conditions for the compressible flow solver. The functions can be directly used with the BoundaryConditions class, which provides an interface to manage and evaluate the different boundary conditions in the solver. More...

Namespaces

namespace  EOS
 

Classes

class  BoundaryConditions
 Helper class taking care of all boundary condition related computations for the compressible flow solver. More...
 
struct  CombinedInflowNoSlipWallValueInterpretation
 
struct  ConcreteConvectiveFluxImpl
 
struct  ConcreteConvectiveFluxImpl< dim, 1, number, Value, Flux >
 
struct  ConcreteDiffusiveFluxImpl
 
struct  ConcreteDiffusiveFluxImpl< dim, 1, number, Value, Gradient, Flux >
 
struct  ConcreteDofStateViewImpl
 
struct  ConcreteDofStateViewImpl< dim, 1, number, StateType >
 
struct  ConcreteDofValueAndGradientStateViewImpl
 
struct  ConcreteDofValueAndGradientStateViewImpl< dim, 1, number, Value, Gradient >
 
struct  ConcreteDofValueViewImpl
 
struct  ConcreteDofValueViewImpl< dim, 1, StateType >
 
struct  ConcreteFluxViewImpl
 
struct  ConcreteFluxViewImpl< dim, 1, FluxType >
 
class  ConservativeVariablesFunction
 
struct  ConservedVariableIndex
 
class  ConservedVariablesPostProcessor
 
struct  ConvectiveFlux
 
struct  ConvectiveKernels
 Convective kernel operations for compressible flow solvers. More...
 
class  CutDGOperation
 Operation that performs a full time step for the compressible single-phase Navier-Stokes equations in a cutDG context. More...
 
class  CutDGOperator
 Operator for the matrix-free evaluation of a compressible single-phase flow cutDG formulation. More...
 
struct  CutSolverData
 Collection of cut-related solver parameters required by the cut single-phase and multiphase compressible Navier-Stokes operators. More...
 
class  DGOperation
 Operation that performs a full time step for the compressible Navier-Stokes. More...
 
class  DGOperatorBase
 Interface of the compressible flow operator interacting with the compressible flow operation. More...
 
class  DGOperatorExplicit
 Operator for the matrix-free evaluation of a compressible single-phase flow cutDG formulation for explicit time integration. More...
 
class  DGOperatorImplicit
 Operator for the matrix-free evaluation of a compressible single-phase flow cutDG formulation for implicit time integration. More...
 
class  DGOperatorImplicitExplicit
 Operator for the matrix-free evaluation of a compressible single-phase flow cutDG formulation for implicit-explicit time integration. More...
 
struct  DiffusiveFlux
 
struct  DofGradientMixin
 
struct  DofGradientView
 
struct  DofStateView
 
struct  DofValueAndGradientStateView
 
struct  DofValueMixin
 
struct  DofValueView
 
struct  EOSData
 Collection of parameters related to the equation of state for a compressible or nearly incompressible fluid. More...
 
struct  ExternalFlowForce
 An abstract interface for defining external forces acting on the fluid that must be evaluated and incorporated during the cell loop of an explicit time integration scheme. More...
 
struct  ExternalFlowForceJacobian
 
struct  FluxMixin
 
struct  FluxView
 
class  FreeJetInflow
 
class  FreeJetVelocityFunction
 Enum for the type of velocity profile of a free jet inflow. More...
 
struct  InflowValueInterpretation
 
struct  InputDefinedBoundaryCondition
 
struct  InputDefinedFreeJetInflow
 
struct  InputDefinedInitialCondition
 
struct  InputDefinedSubdividedHyperRectangleDomain
 
class  Material
 A class which provides all relevant material properties for a specific phase. More...
 
struct  MaterialMixin
 
struct  MaterialPhaseData
 Collection of material parameters for a specific fluid phase. More...
 
struct  MaterialSpeciesData
 Collection of material parameters for a specific species. More...
 
class  MaterialVariablesPostProcessor
 
struct  MaterialView
 
struct  MultiphaseOperationScratchData
 Scratch data structure for compressible multiphase flow solvers. More...
 
struct  MultiSpeciesDofStateView
 
struct  MultiSpeciesDofValueAndGradientStateView
 
struct  MultiSpeciesDofValueView
 
struct  MultiSpeciesFluxView
 
struct  MultiSpeciesMaterialMixin
 
struct  OperationData
 Collection of parameters required by the compressible Navier-Stokes operator. More...
 
struct  OperationScratchData
 Scratch data structure for compressible single-phase flow solvers. More...
 
class  OperationTypeErasure
 Common interface class for compressible flow operation classes based on the type erasure idiom. More...
 
struct  OutputManager
 
class  PrimitiveVariablesPostProcessor
 
struct  SpeciesTransportConvectiveFlux
 
struct  SpeciesTransportDiffusiveFlux
 
struct  ViscousKernels
 Viscous kernel operations for compressible flow solvers. More...
 

Concepts

concept  IsConservedStateCompatible
 
concept  IsConservedGradientCompatible
 
concept  IsConservedView
 
concept  IsPrimitiveView
 
concept  IsMaterialView
 
concept  IsValueView
 
concept  IsGradientView
 
concept  IsFluxKernel
 
concept  CellEvaluatorType
 Concept to check whether a given type conforms to a valid cell evaluator interface.
 
concept  FaceEvaluatorType
 Concept to check whether a given type conforms to a valid face evaluator interface.
 

Typedefs

template<int dim, typename number , int n_species = 1, typename VectorizedArrayType = dealii::VectorizedArray<number>>
using ConservedVariablesType = dealii::Tensor< 1, n_conserved_variables< dim, n_species >, VectorizedArrayType >
 
template<int dim, typename number , int n_species = 1, typename VectorizedArrayType = dealii::VectorizedArray<number>>
using ConservedVariablesGradientType = dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::Tensor< 1, dim, VectorizedArrayType > >
 
template<int dim, typename number , int n_species = 1>
using FluxType = dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > >
 
template<int dim, typename number , int n_species = 1>
using FaceFluxType = dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::VectorizedArray< number > >
 
template<int dim, typename number , int n_species = 1>
using FaceGradientFluxType = dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > >
 
template<int dim, typename number , int n_species = 1>
using SourceType = dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::VectorizedArray< number > >
 
template<int dim, int n_species, typename number , typename Value , typename Flux >
using NSpeciesConvectiveFlux = typename ConcreteConvectiveFluxImpl< dim, n_species, number, Value, Flux >::type
 
template<int dim, int n_species, typename number , typename Value , typename Gradient , typename Flux >
using NSpeciesDiffusiveFlux = typename ConcreteDiffusiveFluxImpl< dim, n_species, number, Value, Gradient, Flux >::type
 
template<int dim, int n_species, IsConservedStateCompatible< dim > StateType>
using NSpeciesDofValueView = typename ConcreteDofValueViewImpl< dim, n_species, StateType >::type
 
template<int dim, int n_species, typename number , IsConservedStateCompatible< dim > StateType>
using NSpeciesDofStateView = typename ConcreteDofStateViewImpl< dim, n_species, number, StateType >::type
 
template<int dim, int n_species, typename number , IsConservedStateCompatible< dim > Value, IsConservedGradientCompatible< dim > Gradient>
using NSpeciesDofValueAndGradientStateView = typename ConcreteDofValueAndGradientStateViewImpl< dim, n_species, number, Value, Gradient >::type
 
template<int dim, int n_species, typename FluxType >
using NSpeciesFluxView = typename ConcreteFluxViewImpl< dim, n_species, FluxType >::type
 

Functions

 BETTER_ENUM (RampUpType, char, none, linear, exponential, cosine)
 Enum for the type of ramp up function used for the velocity at an inflow boundary.
 
 BETTER_ENUM (BoundaryConditionType, char, combined_inflow_no_slip_wall, inflow, slip_wall, no_slip_wall, subsonic_outflow_fixed_energy, subsonic_outflow_fixed_pressure)
 
template<int dim, typename number >
void add_hyper_rectangle_custom_boundary_condition_parameters (dealii::ParameterHandler &prm, std::array< InputDefinedBoundaryCondition< dim, number >, 2 *dim > &boundary_conditions)
 
template<int dim, typename number , CellEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator, bool is_viscous = true>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesType< dim, number >, ConservedVariablesGradientType< dim, number > > rhs_cell_integral_kernel (const Integrator &evaluator, const unsigned int q, const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > *constant_body_force, const ConvectiveKernels< dim, number > &convective_terms, const ViscousKernels< dim, number > &viscous_terms, const std::unique_ptr< dealii::Function< dim > > &body_force)
 Computes the right-hand side cell integral kernels at a quadrature point.
 
template<int dim, typename number , FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator, bool is_viscous = true>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesType< dim, number >, ConservedVariablesType< dim, number >, ConservedVariablesGradientType< dim, number >, ConservedVariablesGradientType< dim, number > > rhs_face_integral_kernel (const Integrator &evaluator_m, const Integrator &evaluator_p, const unsigned int q, dealii::VectorizedArray< number > penalty_parameter, const ConvectiveKernels< dim, number > &convective_terms, const ViscousKernels< dim, number > &viscous_terms)
 Computes the right-hand side face integral kernels at a face quadrature point.
 
template<int dim, typename number , FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator, bool is_viscous = true, bool is_gas_phase = true>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesType< dim, number >, ConservedVariablesGradientType< dim, number > > rhs_boundary_face_integral_kernel (const Integrator &evaluator_m, const unsigned int q, const dealii::types::boundary_id boundary_id, const dealii::VectorizedArray< number > penalty_parameter, const ConvectiveKernels< dim, number > &convective_terms, const ViscousKernels< dim, number > &viscous_terms, const Material< dim, number > &material, const BoundaryConditions< dim, number > &boundary_conditions)
 Computes the right-hand side boundary face integral kernels at a boundary face quadrature point.
 
template<int dim, typename ConservedVariablesView , typename WritableFluxView >
DEAL_II_ALWAYS_INLINE void convective_flux (const ConservedVariablesView &conserved_variables, const WritableFluxView &flux)
 
template<int dim, typename number >
DEAL_II_ALWAYS_INLINE dealii::Tensor< 1, dim, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > > viscous_stress_tensor (const dealii::Tensor< 1, dim, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > > &grad_velocity, const dealii::VectorizedArray< number > dynamic_viscosity)
 
template<int dim, typename VectorizedArrayType , typename DofStateView , typename WritableFluxView >
DEAL_II_ALWAYS_INLINE void diffusive_flux (const DofStateView &conserved_variables, const WritableFluxView &flux)
 
 BETTER_ENUM (NumericalFluxType, char, lax_friedrichs_modified, lax_friedrichs_exact, harten_lax_vanleer) BETTER_ENUM(LinearizedConvectiveFluxJumpType
 
 BETTER_ENUM (JacobianType, char, exact, finite_difference)
 
 BETTER_ENUM (OutputType, char, conserved_variables, primitive_variables, material_quantities)
 
 BETTER_ENUM (Idx1D, char, density, momentum_x, energy)
 Index sets for the components of the compressible Navier-Stokes equations.
 
 BETTER_ENUM (Idx2D, char, density, momentum_x, momentum_y, energy)
 
 BETTER_ENUM (Idx3D, char, density, momentum_x, momentum_y, momentum_z, energy)
 
template<int dim, typename number >
DEAL_II_ALWAYS_INLINE dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > calculate_velocity (const ConservedVariablesType< dim, number > &conserved_variables)
 Calculate the velocity from the conserved variables by computing u = (ρu)/ρ.
 
template<int dim, typename number >
DEAL_II_ALWAYS_INLINE dealii::Tensor< 2, dim, dealii::VectorizedArray< number > > calculate_grad_velocity (const ConservedVariablesType< dim, number > &conserved_variables, const ConservedVariablesGradientType< dim, number > &grad_conserved_variables)
 Calculate the velocity gradient.
 
template<int dim, typename Number >
void calculate_penalty_parameter (dealii::AlignedVector< dealii::VectorizedArray< Number > > &array_penalty_parameter, const dealii::MatrixFree< dim, Number > &matrix_free, const std::string &domain_representation_type, const unsigned int dof_index=0, const Number scaling_factor=1.0)
 This function computes the local values of the internal penalty parameter used in the viscous numerical flux.
 
template<int dim, typename number >
void update_primitive_variables_solution (dealii::LinearAlgebra::distributed::Vector< number > &solution_primitive_variables, const dealii::LinearAlgebra::distributed::Vector< number > &solution, const ScratchData< dim, dim, number > &scratch_data, const unsigned int dof_idx, const unsigned int quad_idx, const Material< dim, number > *material_liquid, const Material< dim, number > *material_gas=nullptr)
 Update the primitive variable solution according to the current solution vector.
 
template<typename DofViewType , typename VectorizedArrayType >
DEAL_II_ALWAYS_INLINE VectorizedArrayType maximum_local_wave_speed (const DofViewType &u_m, const DofViewType &u_p)
 

Variables

template<int dim, int n_species = 1>
constexpr unsigned int n_conserved_variables = dim + 2 + (n_species - 1)
 
 char
 
 analytic
 
 lambda_fd
 
 complete_fd
 

Detailed Description

This file contains various functions that can be used to set and evaluate boundary conditions for the compressible flow solver. The functions can be directly used with the BoundaryConditions class, which provides an interface to manage and evaluate the different boundary conditions in the solver.

Type definitions and helper functions for the compressible flow implementations.

A collection of helper functions that might be useful when solving the compressible Navier-Stokes equations with an explicit time stepping strategy.

This operation solves the compressible Navier-Stokes equations, comprising the primary variables.

This operator solves the compressible Navier-Stokes equations, comprising the primary variables.

Collection of convective term computations for the compressible Navier-Stokes equations.

  • density (ρ)
  • momentum (ρ u)
  • volume-specific energy (ρ E) using the cutDG method for single-phase problems.

It is an extension of deal.II step-67 and is based on

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.

and

Ritthaler, A. (2024). A matrix-free cutDG formulation for complex flows, Master's Thesis.

  • 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.

This file contains type aliases for the kernels used in the multi- and single-species compressible flow solver. The main purpose is that the type aliases automatically resolve to the correct kernel type depending on the number of species in the simulation. For example, for single-species simulations, the kernels resolve to the standard ConvectiveFlux and DiffusiveFlux, while for multi-species simulations, they resolve to the corresponding SpeciesTransportConvectiveFlux and SpeciesTransportDiffusiveFlux.

This file contains type aliases for the state views used in the multi- and single-species compressible flow solver. The main purpose is that the type aliases automatically resolve to the correct state view type depending on the number of species in the simulation. For example, for single-species simulations, the state views resolve to the standard DofStateView and DofValueAndGradientStateView, while for multi-species simulations, they resolve to the corresponding MultiSpeciesDofStateView and MultiSpeciesDofValueAndGradientStateView.

Typedef Documentation

◆ ConservedVariablesGradientType

template<int dim, typename number , int n_species = 1, typename VectorizedArrayType = dealii::VectorizedArray<number>>
using MeltPoolDG::CompressibleFlow::ConservedVariablesGradientType = typedef dealii:: Tensor<1, n_conserved_variables<dim, n_species>, dealii::Tensor<1, dim, VectorizedArrayType> >

Type alias for the gradient of the conserved variables in the compressible flow solver given at a vectorized set of coordinates.

◆ ConservedVariablesType

template<int dim, typename number , int n_species = 1, typename VectorizedArrayType = dealii::VectorizedArray<number>>
using MeltPoolDG::CompressibleFlow::ConservedVariablesType = typedef dealii::Tensor<1, n_conserved_variables<dim, n_species>, VectorizedArrayType>

Type alias for the conserved variables in the compressible flow solver given at a vectorized set of coordinates.

◆ FaceFluxType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::FaceFluxType = typedef dealii::Tensor<1, n_conserved_variables<dim, n_species>, dealii::VectorizedArray<number> >

Type alias for the fluxes at faces in the compressible flow solver given at a vectorized set of coordinates (contracted with normal vector). This includes both convective and diffusive fluxes.

◆ FaceGradientFluxType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::FaceGradientFluxType = typedef dealii::Tensor<1, n_conserved_variables<dim, n_species>, dealii::Tensor<1, dim, dealii::VectorizedArray<number> >>

◆ FluxType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::FluxType = typedef dealii::Tensor<1, n_conserved_variables<dim, n_species>, dealii::Tensor<1, dim, dealii::VectorizedArray<number> >>

Type alias for the fluxes in the compressible flow solver given at a vectorized set of coordinates. This includes both convective and diffusive fluxes.

◆ NSpeciesConvectiveFlux

template<int dim, int n_species, typename number , typename Value , typename Flux >
using MeltPoolDG::CompressibleFlow::NSpeciesConvectiveFlux = typedef typename ConcreteConvectiveFluxImpl<dim, n_species, number, Value, Flux>::type

Type alias for the ConvectiveFlux for a specific number of species. This alias resolves to the appropriate kernel type depending on the number of species in the simulation.

◆ NSpeciesDiffusiveFlux

template<int dim, int n_species, typename number , typename Value , typename Gradient , typename Flux >
using MeltPoolDG::CompressibleFlow::NSpeciesDiffusiveFlux = typedef typename ConcreteDiffusiveFluxImpl<dim, n_species, number, Value, Gradient, Flux>::type

Type alias for the DiffusiveFlux for a specific number of species. This alias resolves to the appropriate kernel type depending on the number of species in the simulation.

◆ NSpeciesDofStateView

template<int dim, int n_species, typename number , IsConservedStateCompatible< dim > StateType>
using MeltPoolDG::CompressibleFlow::NSpeciesDofStateView = typedef typename ConcreteDofStateViewImpl<dim, n_species, number, StateType>::type

Type alias for the DofStateView for a specific number of species. This alias resolves to the appropriate state view type depending on the number of species in the simulation.

◆ NSpeciesDofValueAndGradientStateView

template<int dim, int n_species, typename number , IsConservedStateCompatible< dim > Value, IsConservedGradientCompatible< dim > Gradient>
using MeltPoolDG::CompressibleFlow::NSpeciesDofValueAndGradientStateView = typedef typename ConcreteDofValueAndGradientStateViewImpl<dim, n_species, number, Value, Gradient>:: type

Type alias for the DofValueAndGradientStateView for a specific number of species. This alias resolves to the appropriate state view type depending on the number of species in the simulation.

◆ NSpeciesDofValueView

template<int dim, int n_species, IsConservedStateCompatible< dim > StateType>
using MeltPoolDG::CompressibleFlow::NSpeciesDofValueView = typedef typename ConcreteDofValueViewImpl<dim, n_species, StateType>::type

Type alias for the DofValueView for a specific number of species. This alias resolves to the appropriate state view type depending on the number of species in the simulation.

◆ NSpeciesFluxView

template<int dim, int n_species, typename FluxType >
using MeltPoolDG::CompressibleFlow::NSpeciesFluxView = typedef typename ConcreteFluxViewImpl<dim, n_species, FluxType>::type

Type alias for the FluxView for a specific number of species. This alias resolves to the appropriate flux view type depending on the number of species in the simulation.

◆ SourceType

template<int dim, typename number , int n_species = 1>
using MeltPoolDG::CompressibleFlow::SourceType = typedef dealii::Tensor<1, n_conserved_variables<dim, n_species>, dealii::VectorizedArray<number> >

Type alias for source terms in the compressible flow solver given at a vectorized set of coordinates.

Function Documentation

◆ add_hyper_rectangle_custom_boundary_condition_parameters()

template<int dim, typename number >
void MeltPoolDG::CompressibleFlow::add_hyper_rectangle_custom_boundary_condition_parameters ( dealii::ParameterHandler &  prm,
std::array< InputDefinedBoundaryCondition< dim, number >, 2 *dim > &  boundary_conditions 
)

For a hyper-rectangular domain, this function adds the boundary condition parameters for all boundaries to the parameter handler. For this at each boundary the corresponding function of the boundary conditions object is called, which reads the parameters from the user input file and stores them in the corresponding boundary condition struct. The ordering in the passed array is the same as the boundary id provided by deal.II, i.e., for a 2D domain, the first two entries correspond to the boundaries with normal in x-direction (boundary ids 0 and 1), and the second two entries correspond to the boundaries with normal in y-direction (boundary ids 2 and 3). Subsequently, for 3D domains, the last two entries correspond to the boundaries with normal in z-direction (boundary ids 4 and 5).

Parameters
prmParameter handler to which the parameters will be added.
boundary_conditionsArray of boundary condition structs for all boundaries of the domain.

◆ BETTER_ENUM() [1/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( BoundaryConditionType  ,
char  ,
combined_inflow_no_slip_wall  ,
inflow  ,
slip_wall  ,
no_slip_wall  ,
subsonic_outflow_fixed_energy  ,
subsonic_outflow_fixed_pressure   
)

An enum for the various boundary conditions supported by the compressible flow solver.

◆ BETTER_ENUM() [2/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( Idx1D  ,
char  ,
density  ,
momentum_x  ,
energy   
)

Index sets for the components of the compressible Navier-Stokes equations.

◆ BETTER_ENUM() [3/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( Idx2D  ,
char  ,
density  ,
momentum_x  ,
momentum_y  ,
energy   
)

◆ BETTER_ENUM() [4/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( Idx3D  ,
char  ,
density  ,
momentum_x  ,
momentum_y  ,
momentum_z  ,
energy   
)

◆ BETTER_ENUM() [5/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( JacobianType  ,
char  ,
exact  ,
finite_difference   
)

◆ BETTER_ENUM() [6/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( NumericalFluxType  ,
char  ,
lax_friedrichs_modified  ,
lax_friedrichs_exact  ,
harten_lax_vanleer   
)

◆ BETTER_ENUM() [7/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( OutputType  ,
char  ,
conserved_variables  ,
primitive_variables  ,
material_quantities   
)

◆ BETTER_ENUM() [8/8]

MeltPoolDG::CompressibleFlow::BETTER_ENUM ( RampUpType  ,
char  ,
none  ,
linear  ,
exponential  ,
cosine   
)

Enum for the type of ramp up function used for the velocity at an inflow boundary.

◆ calculate_grad_velocity()

template<int dim, typename number >
DEAL_II_ALWAYS_INLINE dealii::Tensor< 2, dim, dealii::VectorizedArray< number > > MeltPoolDG::CompressibleFlow::calculate_grad_velocity ( const ConservedVariablesType< dim, number > &  conserved_variables,
const ConservedVariablesGradientType< dim, number > &  grad_conserved_variables 
)
inline

Calculate the velocity gradient.

Calculate the gradient of the velocity from the conserved variables and their gradients by computing grad(u) = 1/ρ * (grad(ρu) - u*grad(ρ)).

Parameters
conserved_variablesCurrent values of the conserved variables.
grad_conserved_variablesCurrent gradient of the conserved variables.
Returns
Current gradient of the velocity.

◆ calculate_penalty_parameter()

template<int dim, typename Number >
void MeltPoolDG::CompressibleFlow::calculate_penalty_parameter ( dealii::AlignedVector< dealii::VectorizedArray< Number > > &  array_penalty_parameter,
const dealii::MatrixFree< dim, Number > &  matrix_free,
const std::string &  domain_representation_type,
const unsigned int  dof_index = 0,
const Number  scaling_factor = 1.0 
)

This function computes the local values of the internal penalty parameter used in the viscous numerical flux.

Parameters
array_penalty_parameterArray in which the values of the penalty parameter are stored.
matrix_freeMatrix-free object providing the required geometrical data.
domain_representation_typeNumerical operator type (cut or fitted_mesh).
dof_indexIndex of the relevant dof handler in the matrix-free object.
scaling_factorAdditional scaling factor to scale the penalty parameter.

◆ calculate_velocity()

template<int dim, typename number >
DEAL_II_ALWAYS_INLINE dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > MeltPoolDG::CompressibleFlow::calculate_velocity ( const ConservedVariablesType< dim, number > &  conserved_variables)
inline

Calculate the velocity from the conserved variables by computing u = (ρu)/ρ.

Parameters
conserved_variablesCurrent values of the conserved variables.
Returns
Current velocity.

◆ convective_flux()

template<int dim, typename ConservedVariablesView , typename WritableFluxView >
DEAL_II_ALWAYS_INLINE void MeltPoolDG::CompressibleFlow::convective_flux ( const ConservedVariablesView &  conserved_variables,
const WritableFluxView &  flux 
)
inline

Calculate the convective flux F_c for the compressible Navier-Stokes equations.

Parameters
conserved_variablesView on the local values of the conserved variables, providing convenient accessor functions for the quantities needed to compute the convective flux.
Template Parameters
value_typeType of the conserved variables.

◆ diffusive_flux()

template<int dim, typename VectorizedArrayType , typename DofStateView , typename WritableFluxView >
DEAL_II_ALWAYS_INLINE void MeltPoolDG::CompressibleFlow::diffusive_flux ( const DofStateView conserved_variables,
const WritableFluxView &  flux 
)
inline

Calculate the diffusive (viscous) flux F_d for the compressible Navier-Stokes equations.

Parameters
conserved_variablesA view on the local values of the conserved variables and their gradients, providing convenient accessor functions for the quantities needed to compute the diffusive flux, such as velocity, velocity gradients, temperature gradients, dynamic viscosity, and thermal conductivity.
Template Parameters
value_typeType of the conserved variables.
gradient_typeType of the gradients of the conserved variables.

◆ maximum_local_wave_speed()

template<typename DofViewType , typename VectorizedArrayType >
DEAL_II_ALWAYS_INLINE VectorizedArrayType MeltPoolDG::CompressibleFlow::maximum_local_wave_speed ( const DofViewType &  u_m,
const DofViewType &  u_p 
)
inline

◆ rhs_boundary_face_integral_kernel()

template<int dim, typename number , FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator, bool is_viscous = true, bool is_gas_phase = true>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesType< dim, number >, ConservedVariablesGradientType< dim, number > > MeltPoolDG::CompressibleFlow::rhs_boundary_face_integral_kernel ( const Integrator &  evaluator_m,
const unsigned int  q,
const dealii::types::boundary_id  boundary_id,
const dealii::VectorizedArray< number >  penalty_parameter,
const ConvectiveKernels< dim, number > &  convective_terms,
const ViscousKernels< dim, number > &  viscous_terms,
const Material< dim, number > &  material,
const BoundaryConditions< dim, number > &  boundary_conditions 
)
inline

Computes the right-hand side boundary face integral kernels at a boundary face quadrature point.

Kernel of the local boundary face applier for the right-hand side function. This function computes the face integral contribution of boundary faces to the right hand side for the quadrature point index and the corresponding FE evaluator.

Parameters
evaluator_mFE-evaluator object reinitialized on the current (inner) face batch.
qIndex of the quadrature point.
boundary_idBoundary ID of the considered boundary face.
penalty_parameterValue of the symmetric interior penalty parameter on the face.
convective_termsCollection of convective term computations for the compressible Navier-Stokes equations.
viscous_termsCollection of viscous term computations for the compressible Navier-Stokes equations.
materialClass providing material data and calculations of thermodynamic relations.
boundary_conditionsClass providing boundary condition related computations for the compressible flow solver
Returns
Tuple, containing the flux for the boundary face, weighted with the value of the test function, as first argument, and the flux for the boundary face, weighted with the gradient of the test function, as second argument.

◆ rhs_cell_integral_kernel()

template<int dim, typename number , CellEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator, bool is_viscous = true>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesType< dim, number >, ConservedVariablesGradientType< dim, number > > MeltPoolDG::CompressibleFlow::rhs_cell_integral_kernel ( const Integrator &  evaluator,
const unsigned int  q,
const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > *  constant_body_force,
const ConvectiveKernels< dim, number > &  convective_terms,
const ViscousKernels< dim, number > &  viscous_terms,
const std::unique_ptr< dealii::Function< dim > > &  body_force 
)
inline

Computes the right-hand side cell integral kernels at a quadrature point.

Kernel of the local cell applier for the right-hand side function. This function computes the cell integral contribution to the right hand side for the quadrature point index and the corresponding FE evaluator.

Parameters
evaluatorFE-evaluator object reinitialized on the current cell batch.
qIndex of the quadrature point.
constant_body_forceValue of the body force. If the body force is not constant the pointer must be set to nullptr.
convective_termsCollection of convective term computations for the compressible Navier-Stokes equations.
viscous_termsCollection of viscous term computations for the compressible Navier-Stokes equations.
body_forcePointer to a body force function.
Returns
Tuple, containing the flux, weighted with the value of the test function, as first argument, and the flux, weighted with the gradient of the test function, as second argument.

◆ rhs_face_integral_kernel()

template<int dim, typename number , FaceEvaluatorType< dim, dim+2, number, dealii::VectorizedArray< number > > Integrator, bool is_viscous = true>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesType< dim, number >, ConservedVariablesType< dim, number >, ConservedVariablesGradientType< dim, number >, ConservedVariablesGradientType< dim, number > > MeltPoolDG::CompressibleFlow::rhs_face_integral_kernel ( const Integrator &  evaluator_m,
const Integrator &  evaluator_p,
const unsigned int  q,
dealii::VectorizedArray< number >  penalty_parameter,
const ConvectiveKernels< dim, number > &  convective_terms,
const ViscousKernels< dim, number > &  viscous_terms 
)
inline

Computes the right-hand side face integral kernels at a face quadrature point.

Kernel of the local inner face applier for the right-hand side function. This function computes the face integral contribution of inner faces to the right hand side for the quadrature point index and the corresponding FE evaluator.

Parameters
evaluator_mFE-evaluator object reinitialized on the current (inside) face batch.
evaluator_pFE-evaluator object reinitialized on the current (outside) face batch.
qIndex of the quadrature point.
penalty_parameterValue of the symmetric interior penalty parameter on the face.
convective_termsCollection of convective term computations for the compressible Navier-Stokes equations.
viscous_termsCollection of viscous term computations for the compressible Navier-Stokes equations.
Returns
Tuple, which containing the fluxes for the inside and outside faces, weighted with the value of the test functions, as first two arguments, and the fluxes for the inside and outside faces, weighted with the gradient of the test functions, as the third and fourth argument.

◆ update_primitive_variables_solution()

template<int dim, typename number >
void MeltPoolDG::CompressibleFlow::update_primitive_variables_solution ( dealii::LinearAlgebra::distributed::Vector< number > &  solution_primitive_variables,
const dealii::LinearAlgebra::distributed::Vector< number > &  solution,
const ScratchData< dim, dim, number > &  scratch_data,
const unsigned int  dof_idx,
const unsigned int  quad_idx,
const Material< dim, number > *  material_liquid,
const Material< dim, number > *  material_gas = nullptr 
)

Update the primitive variable solution according to the current solution vector.

Parameters
solution_primitive_variablesVector where the solution in primitive variables is stored.
solutionCurrent solution vector in conservative variable formulation.
dof_idxIndex of the relevant dof handler in the matrix-free object.
quad_idxRelevant quadrature index of the flow solver.
material_liquidPointer to the material object for liquid phase.
material_gasPointer to the material object for the gas phase.
Note
The second material object is only required for the two-phase case.

◆ viscous_stress_tensor()

template<int dim, typename number >
DEAL_II_ALWAYS_INLINE dealii::Tensor< 1, dim, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > > MeltPoolDG::CompressibleFlow::viscous_stress_tensor ( const dealii::Tensor< 1, dim, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > > &  grad_velocity,
const dealii::VectorizedArray< number >  dynamic_viscosity 
)
inline

Calculate the viscous stress tensor for the compressible Navier-Stokes equations.

Parameters
grad_velocityGradient of the velocity field.
dynamic_viscosityDynamic viscosity of the fluid.

Variable Documentation

◆ analytic

MeltPoolDG::CompressibleFlow::analytic

◆ char

MeltPoolDG::CompressibleFlow::char

◆ complete_fd

MeltPoolDG::CompressibleFlow::complete_fd

◆ lambda_fd

MeltPoolDG::CompressibleFlow::lambda_fd

◆ n_conserved_variables

template<int dim, int n_species = 1>
constexpr unsigned int MeltPoolDG::CompressibleFlow::n_conserved_variables = dim + 2 + (n_species - 1)
constexpr

Number of independent conserved variables for the compressible Navier-Stokes equations in dim dimensions.