Overview
MultiphaseStaggeredHierarchyIntegrator is the top-level time integrator for the two-fluid (network + solvent) Stokes system. It extends IBAMR::INSHierarchyIntegrator and manages the full AMR hierarchy lifecycle: variable registration, solver setup, time advancement, regridding, and visualization output.
Namespace: multiphase
Header: multiphase/MultiphaseStaggeredHierarchyIntegrator.h
The integrator drives a staggered MAC (marker-and-cell) discretisation. It owns a MultiphaseStaggeredStokesOperator applied inside a PETSc Krylov solver, optionally preconditioned by a FullFACPreconditioner.
Constructor
Input database containing solver configuration (e.g. time stepping type, preconditioner settings, convective limiter).
Cartesian grid geometry describing the physical domain.
Whether to register this object with the SAMRAI restart manager. Set to
false when restarts are not needed.Variable accessors
getSolventVariable
getNetworkVariable
getPressureVariable
getNetworkVolumeFractionVariable
Boundary conditions
registerPhysicalBoundaryConditions
Robin BC coefficients for the network velocity, one per spatial dimension.
Robin BC coefficients for the solvent velocity, one per spatial dimension.
registerVolumeFractionBoundaryConditions
Robin BC coefficient object for the volume fraction.
Physical parameters
setViscosityCoefficient
setDragCoefficient
setDragCoefficientFunction
initializeHierarchyIntegrator.
Grid function that evaluates the drag coefficient at each grid point.
Initial conditions
setInitialData
nullptr after it is consumed.
Initial condition function for the network velocity u_n.
Initial condition function for the solvent velocity u_s.
setInitialNetworkVolumeFraction
Grid function providing the initial volume fraction field.
Forcing functions
setForcingFunctions
nullptr.
Forcing term added to the pressure (divergence) equation.
setForcingFunctionsScaled
Volume-fraction-scaled body force for the network phase.
Volume-fraction-scaled body force for the solvent phase.
Volume fraction
setNetworkVolumeFractionFunction
Analytic function defining θ_n at any point in space and time.
When
true, this function also provides the initial condition for θ_n. Set to false and call setInitialNetworkVolumeFraction separately if a different initial field is required.advectNetworkVolumeFraction
Advection–diffusion integrator responsible for evolving the volume fraction.
Set to
false when the transport scheme (e.g. semi-Lagrangian) does not produce a meaningful intermediate-time value after one evolution step. This affects how the midpoint volume fraction is evaluated during time stepping.Initialization
initializeHierarchyIntegrator
initializePatchHierarchy but may also be invoked explicitly before hierarchy construction.
The AMR patch hierarchy on which the integrator will operate.
Gridding algorithm used for AMR refinement and coarsening.
Usage example
The following is taken fromfrm/four_roll_mill.cpp and shows a complete setup sequence.