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.

17. Project: screening a contraction and slit-die design across scales

This project applies the methods of the book to one screening calculation. A polymer fluid is fed through a square duct into a slit with wavy walls, and the question is which operating conditions avoid five problems: a wrong description of the polymer at the molecular level; a feed duct that is blocked or has stagnant corners, if the fluid has a yield stress; shear banding or shear thickening in the slit; a velocity overshoot at start-up; and an elastic instability at the constriction.

The calculation has four stages and uses all nine modules of the package. All material parameters and all limits (for example the admissible value of the Pakdel–McKinley number) are assumed. The result illustrates how the methods fit together; it is not a design.

Learning objectives

  1. Stage 1: characterize the model polymer with Brownian dynamics (brownian_chains), a closure (entangled_tubes), the free energy (tensors_kinematics), microrheology and a fitted stress model (microrheology_rheoml).

  2. Stage 2: check the feed duct for flow with the augmented Lagrangian method (viscoplastic_admm), and the fluid for shear banding (shear_banding_instabilities) and discontinuous shear thickening (mesoscopic_suspensions_dpd).

  3. Stage 3: compute the start-up of flow in the slit and the flow through the constriction (constants_benchmarks, viscoelastic_fvm_2d).

  4. Stage 4: map the pressure drop ΔP(ε,Wi)\Delta P(\varepsilon, \mathrm{Wi}) and the largest Pakdel–McKinley number Mmax⁡(ε,Wi)\mathcal{M}_{\max}(\varepsilon, \mathrm{Wi}), and select the conditions within the assumed limits.

Time: about 60 min

1. Stage 1: the model polymer

The first stage describes the model polymer with four of the methods of the book and checks that they agree with one another.

MethodModuleWhat it provides
Probe microrheology (Lecture 16)microrheology_rheomlG′(ω)G'(\omega), G′′(ω)G''(\omega) and the longest relaxation time λ\lambda
Brownian dynamics of FENE dumbbells with a control variate (Lectures 3 and 4)brownian_chainsthe mean-square extension ⟨Q2⟩<b\langle Q^2\rangle < b and the stress
FENE-P and Rolie-Poly models in the log-conformation form (Lectures 2, 6 and 7)entangled_tubes, tensors_kinematicsdet⁡C>0\det\mathbf{C} > 0 and the free energy ψ(C)≥0\psi(\mathbf{C}) \geq 0
Tensor-basis stress model (Lecture 16)microrheology_rheomla frame-indifferent function τp(C)\boldsymbol{\tau}_p(\mathbf{C}) with weights wk≥0w_k \geq 0

The demonstration below applies these methods to the model polymer (b=36b = 36).


Stage 1: the model polymer
==========================
FENE BD overstretches = 0 | VRF = 15.8x | steady tau_xy = 1.472
FENE-P SPD verified = True (psi = 1.914) | steady tau_xy = 1.765
Tensor-basis model R^2 = 1.00000 | SO(3) err = 2.41e-16
<Figure size 1188x440 with 2 Axes>

Figure 17.1. Stage 1. (a) Storage and loss moduli from a simulated probe; the dotted line is 1/λ1/\lambda. (b) Start-up shear stress from FENE Brownian dynamics, the FENE-P closure, the fitted tensor-basis model and a Rolie-Poly curve for comparison.

2. Stage 2: the feed duct, shear banding and shear thickening

If the fluid has a yield stress (parameter set CARBOPOL_EVP) or contains a high volume fraction of particles (SILICA_DST), three things can go wrong before it reaches the slit. The parameter values of both sets are assumed.

  1. The feed duct (viscoplastic_admm). In a square duct [−H,H]2[-H, H]^2 under the pressure gradient Gp=−∂p/∂zG_p = -\partial p/\partial z the flow stops when the Bingham number Bn=τy/(GpH)\mathrm{Bn} = \tau_y/(G_p H) exceeds Bncrit=2/(2+π)≈0.5302\mathrm{Bn}_{\mathrm{crit}} = 2/(2 + \sqrt{\pi}) \approx 0.5302 (Mosolov and Miasnikov, 1965). Below this value the fluid in the four corners is at rest.

  2. Shear banding (shear_banding_instabilities). The flow curve of the Johnson–Segalman model with ξ>0\xi > 0 is non-monotonic if βs<1/8\beta_s < 1/8.

  3. Shear thickening (mesoscopic_suspensions_dpd). The wall stress τw\tau_w has to stay below the stress τ∗\tau^*, or the volume fraction below ϕDST\phi_{\mathrm{DST}}, to avoid discontinuous shear thickening.


Stage 2: the feed duct, shear banding and shear thickening
==========================================================
Feed-duct Bn = 0.00 (Bn_crit = 0.5302) | flux Q = 0.5618 | unyielded = 0.1%
Feed-duct Bn = 0.25 (Bn_crit = 0.5302) | flux Q = 0.2216 | unyielded = 17.7%
Feed-duct Bn = 0.42 (Bn_crit = 0.5302) | flux Q = 0.0446 | unyielded = 52.3%
Feed-duct Bn = 0.56 (Bn_crit = 0.5302) | flux Q = 0.0000 | unyielded = 90.7%
Shear-banding spinodal check : beta_s=0.30 non_mono=False against beta_s=0.05 non_mono=True
Silica filler DST check      : phi=0.45 DST=False against phi=0.542 DST=True
<Figure size 1188x440 with 3 Axes>

Figure 17.2. Stage 2. (a) Flow rate (left axis) and unyielded fraction (right axis) of Bingham flow in a square duct against the Bingham number, with the limit 0.530. (b) Johnson–Segalman flow curves: monotonic for βs=0.30\beta_s = 0.30, non-monotonic for βs=0.05\beta_s = 0.05.

3. Stage 3: start-up and flow through the constriction

The fluid with βs=0.30\beta_s = 0.30 passes the checks of Stage 2. The third stage treats the slit (viscoelastic_fvm_2d):

  • Start-up. The Waters–King solution (waters_king_startup_poiseuille) and the configuration-field solver (solve_1d_channel_viscoelastic_startup) give the overshoot of the centreline velocity when the flow is started suddenly.

  • Flow through the constriction. The function solve_2d_wavy_contraction_channel gives the conformation tensor C(x,y)=exp⁡Ψ(x,y)\mathbf{C}(x,y) = \exp\boldsymbol{\Psi}(x,y), the normal stress difference N1(x,y)N_1(x,y) and the Pakdel–McKinley number M(x,y)\mathcal{M}(x,y) in the slit with wavy walls. Its velocity field is prescribed, not computed.


Stage 3: start-up and flow through the constriction
===================================================
Start-up overshoot of the centreline velocity (El=0.90, beta_s=0.30) : +40.86% above steady velocity
Amplitude (eps = 0.18, Wi = 1.4) : max tr(C) = 6.56, max M_PM = 0.254
Sharp  taper (eps = 0.38, Wi = 1.4) : max tr(C) = 15.75, max M_PM = 0.529
<Figure size 1188x440 with 2 Axes>

Figure 17.3. Stage 3. (a) Start-up of the slit flow: the exact solution overshoots the steady velocity by 41 %; symbols are configuration fields. (b) Largest Pakdel–McKinley number across the channel against axial position for two wall amplitudes.

4. Stage 4: operating conditions within the assumed limits

The last stage evaluates a grid of amplitudes ε\varepsilon of the constriction and of Weissenberg numbers. For each point it computes the largest Pakdel–McKinley number, which must not exceed the assumed limit Mallow=0.42\mathcal{M}_{\mathrm{allow}} = 0.42, and an estimate of the dimensionless pressure drop, ΔP^=Wi Λ(ε)+0.35 ε N1,max⁡\Delta\hat{P} = \mathrm{Wi}\,\Lambda(\varepsilon) + 0.35\,\varepsilon\,N_{1,\max}. The first term is the lubrication result, with Λ(ε)=(2+ε2)/[2(1−ε2)5/2]\Lambda(\varepsilon) = (2 + \varepsilon^2)/[2(1 - \varepsilon^2)^{5/2}]; the second is an assumed allowance for the normal stress, and its coefficient 0.35 is not derived.

Among the points within the limit, the demonstration selects the one with the largest Weissenberg number, and among those with the same Weissenberg number the one with the smallest pressure drop.


Stage 4: operating conditions within the assumed limits
=======================================================
Candidates (M_allow = 0.42):
  eps=0.15, Wi=0.6 | dP_dim=  0.76 | M_max=0.148 | within the limit
  eps=0.15, Wi=1.8 | dP_dim=  1.99 | M_max=0.192 | within the limit
  eps=0.28, Wi=0.6 | dP_dim=  1.18 | M_max=0.254 | within the limit
  eps=0.28, Wi=1.8 | dP_dim=  2.52 | M_max=0.329 | within the limit
  eps=0.42, Wi=0.6 | dP_dim=  2.47 | M_max=0.415 | within the limit
  eps=0.42, Wi=1.8 | dP_dim=  3.97 | M_max=0.536 | outside the limit
Selected operating point: eps* = 0.15, Wi* = 2.40, dP* = 2.62, M_max = 0.198
<Figure size 1210x451 with 2 Axes>

Figure 17.4. Stage 4. (a) Largest Pakdel–McKinley number against dimensionless pressure drop for three wall amplitudes; the dashed line is the limit 0.42 assumed here. (b) The candidates that pass and fail the limit; the star is the passing candidate with the highest rate.

Inside the algorithm: the prescribed velocity field and the list of models and methods

The cell below prints the source of viscoelastic_fvm_2d.solve_2d_wavy_contraction_channel and checks in NumPy that its velocity field, written in the coordinate η(x,y)=y/H(x)∈(−1,1)\eta(x,y) = y / H(x) \in (-1, 1), is divergence free, ∂xu+∂yv=0\partial_x u + \partial_y v = 0, that the normal stress at the wall of the constriction agrees with the formula for low Wi\mathrm{Wi}, and that every function named in RHEO_ATLAS_DB exists.

Check against the package

For u(x,y)=3Q04H(x)(1−η2)u(x,y) = \frac{3 Q_0}{4 H(x)}(1 - \eta^2) and v(x,y)=u(x,y) η H′(x)v(x,y) = u(x,y)\,\eta\,H'(x), differentiating along constant physical yy (using ∂xη=−ηH′(x)/H(x)\partial_x \eta = -\eta H'(x)/H(x)) yields:

∂u∂x=3Q0H′(x)4H(x)2(3η2−1),∂v∂y=3Q0H′(x)4H(x)2(1−3η2)=−∂u∂x\frac{\partial u}{\partial x} = \frac{3 Q_0 H'(x)}{4 H(x)^2}\left(3\eta^2 - 1\right), \qquad \frac{\partial v}{\partial y} = \frac{3 Q_0 H'(x)}{4 H(x)^2}\left(1 - 3\eta^2\right) = -\frac{\partial u}{\partial x}

confirming exact solenoidal mass conservation ∇⋅u≡0\nabla\cdot\mathbf{u} \equiv 0 everywhere in the wavy contraction.


Inside the algorithm: the prescribed velocity field and the list of models and methods
======================================================================================
def solve_2d_wavy_contraction_channel(
    nx: int = 40,
    ny: int = 24,
    constriction_eps: float = 0.30,
    wi: float = 1.2,
    beta_s: float = 0.4,
    n_steps: int = 260,
    dt: float = 0.005,
) -> dict:
    """Log-conformation solution in a periodic channel with wavy walls and a prescribed velocity field; returns N1 and the Pakdel-McKinley number M(x, y)."""
    if nx < 12 or ny < 8 or not (0.0 <= constriction_eps < 0.7) or wi < 0.0 or not (0.0 < beta_s <= 1.0):
        raise ValueError("Invalid parameters for solve_2d_wavy_contraction_channel.")

    L_len = 2.0 * math.pi
    hx = L_len / float(nx)
    x = (np.arange(nx, dtype=float) + 0.5) * hx
    xi_y = (np.arange(ny, dtype=float) + 0.5) / float(ny)  # mapped transverse coordinate in (0, 1)

    # Smooth symmetric wavy half-height H(x) = 1 - eps * cos(x), throat at x = 0 & 2*pi, expansion at x = pi:
    H_x = 1.0 - float(constriction_eps) * np.cos(x)
    dH_dx = float(constriction_eps) * np.sin(x)
    y_phys = (2.0 * xi_y[None, :] - 1.0) * H_x[:, None]
    x_phys = np.broadcast_to(x[:, None], (nx, ny))

    # Lubrication-consistent incompressible base kinematics + viscoelastic Log-Conformation evolution:
    # Volumetric flow Q0 = 4/3 -> u(x, y) = (3 * Q0 / (4 * H(x))) * (1 - (y/H)^2), v = u * (y/H) * dH/dx
    eta_norm = 2.0 * xi_y[None, :] - 1.0  # in (-1, 1)
    q0 = 4.0 / 3.0
    u = (0.75 * q0 / H_x[:, None]) * (1.0 - eta_norm**2)
    v = u * eta_norm * dH_dx[:, None]

    # Exact incompressible velocity gradients L_ij:
    du_dx = (np.roll(u, -1, axis=0) - np.roll(u, 1, axis=0)) / (2.0 * hx) - (
        eta_norm * dH_dx[:, None] / H_x[:, None]
    ) * (-1.5 * q0 * eta_norm / H_x[:, None])
    du_dy = -1.5 * q0 * eta_norm / (H_x[:, None] ** 2)
    dv_dx = (np.roll(v, -1, axis=0) - np.roll(v, 1, axis=0)) / (2.0 * hx)
    dv_dy = -du_dx  # Exact incompressibility div(u) == 0

    Psi_xx = np.zeros((nx, ny), dtype=float)
    Psi_yy = np.zeros((nx, ny), dtype=float)
    Psi_xy = np.zeros((nx, ny), dtype=float)
    C_xx = np.ones((nx, ny), dtype=float)
    C_yy = np.ones((nx, ny), dtype=float)
    C_xy = np.zeros((nx, ny), dtype=float)
    hy_avg = 2.0 * float(np.mean(H_x)) / float(ny)

    if wi > 1e-6:
        for _ in range(n_steps):
            Psi_xx, Psi_yy, Psi_xy, C_xx, C_yy, C_xy = _log_step_2d_field(
                Psi_xx, Psi_yy, Psi_xy, u, v, du_dx, du_dy, dv_dx, dv_dy, hx, hy_avg, dt, wi=wi, periodic_x=True
            )

    g_mod = (1.0 - float(beta_s)) / max(float(wi), 1e-6) if wi > 1e-6 else 0.0
    tau_xx = g_mod * (C_xx - 1.0)
    tau_yy = g_mod * (C_yy - 1.0)
    tau_xy = g_mod * C_xy
    n1_field = tau_xx - tau_yy
    tr_c = C_xx + C_yy

    # Streamline curvature |d^2 y_stream / dx^2| = |eta_norm * d^2H/dx^2| -> R_curv = 1 / max(|kappa|, 1e-3):
    d2H_dx2 = float(constriction_eps) * np.cos(x)
    kappa = np.abs(eta_norm * d2H_dx2[:, None])
    r_curv = 1.0 / np.maximum(kappa, 1e-3)
    speed = np.hypot(u, v)
    gdot_mag = np.sqrt(2.0 * (du_dx**2 + dv_dy**2) + (du_dy + dv_dx) ** 2)
    pm = pakdel_mckinley_criterion(speed, r_curv, lam=wi, tau_11=np.maximum(n1_field, 0.0), eta0_shear_rate=gdot_mag)

    return {
        "x_grid": x_phys,
        "y_grid": y_phys,
        "H_wall": H_x,
        "u": u,
        "v": v,
        "N1_field": n1_field,
        "tau_xy_field": tau_xy,
        "trC_field": tr_c,
        "detC_min": float(np.min(np.exp(Psi_xx + Psi_yy))),
        "pakdel_M_field": pm["M_pakdel"],
    }

Analytical wavy-contraction solenoidal residual |du/dx + dv/dy| : 0.000e+00
Resolved RHEO_ATLAS_DB callables across Parts I..VI             : 24 / 24

Exercises

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

  1. Verify a result. Check the lubrication result for the pressure drop in a slit whose gap varies as 1−εcos⁡x1 - \varepsilon\cos x, relative to a straight slit, Λ(ε)=12π∫02π(1−εcos⁡x)−3dx=2+ε22(1−ε2)5/2\Lambda(\varepsilon) = \frac{1}{2\pi}\int_0^{2\pi}(1-\varepsilon\cos x)^{-3}dx = \frac{2 + \varepsilon^2}{2(1 - \varepsilon^2)^{5/2}}, for ε∈[0.0,0.65]\varepsilon \in [0.0, 0.65] with the trapezoidal rule. Then compute the smallest pressure gradient at which the assumed gel CARBOPOL_EVP (τy=45 Pa\tau_y = 45\text{ Pa}) flows in a square duct of side 2H=10 mm2H = 10\text{ mm}, Gp,min⁡=τy/(H Bncrit)G_{p,\min} = \tau_y / (H\,\mathrm{Bn}_{\mathrm{crit}}).

  2. Find how it fails. A design calculation that treats the fluid as Newtonian (Wi=0,τy=0\mathrm{Wi}=0, \tau_y=0) is applied to a wavy slit with ε=0.42\varepsilon = 0.42 that is operated at Wi=2.0\mathrm{Wi} = 2.0 and fed by a square duct at Bn=0.56\mathrm{Bn} = 0.56. Compare its predictions with solve_2d_wavy_contraction_channel and with solve_2d_duct_bingham_admm.

  3. Implement it yourself. Write find_max_safe_throughput(eps_list, bn_feed, m_allow) in NumPy. The function first checks with solve_2d_duct_bingham_admm that the feed duct flows, and then finds by bisection on Wi∈[0.15,3.20]\mathrm{Wi} \in [0.15, 3.20], with solve_2d_wavy_contraction_channel, the largest Weissenberg number Wi∗(ε)\mathrm{Wi}^*(\varepsilon) for which Mmax⁡(ε,Wi∗)≤Mallow=0.28\mathcal{M}_{\max}(\varepsilon, \mathrm{Wi}^*) \leq \mathcal{M}_{\mathrm{allow}} = 0.28 (an assumed limit), for ε∈{0.20,0.30,0.40}\varepsilon \in \{0.20, 0.30, 0.40\}.


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