Skip to main content

Overview

MultiphaseConvectiveManager manages all routines required to approximate the momentum convective operator for the multiphase equations. It performs flux-differencing of the phase-weighted momenta using a limited upwind scheme on the staggered MAC grid. Namespace: multiphase Header: multiphase/MultiphaseConvectiveManager.h The class lazily allocates patch data on first use and does not maintain state across a regridding operation.
This class must be destroyed or have deallocateData called before any regridding operation. Because it does not maintain state across regridds, it cannot be used in isolation with multistep (e.g. Adams–Bashforth) algorithms.

Available limiters

The following IBAMR::LimiterType values are supported:

Constructors

Database-based constructor

Constructs the manager by reading the limiter type from the input database. The database must contain the key "limiter_type" with one of the supported limiter strings: "UPWIND", "CUI", "FBICS", or "MGAMMA".
string
required
Unique name for this object, used for variable registration and logging.
SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM>>
required
The AMR patch hierarchy on which convective terms are computed.
SAMRAI::tbox::Pointer<SAMRAI::tbox::Database>
required
Input database. Must contain "limiter_type" specifying one of the supported limiter strings.
const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>&
default:"{}"
Robin BC coefficients for the network velocity, one per spatial dimension.
const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>&
default:"{}"
Robin BC coefficients for the solvent velocity, one per spatial dimension.
SAMRAI::solv::RobinBcCoefStrategy<NDIM>*
default:"nullptr"
Robin BC coefficient for the volume fraction. Pass nullptr to use linear extrapolation at physical boundaries.

LimiterType-based constructor

Constructs the manager with an explicitly provided LimiterType value.
string
required
Unique name for this object.
SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM>>
required
The AMR patch hierarchy on which convective terms are computed.
IBAMR::LimiterType
required
Limiter to use for momentum interpolation. One of UPWIND, CUI, FBICS, or MGAMMA.
const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>&
default:"{}"
Robin BC coefficients for the network velocity, one per spatial dimension.
const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>&
default:"{}"
Robin BC coefficients for the solvent velocity, one per spatial dimension.
SAMRAI::solv::RobinBcCoefStrategy<NDIM>*
default:"nullptr"
Robin BC coefficient for the volume fraction.

Methods

approximateConvectiveOperator (with copy)

Computes the convective operator approximation and copies results into dst_un_idx and dst_us_idx. Either destination index may be an invalid index, in which case that copy is skipped. For ts_type = FORWARD_EULER, the new-time indices (un_new_idx, us_new_idx, thn_new_idx) are not used and may be invalid.
int
required
Patch data index to receive the network-phase convective operator result. Pass an invalid index to skip.
int
required
Patch data index to receive the solvent-phase convective operator result. Pass an invalid index to skip.
IBAMR::TimeSteppingType
required
Time-stepping scheme: FORWARD_EULER, MIDPOINT_RULE, or TRAPEZOIDAL_RULE.
double
required
Current simulation time t^n.
double
required
New simulation time t^.
int
required
Patch index for the network velocity at time t^n.
int
required
Patch index for the solvent velocity at time t^n.
int
required
Patch index for the volume fraction at time t^n.
int
required
Patch index for the network velocity at time t^. May be invalid for FORWARD_EULER.
int
required
Patch index for the solvent velocity at time t^. May be invalid for FORWARD_EULER.
int
required
Patch index for the volume fraction at time t^. May be invalid for FORWARD_EULER.

approximateConvectiveOperator (without copy)

Identical to the copy variant but does not transfer results to any external indices. Retrieve the result afterwards using fillWithConvectiveOperator or getConvectiveIndices.
IBAMR::TimeSteppingType
required
Time-stepping scheme: FORWARD_EULER, MIDPOINT_RULE, or TRAPEZOIDAL_RULE.
double
required
Current simulation time t^n.
double
required
New simulation time t^.
int
required
Patch index for the network velocity at t^n.
int
required
Patch index for the solvent velocity at t^n.
int
required
Patch index for the volume fraction at t^n.
int
required
Patch index for the network velocity at t^. May be invalid for FORWARD_EULER.
int
required
Patch index for the solvent velocity at t^. May be invalid for FORWARD_EULER.
int
required
Patch index for the volume fraction at t^. May be invalid for FORWARD_EULER.

fillWithConvectiveOperator

Copies the most recent convective operator approximation into the provided patch indices. If either index is invalid, that copy is skipped.
int
required
Destination patch index for the network-phase result.
int
required
Destination patch index for the solvent-phase result.

getConvectiveIndices

Returns the internal patch data index pair holding the most recent convective operator approximation. The first element of the pair is the network-phase index; the second is the solvent-phase index.

deallocateData

Deallocates all patch data associated with this object. You must call this (or destroy the object) before any regridding operation.

resetData

Resets the manager to a blank state without deallocating patch memory. Useful for clearing operator state between time steps when the hierarchy has not changed.

setBoundaryConditions

Updates the boundary condition objects at any point after construction. This class does not take ownership of any of these objects.
const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>&
required
Robin BC coefficients for the network velocity.
const std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>&
required
Robin BC coefficients for the solvent velocity.
SAMRAI::solv::RobinBcCoefStrategy<NDIM>*
required
Robin BC coefficient for the volume fraction. May be nullptr.

Regridding note

MultiphaseConvectiveManager does not rebuild its internal state after a regridding event. Before calling any regrid routine, either destroy the object or call deallocateData. After regridding, reconstruct or reinitialise the manager with the updated hierarchy.