IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | List of all members
IBAMR::INSVCStaggeredConservativeMassMomentumSSPRKIntegrator Class Reference

Class INSVCStaggeredConservativeMassMomentumSSPRKIntegrator is a derived class that integrates the staggered density field. More...

#include </home/runner/work/IBAMR/IBAMR/include/ibamr/INSVCStaggeredConservativeMassMomentumSSPRKIntegrator.h>

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

Public Member Functions

 INSVCStaggeredConservativeMassMomentumSSPRKIntegrator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db)
 Class constructor.
 
 ~INSVCStaggeredConservativeMassMomentumSSPRKIntegrator ()=default
 Destructor.
 
void integrate (double dt) override
 Integrate density and momentum field.
 
- Public Member Functions inherited from IBAMR::INSVCStaggeredConservativeMassMomentumRKIntegrator
 INSVCStaggeredConservativeMassMomentumRKIntegrator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db)
 Class constructor.
 
virtual ~INSVCStaggeredConservativeMassMomentumRKIntegrator ()
 Destructor.
 
virtual void initializeSTSIntegrator (SAMRAI::tbox::Pointer< SAMRAI::hier::BasePatchHierarchy< NDIM > > base_hierarchy) override
 Compute hierarchy dependent data required for time integrating variables.
 
virtual void deallocateSTSIntegrator () override
 Remove all hierarchy dependent data allocated by initializeSTSIntegrator(). More...
 
void setSideCenteredVelocityBoundaryConditions (const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &u_sc_bc_coefs)
 
int getUpdatedSideCenteredDensityPatchDataIndex ()
 Get the newly constructed side-centered density patch data index. More...
 
void setMassDensitySourceTerm (const SAMRAI::tbox::Pointer< IBTK::CartGridFunction > S_fcn)
 Set an optional mass density source term.
 
- Public Member Functions inherited from IBAMR::STSMassFluxIntegrator
 STSMassFluxIntegrator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db)
 Class constructor.
 
virtual ~STSMassFluxIntegrator ()=default
 Destructor.
 
void setDensityPatchDataIndex (int rho_idx)
 Set the current cell-centered density patch data index.
 
void setConvectiveDerivativePatchDataIndex (int N_idx)
 Set the new convective derivative patch data index.
 
void setDensityBoundaryConditions (const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &rho_sc_bc_coefs)
 Set the boundary condition object for the density.
 
int getUpdatedDensityPatchDataIndex ()
 Get the newly constructed density patch data index.
 
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.
 
void setSolutionTime (double solution_time)
 Set solution time.
 
void setTimeInterval (double current_time, double new_time)
 Set the current time interval.
 
std::pair< double, double > getTimeInterval () const
 Get the current time interval.
 
double getTimeStepSize () const
 Get the current time step size.
 
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.
 
void setHierarchyMathOps (SAMRAI::tbox::Pointer< IBTK::HierarchyMathOps > hier_math_ops)
 Set the HierarchyMathOps object used by the operator.
 
SAMRAI::tbox::Pointer< IBTK::HierarchyMathOpsgetHierarchyMathOps () const
 Get the HierarchyMathOps object used by the operator.
 

Additional Inherited Members

- Protected Member Functions inherited from IBAMR::INSVCStaggeredConservativeMassMomentumRKIntegrator
void computeAdvectionVelocity (std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > U_adv_data, const SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > U_data, const SAMRAI::hier::IntVector< NDIM > &patch_lower, const SAMRAI::hier::IntVector< NDIM > &patch_upper, const std::array< SAMRAI::hier::Box< NDIM >, NDIM > &side_boxes)
 Compute the advection velocity using simple averages.
 
void interpolateSideQuantity (std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > Q_half_data, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > U_adv_data, const SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > Q_data, const SAMRAI::hier::IntVector< NDIM > &patch_lower, const SAMRAI::hier::IntVector< NDIM > &patch_upper, const std::array< SAMRAI::hier::Box< NDIM >, NDIM > &side_boxes, const LimiterType &convective_limiter)
 Compute the interpolation of a quantity Q onto Q_half, faces of the velocity DOF centered control volumes.
 
void computeConvectiveDerivative (SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > N_data, std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > P_half_data, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > U_adv_data, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > R_half_data, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > U_half_data, const std::array< SAMRAI::hier::Box< NDIM >, NDIM > &side_boxes, const double *const dx, const SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM > > &patch)
 Compute div[rho_half*u_half*u_adv].
 
void computeDensityUpdate (SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > R_data, const double &a0, const SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > R0_data, const double &a1, const SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > R1_data, const double &a2, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > U_adv_data, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > R_half_data, const SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > S_data, const std::array< SAMRAI::hier::Box< NDIM >, NDIM > &side_boxes, const double &dt, const double *const dx)
 Compute the density update rho = a0*rho^0 + a1*rho^1 + a2*dt*(-div[u_adv*rho_half]) + a2*dt*S.
 
void computeErrorOfMassConservationEquation (SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > E_data, const SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > Rnew_data, const SAMRAI::tbox::Pointer< SAMRAI::pdat::SideData< NDIM, double > > Rold_data, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > U_adv_data, const std::array< SAMRAI::tbox::Pointer< SAMRAI::pdat::FaceData< NDIM, double > >, NDIM > R_half_data, const std::array< SAMRAI::hier::Box< NDIM >, NDIM > &side_boxes, const double &dt, const double *const dx)
 Compute the error of the mass conservation equation using the integrated density field pointwise.
 
void enforceDivergenceFreeConditionAtCoarseFineInterface (const int U_idx)
 Enforce divergence free condition at the coarse-fine interface to ensure conservation of mass.
 
- Protected Attributes inherited from IBAMR::INSVCStaggeredConservativeMassMomentumRKIntegrator
std::string d_velocity_bdry_extrap_type = "CONSTANT"
 
std::vector< IBTK::HierarchyGhostCellInterpolation::InterpolationTransactionComponentd_v_transaction_comps
 
SAMRAI::tbox::Pointer< IBTK::HierarchyGhostCellInterpolationd_hier_v_bdry_fill
 
LimiterType d_velocity_convective_limiter = CUI
 
int d_velocity_limiter_gcw = 1
 
- Protected Attributes inherited from IBAMR::STSMassFluxIntegrator
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
 

Detailed Description

Class INSVCStaggeredConservativeMassMomentumSSPRKIntegrator is a derived class that integrates the staggered density field.

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

and computes the conservative form of the convective operator $ \nabla \cdot (\rho u u)$.

This class implements the SSP-RK2 and SSP-RK3 time stepping schemes.

Class INSVCStaggeredConservativeMassMomentumSSPRKIntegrator computes the convective derivative of a side-centered velocity field using various bounded-limiters described by Patel and Natarajan.

A side-centered density update is provided by this class, which is used in the conservative discretization of the incompressible Navier-Stokes equation. There is an optional mass density source term $ S(x,t) $ that can be set to check the order of accuracy via manufactured solutions.

References Patel, JK. and Natarajan, G., A generic framework for design of interface capturing schemes for multi-fluid flows

Note
This class is specialized in that it computes a conservative discretization of the form $N = \nabla \cdot (u \rho u)$, where the density $\rho$ can vary in space and time. This operator is to be used in conjuction with the conservative form of the variable coefficient Navier-Stokes equations, which will produce better results for high density ratio flows.
See also
INSVCStaggeredHierarchyIntegrator

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