Multiphase Namespace Reference

Developer Documentation: MeltPoolDG::Multiphase Namespace Reference
Developer Documentation
MeltPoolDG::Multiphase Namespace Reference

A collection of functions for the computation of the interface terms for compressible two-phase flows. More...

Classes

struct  CompressibleFlowPhaseCouplingData
 Data structure, which contains parameters specifically for the phase coupling of compressible multiphase simulations. More...
 
class  CompressibleMultiphaseOperation
 Operation that performs a full time step for the compressible two-phase Navier-Stokes equations in a cutDG context. More...
 
class  CompressibleMultiphaseOperator
 Operator for the matrix-free of a compressible multiphase flow cutDG formulation. More...
 
class  LevelSetAdvection
 Class for the analytical advection of a 1D test case. More...
 
class  LevelSetOscillatingWaterColumn
 Class for the analytical advection of a 1D test case with two phase interfaces. More...
 
struct  PhaseChangeData
 Collection of parameters related to liquid-gas and solid-liquid phase transitions. More...
 

Functions

template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType >
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesType, ConservedVariablesType > calculate_convective_and_viscous_interface_flux_penalty (const ConservedVariablesType &u_liquid, const ConservedVariablesType &u_gas, const ConservedVariablesGradType &grad_u_liquid, const ConservedVariablesGradType &grad_u_gas, const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &multiphase_scratch_data, const number &m_dot_evap, const number &laser_heat_source)
 "penalty" method ///
 
template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > ConvectiveKernel>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesGradType, ConservedVariablesGradType, dealii::VectorizedArray< number > > calculate_convective_interface_flux_HLLP0 (const ConservedVariablesType &u_liquid, const ConservedVariablesType &u_gas, const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &normal, const ConvectiveKernel &convective_kernel_liquid, const ConvectiveKernel &convective_kernel_gas, const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &multiphase_scratch_data, const number &m_dot_evap)
 HLLP0 Riemann solver ///.
 
template<int dim, typename number , typename ConservedVariablesType >
DEAL_II_ALWAYS_INLINE ConservedVariablesType calculate_Dirichlet_jump_in_conservative_variables (const ConservedVariablesType &u_liquid_cons, const ConservedVariablesType &u_gas_cons, const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &multiphase_scratch_data, const number &m_dot_evap, const number &delta_T)
 SIPG functions for method "HLLP and SIPG" ///.
 
template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > DiffusiveKernel>
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesType, ConservedVariablesType > calculate_viscous_interface_flux (const ConservedVariablesType &u_liquid, const ConservedVariablesType &u_gas, const ConservedVariablesGradType &grad_u_liquid, const ConservedVariablesGradType &grad_u_gas, const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &normal, const number &visc_ave_weight_phase_liquid, const number &visc_ave_weight_phase_gas, const number &tau, const DiffusiveKernel &diffusive_kernel_liquid, const DiffusiveKernel &diffusive_kernel_gas, const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &multiphase_scratch_data, const number &cell_size, const number &m_dot_evap, const number &delta_T, const number &laser_heat_source)
 Calculate the viscous interface flux for viscous phase coupling with the SIPG method.
 
template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > DiffusiveKernel>
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesGradType, ConservedVariablesGradType > calculate_viscous_interface_flux_gradient (const ConservedVariablesType &u_liquid, const ConservedVariablesType &u_gas, const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &normal, const number &visc_ave_weight_phase_liquid, const number &visc_ave_weight_phase_gas, const DiffusiveKernel &diffusive_kernel_liquid, const DiffusiveKernel &diffusive_kernel_gas, const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &multiphase_scratch_data, const number &m_dot_evap, const number &delta_T)
 Calculate gradient-tested viscous interface flux for viscous phase coupling with the SIPG method.
 
template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > DiffusiveKernel>
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesType, ConservedVariablesType > calculate_viscous_interface_flux_method_3 (const ConservedVariablesType &u_liquid, const ConservedVariablesType &u_gas, const ConservedVariablesGradType &grad_u_liquid, const ConservedVariablesGradType &grad_u_gas, const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &normal, const number &visc_ave_weight_phase_liquid, const number &visc_ave_weight_phase_gas, const DiffusiveKernel &diffusive_kernel_liquid, const DiffusiveKernel &diffusive_kernel_gas, const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &multiphase_scratch_data, const number &cell_size, const number &m_dot_evap, const number &delta_T, const number &laser_heat_source)
 viscous terms for the method "HLLP0 and penalty" ///
 
template<typename number >
DEAL_II_ALWAYS_INLINE number update_laser_heat_source (const CompressibleFlowPhaseCouplingData< number > &phase_coupling_data, const number &time)
 Compute the current value of the laser heat source.
 
template<int dim, typename number , typename ConservedVariablesType >
DEAL_II_ALWAYS_INLINE std::tuple< number, number > update_evaporative_mass_flux_and_temperature_jump (const ConservedVariablesType &u_liquid, const ConservedVariablesType &u_gas, const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &normal, const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &multiphase_scratch_data, Evaporation::EvaporationModelKnight< number > *evaporation_model_knight=nullptr)
 Compute the current evaporative mass flux and temperature jump across the interface.
 

Detailed Description

A collection of functions for the computation of the interface terms for compressible two-phase flows.

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

This file is only relevant temporarily and solves the level-set advection for one-dimensional test cases. When the incorporation of a full level-set velocity field is considered, the already available functionalities should be used.

Three different strategies for enforcing the interface jump conditions are implemented:

  • "HLLP0 and penalty": approximate HLLP0 Riemann solver for convective fluxes and a combination of strong incorporation in the weak form and penalty terms for the viscous fluxes
  • "HLLP0 and SIPG": approximate HLLP0 Riemann solver for convective fluxes and Nitsche-type method for viscous fluxes, consistently aligned to the SIPG method for inner faces
  • "penalty": strong enforcement of both convective and viscous fluxes in the weak form and penalty terms for Dirichlet density and temperature constraints for the gas phase

    • density (ρ)
    • momentum (ρ u)
    • volume-specific energy (ρ E)

    The following equations of state are currently enabled:

    • ideal gas
    • stiffened gas
    • Noble-Abel stiffened gas

Three different strategies for enforcing the interface jump conditions are implemented:

  • "HLLP0 and penalty": approximate HLLP0 Riemann solver for convective fluxes and a combination of strong incorporation in the weak form and penalty terms for the viscous fluxes
  • "HLLP0 and SIPG": approximate HLLP0 Riemann solver for convective fluxes and Nitsche-type method for viscous fluxes, consistently aligned to the SIPG method for inner faces
  • "penalty": strong enforcement of both convective and viscous fluxes in the weak form and penalty terms for Dirichlet density and temperature constraints for the gas phase

Function Documentation

◆ calculate_convective_and_viscous_interface_flux_penalty()

template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType >
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesType, ConservedVariablesType > MeltPoolDG::Multiphase::calculate_convective_and_viscous_interface_flux_penalty ( const ConservedVariablesType &  u_liquid,
const ConservedVariablesType &  u_gas,
const ConservedVariablesGradType &  grad_u_liquid,
const ConservedVariablesGradType &  grad_u_gas,
const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &  multiphase_scratch_data,
const number &  m_dot_evap,
const number &  laser_heat_source 
)
inline

"penalty" method ///

Compute the convective and viscous fluxes according to the penalty method for phase coupling.

This function calculates the interface flux terms, considering both convective and viscous interface jump conditions. A combination of strong enforcement within the weak form and a penalty method is applied.

Parameters
u_liquidConserved variables for liquid phase at quadrature point on the (unfitted) interface.
u_gasConserved variables for gas phase at quadrature point on the (unfitted) interface.
grad_u_liquidGradient of conserved variables for liquid phase at quadrature point on the (unfitted) interface.
grad_u_gasGradient of conserved variables for gas phase at quadrature point on the (unfitted) interface.
multiphase_scratch_dataCollection of parameters required by the compressible Navier-Stokes multiphase operator.
m_dot_evapCurrent evaporation mass flux (SI: in kg/(m^2 s)).
laser_heat_sourceCurrent value of the laser heat source (SI: in W/m^2).
Returns
Pair of interface fluxes, considering both convective and viscous jump conditions.

◆ calculate_convective_interface_flux_HLLP0()

template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > ConvectiveKernel>
DEAL_II_ALWAYS_INLINE std::tuple< ConservedVariablesGradType, ConservedVariablesGradType, dealii::VectorizedArray< number > > MeltPoolDG::Multiphase::calculate_convective_interface_flux_HLLP0 ( const ConservedVariablesType &  u_liquid,
const ConservedVariablesType &  u_gas,
const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &  normal,
const ConvectiveKernel &  convective_kernel_liquid,
const ConvectiveKernel &  convective_kernel_gas,
const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &  multiphase_scratch_data,
const number &  m_dot_evap 
)
inline

HLLP0 Riemann solver ///.

Calculate the convective flux with the HLLP0 Riemann solver.

This function calculates the convective fluxes for both phases at the phase interface and the interface normal speed at the considered quadrature point. The HLLP0 approximate Riemannn solver for phase transition is implemented according to the following paper: Joens, Munz, 2023: 'Riemann solvers for phase transition in a compressible sharp-interface method.'

Parameters
u_liquidConserved variables for liquid phase at quadrature point on the (unfitted) interface.
u_gasConserved variables for gas phase at quadrature point on the (unfitted) interface.
normalInterface normal vector, pointing outside the liquid phase.
convective_kernel_liquidObject with references to the EOS utilities and material data needed for convective flux calculations in the liquid phase.
convective_kernel_gasObject with references to the EOS utilities and material data needed for convective flux calculations in the gas phase.
multiphase_scratch_dataCollection of parameters required by the compressible Navier-Stokes multiphase operator.
m_dot_evapCurrent evaporation mass flux (SI: in kg/(m^2 s)).
Returns
Tuple, containing the convective fluxes for liquid and gas phase, respectively, and the interface normal velocity.
Note
The HLLP0 solver can be solved explicitly, no iterative solution strategy is required. The solver is also applicable for vanishing evaporation mass flux (reduces to the HLLC solver).

◆ calculate_Dirichlet_jump_in_conservative_variables()

template<int dim, typename number , typename ConservedVariablesType >
DEAL_II_ALWAYS_INLINE ConservedVariablesType MeltPoolDG::Multiphase::calculate_Dirichlet_jump_in_conservative_variables ( const ConservedVariablesType &  u_liquid_cons,
const ConservedVariablesType &  u_gas_cons,
const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &  multiphase_scratch_data,
const number &  m_dot_evap,
const number &  delta_T 
)
inline

SIPG functions for method "HLLP and SIPG" ///.

Calculates the Dirichlet jump in conservative variables between two phases.

This function calculates the Dirichlet jump in conservative variables via transformation into primitive variables, as described in: Henneaux, 2023: 'Higher-order enforcement of jumps conditions between compressible viscous phases: An extended interior penalty discontinuous Galerkin method for sharp interface simulation.'

Parameters
u_liquid_consConserved variables for liquid phase at quadrature point on the (unfitted) interface.
u_gas_consConserved variables for gas phase at quadrature point on the (unfitted) interface.
multiphase_scratch_dataCollection of parameters required by the compressible multiphase Navier-Stokes operator.
m_dot_evapCurrent evaporation mass flux (SI: in kg/(m^2 s)).
delta_TCurrent temperature jump at the interface (T^l - T^g) (SI: in K)
Returns
Dirichlet jump for conserved quantities in conservative variable formulation.

◆ calculate_viscous_interface_flux()

template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > DiffusiveKernel>
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesType, ConservedVariablesType > MeltPoolDG::Multiphase::calculate_viscous_interface_flux ( const ConservedVariablesType &  u_liquid,
const ConservedVariablesType &  u_gas,
const ConservedVariablesGradType &  grad_u_liquid,
const ConservedVariablesGradType &  grad_u_gas,
const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &  normal,
const number &  visc_ave_weight_phase_liquid,
const number &  visc_ave_weight_phase_gas,
const number &  tau,
const DiffusiveKernel &  diffusive_kernel_liquid,
const DiffusiveKernel &  diffusive_kernel_gas,
const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &  multiphase_scratch_data,
const number &  cell_size,
const number &  m_dot_evap,
const number &  delta_T,
const number &  laser_heat_source 
)
inline

Calculate the viscous interface flux for viscous phase coupling with the SIPG method.

This function calculates the viscous interface flux, as described in: Henneaux, 2023: 'Higher-order enforcement of jumps conditions between compressible viscous phases: An extended interior penalty discontinuous Galerkin method for sharp interface simulation.'

Parameters
u_liquidConserved variables for liquid phase at quadrature point on the (unfitted) interface.
u_gasConserved variables for gas phase at quadrature point on the (unfitted) interface.
grad_u_liquidGradient of conserved variables for liquid phase at quadrature point on the (unfitted) interface.
grad_u_gasGradient of conserved variables for gas phase at quadrature point on the (unfitted) interface.
normalInterface normal vector, pointing outside the liquid phase.
visc_ave_weight_phase_liquidWeighting factor for Nitsche-type weighted viscous interface fluxes.
visc_ave_weight_phase_gasWeighting factor for Nitsche-type weighted viscous interface fluxes.
tauSymmetric interior penalty parameter.
diffusive_kernel_liquidObject with references to the EOS utilities and material data needed for diffusive flux calculations in the liquid phase.
diffusive_kernel_gasObject with references to the EOS utilities and material data needed for diffusive flux calculations in the gas phase.
multiphase_scratch_dataCollection of parameters required by the compressible multiphase Navier-Stokes operator.
cell_sizeCell size.
m_dot_evapCurrent evaporation mass flux (SI: in kg/(m^2 s)).
delta_TCurrent temperature jump at the interface (T^l - T^g) (SI: in K).
laser_heat_sourceCurrent value of the laser heat source (SI: in W/m^2).
Returns
Pair of interface viscous fluxes for liquid and gas phase, which are weighted with the test functions.

◆ calculate_viscous_interface_flux_gradient()

template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > DiffusiveKernel>
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesGradType, ConservedVariablesGradType > MeltPoolDG::Multiphase::calculate_viscous_interface_flux_gradient ( const ConservedVariablesType &  u_liquid,
const ConservedVariablesType &  u_gas,
const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &  normal,
const number &  visc_ave_weight_phase_liquid,
const number &  visc_ave_weight_phase_gas,
const DiffusiveKernel &  diffusive_kernel_liquid,
const DiffusiveKernel &  diffusive_kernel_gas,
const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &  multiphase_scratch_data,
const number &  m_dot_evap,
const number &  delta_T 
)
inline

Calculate gradient-tested viscous interface flux for viscous phase coupling with the SIPG method.

This function calculates the viscous interface fluxes, which are weighted with the gradient of the test functions, as described in: Henneaux, 2023: 'Higher-order enforcement of jumps conditions between compressible viscous phases: An extended interior penalty discontinuous Galerkin method for sharp interface simulation.'

Parameters
u_liquidConserved variables for liquid phase at quadrature point on the (unfitted) interface.
u_gasConserved variables for gas phase at quadrature point on the (unfitted) interface.
normalInterface normal vector, pointing outside the liquid phase.
visc_ave_weight_phase_liquidWeighting factor for Nitsche-type weighted viscous interface fluxes.
visc_ave_weight_phase_gasWeighting factor for Nitsche-type weighted viscous interface fluxes.
diffusive_kernel_liquidObject with references to the EOS utilities and material data needed for diffusive flux calculations in the liquid phase.
diffusive_kernel_gasObject with references to the EOS utilities and material data needed for diffusive flux calculations in the gas phase.
multiphase_scratch_dataCollection of parameters required by the compressible multiphase Navier-Stokes operator.
m_dot_evapCurrent evaporation mass flux (SI: in kg/(m^2 s)).
delta_TCurrent temperature jump at the interface (T^l - T^g) (SI: in K).
Returns
Pair of interface viscous fluxes for liquid and gas phase, which are weighted with the gradient of the test functions.

◆ calculate_viscous_interface_flux_method_3()

template<int dim, typename number , typename ConservedVariablesType , typename ConservedVariablesGradType , CompressibleFlow::IsFluxKernel< ConservedVariablesType, ConservedVariablesGradType > DiffusiveKernel>
DEAL_II_ALWAYS_INLINE std::pair< ConservedVariablesType, ConservedVariablesType > MeltPoolDG::Multiphase::calculate_viscous_interface_flux_method_3 ( const ConservedVariablesType &  u_liquid,
const ConservedVariablesType &  u_gas,
const ConservedVariablesGradType &  grad_u_liquid,
const ConservedVariablesGradType &  grad_u_gas,
const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &  normal,
const number &  visc_ave_weight_phase_liquid,
const number &  visc_ave_weight_phase_gas,
const DiffusiveKernel &  diffusive_kernel_liquid,
const DiffusiveKernel &  diffusive_kernel_gas,
const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &  multiphase_scratch_data,
const number &  cell_size,
const number &  m_dot_evap,
const number &  delta_T,
const number &  laser_heat_source 
)
inline

viscous terms for the method "HLLP0 and penalty" ///

Calculates the viscous flux at the phase interface with a combined direct and penalty approach.

This function calculates the viscous interface flux for direct incorporation in the weak form in combination with a penalty term for the temperature jump constraint.

Parameters
u_liquidConserved variables for liquid phase at quadrature point on the (unfitted) interface.
u_gasConserved variables for gas phase at quadrature point on the (unfitted) interface.
grad_u_liquidGradient of conserved variables for liquid phase at quadrature point on the (unfitted) interface.
grad_u_gasGradient of conserved variables for gas phase at quadrature point on the (unfitted) interface.
normalInterface normal vector, pointing outside the liquid phase.
visc_ave_weight_phase_liquidWeighting factor for Nitsche-type weighted viscous interface fluxes.
visc_ave_weight_phase_gasWeighting factor for Nitsche-type weighted viscous interface fluxes.
diffusive_kernel_liquidCollection of helper functions for viscous term evaluations in the liquid phase.
diffusive_kernel_gasCollection of helper functions for viscous term evaluations in the gas phase.
multiphase_scratch_dataCollection of parameters required by the compressible multiphaes Navier-Stokes operator.
cell_sizeCell size.
m_dot_evapCurrent evaporation mass flux (SI: in kg/(m^2 s)).
delta_TCurrent temperature jump at the interface (T^l - T^g) (SI: in K).
laser_heat_sourceCurrent value of the laser heat source (SI: in W/m^2).
Returns
Pair of interface viscous fluxes for liquid and gas phase, which are weighted with the test functions.

◆ update_evaporative_mass_flux_and_temperature_jump()

template<int dim, typename number , typename ConservedVariablesType >
DEAL_II_ALWAYS_INLINE std::tuple< number, number > MeltPoolDG::Multiphase::update_evaporative_mass_flux_and_temperature_jump ( const ConservedVariablesType &  u_liquid,
const ConservedVariablesType &  u_gas,
const dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > &  normal,
const CompressibleFlow::MultiphaseOperationScratchData< dim, number > &  multiphase_scratch_data,
Evaporation::EvaporationModelKnight< number > *  evaporation_model_knight = nullptr 
)
inline

Compute the current evaporative mass flux and temperature jump across the interface.

Parameters
u_liquidConserved variables for liquid phase at quadrature point on the (unfitted) interface.
u_gasConserved variables for gas phase at quadrature point on the (unfitted) interface.
normalInterface normal vector, pointing outwards the liquid phase.
multiphase_scratch_dataCollection of parameters required by the compressible multiphase Navier-Stokes operator.
evaporation_model_knightApplied evaporation model.
Returns
Tuple, containing the current values of the evaporative mass flux and the interface temperature jump (T^l - T^g).

◆ update_laser_heat_source()

template<typename number >
DEAL_II_ALWAYS_INLINE number MeltPoolDG::Multiphase::update_laser_heat_source ( const CompressibleFlowPhaseCouplingData< number > &  phase_coupling_data,
const number &  time 
)
inline

Compute the current value of the laser heat source.

Parameters
phase_coupling_dataCollection of parameters specific for phase coupling.
timeCurrent time.
Returns
Current value of the laser heat source.