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 · 16. Passive microrheology and a frame-invariant, thermodynamically consistent stress model

Worked solutions to the three exercises of Lecture 16. 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. A probe of radius a=0.5 μma = 0.5\,\mu\text{m} at kBT=4.11×10−21 Jk_B T = 4.11\times 10^{-21}\text{ J} moves in one dimension in a medium with one Maxwell mode and a solvent (G0=4.0 Pa,τ1=0.25 s,ηs=2×10−3 Pa⋅sG_0 = 4.0\text{ Pa}, \tau_1 = 0.25\text{ s}, \eta_s = 2\times 10^{-3}\text{ Pa}\cdot\text{s}). Derive the plateau of the mean-square displacement at intermediate times, ⟨Δx2⟩plat=kBT/(3πaG0)\langle\Delta x^2\rangle_{\mathrm{plat}} = k_B T / (3\pi a G_0), and its slope at long times, 2D∞=2kBT/[6πa(ηs+G0τ1)]2 D_\infty = 2 k_B T / [6\pi a (\eta_s + G_0\tau_1)], and compare both with simulate_gle_thermal_probe.


Exercise 1: plateau and long-time slope of the mean-square displacement
=======================================================================
Analytical 1-D caging plateau kT/(3*pi*a*G0) : 0.00022 um^2 against GLE(12 ms) = 0.00023 um^2
Analytical terminal slope 2*D_inf            : 0.00087 um^2/s against GLE(25 s) = 0.00087 um^2/s
<Figure size 814x451 with 1 Axes>

Figure S16.1. Mean-square displacement of a probe in a Jeffreys medium: simulation and exact result, with the plateau kBT/(3πaG0)k_BT/(3\pi a G_0) and the long-time diffusion line.

Explanation. The Maxwell mode acts on the probe as a spring of stiffness k1=6πaG0k_1 = 6\pi a G_0 attached to a point y1y_1 that itself relaxes. At intermediate times the probe has equilibrated in the spring and the attachment point has not yet moved, so that x≈y1(0)+δxx \approx y_1(0) + \delta x with ⟨δx2⟩=kBT/k1\langle\delta x^2\rangle = k_B T/k_1. The simulation starts with x(0)=0x(0)=0 and with y1(0)y_1(0) drawn from its equilibrium distribution of variance kBT/k1k_B T/k_1; the plateau is therefore 2kBT/k1=kBT/(3πaG0)2 k_B T / k_1 = k_B T / (3\pi a G_0), which is also the value given by the generalized Stokes–Einstein relation in one dimension. The simulation gives 2.3×10−4 μm22.3\times10^{-4}\ \mu\mathrm{m}^2 at 12 ms against 2.2×10−4 μm22.2\times10^{-4}\ \mu\mathrm{m}^2, and a long-time slope of 8.7×10−4 μm2/s8.7\times10^{-4}\ \mu\mathrm{m}^2/\mathrm{s}, equal to the formula to the two digits printed.


Exercise 2

Problem. (1) Compare the error of fit_naive_component_mlp and of fit_thermodynamic_tensor_rheoml on test data in the frame of the training data and in a frame rotated by 42∘42^\circ. (2) Fit the weights of the tensor basis by ordinary least squares (np.linalg.lstsq, without the condition wk≥0w_k \geq 0) to noisy synthetic data at small stretch, and evaluate the dissipation in uniaxial stretch, C=diag⁡(λ2,1/λ,1/λ)\mathbf{C} = \operatorname{diag}(\lambda^2, 1/\lambda, 1/\lambda), for λ\lambda between 1.1 and 3.2. Compare with the fit with non-negative weights.


Exercise 2: a rotated frame, and a fit without the constraint of non-negative weights
=====================================================================================
Component-wise network RMSE: 0 deg = 0.0048 Pa -> 42 deg = 1.4976 Pa (310.3x jump)
Tensor-basis model     RMSE: 42 deg = 0.0000 Pa (invariant)
Unconstrained OLS weights : [ 1.798  0.338  0.087 -0.285] -> min dissipation = -89.64 (negative)
Tensor-basis model NNLS weights    : [1.794 0.    0.    0.   ] -> min dissipation = 0.10 (non-negative)
<Figure size 1166x429 with 2 Axes>

Figure S16.2. (a) Root-mean-square error of the component-wise network in the training frame and after a rotation by 42°, and of the tensor-basis model after the rotation. (b) Dissipation rate against stretch beyond the training range: negative for unconstrained least squares, positive for non-negative weights.

Explanation. The network that maps components to components has an error of 0.005 Pa in the frame of its training data and 1.50 Pa after a rotation by 42∘42^\circ, 310 times larger: nothing in it expresses that the stress must rotate with the conformation tensor. The tensor-basis model has this property by construction, and its error does not change. The unconstrained fit returns the weights (1.798, 0.338, 0.087, -0.285); the negative weight of the highest term has no visible effect at small stretch and makes the dissipation negative at large stretch, down to -89.6 at λ=3.2\lambda = 3.2. The fit with non-negative weights returns (1.794, 0, 0, 0), and its dissipation stays positive (the smallest value is 0.10). A stress model with negative dissipation inside a flow solver adds energy to the flow.


Exercise 3

Problem. Combine the log-conformation equation with a fitted stress model. Generate training data with entangled_tubes.solve_fenep_fenecr(..., b_ext=28.0, variant="fenep") at the shear rates γ˙∈{1.0,2.5}\dot{\gamma} \in \{1.0, 2.5\}, fit the tensor-basis model for τp(C)\boldsymbol{\tau}_p(\mathbf{C}), then integrate dΨ/dtd\boldsymbol{\Psi}/dt at the shear rate γ˙=3.4\dot{\gamma} = 3.4, which is outside the training data, with the relaxation term −(τp(C)/G0)/λ-(\boldsymbol{\tau}_p(\mathbf{C})/G_0)/\lambda, and compare with the FENE-P model.


Exercise 3: the log-conformation equation with a fitted stress model
====================================================================
Tensor-basis model fit R^2 on FENE-P training trajectories : 1.00000
Unseen Wi = 3.4 start-up of shear stress rel L2 err  : 0.0035
Unseen Wi = 3.4 startup N1(t) rel L2 err         : 0.0057
<Figure size 1166x429 with 2 Axes>

Figure S16.3. Log-conformation integration with the fitted stress model at Wi=3.4\mathrm{Wi} = 3.4, which was not in the training data, against the FENE-P model. (a) Shear stress. (b) First normal stress difference.

Explanation. The kinematic part of the equation, [Ω,Ψ]+2B[\boldsymbol{\Omega},\boldsymbol{\Psi}] + 2\mathbf{B}, is known exactly and is not fitted; only the function τp(C)\boldsymbol{\tau}_p(\mathbf{C}) is. The conformation tensor then stays positive definite, and the model frame indifferent, whatever the fit. The fit reproduces the training data (R2=1.00000R^2 = 1.00000), and at the shear rate 3.4 the predicted start-up differs from the FENE-P model by 0.35 % in the shear stress and by 0.57 % in N1N_1 (relative L2L_2 norm). The test is a favourable one: the data come from a model whose stress is a function of C\mathbf{C} alone, and the new rate is 36 % above the largest rate of the training data.