Skip to main content
The solver supports non-Newtonian viscoelastic behavior through an Oldroyd-B conformation tensor model. When enabled, the network phase carries a polymer stress described by a symmetric positive-definite conformation tensor C\mathbf{C}, which evolves in time and contributes an additional stress to the network momentum equation.

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.
Enable the model by setting 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 C\mathbf{C}, a symmetric positive-definite field that represents the average end-to-end stretch and orientation of the polymer chains. In the Oldroyd-B model, C\mathbf{C} satisfies the upper-convected Maxwell equation: ∂C∂t+(un⋅∇)C−C(∇un)T−(∇un)C=−1λ(C−I)\frac{\partial \mathbf{C}}{\partial t} + (\mathbf{u}_n \cdot \nabla)\mathbf{C} - \mathbf{C}(\nabla\mathbf{u}_n)^T - (\nabla\mathbf{u}_n)\mathbf{C} = -\frac{1}{\lambda}(\mathbf{C} - \mathbf{I}) where λ\lambda is the relaxation time. The right-hand side drives C\mathbf{C} back toward the identity (the equilibrium, unstretched state) on a time scale λ\lambda. The polymer contribution to the network stress is: σp=ηpλ(C−I)\boldsymbol{\sigma}_p = \frac{\eta_p}{\lambda}(\mathbf{C} - \mathbf{I}) where ηp\eta_p is the polymer viscosity. This stress is added to the network phase momentum equation.

CFMultiphaseOldroydB strategy

The viscoelastic behavior is implemented in the CFMultiphaseOldroydB class, which extends the CFStrategy interface from IBAMR. It provides two key methods:

computeRelaxation

This method computes the relaxation source term R=−1λ(C−I)\mathbf{R} = -\frac{1}{\lambda}(\mathbf{C} - \mathbf{I}) on the patch hierarchy. It is called by the advection-diffusion integrator to evaluate the right-hand side of the conformation tensor evolution equation. The volume fraction θn\theta_n is used to weight the relaxation consistently with the two-phase formulation.

computeStress

This method evaluates the polymer stress σp=ηpλ(C−I)\boldsymbol{\sigma}_p = \frac{\eta_p}{\lambda}(\mathbf{C} - \mathbf{I}) from the current conformation tensor field and writes it to the output patch data index. The stress is then incorporated into the network phase body force in the momentum equations.
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 a CFFluid 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 a CFMultiphaseOldroydB object and register it with the conformation tensor advection-diffusion integrator before calling initializePatchHierarchy:
Start with a small relaxation time (low Weissenberg number) to verify that your setup is correct before increasing elasticity. Very large relaxation times can require smaller time steps to maintain stability of the conformation tensor evolution.

Relationship to the Newtonian model

When USE_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 σp\boldsymbol{\sigma}_p adds the elastic contribution on top of it.