This simulation bridges the microscopic stochastic motion of individual Brownian particles with the macroscopic deterministic continuum dynamics of the diffusion equation across a 1D channel x ∈ [0, L] (L = 1.00 mm = 10⁻³ m).
| Initial Condition | Mathematical Profile C(x, 0) | Physical Interpretation & Dynamics |
|---|---|---|
| Dirac Delta Pulse (Gaussian) | C₀ exp(−(x − L/2)² / 2σ₀²) |
Planar solute injection at the center of the tube. Spreads symmetrically with variance σ²(t) = σ₀² + 2Dt; inflection points occur at x = L/2 ± σ(t) where |J| is maximum. |
| Heaviside Step Interface (erfc) | C₀ for x < 0.4L, 0 for x > 0.4L |
Diaphragm removal between concentrated solution and pure solvent. Evolves as ½ C₀ erfc((x − x₀)/√(4Dt)) with a single positive flux peak at the interface. |
| Square Well / Top-Hat Plug | C₀ for |x − L/2| ≤ w, 0 otherwise |
Finite-width solute plug. Exhibits two counter-propagating flux lobes (J < 0 on the left edge, J > 0 on the right edge) that erode the plateau from the outside in. |
| Bimodal Double Pulse | Two Gaussian peaks at 0.3L & 0.7L |
Demonstrates linear superposition and diffusive mixing of two distinct concentration zones merging into a single central peak before flattening. |
| Sinusoidal Fourier Mode | C̄ + A₁ cos(2πx/L) + A₂ sin(4πx/L) |
Spatial eigenmodes of the Laplacian operator. Higher spatial frequencies decay exponentially faster at rate Γₖ = D k². |
| Empty Tube (Permeation) | C(x, 0) = 0 |
Starts with pure solvent to observe transient permeation buildup under the Source–Sink Cell boundary condition or to paint a custom profile from scratch. |
| Boundary Condition | Mathematical Formulation | Physical Meaning & Steady State (t → ∞) |
|---|---|---|
| Insulated Walls (J = 0) | ∂C/∂x = 0 at x = 0, L |
Impermeable glass walls (Neumann BC). Walkers reflect elastically. Total solute mass ∫C dx is strictly conserved and equilibrates to a flat line. |
| Absorbing Sinks (C = 0) | C(0, t) = 0, C(L, t) = 0 |
Open to pure-solvent drains or fast catalytic sinks (Dirichlet BC). Mass drains out both ends (J(0) < 0, J(L) > 0) until C(x, ∞) = 0. |
| Source–Sink Cell (C₀ → 0) | C(0, t) = C₀, C(L, t) = 0 |
Membrane permeation cell: constant supply reservoir at x = 0 and sink at x = L. Relaxes to a linear steady-state profile C(x) = C₀(1 − x/L) with uniform flux J = +DC₀/L. |
| Periodic Ring (C(0) = C(L)) | C(0, t) = C(L, t), J(0) = J(L) |
Connects x = 0 and x = L into a closed toroidal ring. Walkers exiting the right boundary re-enter from the left; total mass is conserved. |
Select Dirac Delta Pulse + Insulated Walls, pause shortly after start, and hover across the peak. At x = 0.50 mm, the tangent is flat (J = 0) while downward curvature ∂²C/∂x² < 0 is maximum. At the inflection points x = 0.50 ± σ(t), curvature vanishes (∂C/∂t = 0) and flux magnitude |J| is at its peak.
Select Empty Tube + Source–Sink Cell (C₀ → 0). Watch the solute front enter from x = 0. As t → ∞, C(x,t) relaxes to the straight line C₀(1 − x/L), curvature vanishes everywhere, and the coral flux curve flattens to a spatially uniform constant J = +DC₀/L.
Pause the simulation and use Click & Drag to paint several narrow, sharp spikes alongside a wide mound. Resume playback: because Fourier mode k decays at rate D k², narrow spikes generate intense opposing flux lobes and smooth out almost immediately compared to long-wavelength features.
Select Heaviside Step Interface and watch the 3 highlighted tracer molecules. Each individual walker steps left or right with equal 50% probability (⟨Δx⟩ = 0), yet because more walkers reside on the left, net crossings from left to right produce the deterministic macroscopic flux J = −D ∂C/∂x.
| Key | Action | Key | Action |
|---|---|---|---|
| Space | Toggle Play / Pause | F | Toggle Fick’s 1st Law Flux (J = −D∇C) |
| → | Step forward in time (while paused) | C / P | Toggle Curvature (∂²C/∂x²) overlay |
| ← | Rewind to initial profile (t = 0) | W | Toggle Brownian Walkers & Tracer Trails |
| R | Reset simulation to t = 0 | H / ? / Esc | Open or close this Help Guide |