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.

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

Worked solutions to the three exercises of Lecture 1. Each solution is computed here and checked with assert statements against an exact identity or an independent calculation. The first code cell sets up the notebook and runs Demonstration 1 of the lecture without showing its output, because some of the solutions use its variables.

Exercise 1

Problem. 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.


Exercise 1: Trouton ratios in uniaxial and planar extension
===========================================================
Low-Wi Trouton limits (Wi=0.02): uniaxial = 3.064 (exact 3.064), planar = 4.006 (exact 4.006)
Max relative error across Wi <= 0.40: uniaxial = 3.786e-06, planar = 3.580e-06
<Figure size 792x418 with 1 Axes>

Figure S1.1. Oldroyd-B Trouton ratios in uniaxial and planar extension, computed (symbols) and exact (lines). Both diverge at Wi=1/2\mathrm{Wi} = 1/2.

Explanation. In planar extension (Lxx=ε˙L_{xx} = \dot{\varepsilon}, Lyy=−ε˙L_{yy} = -\dot{\varepsilon}, Lzz=0L_{zz} = 0) the steady conformation is Cxx=(1−2Wi)−1C_{xx} = (1 - 2\mathrm{Wi})^{-1}, Cyy=(1+2Wi)−1C_{yy} = (1 + 2\mathrm{Wi})^{-1}, Czz=1C_{zz} = 1, so that Cxx−Cyy=4Wi/(1−4Wi2)C_{xx} - C_{yy} = 4\mathrm{Wi}/(1 - 4\mathrm{Wi}^2) and the Trouton ratio tends to 4 at low rates, against 3 in uniaxial extension. The largest rate of stretching is ε˙\dot{\varepsilon} in both flows, and both ratios diverge at Wi=1/2\mathrm{Wi} = 1/2. The integrator reproduces both formulas with a relative error below 4×10−64\times10^{-6}.


Exercise 2

Problem. 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.


Exercise 2: a conformation tensor that is not positive definite
===============================================================
Critical SPD shear bound s_crit = 0.8124
At s = 0.95: is_spd=False, min_eig=-0.0935, det(C)=-0.2425
Cholesky LinAlgError raised: True | dissipation Phi_diss = -5.905 < 0
<Figure size 1122x407 with 2 Axes>

Figure S1.2. The tensor C(s)\mathbf{C}(s) of the exercise as its shear component ss increases. (a) The second leading minor and the smallest eigenvalue change sign together at scrit=0.812s_{\mathrm{crit}} = 0.812. (b) The dissipation formula diverges at scrits_{\mathrm{crit}} and is negative beyond it.

Explanation. When Δ2\Delta_2 passes through zero the smallest eigenvalue changes sign, and its contribution (λmin⁡−1)2/λmin⁡(\lambda_{\min} - 1)^2/\lambda_{\min} to the dissipation jumps from +∞+\infty to −∞-\infty. At s=0.95s = 0.95 the smallest eigenvalue is -0.094, the Cholesky factorization fails and the dissipation is -5.9. A tensor of this kind in a flow calculation returns energy to the flow instead of dissipating it, and the calculation diverges. Replacing negative eigenvalues by a small positive number changes the stress without a physical basis; Lecture 2 avoids the problem by evolving Ψ=log⁡C\boldsymbol{\Psi} = \log\mathbf{C}.


Exercise 3

Problem. 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.


Exercise 3: a Runge-Kutta solver for the Giesekus model, and its dissipation
============================================================================
Max |tau_xy(RK4) - tau_xy(engcomprheo log_psi)|: 6.543e-03 Pa
Min Giesekus dissipation: 0.000e+00 W/m^3 (strictly >= 0 for alpha in [0, 1])
<Figure size 1122x407 with 2 Axes>

Figure S1.3. Giesekus model in start-up of shear and after cessation at 1.2 s, integrated with a separate fourth-order Runge–Kutta code. (a) Shear stress against the package, and the second normal stress difference, which is negative. (b) Total dissipation and the part that the Oldroyd-B model would give.

Explanation. In principal axes the Giesekus term multiplies the dissipation (λi−1)2/λi(\lambda_i - 1)^2/\lambda_i of each eigenvalue by 1+α(λi−1)=(1−α)+αλi1 + \alpha(\lambda_i - 1) = (1 - \alpha) + \alpha\lambda_i, which is positive for λi>0\lambda_i > 0 and 0≤α≤10 \le \alpha \le 1. The dissipation is therefore non-negative for every positive definite conformation tensor; the computed minimum is zero, the value at rest. The shear stresses of the two integrators differ by at most 6.5×10−36.5\times10^{-3} Pa.