KNUDSEN

Excel Usage

=KNUDSEN(path, L)
  • path (float, required): Mean free path between molecular collisions [m]
  • L (float, required): Characteristic length [m]

Returns (float): Knudsen number [-]

Examples

Example 1: Knudsen number with path=1e-10, L=0.001

Inputs:

path L
1e-10 0.001

Excel formula:

=KNUDSEN(1e-10, 0.001)

Expected output:

1e-7

Example 2: Continuum flow regime (Kn << 1)

Inputs:

path L
1e-8 0.01

Excel formula:

=KNUDSEN(1e-8, 0.01)

Expected output:

0.000001

Example 3: Transition flow regime (Kn ~ 1)

Inputs:

path L
0.00001 0.00001

Excel formula:

=KNUDSEN(0.00001, 0.00001)

Expected output:

1

Example 4: Free molecular flow regime (Kn >> 1)

Inputs:

path L
0.001 0.000001

Excel formula:

=KNUDSEN(0.001, 0.000001)

Expected output:

1000

Python Code

from fluids.core import Knudsen as fluids_Knudsen

def knudsen(path, L):
    """
    Calculate the Knudsen number.

    See: https://fluids.readthedocs.io/fluids.core.html#fluids.core.Knudsen

    This example function is provided as-is without any representation of accuracy.

    Args:
        path (float): Mean free path between molecular collisions [m]
        L (float): Characteristic length [m]

    Returns:
        float: Knudsen number [-]
    """
    try:
        path = float(path)
        L = float(L)

        if path < 0:
            return "Error: Mean free path must be non-negative"
        if L <= 0:
            return "Error: Characteristic length L must be positive"

        result = fluids_Knudsen(path, L)
        return float(result)
    except (TypeError, ValueError) as e:
        return f"Error: Invalid input - {str(e)}"
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator