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.

14. Viscoelastic cavity flow, constricted channels and the Pakdel–McKinley criterion

In creeping flow of a Newtonian fluid in a lid-driven cavity the main vortex is centred at xc/L=0.5x_c / L = 0.5, by the symmetry of Stokes flow. Inertia moves it downstream. A polymer solution at negligible Reynolds number moves it upstream, and the shift grows with the Weissenberg number. At higher Weissenberg numbers, flows with curved streamlines become unstable although inertia is negligible.

Both effects come from the tension along curved streamlines. Pakdel and McKinley (1996) combined the curvature of the streamlines and the normal stress into one dimensionless number M\mathcal{M}, which is large where such an instability is expected. This lecture computes the shift of the vortex, shows why the lid velocity must be regularized at the corners, and evaluates M\mathcal{M} in a channel with wavy walls.

Learning objectives

  1. Explain why a lid that moves at a uniform velocity gives a stress singularity at the corners, and use the regularized velocity ulid(x)=16x2(1−x)2u_{\mathrm{lid}}(x) = 16x^2(1-x)^2.

  2. Compute the upstream shift of the vortex centre as the Weissenberg number increases (re=0.01).

  3. Define the Pakdel–McKinley number M(x,y)=(λ∣u∣/R) (τ11/(η0γ˙))\mathcal{M}(x,y) = \sqrt{(\lambda\lvert\mathbf{u}\rvert/\mathcal{R})\,(\tau_{11}/(\eta_0\dot{\gamma}))} and evaluate it in a channel with wavy walls.

  4. Map the largest value of M\mathcal{M} against the amplitude ε\varepsilon of the constriction and the Weissenberg number.

Time: about 60 min

1. Cavity flow and the upstream shift of the vortex

Flow in a square cavity [0,L]2[0, L]^2 driven by its lid is a standard test of viscoelastic solvers (Fattal and Kupferman, 2005; Sousa et al., 2016). If the lid moves at a uniform velocity, the shear rate of a Newtonian fluid diverges as r−1r^{-1} at the two upper corners, and the normal stress of an Oldroyd-B fluid, N1∼γ˙2N_1 \sim \dot{\gamma}^2, diverges as r−2r^{-2}. The singularity is removed by a lid velocity that vanishes smoothly at the corners:

ulid(x)=16(xL)2(1−xL)2U0,ulid(0)=ulid′(0)=ulid(L)=ulid′(L)=0,ulid(L/2)=U0u_{\mathrm{lid}}(x) = 16 \left(\frac{x}{L}\right)^2 \left(1 - \frac{x}{L}\right)^2 U_0, \qquad u_{\mathrm{lid}}(0) = u_{\mathrm{lid}}'(0) = u_{\mathrm{lid}}(L) = u_{\mathrm{lid}}'(L) = 0, \qquad u_{\mathrm{lid}}(L/2) = U_0

At a negligible Reynolds number (Re=0.01\mathrm{Re} = 0.01), consider the Weissenberg number Wi=λU0/L\mathrm{Wi} = \lambda U_0 / L increasing from 0 to 1.2:

  • The fluid that is carried along the lid from left to right is sheared, and its polymer acquires a tension along the streamlines, τxx>0\tau_{xx} > 0 (tr⁡C≫2\operatorname{tr}\mathbf{C} \gg 2).

  • Near the downstream corner the streamlines turn downwards with a radius of curvature R\mathcal{R}. A tension along a curved streamline acts as a force τ11/R\tau_{11}/\mathcal{R} towards the centre of curvature, which resists the turn. The recirculation changes, and the centre of the main vortex moves upstream, to xc<0.5x_c < 0.5.


Demonstration 1: shift of the vortex centre with Weissenberg number (Re = 0.01)
===============================================================================
Wi = 0.00 | vortex centre (x_c, y_c) = (0.5000, 0.7788) | max tr(C) = 2.000 | detC_min = 1.0000
Wi = 0.40 | vortex centre (x_c, y_c) = (0.4750, 0.7944) | max tr(C) = 7.834 | detC_min = 1.0000
Wi = 0.80 | vortex centre (x_c, y_c) = (0.4624, 0.8059) | max tr(C) = 18.052 | detC_min = 1.0000
Wi = 1.20 | vortex centre (x_c, y_c) = (0.4594, 0.8115) | max tr(C) = 25.151 | detC_min = 1.0000
<Figure size 1188x451 with 3 Axes>

Figure 14.1. Cavity flow at Re=0.01\mathrm{Re} = 0.01. (a) Horizontal position of the vortex centre (left axis) and the largest trace of C\mathbf{C} (right axis) against Wi\mathrm{Wi}. (b) Streamlines of the Newtonian flow (grey) and at Wi=1.2\mathrm{Wi} = 1.2 (blue), with the two vortex centres.

2. Regularization of the lid velocity

Consider the choice regularized_lid=False, that is ulid(x)=1u_{\mathrm{lid}}(x) = 1 up to the side walls x=0x = 0 and x=Lx = L. At the two upper corners the velocity changes from 1 on the lid to 0 on the side wall within one grid spacing hyh_y, so that ∂yu∼1/hy\partial_y u \sim 1/h_y: the velocity gradient there grows without limit as the grid is refined.

The demonstration compares the stretch tr⁡C(x,ytop)\operatorname{tr}\mathbf{C}(x, y_{\mathrm{top}}) in the row of cells under the lid for the regularized lid velocity 16x2(1−x)216x^2(1-x)^2 and for the uniform one, at the same Wi=0.85\mathrm{Wi} = 0.85.


Demonstration 2: regularized and uniform lid velocity
=====================================================
Regularized lid top-corner tr(C)   : 5.673 (bounded)
Unregularized lid top-corner tr(C) : 177.143 (grows as the grid is refined)
<Figure size 1188x440 with 2 Axes>

Figure 14.2. (a) The regularized lid velocity 16x2(1−x)216x^2(1-x)^2 and the uniform one. (b) Trace of C\mathbf{C} in the row of cells under the lid: the uniform lid gives a spike at the downstream corner.

3. Channels with wavy walls and the Pakdel–McKinley criterion

Viscoelastic flows become unstable at negligible Reynolds number in contractions, in channels with wavy walls, in Taylor–Couette cells and in cone-and-plate rheometers. Pakdel and McKinley (1996) described these elastic instabilities with one criterion. It compares the distance ℓe=λ∣u∣\ell_e = \lambda \lvert\mathbf{u}\rvert that the fluid travels in one relaxation time with the radius of curvature R\mathcal{R} of the streamline, and the tension τ11\tau_{11} along the streamline with the viscous shear stress η0γ˙\eta_0 \dot{\gamma}:

M(x,y)=λ∣u(x,y)∣R(x,y) τ11(x,y)η0γ˙(x,y)≥Mcrit\mathcal{M}(x,y) = \sqrt{\frac{\lambda \lvert\mathbf{u}(x,y)\rvert}{\mathcal{R}(x,y)} \, \frac{\tau_{11}(x,y)}{\eta_0 \dot{\gamma}(x,y)}} \geq \mathcal{M}_{\mathrm{crit}}

In viscoelastic_fvm_2d.solve_2d_wavy_contraction_channel the fluid flows through a periodic channel of half-height H(x)=1−εcos⁡xH(x) = 1 - \varepsilon\cos x for 0≤x≤2π0 \le x \le 2\pi: the channel is narrowest at x=0x = 0 and 2π2\pi and widest at x=πx = \pi. The field M(x,y)\mathcal{M}(x,y) has the following features:

  • On the centreline, y=0y = 0, the streamline is straight (R→∞\mathcal{R} \to \infty), and M\mathcal{M} is close to zero although the fluid is stretched there.

  • At the walls, ∣y∣=H(x)\lvert y\rvert = H(x), the velocity is zero, and so is M\mathcal{M}.

  • The largest values are found between the centreline and the wall near the narrowest section, where the velocity, the curvature of the streamlines and the normal stress N1N_1 are all large.


Demonstration 3: normal stress and Pakdel-McKinley number in a channel with wavy walls
======================================================================================
Axial volumetric flux range [min, max] : [1.3347, 1.3347] (incompressible)
Peak conformation trace max tr(C)      : 16.918
Peak first normal stress max N1        : 7.306
Largest Pakdel-McKinley M(x, y)           : 0.530 (centreline M = 0.275)
<Figure size 1232x451 with 4 Axes>

Figure 14.3. Oldroyd-B fluid in a periodic channel with wavy walls. (a) First normal stress difference, largest near the walls at the throats. (b) Local Pakdel–McKinley number MM, largest (0.53) where curved streamlines carry a high tensile stress.

4. A map in the plane (ε,Wi)(\varepsilon, \mathrm{Wi})

In the design of an extrusion die the amplitude of the constriction, ε\varepsilon, is weighed against the speed of the line, which sets Wi\mathrm{Wi}. The demonstration computes the largest value Mmax⁡(ε,Wi)=max⁡x,yM(x,y)\mathcal{M}_{\max}(\varepsilon, \mathrm{Wi}) = \max_{x,y}\mathcal{M}(x,y) for ε=0\varepsilon = 0, 0.15, 0.30 and 0.45 and Wi=0.4\mathrm{Wi} = 0.4, 0.9, 1.5 and 2.2. A smaller amplitude allows a larger Weissenberg number at the same Mmax⁡\mathcal{M}_{\max}.


Demonstration 4: largest Pakdel-McKinley number against amplitude and Weissenberg number
========================================================================================
eps = 0.00 | peak M across Wi [0.4, 0.9, 1.5, 2.2]: [np.float64(0.01), np.float64(0.014), np.float64(0.016), np.float64(0.017)]
eps = 0.15 | peak M across Wi [0.4, 0.9, 1.5, 2.2]: [np.float64(0.129), np.float64(0.179), np.float64(0.201), np.float64(0.213)]
eps = 0.30 | peak M across Wi [0.4, 0.9, 1.5, 2.2]: [np.float64(0.238), np.float64(0.329), np.float64(0.368), np.float64(0.389)]
eps = 0.45 | peak M across Wi [0.4, 0.9, 1.5, 2.2]: [np.float64(0.394), np.float64(0.54), np.float64(0.604), np.float64(0.638)]
<Figure size 1188x440 with 3 Axes>

Figure 14.4. (a) Largest Pakdel–McKinley number in the channel against Wi\mathrm{Wi} for four wall amplitudes ε\varepsilon; the dashed line is the limit 0.38 used here for illustration. (b) The same values as a table.

Inside the algorithm: the Pakdel–McKinley number in Taylor–Couette flow

The cell below prints the source of shear_banding_instabilities.pakdel_mckinley_criterion and checks it against the formula for an Oldroyd-B fluid in a viscometric flow with curved streamlines.

Check against the package

In steady shear of an Oldroyd-B fluid along streamlines of radius R\mathcal{R} in a gap of width dd, the shear rate is γ˙=U/d\dot{\gamma} = U/d and the tension is τ11=2ηpλγ˙2=2(1−βs)η0λγ˙2\tau_{11} = 2\eta_p\lambda\dot{\gamma}^2 = 2(1-\beta_s)\eta_0\lambda\dot{\gamma}^2. Substituting these into the definition gives

M=λUR 2(1−βs)η0λγ˙2η0γ˙=Wi 2(1−βs)dR,Wi=λUd\mathcal{M} = \sqrt{\frac{\lambda U}{\mathcal{R}} \, \frac{2(1-\beta_s)\eta_0 \lambda \dot{\gamma}^2}{\eta_0 \dot{\gamma}}} = \mathrm{Wi}\,\sqrt{2(1-\beta_s)\frac{d}{\mathcal{R}}}, \qquad \mathrm{Wi} = \frac{\lambda U}{d}

This is the scaling of the elastic instability of Taylor–Couette flow (Larson, Shaqfeh and Muller, 1990). The function reproduces the formula to rounding error (< 1e-14).


Inside the algorithm: the Pakdel-McKinley number in Taylor-Couette flow
=======================================================================
def pakdel_mckinley_criterion(
    speed: np.ndarray | float,
    radius_of_curvature: np.ndarray | float,
    lam: float,
    tau_11: np.ndarray | float,
    eta0_shear_rate: np.ndarray | float,
    m_crit: float = 5.92,
) -> dict:
    """The dimensionless number M of the criterion of Pakdel and McKinley (1996) for elastic instability."""
    if lam < 0.0 or m_crit <= 0.0:
        raise ValueError("Require lam >= 0 and m_crit > 0.")
    u_abs = np.abs(np.asarray(speed, dtype=float))
    rad = np.maximum(np.abs(np.asarray(radius_of_curvature, dtype=float)), 1e-12)
    t11 = np.maximum(np.asarray(tau_11, dtype=float), 0.0)
    visc_stress = np.maximum(np.abs(np.asarray(eta0_shear_rate, dtype=float)), 1e-12)
    m_val = np.sqrt((float(lam) * u_abs / rad) * (t11 / visc_stress))
    return {
        "M_pakdel": m_val,
        "exceeds_critical": m_val >= float(m_crit),
        "M_crit": float(m_crit),
    }

Max discrepancy against exact Larson-Shaqfeh-Muller formula : 7.105e-15
Predicted critical Weissenberg number at M_crit = 5.92  : Wi_crit = 21.617

Exercises

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

  1. Verify a result. 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.

  2. Find how it fails. (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.

  3. Implement it yourself. 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\}.


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