Skip to content

polykin.transport.diffusion¤

profile_constc_sheet ¤

profile_constc_sheet(Fo: float, xstar: float) -> float

Concentration profile for transient diffusion in a plane sheet subjected to a constant surface concentration boundary condition.

For a plane sheet of thickness \(2a\), with diffusion from both faces, where the concentration is initially \(C_0\) everywhere, and the concentration at both surfaces is maintained at \(C_s\), the normalized concentration is:

\[ \frac{C - C_0}{C_s - C_0} = 1-\frac{4}{\pi}\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1} \exp\left[-\frac{\pi^2 Fo}{4} (2n+1)^2 \right] \cos\left[ \frac{\pi x^*}{2} (2n+1) \right] \]

where \(Fo = D t/a^2\) is the Fourier number, and \(x^*=x/a\) is the normalized distance from the center of the sheet.

Tip

This equation is also applicable to a plane sheet of thickness \(a\) if one of the faces is sealed.

References

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

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

TYPE: float

xstar

Normalized distance from the center or sealed face, \(r/a\).

TYPE: float

RETURNS DESCRIPTION
float

Fractional accomplished concentration change.

See also

Examples:

Determine the fractional concentration change after 100 s in a 0.2 mm-thick polymer film (diffusivity: 1e-10 m²/s) at its maximum depth.

>>> from polykin.transport import profile_constc_sheet
>>> t = 1e2    # s
>>> a = 0.2e-3 # m
>>> D = 1e-10  # m²/s
>>> x = 0.     # m
>>> Fo = D*t/a**2
>>> xstar = x/a
>>> profile_constc_sheet(Fo, xstar)
0.3145542331096478
Source code in src/polykin/transport/diffusion.py
 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
def profile_constc_sheet(Fo: float, xstar: float) -> float:
    r"""Concentration profile for transient diffusion in a plane sheet subjected
    to a constant surface concentration boundary condition.

    For a plane sheet of thickness $2a$, with diffusion from _both_ faces, where
    the concentration is initially $C_0$ everywhere, and the concentration at
    both surfaces is maintained at $C_s$, the normalized concentration is:

    $$ \frac{C - C_0}{C_s - C_0} = 
        1-\frac{4}{\pi}\sum_{n=0}^{\infty}\frac{(-1)^n}{2n+1}
        \exp\left[-\frac{\pi^2 Fo}{4} (2n+1)^2 \right] 
        \cos\left[ \frac{\pi x^*}{2} (2n+1) \right] $$

    where $Fo = D t/a^2$ is the Fourier number, and $x^*=x/a$ is the normalized
    distance from the center of the sheet.

    !!! tip

        This equation is also applicable to a plane sheet of thickness $a$ if
        one of the faces is sealed.

    **References**

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

    Parameters
    ----------
    Fo : float
        Fourier number, $D t/a^2$.
    xstar : float
        Normalized distance from the center or sealed face, $r/a$.

    Returns
    -------
    float
        Fractional accomplished concentration change.

    See also
    --------
    * [`uptake_constc_sheet`](uptake_constc_sheet.md): related method to
      determine the mass uptake.

    Examples
    --------
    Determine the fractional concentration change after 100 s in a 0.2 mm-thick
    polymer film (diffusivity: 1e-10 m²/s) at its maximum depth.
    >>> from polykin.transport import profile_constc_sheet
    >>> t = 1e2    # s
    >>> a = 0.2e-3 # m
    >>> D = 1e-10  # m²/s
    >>> x = 0.     # m
    >>> Fo = D*t/a**2
    >>> xstar = x/a
    >>> profile_constc_sheet(Fo, xstar)
    0.3145542331096478
    """
    N = 4  # Number of terms in series expansion (sufficient for convergence)

    if Fo == 0:
        result = 0
    elif Fo < 1/4:
        # Solution for small times
        A = 2*sqrt(Fo)
        S = sum((-1 if n % 2 else 1) * (erfc(((2*n + 1) - xstar)/A) + erfc(((2*n + 1) + xstar)/A))
                for n in range(0, N))
        result = S
    else:
        # Solution for normal times
        B = -(pi**2 / 4)*Fo
        C = (pi/2)*xstar
        S = sum((-1 if n % 2 else 1) / (2*n + 1) * exp(B*(2*n + 1)**2) * cos(C*(2*n + 1))
                for n in range(0, N))
        result = 1 - (4/pi)*S

    return result

Graphical Illustration¤

The numbers in the legend are values of \(Fo = D t / a^2\).

profile_constc_sheet