Skip to content

Diffusion

membrane_toolkit.core.diffusion.diffusion_coefficient_mackie_meares(D_bulk, phi_w)

Calculate the membrane-phase diffusion coefficient according to the Mackie-Meares model.

Parameters:

Name Type Description Default
D_bulk float

Bulk diffusion coefficient, [L**2 / t]

required
phi_w float

Water volume fraction (0 < < 1) in the membrane [dimensionless]

required

Returns:

Type Description
float

float: Diffusion coefficient in the membrane, [L**2 / t]

Notes

The Mackie-Meares model relates the bulk diffusion coefficient of a species to its diffusion coefficient inside a porous medium through the volume fraction of water (or porosity) of that medium. The equation is

References

Mackie, J. S.; Meares, P. The Diffusion of Electrolytes in a Cation-Exchange Resin Membrane. I. Theoretical. Proc. R. Soc. London A 1955, 232 (1191), 498–509.

Source code in membrane_toolkit/core/diffusion.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
def diffusion_coefficient_mackie_meares(D_bulk: float, phi_w: float) -> float:
    """
    Calculate the membrane-phase diffusion coefficient according to the Mackie-Meares
    model.

    Args:
        D_bulk (float): Bulk diffusion coefficient, [L**2 / t]
        phi_w (float): Water volume fraction (0 < \( \\phi_w \) < 1) in the membrane
            [dimensionless]

    Returns:
        float: Diffusion coefficient in the membrane, [L**2 / t]

    Notes:
        The Mackie-Meares model relates the bulk diffusion coefficient of a species
        to its diffusion coefficient inside a porous medium through the volume fraction
        of water (or porosity) of that medium. The equation is

        $$
            D_{mem} = D_{bulk} * ( \\frac{\\phi_w}{2-\\phi_w} )^2
        $$

    References:
        Mackie, J. S.; Meares, P. The Diffusion of Electrolytes in a Cation-Exchange
        Resin Membrane. I. Theoretical. Proc. R. Soc. London A 1955, 232 (1191),
        498–509.
    """
    if phi_w < 0 or phi_w > 1:
        raise ValueError(
            "Invalid phi_w = {}. phi_w must be between 0 and 1".format(phi_w)
        )

    return D_bulk * (phi_w / (2 - phi_w)) ** 2