top of page

29. maj 2025

||

By Humzaa Imtiaz Ullah

Solving Fick's Law in Python

This short Python script demonstrates how to apply Fick’s First Law of Diffusion to calculate the diffusion flux, JJ, across a slab or membrane.

The user provides four key values:

  • The diffusivity (D) of the substance,

  • The concentration on each side of the slab (C₁ and C₂),

  • And the thickness (L) of the slab.

The script then applies the formula:

J=−D⋅(C2−C1)LJ=−D⋅L(C2​−C1​)​

This is particularly useful for chemical engineers and students who want a quick tool for understanding diffusion behavior.

📺 Watch the tutorial video here.



bottom of page