IBAMR  IBAMR version 0.19.
Public Member Functions | List of all members
IBAMR::STSMassFluxIntegrator Class Referenceabstract

Class STSMassFluxIntegrator is an abstract class which integrates the density field. More...

#include <ibamr/STSMassFluxIntegrator.h>

Inheritance diagram for IBAMR::STSMassFluxIntegrator:
Inheritance graph
[legend]

Public Member Functions

 STSMassFluxIntegrator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db)
 Class constructor. More...
 
virtual ~STSMassFluxIntegrator ()=default
 Destructor. More...
 
virtual void integrate (double dt)=0
 Integrate density and compute the convective operator of the momentum and/or energy. More...
 

General time stepping functionality.

std::string d_object_name
 
SAMRAI::tbox::Pointer< StaggeredStokesPhysicalBoundaryHelperd_bc_helper
 
std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > d_bc_coefs
 
std::string d_density_bdry_extrap_type = "CONSTANT"
 
std::vector< IBTK::HierarchyGhostCellInterpolation::InterpolationTransactionComponentd_rho_transaction_comps
 
SAMRAI::tbox::Pointer< IBTK::HierarchyGhostCellInterpolationd_hier_rho_bdry_fill
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > d_hierarchy
 
int d_coarsest_ln = IBTK::invalid_level_number
 
int d_finest_ln = IBTK::invalid_level_number
 
std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > d_u_bc_coefs
 
std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > d_rho_bc_coefs
 
SAMRAI::tbox::Pointer< SAMRAI::math::HierarchyFaceDataOpsReal< NDIM, double > > d_hier_fc_data_ops
 
SAMRAI::tbox::Pointer< SAMRAI::math::HierarchySideDataOpsReal< NDIM, double > > d_hier_sc_data_ops
 
SAMRAI::tbox::Pointer< SAMRAI::math::HierarchyCellDataOpsReal< NDIM, double > > d_hier_cc_data_ops
 
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > d_V_var
 
int d_V_scratch_idx = IBTK::invalid_index
 
int d_V_old_idx = IBTK::invalid_index
 
int d_V_current_idx = IBTK::invalid_index
 
int d_V_new_idx = IBTK::invalid_index
 
int d_V_composite_idx = IBTK::invalid_index
 
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > d_rho_var
 
int d_rho_current_idx = IBTK::invalid_index
 
int d_rho_scratch_idx = IBTK::invalid_index
 
int d_rho_new_idx = IBTK::invalid_index
 
int d_rho_composite_idx = IBTK::invalid_index
 
int d_N_idx = IBTK::invalid_index
 
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > d_S_var
 
int d_S_scratch_idx = IBTK::invalid_index
 
SAMRAI::tbox::Pointer< IBTK::CartGridFunctiond_S_fcn
 
SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > d_E_var
 
int d_E_scratch_idx = IBTK::invalid_index
 
SAMRAI::tbox::Pointer< IBTK::HierarchyMathOpsd_hier_math_ops
 
bool d_hier_math_ops_external = false
 
bool d_is_initialized = false
 
bool d_enable_logging = false
 
LimiterType d_density_convective_limiter = CUI
 
int d_density_limiter_gcw = 1
 
TimeSteppingType d_density_time_stepping_type = FORWARD_EULER
 
int d_cycle_num = -1
 
double d_current_time = std::numeric_limits<double>::quiet_NaN()
 
double d_new_time = std::numeric_limits<double>::quiet_NaN()
 
double d_solution_time = std::numeric_limits<double>::quiet_NaN()
 
double d_dt = std::numeric_limits<double>::quiet_NaN()
 
double d_dt_prev = -1.0
 
std::vector< SAMRAI::hier::CoarseFineBoundary< NDIM > > d_cf_boundary
 
virtual void initializeSTSIntegrator (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > base_hierarchy)=0
 Compute hierarchy dependent data required for time integrating variables. More...
 
virtual void deallocateSTSIntegrator ()=0
 Remove all hierarchy dependent data allocated by initializeSTSIntegrator(). More...
 
void setDensityPatchDataIndex (int rho_idx)
 Set the current cell-centered density patch data index. More...
 
void setConvectiveDerivativePatchDataIndex (int N_idx)
 Set the new convective derivative patch data index. More...
 
void setDensityBoundaryConditions (const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &rho_sc_bc_coefs)
 Set the boundary condition object for the density. More...
 
int getUpdatedDensityPatchDataIndex ()
 Get the newly constructed density patch data index. More...
 
void setFluidVelocityPatchDataIndices (int V_old_idx, int V_current_idx, int V_new_idx)
 Set the patch data indices corresponding to the velocity at the previous time step to be used when computing the density update. More...
 
void setCycleNumber (int cycle_num)
 Set the cycle number currently being executed by the INS integrator. This will determine the rho advection velocity. More...
 
void setSolutionTime (double solution_time)
 Set solution time. More...
 
void setTimeInterval (double current_time, double new_time)
 Set the current time interval. More...
 
std::pair< double, doublegetTimeInterval () const
 Get the current time interval. More...
 
double getTimeStepSize () const
 Get the current time step size. More...
 
void setPreviousTimeStepSize (double dt_prev)
 Set the previous time step value between times n - 1 (old) and n (current). This is used during velocity extrapolation. More...
 
void setHierarchyMathOps (SAMRAI::tbox::Pointer< IBTK::HierarchyMathOps > hier_math_ops)
 Set the HierarchyMathOps object used by the operator. More...
 
SAMRAI::tbox::Pointer< IBTK::HierarchyMathOpsgetHierarchyMathOps () const
 Get the HierarchyMathOps object used by the operator. More...
 
 STSMassFluxIntegrator ()=delete
 Default constructor. More...
 
 STSMassFluxIntegrator (const STSMassFluxIntegrator &from)=delete
 Copy constructor. More...
 
STSMassFluxIntegratoroperator= (const STSMassFluxIntegrator &that)=delete
 Assignment operator. More...
 

Detailed Description

\( \frac{\partial \rho}{\partial t} + \nabla \cdot (\rho \mathbf{u}) = S(x,t) \)

and computes the conservative form of the convective operator \( \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u})\) for the momentum and \( \nabla \cdot (\rho \mathbf{u} Q)\) for the energy equation where \( Q = C_\textrm{p} T\) or \( Q = h\) based on the form of the energy equation.

Note
STSMassFluxIntegrator is an intermediate or a lightweight integrator that is used within one or a single time step (STS) to get a consistent mass flux \( m_\rho = \rho \mathbf{u} \) for advecting either momentum \( \mathbf{u} \) through \( \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) = \nabla \cdot (m_\rho \otimes \mathbf{u} ) \) or a scalar \( Q \) through \( \nabla \cdot (\rho \mathbf{u} Q) = \nabla \cdot (m_\rho Q) \). It does not maintain any hierarchy data, child or parent integrator, as done in implementations of HierarchyIntegrator.

The core concept behind STSMassFluxIntegrator is to obtain a consistent mass flux $\mathbf{m_\rho} = \rho \mathbf{u}$ for stabilizing high density ratio flows. It also ensures a consistency condition that:

  1. When there are no viscous, pressure forces or any other body forces in the domain, the momentum equation becomes discretely equal to the mass equation.
  2. Under isothermal/isenthalpic conditions, with no additional heat source, the energy/enthalpy equation reverts to mass balance equation.

To achieve these conditions, the time integrator scheme of STSMassFluxIntegrator is tightly coupled to how INSVCStaggeredHierarchyIntegrator or PhaseChangeHierarchyIntegrator integrate their respective variables. Note that when flow is incompressible, one does not need to solve mass balance equation. Here, we are solving a redundant mass balance equation through STSMassFluxIntegrator class in order to achieve consistency and stability.

Reference Nangia et. al, A robust incompressible Navier-Stokes solver for high density ratio multiphase flows

Thirumalaisamy and Bhalla, A low Mach enthalpy method to model non-isothermal gas-liquid-solid flows with melting and solidification

Constructor & Destructor Documentation

◆ STSMassFluxIntegrator() [1/3]

IBAMR::STSMassFluxIntegrator::STSMassFluxIntegrator ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db 
)

◆ ~STSMassFluxIntegrator()

virtual IBAMR::STSMassFluxIntegrator::~STSMassFluxIntegrator ( )
virtualdefault

◆ STSMassFluxIntegrator() [2/3]

IBAMR::STSMassFluxIntegrator::STSMassFluxIntegrator ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ STSMassFluxIntegrator() [3/3]

IBAMR::STSMassFluxIntegrator::STSMassFluxIntegrator ( const STSMassFluxIntegrator from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ integrate()

virtual void IBAMR::STSMassFluxIntegrator::integrate ( double  dt)
pure virtual

◆ initializeSTSIntegrator()

virtual void IBAMR::STSMassFluxIntegrator::initializeSTSIntegrator ( SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > >  base_hierarchy)
pure virtual

◆ deallocateSTSIntegrator()

virtual void IBAMR::STSMassFluxIntegrator::deallocateSTSIntegrator ( )
pure virtual

◆ setDensityPatchDataIndex()

void IBAMR::STSMassFluxIntegrator::setDensityPatchDataIndex ( int  rho_idx)

◆ setConvectiveDerivativePatchDataIndex()

void IBAMR::STSMassFluxIntegrator::setConvectiveDerivativePatchDataIndex ( int  N_idx)

◆ setDensityBoundaryConditions()

void IBAMR::STSMassFluxIntegrator::setDensityBoundaryConditions ( const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &  rho_sc_bc_coefs)

◆ getUpdatedDensityPatchDataIndex()

int IBAMR::STSMassFluxIntegrator::getUpdatedDensityPatchDataIndex ( )

◆ setFluidVelocityPatchDataIndices()

void IBAMR::STSMassFluxIntegrator::setFluidVelocityPatchDataIndices ( int  V_old_idx,
int  V_current_idx,
int  V_new_idx 
)
Note
This velocities will be used to compute an approximation to velocities required for time integrator. For example, SSPRK updates V_old_idx = n-1, V_current_idx = n, V_new_idx = n+1,k (after an INS cycle). If V_old_idx or V_new_idx are not set, then they will degenerate to V_current automatically, for the very first simulation time step and cases where an INS cycle has not been executed, respectively.

◆ setCycleNumber()

void IBAMR::STSMassFluxIntegrator::setCycleNumber ( int  cycle_num)

◆ setSolutionTime()

void IBAMR::STSMassFluxIntegrator::setSolutionTime ( double  solution_time)

◆ setTimeInterval()

void IBAMR::STSMassFluxIntegrator::setTimeInterval ( double  current_time,
double  new_time 
)

◆ getTimeInterval()

std::pair<double, double> IBAMR::STSMassFluxIntegrator::getTimeInterval ( ) const

◆ getTimeStepSize()

double IBAMR::STSMassFluxIntegrator::getTimeStepSize ( ) const

◆ setPreviousTimeStepSize()

void IBAMR::STSMassFluxIntegrator::setPreviousTimeStepSize ( double  dt_prev)

◆ setHierarchyMathOps()

void IBAMR::STSMassFluxIntegrator::setHierarchyMathOps ( SAMRAI::tbox::Pointer< IBTK::HierarchyMathOps hier_math_ops)

◆ getHierarchyMathOps()

SAMRAI::tbox::Pointer<IBTK::HierarchyMathOps> IBAMR::STSMassFluxIntegrator::getHierarchyMathOps ( ) const

◆ operator=()

STSMassFluxIntegrator& IBAMR::STSMassFluxIntegrator::operator= ( const STSMassFluxIntegrator that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

Member Data Documentation

◆ d_object_name

std::string IBAMR::STSMassFluxIntegrator::d_object_name
protected

◆ d_bc_helper

SAMRAI::tbox::Pointer<StaggeredStokesPhysicalBoundaryHelper> IBAMR::STSMassFluxIntegrator::d_bc_helper
protected

◆ d_bc_coefs

std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*> IBAMR::STSMassFluxIntegrator::d_bc_coefs
protected

◆ d_density_bdry_extrap_type

std::string IBAMR::STSMassFluxIntegrator::d_density_bdry_extrap_type = "CONSTANT"
protected

◆ d_rho_transaction_comps

std::vector<IBTK::HierarchyGhostCellInterpolation::InterpolationTransactionComponent> IBAMR::STSMassFluxIntegrator::d_rho_transaction_comps
protected

◆ d_hier_rho_bdry_fill

SAMRAI::tbox::Pointer<IBTK::HierarchyGhostCellInterpolation> IBAMR::STSMassFluxIntegrator::d_hier_rho_bdry_fill
protected

◆ d_hierarchy

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM> > IBAMR::STSMassFluxIntegrator::d_hierarchy
protected

◆ d_coarsest_ln

int IBAMR::STSMassFluxIntegrator::d_coarsest_ln = IBTK::invalid_level_number
protected

◆ d_finest_ln

int IBAMR::STSMassFluxIntegrator::d_finest_ln = IBTK::invalid_level_number
protected

◆ d_u_bc_coefs

std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*> IBAMR::STSMassFluxIntegrator::d_u_bc_coefs
protected

◆ d_rho_bc_coefs

std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*> IBAMR::STSMassFluxIntegrator::d_rho_bc_coefs
protected

◆ d_hier_fc_data_ops

SAMRAI::tbox::Pointer<SAMRAI::math::HierarchyFaceDataOpsReal<NDIM, double> > IBAMR::STSMassFluxIntegrator::d_hier_fc_data_ops
protected

◆ d_hier_sc_data_ops

SAMRAI::tbox::Pointer<SAMRAI::math::HierarchySideDataOpsReal<NDIM, double> > IBAMR::STSMassFluxIntegrator::d_hier_sc_data_ops
protected

◆ d_hier_cc_data_ops

SAMRAI::tbox::Pointer<SAMRAI::math::HierarchyCellDataOpsReal<NDIM, double> > IBAMR::STSMassFluxIntegrator::d_hier_cc_data_ops
protected

◆ d_V_var

SAMRAI::tbox::Pointer<SAMRAI::hier::Variable<NDIM> > IBAMR::STSMassFluxIntegrator::d_V_var
protected

◆ d_V_scratch_idx

int IBAMR::STSMassFluxIntegrator::d_V_scratch_idx = IBTK::invalid_index
protected

◆ d_V_old_idx

int IBAMR::STSMassFluxIntegrator::d_V_old_idx = IBTK::invalid_index
protected

◆ d_V_current_idx

int IBAMR::STSMassFluxIntegrator::d_V_current_idx = IBTK::invalid_index
protected

◆ d_V_new_idx

int IBAMR::STSMassFluxIntegrator::d_V_new_idx = IBTK::invalid_index
protected

◆ d_V_composite_idx

int IBAMR::STSMassFluxIntegrator::d_V_composite_idx = IBTK::invalid_index
protected

◆ d_rho_var

SAMRAI::tbox::Pointer<SAMRAI::hier::Variable<NDIM> > IBAMR::STSMassFluxIntegrator::d_rho_var
protected

◆ d_rho_current_idx

int IBAMR::STSMassFluxIntegrator::d_rho_current_idx = IBTK::invalid_index
protected

◆ d_rho_scratch_idx

int IBAMR::STSMassFluxIntegrator::d_rho_scratch_idx = IBTK::invalid_index
protected

◆ d_rho_new_idx

int IBAMR::STSMassFluxIntegrator::d_rho_new_idx = IBTK::invalid_index
protected

◆ d_rho_composite_idx

int IBAMR::STSMassFluxIntegrator::d_rho_composite_idx = IBTK::invalid_index
protected

◆ d_N_idx

int IBAMR::STSMassFluxIntegrator::d_N_idx = IBTK::invalid_index
protected

◆ d_S_var

SAMRAI::tbox::Pointer<SAMRAI::hier::Variable<NDIM> > IBAMR::STSMassFluxIntegrator::d_S_var
protected

◆ d_S_scratch_idx

int IBAMR::STSMassFluxIntegrator::d_S_scratch_idx = IBTK::invalid_index
protected

◆ d_S_fcn

SAMRAI::tbox::Pointer<IBTK::CartGridFunction> IBAMR::STSMassFluxIntegrator::d_S_fcn
protected

◆ d_E_var

SAMRAI::tbox::Pointer<SAMRAI::hier::Variable<NDIM> > IBAMR::STSMassFluxIntegrator::d_E_var
protected

◆ d_E_scratch_idx

int IBAMR::STSMassFluxIntegrator::d_E_scratch_idx = IBTK::invalid_index
protected

◆ d_hier_math_ops

SAMRAI::tbox::Pointer<IBTK::HierarchyMathOps> IBAMR::STSMassFluxIntegrator::d_hier_math_ops
protected

◆ d_hier_math_ops_external

bool IBAMR::STSMassFluxIntegrator::d_hier_math_ops_external = false
protected

◆ d_is_initialized

bool IBAMR::STSMassFluxIntegrator::d_is_initialized = false
protected

◆ d_enable_logging

bool IBAMR::STSMassFluxIntegrator::d_enable_logging = false
protected

◆ d_density_convective_limiter

LimiterType IBAMR::STSMassFluxIntegrator::d_density_convective_limiter = CUI
protected

◆ d_density_limiter_gcw

int IBAMR::STSMassFluxIntegrator::d_density_limiter_gcw = 1
protected

◆ d_density_time_stepping_type

TimeSteppingType IBAMR::STSMassFluxIntegrator::d_density_time_stepping_type = FORWARD_EULER
protected

◆ d_cycle_num

int IBAMR::STSMassFluxIntegrator::d_cycle_num = -1
protected

◆ d_current_time

double IBAMR::STSMassFluxIntegrator::d_current_time = std::numeric_limits<double>::quiet_NaN()
protected

◆ d_new_time

double IBAMR::STSMassFluxIntegrator::d_new_time = std::numeric_limits<double>::quiet_NaN()
protected

◆ d_solution_time

double IBAMR::STSMassFluxIntegrator::d_solution_time = std::numeric_limits<double>::quiet_NaN()
protected

◆ d_dt

double IBAMR::STSMassFluxIntegrator::d_dt = std::numeric_limits<double>::quiet_NaN()
protected

◆ d_dt_prev

double IBAMR::STSMassFluxIntegrator::d_dt_prev = -1.0
protected

◆ d_cf_boundary

std::vector<SAMRAI::hier::CoarseFineBoundary<NDIM> > IBAMR::STSMassFluxIntegrator::d_cf_boundary
protected

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