Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1. The conformation tensor: positive definiteness, free energy and dissipation

A viscoelastic flow solver stores a symmetric tensor in each cell: the conformation tensor C\mathbf{C}, the second moment of the end-to-end vector of the polymer molecules, scaled so that C=I\mathbf{C} = \mathbf{I} at equilibrium. As a second moment it must be positive definite. The free energy of the polymer and the rate at which it dissipates energy are functions of C\mathbf{C}, and both lose their meaning when an eigenvalue of C\mathbf{C} becomes negative.

This lecture builds C\mathbf{C} from an ensemble of dumbbells, derives its free energy and the balance between the work done by the flow, the stored energy and the dissipation, and examines two limits: the divergence of the Oldroyd-B stress in extension at Wi=1/2\mathrm{Wi} = 1/2, which the FENE-P and Giesekus models remove, and the loss of positive definiteness through numerical error.

Learning objectives

  1. Form the conformation tensor C=⟨QQ⊤⟩/Qeq,1D2\mathbf{C} = \langle\mathbf{Q}\mathbf{Q}^\top\rangle / Q_{\mathrm{eq},1\mathrm{D}}^2 from an ensemble of dumbbells and test its positive definiteness with tensors_kinematics.check_spd_conformation.

  2. Derive the free energy ψ(C)=G02(tr⁡C−ln⁡det⁡C−d)≥0\psi(\mathbf{C}) = \frac{G_0}{2}(\operatorname{tr}\mathbf{C} - \ln\det\mathbf{C} - d) \geq 0 and check the balance τp:D=ψ˙+Φdiss\boldsymbol{\tau}_p : \mathbf{D} = \dot{\psi} + \Phi_{\mathrm{diss}}, with Φdiss≥0\Phi_{\mathrm{diss}} \geq 0, in a transient flow.

  3. Compute the Trouton ratio of the Oldroyd-B model, which diverges at Wi=λε˙=1/2\mathrm{Wi} = \lambda\dot{\varepsilon} = 1/2, and compare it with the FENE-P and Giesekus models.

  4. Find what happens to the eigenvalues and to the dissipation when C\mathbf{C} is not positive definite.

Time: about 60 min

1. The conformation tensor as a second moment, and positive definiteness

Consider a dilute solution with npn_p polymer molecules per unit volume. Each molecule is described by its end-to-end vector Q\mathbf{Q} in dd dimensions (d=2d = 2 or 3), whose components have the variance ⟨Qx2⟩eq=kBT/H\langle Q_x^2\rangle_{\mathrm{eq}} = k_B T / H at equilibrium. The dimensionless conformation tensor is the second moment of Q\mathbf{Q} divided by this variance,

C≡HkBT⟨QQ⊤⟩,Ceq=I,τp=G0(C−I),G0=npkBT.\mathbf{C} \equiv \frac{H}{k_B T}\langle \mathbf{Q}\mathbf{Q}^\top \rangle, \qquad \mathbf{C}_{\mathrm{eq}} = \mathbf{I}, \qquad \boldsymbol{\tau}_p = G_0(\mathbf{C} - \mathbf{I}), \quad G_0 = n_p k_B T.

For any non-zero vector v\mathbf{v}, v⊤Cv=HkBT⟨(v⋅Q)2⟩>0\mathbf{v}^\top\mathbf{C}\mathbf{v} = \frac{H}{k_B T}\langle (\mathbf{v}\cdot\mathbf{Q})^2 \rangle > 0, provided the thermal fluctuations of Q\mathbf{Q} have components in all directions. The tensor C\mathbf{C} is therefore symmetric and positive definite. Two equivalent statements are:

  1. All eigenvalues λ1,…,λd\lambda_1, \dots, \lambda_d are positive. Their square roots are the stretch ratios of the molecules along the principal axes.

  2. All leading principal minors are positive (Sylvester’s criterion): Δ1=C11>0\Delta_1 = C_{11} > 0, Δ2=C11C22−C122>0\Delta_2 = C_{11}C_{22} - C_{12}^2 > 0, Δ3=det⁡C>0\Delta_3 = \det\mathbf{C} > 0.

The free-energy density of Hookean dumbbells is

ψ(C)=G02(tr⁡C−ln⁡det⁡C−d)=G02∑i=1d(λi−ln⁡λi−1)≥0\psi(\mathbf{C}) = \frac{G_0}{2}\left(\operatorname{tr}\mathbf{C} - \ln\det\mathbf{C} - d\right) = \frac{G_0}{2}\sum_{i=1}^{d}\left(\lambda_i - \ln\lambda_i - 1\right) \geq 0

It is zero at equilibrium and tends to +∞+\infty as det⁡C→0\det\mathbf{C} \to 0, that is when the smallest eigenvalue tends to zero: a state in which the molecules have no extension in one direction has an infinite entropic cost.


Demonstration 1: the conformation tensor of an ensemble and its free energy
===========================================================================
Equilibrium C = I : is_spd=True, psi/G0=0.000e+00
Deformed ensemble : is_spd=True, min_eig=0.5122, psi/G0=0.7513
Sylvester minors  : Delta_1=3.3004 > 0, Delta_2=1.7567 > 0, Delta_3=1.0166 > 0
<Figure size 1155x429 with 3 Axes>

Figure 1.1. (a) Free energy ψ/G0\psi/G_0 on the plane (C12,C22)(C_{12}, C_{22}) at C11=2C_{11} = 2. The shaded region below the curve det⁡C=0\det\mathbf{C} = 0 contains no positive-definite tensor. (b) Contribution 12(λi−ln⁡λi−1)\tfrac{1}{2}(\lambda_i - \ln\lambda_i - 1) of one eigenvalue: zero at equilibrium and unbounded as λi→0+\lambda_i \to 0^+.

2. Work, free energy and dissipation

In an isothermal flow the power of the polymer stress, Pstress=τp:DP_{\mathrm{stress}} = \boldsymbol{\tau}_p : \mathbf{D}, must equal the rate of change of the stored free energy, ψ˙\dot{\psi}, plus a dissipation Φdiss\Phi_{\mathrm{diss}} that is never negative. For the Oldroyd-B model the conformation tensor obeys C˙=LC+CL⊤−1λ(C−I)\dot{\mathbf{C}} = \mathbf{L}\mathbf{C} + \mathbf{C}\mathbf{L}^\top - \frac{1}{\lambda}(\mathbf{C} - \mathbf{I}). Differentiating ψ(C)\psi(\mathbf{C}) along this evolution gives the stress as a derivative of the free energy, τp=2C∂ψ∂C=G0(C−I)\boldsymbol{\tau}_p = 2\mathbf{C}\frac{\partial\psi}{\partial\mathbf{C}} = G_0(\mathbf{C} - \mathbf{I}), and the balance

τp:D⏟Stress power Pstress=dψdt+G02λtr⁡ ⁣(C+C−1−2I)⏟Φdiss=G02λ∑i=1d(λi−1)2λi≥0.\underbrace{\boldsymbol{\tau}_p : \mathbf{D}}_{\text{Stress power } P_{\mathrm{stress}}} = \frac{d\psi}{dt} + \underbrace{\frac{G_0}{2\lambda}\operatorname{tr}\!\left(\mathbf{C} + \mathbf{C}^{-1} - 2\mathbf{I}\right)}_{\Phi_{\mathrm{diss}} = \frac{G_0}{2\lambda}\sum_{i=1}^d \frac{(\lambda_i - 1)^2}{\lambda_i} \geq 0}.

In start-up of shear the work of the flow increases the free energy (ψ˙>0\dot{\psi} > 0) until the steady state, in which ψ˙=0\dot{\psi} = 0 and all the power is dissipated, Pstress=Φdiss>0P_{\mathrm{stress}} = \Phi_{\mathrm{diss}} > 0. When the flow stops (D=0\mathbf{D} = \mathbf{0}), the power is zero and the stored energy decreases monotonically, ψ˙=−Φdiss≤0\dot{\psi} = -\Phi_{\mathrm{diss}} \leq 0.


Demonstration 2: work, free energy and dissipation in start-up and cessation of shear
=====================================================================================
Pointwise Clausius-Duhem residual max |P - (dpsi/dt + Phi_diss)|: 1.937e-03 W/m^3
Integrated mechanical work = 26.0313 J/m^3 against (diss + Delta_psi) = 26.1562 J/m^3
<Figure size 1155x418 with 2 Axes>

Figure 1.2. Start-up of shear until t=1.6t = 1.6 s, then cessation. (a) Stress power, rate of change of the free energy and dissipation; the dissipation is never negative. (b) Free energy density, which rises during the flow and decays after it stops.

3. Uniaxial extension: the divergence at Wi=1/2\mathrm{Wi} = 1/2

The Oldroyd-B model, with its linear spring, fails in extension whatever the accuracy of the solver. In steady uniaxial extension, L=diag⁡(ε˙,−ε˙/2,−ε˙/2)\mathbf{L} = \operatorname{diag}(\dot{\varepsilon}, -\dot{\varepsilon}/2, -\dot{\varepsilon}/2), with the Weissenberg number Wi=λε˙\mathrm{Wi} = \lambda\dot{\varepsilon}, the equation for the axial component is

dCxxdt=(2ε˙−1λ)Cxx+1λ  ⟹  Cxxsteady=11−2Wi(Wi<12),TrOldroyd-B(Wi)≡τxx−τyyηpε˙=3(1−2Wi)(1+Wi).\frac{dC_{xx}}{dt} = \left(2\dot{\varepsilon} - \frac{1}{\lambda}\right)C_{xx} + \frac{1}{\lambda} \implies C_{xx}^{\mathrm{steady}} = \frac{1}{1 - 2\mathrm{Wi}} \quad (\mathrm{Wi} < \tfrac{1}{2}), \qquad \mathrm{Tr}_{\mathrm{Oldroyd\text{-}B}}(\mathrm{Wi}) \equiv \frac{\tau_{xx} - \tau_{yy}}{\eta_p\dot{\varepsilon}} = \frac{3}{(1 - 2\mathrm{Wi})(1 + \mathrm{Wi})}.

For Wi→0\mathrm{Wi} \to 0 the Trouton ratio tends to the Newtonian value 3. At Wi=1/2\mathrm{Wi} = 1/2 the rate of stretching by the flow, 2ε˙2\dot{\varepsilon}, equals the rate of relaxation, 1/λ1/\lambda, and CxxC_{xx} and the extensional viscosity diverge. Two modifications available in integrate_homogeneous_constitutive remove this divergence:

  1. The FENE-P model (finite extensibility with the approximation of Peterlin) replaces the relaxation term by −(11−(tr⁡C−d)/bC−I)/λ-(\frac{1}{1 - (\operatorname{tr}\mathbf{C} - d)/b}\mathbf{C} - \mathbf{I})/\lambda. The trace then stays below b+db + d, and the Trouton ratio approaches a plateau of order 2b2b at high Wi\mathrm{Wi}.

  2. The Giesekus (1982) model adds the quadratic term −αλ(C−I)2-\frac{\alpha}{\lambda}(\mathbf{C} - \mathbf{I})^2, with 0<α<10 < \alpha < 1, which stands for a drag that depends on the orientation. The Trouton ratio then tends to 2/α2/\alpha.


Demonstration 3: Trouton ratios of the Oldroyd-B, FENE-P and Giesekus models
============================================================================
Oldroyd-B Trouton ratio (Wi <= 0.42) max rel err: 2.133e-06
Wi -> 0 Trouton limit (FENE-P b=120): 3.063 (exact Newtonian = 3.0)
Wi = 1.6 Trouton ratios -> FENE-P(b=50): 74.4, FENE-P(b=120): 170.7, Giesekus(a=0.2): 8.09
<Figure size 836x440 with 1 Axes>

Figure 1.3. Polymer Trouton ratio against the extensional Weissenberg number. The Oldroyd-B value diverges at Wi=1/2\mathrm{Wi} = 1/2; the FENE-P model (b=50b = 50 and 120) and the Giesekus model (α=0.2\alpha = 0.2) stay finite beyond it.

4. FENE-P and Giesekus models in simple shear

Both the FENE-P and the Giesekus model keep the extensional stress finite and predict shear thinning in simple shear, but they differ in the second normal stress difference N2=τyy−τzzN_2 = \tau_{yy} - \tau_{zz}:

  • In the FENE-P model the relaxation term is a scalar function times C\mathbf{C}, so that Cyy=CzzC_{yy} = C_{zz} and N2=0N_2 = 0 in simple shear. The model is used for dilute solutions.

  • In the Giesekus model the quadratic term couples Cxy2C_{xy}^2 into CyyC_{yy}, which becomes smaller than CzzC_{zz}, so that N2<0N_2 < 0. The model is used for concentrated solutions and melts, with 0<α≤1/20 < \alpha \leq 1/2; for larger α\alpha the shear stress decreases with shear rate.


Demonstration 4: FENE-P and Giesekus models in simple shear
===========================================================
FENE-P (b=40)     at Wi=10 -> eta/eta_p=0.507, N2/N1=-3.417e-15
Giesekus (a=0.25) at Wi=10 -> eta/eta_p=0.153, N2/N1=-0.064
<Figure size 1155x418 with 2 Axes>

Figure 1.4. Steady shear of the FENE-P model (b=40b = 40) and the Giesekus model (α=0.25\alpha = 0.25). (a) Polymer viscosity divided by its zero-shear value. (b) The ratio N2/N1N_2/N_1: zero for FENE-P, negative for Giesekus with the low-rate limit −α/2-\alpha/2 (dashed).

Inside the algorithm

The cell below prints the source of tensors_kinematics.check_spd_conformation. The function computes the symmetry error max⁡i,j∣Cij−Cji∣\max_{i,j}\lvert C_{ij} - C_{ji}\rvert and the smallest eigenvalue of the symmetric part of C\mathbf{C}, and evaluates the logarithm of the determinant as ∑iln⁡λi\sum_i \ln\lambda_i only if that eigenvalue exceeds a tolerance.

Check against the package

The check below verifies the relation τp=2C∂ψ∂C=G0(C−I)\boldsymbol{\tau}_p = 2\mathbf{C}\frac{\partial\psi}{\partial\mathbf{C}} = G_0(\mathbf{C} - \mathbf{I}) numerically. It differentiates ψ(C+ϵEij)\psi(\mathbf{C} + \epsilon\mathbf{E}_{ij}) by central differences in all symmetric directions Eij\mathbf{E}_{ij}, for an anisotropic positive definite C\mathbf{C}, and compares the result with G0(C−I)G_0(\mathbf{C} - \mathbf{I}); the difference is below 10-10.


Inside the algorithm: the free energy and the stress derived from it
====================================================================
def check_spd_conformation(C: np.ndarray, G0: float = 1.0, tol: float = 1e-12) -> dict:
    """Test the symmetry and positive definiteness of C and return its dimensionless Hookean free energy."""
    C_m = np.asarray(C, dtype=float)
    if C_m.ndim != 2 or C_m.shape[0] != C_m.shape[1]:
        raise ValueError("Conformation tensor C must be a square 2-D matrix.")
    sym_err = float(np.max(np.abs(C_m - C_m.T)))
    C_sym = 0.5 * (C_m + C_m.T)
    evals = np.linalg.eigvalsh(C_sym)
    min_ev = float(np.min(evals))
    det_c = float(np.prod(evals))
    tr_c = float(np.sum(evals))
    is_spd = (sym_err <= 1e-9) and (min_ev > tol)
    d = C_m.shape[0]
    psi = 0.5 * float(G0) * (tr_c - float(np.sum(np.log(np.maximum(evals, 1e-300)))) - d) if is_spd else math.nan
    return {
        "is_spd": is_spd,
        "min_eigenvalue": min_ev,
        "eigenvalues": evals,
        "det_C": det_c,
        "trace_C": tr_c,
        "free_energy_hookean": psi,
    }

NumPy psi(C) = 1.98717840 against package = 1.98717840
Thermodynamic stress ||2 C (dpsi/dC)^T - G0(C - I)||_F = 3.714e-09

Exercises

Worked solutions are in 01_solutions.ipynb. The cell below the list is a short self-check to start from.

  1. Verify a result. Check with tensors_kinematics.integrate_homogeneous_constitutive that the Trouton ratio (τxx−τyy)/(ηpε˙)(\tau_{xx} - \tau_{yy})/(\eta_p\dot{\varepsilon}) of an Oldroyd-B fluid is 3(1−2Wi)(1+Wi)\frac{3}{(1 - 2\mathrm{Wi})(1 + \mathrm{Wi})} in uniaxial extension and 41−4Wi2\frac{4}{1 - 4\mathrm{Wi}^2} in planar extension, for 0.02≤Wi≤0.400.02 \le \mathrm{Wi} \le 0.40.

  2. Find how it fails. Take the family of tensors C(s)=[2.2s0s0.300001.0]\mathbf{C}(s) = \begin{bmatrix} 2.2 & s & 0 \\ s & 0.30 & 0 \\ 0 & 0 & 1.0 \end{bmatrix}, which is positive definite for s<scrit=2.2×0.30≈0.8124s < s_{\mathrm{crit}} = \sqrt{2.2 \times 0.30} \approx 0.8124. For ss up to 0.95 compute the leading minor Δ2(s)\Delta_2(s), the smallest eigenvalue λmin⁡(s)\lambda_{\min}(s), whether the Cholesky factorization fails, and the dissipation Φdiss(s)\Phi_{\mathrm{diss}}(s) of the Oldroyd-B model.

  3. Implement it yourself. Write a fourth-order Runge–Kutta solver in NumPy for the Giesekus model (G0=2.5 PaG_0 = 2.5\ \mathrm{Pa}, λ=0.6 s\lambda = 0.6\ \mathrm{s}, α=0.3\alpha = 0.3) in start-up of shear at 5.0 s−15.0\ \mathrm{s}^{-1} followed by cessation at t=1.2 st = 1.2\ \mathrm{s}. Compare the shear stress with integrate_homogeneous_constitutive, and check that the dissipation ΦdissG=G02λtr⁡[(I−C−1)((C−I)+α(C−I)2)]\Phi_{\mathrm{diss}}^{\mathrm{G}} = \frac{G_0}{2\lambda}\operatorname{tr}[(\mathbf{I} - \mathbf{C}^{-1})((\mathbf{C}-\mathbf{I}) + \alpha(\mathbf{C}-\mathbf{I})^2)] is never negative.


Self-check for the exercises
============================
All checks passed.