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: multiphaseHeader:
multiphase/CFMultiphaseOldroydB.h
Constructor
Cell-centered variable holding the network volume fraction
thn. Used to
scale the polymer stress in computeStress.Advection-diffusion integrator that owns
thn_var. The constructor uses its
current, scratch, and new contexts to interpolate thn in time.SAMRAI input database. The constructor reads two keys from this database:
Polymer relaxation time λ (seconds). Determines how quickly the conformation
tensor relaxes back to the identity:
R = (I - C) / λ.Methods
computeRelaxation
R on every patch in the hierarchy. For
the Oldroyd-B model the relaxation term is:
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).
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).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.AMR patch hierarchy over which the relaxation is computed, from level 0 to
the finest level.
computeStress
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.
Patch data index that holds the conformation tensor on entry. The array is
overwritten with the polymer stress on exit.
AMR patch hierarchy. The stress conversion is applied from level 0 to the
finest level, including ghost cells needed by the divergence stencil.
Current simulation time used to fill
thn ghost cells and interpolate
between time contexts.Enabling viscoelasticity in a simulation
SetUSE_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 fromfrm/four_roll_mill.cpp shows how to construct
CFMultiphaseOldroydB and register it with CFINSForcing:
four_roll_mill.cpp
CFINSForcing database block is shared between the CFINSForcing object
and CFMultiphaseOldroydB so that relaxation_time and viscosity are read
from the same source.