Skip to content

polykin.transport.rheology¤

mu_Carreau_Yasuda ¤

mu_Carreau_Yasuda(
    gdot: float | FloatArray,
    mu0: float,
    muinf: float,
    lmbda: float,
    n: float,
    a: float = 2.0,
) -> float | FloatArray

Calculate the viscosity of a fluid using the Carreau-Yasuda model.

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

\[ \mu = \mu_{\infty} + \frac{\mu_0 - \mu_{\infty}} {\left[1 + (\lambda \dot{\gamma})^a\right]^{\frac{1-n}{a}}} \]

where \(\mu_0\) is the zero-shear viscosity, \(\mu_{\infty}\) is the infinite-shear viscosity, \(\lambda\) is the relaxation time, \(n\) is the power-law index, and \(a\) is the Yasuda transition parameter.

PARAMETER DESCRIPTION
gdot

Shear rate (1/s).

TYPE: float | FloatArray

mu0

Zero-shear viscosity (Pa·s).

TYPE: float

muinf

Infinite-shear viscosity (Pa·s).

TYPE: float

lmbda

Relaxation constant (s).

TYPE: float

n

Power-law index.

TYPE: float

a

Yasuda transition parameter (often assumed equal to 2).

TYPE: float DEFAULT: 2.0

RETURNS DESCRIPTION
mu

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

TYPE: float | FloatArray

Examples:

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

>>> from polykin.transport import mu_Carreau_Yasuda
>>> gdot = 20.0   # 1/s
>>> mu0 = 1.0     # Pa·s
>>> muinf = 1e-3  # Pa·s
>>> lmbda = 1.0   # s
>>> n = 0.2
>>> a = 2.0
>>> mu = mu_Carreau_Yasuda(gdot, mu0, muinf, lmbda, n, a)
>>> print(f"mu={mu:.2e} Pa.s")
mu=9.18e-02 Pa.s
Source code in src/polykin/transport/rheology.py
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
def mu_Carreau_Yasuda(gdot: float | FloatArray,
                      mu0: float,
                      muinf: float,
                      lmbda: float,
                      n: float,
                      a: float = 2.0
                      ) -> float | FloatArray:
    r"""Calculate the viscosity of a fluid using the Carreau-Yasuda model.

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

    $$ \mu = \mu_{\infty} + \frac{\mu_0 - \mu_{\infty}}
                {\left[1 + (\lambda \dot{\gamma})^a\right]^{\frac{1-n}{a}}} $$

    where $\mu_0$ is the zero-shear viscosity, $\mu_{\infty}$ is the infinite-shear
    viscosity, $\lambda$ is the relaxation time, $n$ is the power-law index, 
    and $a$ is the Yasuda transition parameter.

    Parameters
    ----------
    gdot : float | FloatArray
        Shear rate (1/s).
    mu0 : float
        Zero-shear viscosity (Pa·s).
    muinf : float
        Infinite-shear viscosity (Pa·s).
    lmbda : float
        Relaxation constant (s).
    n : float
        Power-law index.
    a : float
        Yasuda transition parameter (often assumed equal to 2).

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

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