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 · 14. Viscoelastic cavity flow, constricted channels and the Pakdel–McKinley criterion

Worked solutions to the three exercises of Lecture 14. 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. For flow of an Oldroyd-B fluid with curved streamlines in a gap of width dd and radius of curvature R\mathcal{R}, derive the critical Weissenberg number Wicrit(d/R,βs)=Mcrit/2(1−βs)(d/R)\mathrm{Wi}_{\mathrm{crit}}(d/\mathcal{R}, \beta_s) = \mathcal{M}_{\mathrm{crit}} / \sqrt{2(1-\beta_s)(d/\mathcal{R})} from the Pakdel–McKinley criterion with Mcrit=5.92\mathcal{M}_{\mathrm{crit}} = 5.92. Evaluate it for d/Rd/\mathcal{R} between 0.02 and 0.40 for the assumed parameters BOGER_PIB (βs=1.2/3.0=0.40\beta_s = 1.2/3.0 = 0.40) and for a dilute solution (βs=0.85\beta_s = 0.85), and check each value with pakdel_mckinley_criterion.


Exercise 1: critical Weissenberg number against curvature and viscosity ratio
=============================================================================
BOGER_PIB beta_s = 0.40 | Wi_crit at d/R=0.10 : 17.090
Dilute    beta_s = 0.85 | Wi_crit at d/R=0.10 : 34.179
Max verification residual |M(Wi_crit) - M_crit| : 1.776e-15
<Figure size 792x440 with 1 Axes>

Figure S14.1. Critical Weissenberg number of the Pakdel–McKinley criterion with Mcrit=5.92M_{\mathrm{crit}} = 5.92 against the ratio of gap to radius of curvature, for two solvent viscosity ratios. The shaded region is above the criterion for βs=0.40\beta_s = 0.40.

Explanation. The critical Weissenberg number is proportional to [(1−βs)(d/R)]−1/2[(1-\beta_s)(d/\mathcal{R})]^{-1/2}: a stronger curvature or a larger polymer contribution to the viscosity lowers it, and in a straight channel (d/R→0d/\mathcal{R} \to 0) it is infinite. At d/R=0.10d/\mathcal{R} = 0.10 it is 17.1 for βs=0.40\beta_s = 0.40 and 34.2 for βs=0.85\beta_s = 0.85, a factor of 2, as the ratio 0.60/0.15\sqrt{0.60/0.15} requires. The function pakdel_mckinley_criterion returns Mcrit\mathcal{M}_{\mathrm{crit}} at each of these points to 2×10−152\times10^{-15}.


Exercise 2

Problem. (1) Run solve_2d_viscoelastic_cavity at Wi=0.75\mathrm{Wi}=0.75 on grids of N∈{16,22,28}N \in \{16, 22, 28\} cells in each direction with regularized_lid=False and with True, and compare the trace of the conformation tensor at the corner of the lid. (2) Compare the largest Pakdel–McKinley number M\mathcal{M} in solve_2d_wavy_contraction_channel for a straight channel (ε=0.0\varepsilon = 0.0) and for ε=0.38\varepsilon = 0.38 at Wi=1.6\mathrm{Wi}=1.6.


Exercise 2: corner stretch with and without a regularized lid, and the effect of a constriction
===============================================================================================
Unregularized corner tr(C) across N=[16, 22, 28] : [78.79, 149.04, 234.68] (diverges with mesh)
Regularized   corner tr(C) across N=[16, 22, 28] : [4.485, 4.087, 3.638] (bounded)
Straight slit M_max = 0.0156 against constricted eps=0.38 M_max = 0.4749 (30.3x higher)
<Figure size 1166x429 with 2 Axes>

Figure S14.2. (a) Trace of C\mathbf{C} at the downstream top corner against the grid size: it grows without limit for the uniform lid and stays bounded for the regularized lid. (b) Largest MM in a straight channel and in a wavy one (ε=0.38\varepsilon = 0.38).

Explanation. With a lid that moves at a uniform velocity, the velocity is discontinuous at the corners, and the trace of the conformation tensor there grows without limit as the grid is refined (79, 149 and 235 on the three grids). With the regularized lid it stays bounded (4.5, 4.1 and 3.6). A convergence study of viscoelastic cavity flow is meaningful only with a regularized lid. In the channel, the largest Pakdel–McKinley number is 0.016 without the constriction and 0.475 with it, 30 times larger: the criterion depends on the curvature of the streamlines, which a calculation for a straight channel does not contain.


Exercise 3

Problem. Write in NumPy a function that locates the minimum of the stream function between grid points by fitting a parabola in each direction, and a function for the vorticity ω=−∇h2ψ\omega = -\nabla_h^2 \psi. Compare the position of the vortex centre with that returned by solve_2d_viscoelastic_cavity for Wi∈{0.0,0.35,0.75,1.15}\mathrm{Wi} \in \{0.0, 0.35, 0.75, 1.15\}.


Exercise 3: vortex centre between grid points, and the vorticity
================================================================
Wi = 0.00 | vortex centre = (0.50002, 0.77856) | difference from the package = 0.00e+00
Wi = 0.35 | vortex centre = (0.47820, 0.79104) | difference from the package = 0.00e+00
Wi = 0.75 | vortex centre = (0.46548, 0.80440) | difference from the package = 0.00e+00
Wi = 1.15 | vortex centre = (0.46259, 0.81038) | difference from the package = 0.00e+00
<Figure size 1144x429 with 3 Axes>

Figure S14.3. (a) Position of the vortex centre from a parabolic fit around the minimum of the stream function. (b) Vorticity from the discrete Laplacian of the stream function, with the vortex centre.

Explanation. The grid spacing is about 0.04, and between Wi=0\mathrm{Wi} = 0 and 1.15 the vortex centre moves from (0.500, 0.779) to (0.463, 0.810), that is by 0.037 in xx and 0.032 in yy. Without interpolation between grid points a shift smaller than one cell could not be followed. The function written here returns the same positions as the package.