Home▸Electromagnetism▸2D Plasma — Particle-in-Cell Charged Gas

⚡ 2D Plasma — Particle-in-Cell Charged Gas

A real 2D particle-in-cell (PIC) plasma simulation: charged ions and electrons interact through a self-consistently solved electric field on a grid. Watch Debye shielding screen a test charge and electron plasma oscillations run at the real formula frequency.

Electromagnetism2DAdvanced60 FPS📱 Mobile-adapted⚡ Plasma⇄ 3D version
2d-plasma ↗ Open standalone

How this particle-in-cell simulation works

This is a genuine, if small-scale, particle-in-cell (PIC) plasma solver — not a decorative N-body glow effect. Every step: (1) each charged particle's charge is deposited onto a 64×40 grid using bilinear (cloud-in-cell) weighting; (2) the resulting charge density feeds a real Poisson equation −∇²φ = ρ/ε₀, solved with 20 Gauss–Seidel relaxation iterations per frame on a periodic domain; (3) the electric field E = −∇φ is computed on the grid by finite differences and interpolated back to each particle's position; (4) particles are pushed by F = qE with a real electron/ion mass ratio of 1 : 1836.

In Plasma Oscillation mode, electrons move against a stationary, uniform positive ion background. A single-wavelength density perturbation is seeded at start, and the resulting restoring electric field makes the electron gas oscillate at the real electron plasma frequency ωp = √(ne²/ε₀me) — the readout panel measures the oscillation period directly from the simulated motion and compares it to the theoretical value from the formula.

In Debye Shielding mode, both ions and electrons are mobile and thermalised. A fixed test charge is inserted into the plasma, and the mobile charges rearrange around it, screening its field beyond roughly one Debye length λD — the same real length scale that limits how far an electrostatic disturbance in a real plasma can be felt.

⚙ Under the hood

A real 2D particle-in-cell (PIC) plasma simulation: ions and electrons deposit charge onto a grid, a Poisson equation is solved by Gauss-Seidel relaxation for the self-consistent electric field, and the field is interpolated back to push each particle. Switch between a Plasma Oscillation mode, where electrons genuinely oscillate around a stationary ion background at the measured plasma frequency, and a Debye Shielding mode, where mobile ions and electrons screen a test charge within a real Debye length.

plasmaparticle-in-cellPICDebye shieldingplasma oscillationplasma frequencyCoulomb forceelectromagnetism2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)