Skip to content

polykin.transport.rheology¤

mu_Cross ¤

mu_Cross(
    gdot: float | FloatArray,
    mu0: float,
    lmbda: float,
    n: float,
) -> float | FloatArray

Calculate the viscosity of a fluid using the Cross model.

The viscosity \(\mu\) at a given shear rate \(\dot{\gamma}\) is calculated using the following equation:

\[ \mu = \frac{\mu_0}{1 + (\lambda \dot{\gamma})^{1-n}} \]

where \(\mu_0\) is the zero-shear viscosity, \(\lambda\) is the relaxation time, and \(n\) is the power-law index.

PARAMETER DESCRIPTION
gdot

Shear rate (1/s).

TYPE: float | FloatArray

mu0

Zero-shear viscosity (Pa·s).

TYPE: float

lmbda

Relaxation constant (s).

TYPE: float

n

Power-law index.

TYPE: float

RETURNS DESCRIPTION
float | FloatArray

Viscosity at the given shear rate (Pa·s).

See also

Examples:

Determine the viscosity of a fluid with a zero-shear viscosity of 1.0 Pa·s, a relaxation time of 1 second, and a power-law index of 0.2, at a shear rate of 20 1/s.

>>> from polykin.transport import mu_Cross
>>> gdot = 20.0   # 1/s
>>> mu0 = 1.0     # Pa·s
>>> lmbda = 1.0   # s
>>> n = 0.2
>>> mu = mu_Cross(gdot, mu0, lmbda, n)
>>> print(f"mu={mu:.2e} Pa.s")
mu=8.34e-02 Pa.s
Source code in src/polykin/transport/rheology.py
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
def mu_Cross(gdot: float | FloatArray,
             mu0: float,
             lmbda: float,
             n: float
             ) -> float | FloatArray:
    r"""Calculate the viscosity of a fluid using the Cross model.

    The viscosity $\mu$ at a given shear rate $\dot{\gamma}$ is calculated
    using the following equation:

    $$ \mu = \frac{\mu_0}{1 + (\lambda \dot{\gamma})^{1-n}} $$

    where $\mu_0$ is the zero-shear viscosity, $\lambda$ is the relaxation time,
    and $n$ is the power-law index.

    Parameters
    ----------
    gdot : float | FloatArray
        Shear rate (1/s).
    mu0 : float
        Zero-shear viscosity (Pa·s).
    lmbda : float
        Relaxation constant (s).
    n : float
        Power-law index.

    Returns
    -------
    float | FloatArray
        Viscosity at the given shear rate (Pa·s).

    See also
    --------
    * [`mu_Cross_modified`](mu_Cross_modified.md): modified version of the Cross
      model.

    Examples
    --------
    Determine the viscosity of a fluid with a zero-shear viscosity of 1.0 Pa·s,
    a relaxation time of 1 second, and a power-law index of 0.2, at a shear rate
    of 20 1/s.
    >>> from polykin.transport import mu_Cross
    >>> gdot = 20.0   # 1/s
    >>> mu0 = 1.0     # Pa·s
    >>> lmbda = 1.0   # s
    >>> n = 0.2
    >>> mu = mu_Cross(gdot, mu0, lmbda, n)
    >>> print(f"mu={mu:.2e} Pa.s")
    mu=8.34e-02 Pa.s
    """
    return mu0/(1 + (lmbda * gdot) ** (1 - n))