Skip to main content
CFMultiphaseOldroydB implements the Oldroyd-B viscoelastic model for multiphase flows. It extends IBAMR::CFStrategy and supplies the relaxation and stress computation routines consumed by CFINSForcing. The class couples the conformation tensor evolution to the network volume fraction thn, scaling both the relaxation source term and the resulting polymer stress by the local network phase concentration. Namespace: multiphase
Header: multiphase/CFMultiphaseOldroydB.h

Constructor

string
required
Name passed to the base CFStrategy for logging and object registry lookup.
CellVariable<NDIM, double>
required
Cell-centered variable holding the network volume fraction thn. Used to scale the polymer stress in computeStress.
AdvDiffHierarchyIntegrator
required
Advection-diffusion integrator that owns thn_var. The constructor uses its current, scratch, and new contexts to interpolate thn in time.
Database
required
SAMRAI input database. The constructor reads two keys from this database:
double
required
Polymer relaxation time λ (seconds). Determines how quickly the conformation tensor relaxes back to the identity: R = (I - C) / λ.
double
required
Polymer viscosity η_p. Together with relaxation_time, sets the magnitude of the polymer stress: σ = thn * η_p / λ * (C - I).

Methods

computeRelaxation

Fills the relaxation source term R on every patch in the hierarchy. For the Oldroyd-B model the relaxation term is:
where C is the conformation tensor (converted from the evolved quantity via convert_to_conformation_tensor to handle non-standard evolution types such as log-conformation).
int
required
Patch data index for the output relaxation field. Depth must be at least 3 (components 0, 1, 2 correspond to C_xx, C_yy, C_xy in 2D).
CellVariable<NDIM, double>
required
Variable associated with R_idx.
int
required
Patch data index for the current conformation (or evolved) tensor.
CellVariable<NDIM, double>
required
Variable associated with C_idx.
TensorEvolutionType
required
Specifies how the conformation tensor is stored (e.g., STANDARD, SQUARE_ROOT, LOGARITHM). The conversion to the physical conformation tensor is handled internally before computing the relaxation.
PatchHierarchy<NDIM>
required
AMR patch hierarchy over which the relaxation is computed, from level 0 to the finest level.
double
required
Current simulation time. Passed through to any time-dependent operations.

computeStress

Converts the conformation tensor stored at sig_idx into the Cauchy polymer stress tensor in place. The stress relation is:
thn is time-interpolated as the average of the current and new contexts when the new context is allocated; otherwise it copies from the current context. Ghost cells of thn are filled with conservative linear refinement and linear time interpolation before the stress is evaluated.
int
required
Patch data index that holds the conformation tensor on entry. The array is overwritten with the polymer stress on exit.
CellVariable<NDIM, double>
required
Variable associated with sig_idx.
PatchHierarchy<NDIM>
required
AMR patch hierarchy. The stress conversion is applied from level 0 to the finest level, including ghost cells needed by the divergence stencil.
double
required
Current simulation time used to fill thn ghost cells and interpolate between time contexts.

Enabling viscoelasticity in a simulation

Set USE_CF = TRUE in your input file and configure CFINSForcing with fluid_model = "OLDROYDB". The relaxation and viscosity parameters live in the CFINSForcing database block, which is passed directly to the CFMultiphaseOldroydB constructor.
input2d

Usage example

The following excerpt from frm/four_roll_mill.cpp shows how to construct CFMultiphaseOldroydB and register it with CFINSForcing:
four_roll_mill.cpp
The CFINSForcing database block is shared between the CFINSForcing object and CFMultiphaseOldroydB so that relaxation_time and viscosity are read from the same source.