aidoesscience
aidoesscience › Electrostatics · Gauss
Validating · validations

Electrostatics · Gauss's law

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

Electrostatics · Gauss's law simulation running in the browser

▶ 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ᵢ)

Gauss's law calculator (electric flux, the enclosed-charge count, line, sheet and sphere fields, and why the constant is 2π in a plane and 4π in space)

Flux counts charge, and this page performs the count rather than an integral. The simulation above knows one thing — the raw superposed field E = Σ qᵢ(r−rᵢ)/|r−rᵢ|² — and discovers Gauss's law by numerically integrating ∮ E·n̂ dl around thousands of arbitrary loops until 2π and the exact integer enclosed charges fall out of it. Nothing here is obtained that way, which is the only reason the agreement is worth anything: you type three charges, their places and a loop, and every number below comes out of distances, sums and square roots. THE GAUSS CONSTANT IS NOT LOOKED UP EITHER. It is the area of the unit sphere, and this page walks to it dimension by dimension on the recursion A(d) = 2π·A(d−2)/(d−2) seeded on A(1) = 2, so the 2π of the plane and the 4π hiding inside Coulomb's 1/(4πε₀) are one statement read in two dimensions and in three — and the force law is forced along with it, because flux can only be blind to the loop if the field falls exactly as fast as the sphere grows: 1/r² in space, 1/r in a plane. That is why this world's falsified rival matters. Drop the inverse-square law into two dimensions and the flux out of a bigger loop is SMALLER — for a centred charge it is exactly q/R rather than q — so a quantity meant to count what is inside reports a different number at every radius. The staircase direction is the one worth trying first: grow a loop from your own centre and it swallows the charges one at a time, at radii that are plain hypotenuses with no electrostatics in them at all, while the plateau heights are the charges themselves. Multiply every charge by a million and the crossing radii are character-identical. Geometry decides when; charge decides how much. The SI direction puts the units back on — line charge λ/(2πε₀r), the logarithmic potential that only two dimensions have, the infinite sheet's σ/(2ε₀) that does not care how far away you stand, the capacitor, and the sphere inside and out — and it assembles ε₀ from μ₀ and c rather than storing it. Four things this page will NOT do. It will not integrate: the loop above sums E·n̂ over 720 live samples and this page counts three distances, and if both took the same road neither would be evidence for the other. It will not quadrature the rival's off-centre flux, which is an elliptic integral with no elementary form — it gives the exact centred law and names what the remainder is made of. It will not model conductors, dielectrics, images or finite wires. And it will not correct a single number the finding recovered: where a printed number and a closed form part company it reports the gap and the printing quantum and stops there.

∮ E·n̂ dl = 2π·Σ_inside qᵢ · ∮ E·dA = Q_enc/ε₀ · A(d) = 2π·A(d−2)/(d−2), A(1) = 2 · |E| ∝ 1/r^(d−1) · E_line = λ/(2πε₀r) · ΔV = (λ/2πε₀)·ln(r₂/r) · E_sheet = σ/(2ε₀) · E_sphere = Q/(4πε₀r²) outside, Qr/(4πε₀R³) inside · crossing radius = |c − rᵢ| · rival 1/r²: Φ/2π = q/R

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