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: multiphaseHeader:
multiphase/MultiphaseParameters.h
Struct definition
Fields
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.Dynamic viscosity of the network phase. Controls the magnitude of the
viscous stress tensor
A_n:Dynamic viscosity of the solvent phase. Controls the magnitude of the
viscous stress tensor
A_s:Constant drag coefficient between the network and solvent phases. Used when
Set via
xi_idx equals IBTK::invalid_index (i.e., isVariableDrag() returns
false). Appears in the off-diagonal coupling blocks:MultiphaseStaggeredHierarchyIntegrator::setDragCoefficient(xi, nu_n, nu_s).Drag scaling factor for the network phase. Normalises the drag coupling in
the network momentum block. A value of
1.0 gives unscaled drag.Drag scaling factor for the solvent phase. Normalises the drag coupling in
the solvent momentum block. A value of
1.0 gives unscaled drag.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
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:
MultiphaseParameters::xi, nu_n, and nu_s.
xi_idx stays at IBTK::invalid_index and isVariableDrag() returns false.
Variable drag — call setDragCoefficientFunction before initialization:
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:
A_i = D * eta_i * div(thn_i * ((grad + grad^T) - div*I))useseta_noreta_s- The drag coupling blocks use
xi(constant) or the patch field atxi_idx(variable), scaled bynu_nandnu_s C,D_u,D_p,D_divare time-stepping coefficients set separately viasetCandDCoefficients
rho field enters C through the time-stepping scheme in
MultiphaseStaggeredHierarchyIntegrator.