When to use the viscoelastic model
The Newtonian model (default) treats both phases as purely viscous fluids. This is appropriate when the network phase behaves like a viscous gel with no elastic memory. Use the viscoelastic model when:- The network phase is a polymer solution or hydrogel that stores elastic energy.
- You need to capture stress relaxation or normal stress differences.
- The Weissenberg number (ratio of relaxation time to flow time scale) is non-negligible.
USE_CF = TRUE in your input file:
input2d
The default in
frm/input2d is USE_CF = FALSE. The Newtonian solver runs without the conformation tensor, which reduces memory usage and removes the need to solve the tensor evolution equation.The Oldroyd-B model
The Oldroyd-B model describes a dilute polymer solution in which polymer chains are modeled as linear elastic dumbbells. The macroscopic state of the polymer is encoded in the conformation tensor , a symmetric positive-definite field that represents the average end-to-end stretch and orientation of the polymer chains. In the Oldroyd-B model, satisfies the upper-convected Maxwell equation: where is the relaxation time. The right-hand side drives back toward the identity (the equilibrium, unstretched state) on a time scale . The polymer contribution to the network stress is: where is the polymer viscosity. This stress is added to the network phase momentum equation.CFMultiphaseOldroydB strategy
The viscoelastic behavior is implemented in theCFMultiphaseOldroydB class, which extends the CFStrategy interface from IBAMR. It provides two key methods:
computeRelaxation
computeStress
Both methods operate on
CellVariable data and traverse the full AMR patch hierarchy, so the conformation tensor and stress fields respect the same refinement structure as the velocity and volume fraction fields.Enabling and configuring the model
Step 1: Set USE_CF = TRUE
In your input file, set the flag at the top level:input2d
Step 2: Add a CFFluid section
Configure the relaxation time and polymer viscosity in aCFFluid input database block. The constructor of CFMultiphaseOldroydB reads this database:
input2d
Step 3: Register the strategy with the integrator
In your C++ driver code, construct aCFMultiphaseOldroydB object and register it with the conformation tensor advection-diffusion integrator before calling initializePatchHierarchy:
Relationship to the Newtonian model
WhenUSE_CF = FALSE, the solver reduces to the purely viscous two-fluid model described in Multiphase model. The network phase viscosity eta_n accounts for all network stress. When USE_CF = TRUE, eta_n represents only the solvent contribution to network stress, and the polymer stress adds the elastic contribution on top of it.