Skip to content

polykin.transport.diffusion¤

uptake_sheet ¤

uptake_sheet(t: float, a: float, D: float) -> float

Fractional mass uptake for transient diffusion in a plane sheet.

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 fractional mass uptake is:

\[ \frac{M_t}{M_{\infty}} = 1 - \frac{8}{\pi^2} \sum_{n=0}^{\infty}\frac{1}{(2n+1)^2} \exp\left[\frac{-D(2n+1)^2 \pi^2t}{4 a^2}\right] \]

where \(t\) is the time, and \(D\) is the diffusion coefficient.

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. 48.
PARAMETER DESCRIPTION
t

Time (s).

TYPE: float

a

Half thickness of sheet (m).

TYPE: float

D

Diffusion coefficient (m²/s).

TYPE: float

RETURNS DESCRIPTION
float

Fractional mass uptake.

See also
  • profile_sheet: related method to determine the concentration profile.

Examples:

Determine the fractional mass uptake after 100 seconds for a polymer solution film with a thickness of 0.2 mm and a diffusion coefficient of 1e-10 m²/s.

>>> from polykin.transport.diffusion import uptake_sheet
>>> uptake_sheet(t=1e2, a=0.2e-3, D=1e-10)
0.562233541762138
Source code in src/polykin/transport/diffusion.py
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
def uptake_sheet(t: float,
                 a: float,
                 D: float
                 ) -> float:
    r"""Fractional mass uptake for transient diffusion in a plane sheet. 

    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 fractional mass uptake is:

    $$ \frac{M_t}{M_{\infty}} = 
        1 - \frac{8}{\pi^2} \sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}
        \exp\left[\frac{-D(2n+1)^2 \pi^2t}{4 a^2}\right] $$

    where $t$ is the time, and $D$ is the diffusion coefficient.

    !!! 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. 48.

    Parameters
    ----------
    t : float
        Time (s).
    a : float
        Half thickness of sheet (m).
    D : float
        Diffusion coefficient (m²/s).

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

    See also
    --------
    * [`profile_sheet`](profile_sheet.md): related method to determine the
      concentration profile.

    Examples
    --------
    Determine the fractional mass uptake after 100 seconds for a polymer solution
    film with a thickness of 0.2 mm and a diffusion coefficient of 1e-10 m²/s.
    >>> from polykin.transport.diffusion import uptake_sheet
    >>> uptake_sheet(t=1e2, a=0.2e-3, D=1e-10)
    0.562233541762138
    """
    N = 4  # Number of terms in series expansion (optimal value)

    A = sqrt(D*t)/a
    if A == 0.:
        result = 0.
    elif A < 0.5:
        # Solution for small times
        S = sum((-1 if n % 2 else 1) * ierfc(n/A) for n in range(1, N))
        result = 2*A * (1/sqrt(pi) + 2*S)
    else:
        # Solution for normal times
        B = -D*pi**2*t/(4*a**2)
        S = sum(1/(2*n + 1)**2 * exp(B*(2*n + 1)**2) for n in range(0, N-1))
        result = 1 - (8/pi**2)*S

    return result

Graphical Illustration¤

uptake_sheet