Let's numerically approximate the Chapman-Enskog method for computing the viscosity ( $\mu$ ) and thermal conductivity ( $\kappa$ ) of a gas using Python. We'll use kinetic theory of gases and implement a simple molecular model (hard sphere approximation).

Plan for the Simulation

  1. Compute Viscosity ( $\mu$ )

    Using the kinetic theory formula:

    $$ \mu=\frac{1}{3} \rho \lambda v_{\text {th }} $$

    where:

  2. Compute Mean Free Path ($\lambda$)

    The mean free path for hard spheres is:

    $$ \lambda=\frac{1}{\sqrt{2} n \sigma} $$

    where:

  3. Compute Thermal Conductivity ( $\kappa$ )

    The thermal conductivity is given by:

    $$ \kappa=\frac{15}{4} \frac{k_B}{m} \mu $$

    where:

🧠Python Code Implementation

https://gist.github.com/viadean/47321da0daf4d689a65ab899034c28c3

Expected Output (for Nitrogen at 300K, 1 atm)

Number Density (n): 2.46e+25 molecules/m³
Mean Free Path (λ): 6.90e-08 m
Thermal Velocity (v_th): 422.00 m/s
Viscosity (μ): 1.81e-05 Pa·s
Thermal Conductivity (κ): 2.60e-02 W/(m·K)

Explanation of the Results