Skip to main content
MultiphaseParameters is a plain data struct in the multiphase namespace that bundles every coefficient required by MultiphaseStaggeredStokesOperator. You create one instance, fill its fields, and pass it to the operator constructor. The operator then reads the fields directly when assembling the block system shown below. Namespace: multiphase
Header: multiphase/MultiphaseParameters.h

Struct definition


Fields

double
required
Fluid density. Appears in the unsteady term C * thn and C * ths on the diagonal blocks of the operator matrix, where C absorbs the density scaling set by the time-stepping scheme.
double
required
Dynamic viscosity of the network phase. Controls the magnitude of the viscous stress tensor A_n:
double
required
Dynamic viscosity of the solvent phase. Controls the magnitude of the viscous stress tensor A_s:
double
required
Constant drag coefficient between the network and solvent phases. Used when xi_idx equals IBTK::invalid_index (i.e., isVariableDrag() returns false). Appears in the off-diagonal coupling blocks:
Set via MultiphaseStaggeredHierarchyIntegrator::setDragCoefficient(xi, nu_n, nu_s).
double
required
Drag scaling factor for the network phase. Normalises the drag coupling in the network momentum block. A value of 1.0 gives unscaled drag.
double
required
Drag scaling factor for the solvent phase. Normalises the drag coupling in the solvent momentum block. A value of 1.0 gives unscaled drag.
int
default:"IBTK::invalid_index"
Patch data index for a spatially varying drag coefficient. When set to any value other than IBTK::invalid_index, the operator reads the drag field from the patch hierarchy at this index instead of using the constant xi.Set via MultiphaseStaggeredHierarchyIntegrator::setDragCoefficientFunction(xi_fcn), which registers a CartGridFunction that fills this patch index each time step.

Method

isVariableDrag

Returns true when xi_idx != IBTK::invalid_index, indicating that the drag coefficient is spatially varying and stored on the patch hierarchy. Returns false when the constant scalar xi should be used.

Constant vs variable drag

MultiphaseStaggeredHierarchyIntegrator exposes two mutually exclusive ways to supply the drag coefficient. Constant drag — call setDragCoefficient before initialization:
This writes directly into MultiphaseParameters::xi, nu_n, and nu_s. xi_idx stays at IBTK::invalid_index and isVariableDrag() returns false. Variable drag — call setDragCoefficientFunction before initialization:
This allocates a patch data index, stores it in MultiphaseParameters::xi_idx, and fills the field via xi_fcn each time step. isVariableDrag() returns true and the operator reads the drag from the patch hierarchy.

Operator matrix mapping

MultiphaseStaggeredStokesOperator assembles the following block system using the fields from MultiphaseParameters:
where:
  • A_i = D * eta_i * div(thn_i * ((grad + grad^T) - div*I)) uses eta_n or eta_s
  • The drag coupling blocks use xi (constant) or the patch field at xi_idx (variable), scaled by nu_n and nu_s
  • C, D_u, D_p, D_div are time-stepping coefficients set separately via setCandDCoefficients
The rho field enters C through the time-stepping scheme in MultiphaseStaggeredHierarchyIntegrator.