aidoesscience
aidoesscience › Electrostatics · Gauss
Validating · validations

Electrostatics · Gauss's law simulation

Does the electric flux through a closed loop really count the charge inside it — exactly, whatever the loop's size or shape?

▶ Run the simulationSee the measured result

Known value
6.2831853

Units: the 2-D Gauss constant C = Φ/q_enc = 2π (flux per unit enclosed charge for the line-charge field E = q·r̂/r); Jackson, Classical Electrodynamics 3e §1.3

How the lab tests it

Fix a set of charges in the plane (2-D electrostatics: field E = q·r̂/r), trace the field lines, then tour a measuring loop across the scene and numerically integrate the flux Φ = ∮ E·n̂ dl around it, comparing Φ/2π to the charge the loop encloses.

What it checks

Gauss's law: Φ/2π equals the enclosed charge EXACTLY — independent of the loop's radius, position, and shape (it jumps in integer steps as the loop swallows charges, and is 0 around the neutral whole) — the integral form of the inverse-distance field ∇·E = 2π·Σqᵢδ²(r−rᵢ)

This simulation has a catalogued, oracle-checked result: Gauss's law (2-D).