Skip to content

polykin.transport.diffusion¤

uptake_convection_sphere ¤

uptake_convection_sphere(Fo: float, Bi: float) -> float

Fractional mass uptake for transient diffusion in a sphere subjected to a surface convection boundary condition.

For a sphere of radius \(a\), where the concentration is initially \(C_0\) everywhere, and the flux at the surface is:

\[ -D \left.\frac{\partial C}{\partial r} \right|_{r=a}=k(C(a,t)-C_{\infty}) \]

the fractional mass uptake is:

\[ \frac{\bar{C}-C_0}{C_{\infty} -C_0} = 1 - 6 Bi^2 \sum_{n=1}^{\infty}\frac{1}{\beta_n^2[\beta_n^2+Bi(Bi-1)]} \exp (-\beta_n^2 Fo) \]

where \(Fo = D t/a^2\) is the Fourier number, \(Bi = k a/D\) is the Biot number, and \(\beta_n\) are the positive roots of the transcendental equation \(1 - \beta \cot(\beta) = Bi\).

References

  • J. Crank, "The mathematics of diffusion", Oxford University Press, 1975, p. 96.
PARAMETER DESCRIPTION
Fo

Fourier number, \(D t/a^2\).

TYPE: float

Bi

Biot number, \(k a/D\).

TYPE: float

RETURNS DESCRIPTION
float

Fractional mass uptake.

See also

Examples:

Determine the fractional mass uptake after 100 seconds for a polymer sphere with a radius of 0.1 mm, a diffusion coefficient of 1e-11 m²/s, and an external mass transfer coefficient of 1e-6 m/s.

>>> from polykin.transport import uptake_convection_sphere
>>> t = 1e2   # s
>>> a = 1e-4  # m
>>> D = 1e-11 # m²/s
>>> k = 1e-6  # m/s
>>> Fo = D*t/a**2
>>> Bi = k*a/D
>>> uptake_convection_sphere(Fo, Bi)
0.6539883120664335
Source code in src/polykin/transport/diffusion.py
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
def uptake_convection_sphere(Fo: float, Bi: float) -> float:
    r"""Fractional mass uptake for transient diffusion in a sphere subjected
    to a surface convection boundary condition. 

    For a sphere of radius $a$, where the concentration is initially $C_0$
    everywhere, and the flux at the surface is:

    $$ -D \left.\frac{\partial C}{\partial r} \right|_{r=a}=k(C(a,t)-C_{\infty}) $$

    the fractional mass uptake is:

    $$ \frac{\bar{C}-C_0}{C_{\infty} -C_0} = 
        1 - 6 Bi^2 \sum_{n=1}^{\infty}\frac{1}{\beta_n^2[\beta_n^2+Bi(Bi-1)]}
        \exp (-\beta_n^2 Fo) $$

    where $Fo = D t/a^2$ is the Fourier number, $Bi = k a/D$ is the Biot
    number, and $\beta_n$ are the positive roots of the transcendental equation 
    $1 - \beta \cot(\beta) = Bi$.

    **References**

    * J. Crank, "The mathematics of diffusion", Oxford University Press, 1975,
      p. 96.

    Parameters
    ----------
    Fo : float
        Fourier number, $D t/a^2$.
    Bi : float
        Biot number, $k a/D$.

    Returns
    -------
    float
        Fractional mass uptake.

    See also
    --------
    * [`uptake_constc_sphere`](uptake_constc_sphere.md): related method for
      constant surface concentration boundary condition.

    Examples
    --------
    Determine the fractional mass uptake after 100 seconds for a polymer sphere
    with a radius of 0.1 mm, a diffusion coefficient of 1e-11 m²/s, and an
    external mass transfer coefficient of 1e-6 m/s.
    >>> from polykin.transport import uptake_convection_sphere
    >>> t = 1e2   # s
    >>> a = 1e-4  # m
    >>> D = 1e-11 # m²/s
    >>> k = 1e-6  # m/s
    >>> Fo = D*t/a**2
    >>> Bi = k*a/D
    >>> uptake_convection_sphere(Fo, Bi)
    0.6539883120664335
    """
    if Fo and Bi:
        N = 4  # Number of terms in series expansion (optimal value)
        x = roots_xcotx(Bi, N)
        b2 = x**2
        S = sum(exp(-b2[n]*Fo)/(b2[n]*(b2[n] + Bi*(Bi - 1)))
                for n in range(0, N))
        return 1 - (6*Bi**2)*S
    else:
        return 0