Gauss's Law Simulator Back
Electromagnetism

Gauss's Law Electric Field Simulator

Calculate and visualize electric fields for infinite line charge, infinite plane, and spherical charge distributions using Gauss's law. Move the Gaussian surface to experience the relationship between enclosed charge and field.

Select Charge Distribution
Line charge density λ (nC/m)10
Gaussian surface size r (m)1.5
Field Strength
E (V/m)
Φ_E (V·m)

Gauss's Law

$$\oint \mathbf{E}\cdot d\mathbf{A}= \frac{Q_{enc}}{\varepsilon_0}$$

Line charge: $E = \dfrac{\lambda}{2\pi\varepsilon_0 r}$

CAE Note: Electrostatic FEM (ANSYS Maxwell, COMSOL) uses Gauss's law to compute capacitance, PCB parasitic capacitance, and semiconductor field strength.
Electric Field E(r) vs Distance r

What is Gauss's Law?

🧑‍🎓
What exactly is Gauss's Law? I see the integral symbol and it looks intimidating.
🎓
Basically, it's a powerful shortcut. It says the total electric field "flowing out" of a closed surface is proportional to the total charge *inside* that surface. In practice, for symmetric shapes like the ones in this simulator, it lets us calculate the electric field easily without complicated integrals. Try selecting the "Line Charge" and moving the "Gaussian surface size r" slider. You'll see the cylindrical surface we use to apply the law.
🧑‍🎓
Wait, really? So for the infinite line charge, the formula is $E = \lambda / (2\pi\varepsilon_0 r)$. How do we get that from the law?
🎓
Great question! We imagine a cylindrical Gaussian surface around the line. The field points radially outward, so it's perpendicular to the cylinder's curved surface. The left side of Gauss's Law becomes $E$ times the area of the cylinder's wall, $E(2\pi r L)$. The enclosed charge is just the charge density $\lambda$ times the length $L$ inside. Cancel $L$ and solve for $E$! You can test this: increase the "Line charge density λ" parameter above and watch the calculated field strength grow.
🧑‍🎓
That makes sense for lines and cylinders. But what about the sphere? What happens when my Gaussian surface (size r) is *smaller* than the actual charged sphere's radius (R)?
🎓
Excellent! This is a key insight. For a sphere with total charge Q, if your Gaussian surface is inside (r < R), the enclosed charge is *not* Q. It's only the charge within that smaller sphere. In the simulator, set the sphere's "Total charge Q" and "Radius R", then slowly drag the "Gaussian surface size r" slider from 0 to a value larger than R. You'll see the field plot change from linear (inside) to the familiar $1/r^2$ drop (outside), all governed by the same law.

Physical Model & Key Equations

The fundamental governing equation is Gauss's Law in integral form. It states that the net flux of the electric field through any closed surface is equal to the net charge enclosed divided by the permittivity of free space.

$$\oint_S \mathbf{E}\cdot d\mathbf{A}= \frac{Q_{enc}}{\varepsilon_0}$$

$\mathbf{E}$: Electric field vector (V/m or N/C)
$d\mathbf{A}$: Differential area vector (points outward normal to the Gaussian surface)
$Q_{enc}$: Total charge enclosed within the surface (C)
$\varepsilon_0$: Permittivity of free space (~$8.854 \times 10^{-12}$ F/m)

For geometries with high symmetry (line, plane, sphere), the law simplifies to algebraic formulas for the field magnitude. For example, for an infinite line charge with density $\lambda$:

$$E = \frac{\lambda}{2\pi\varepsilon_0 r}$$

$\lambda$: Linear charge density (C/m). This is the "Line charge density λ" parameter in the simulator.
$r$: Perpendicular distance from the line charge (m). This is the "Gaussian surface size r" parameter when the line charge is selected.
The field points radially away from a positive line charge.

Real-World Applications

Semiconductor Device Design: Engineers use Gauss's Law to analyze electric fields within transistors and diodes. For instance, in a MOSFET, the field in the gate oxide layer is critical for performance and preventing breakdown. CAE tools like ANSYS Maxwell solve the law numerically to optimize these nanoscale structures.

High-Voltage Insulation & Cables: Calculating the radial electric field around a coaxial power cable is a direct application of the spherical/cylindrical symmetry models. Engineers must ensure the field strength stays below the dielectric breakdown limit of the insulation material, which you can explore with the line and sphere models here.

Capacitance Calculation for PCB Traces: The capacitance between two parallel traces on a circuit board is found by relating the electric field (from the charge on one trace) to the voltage. FEM software like COMSOL uses the differential form of Gauss's Law ($\nabla \cdot \mathbf{E} = \rho/\varepsilon_0$) to compute parasitic capacitance that affects signal speed.

Electrostatic Precipitators & Pollution Control: These industrial devices use charged plates and wires to attract dust particles. The electric field between a charged wire (modeled as a line charge) and a cylindrical collection plate is designed using Gauss's Law principles to maximize particle collection efficiency.

Common Misconceptions and Points to Note

When you start using this simulator, there are a few points that are easy to misunderstand. First is the meaning of the word "infinite." Terms like "infinite line charge" or "infinite plane" describe powerful models that don't exist in reality but can be used when the object appears sufficiently long or wide from the observation point. For example, to find the electric field at a point just 1 cm away from the center of a 1-meter long thin wire, you can approximate it using the formula for an "infinite line charge," $E = \frac{\lambda}{2\pi\varepsilon_0 r}$. However, this formula doesn't hold near the ends of the wire. In the simulator, if you try making the "Gaussian surface size r" very large, you can visually see how the field weakens. This is your first step in understanding the limits of "infinite" models.

Next is the "appropriateness" of the Gaussian surface. The law itself holds for any arbitrary closed surface, but if you want to find the electric field E, "symmetry" is crucial. Using a cubic Gaussian surface for a spherically symmetric charge distribution makes the calculation explode in complexity. In the simulator, select "spherical symmetry" and try deliberately moving the Gaussian surface away from being a sphere. You should experience firsthand how the direction and magnitude of the electric field vector vary wildly at different points on the surface, making it impossible to calculate simply as 'E × (area).' Even when using CAE tools in practical work, how you define the mesh (computational grid) is often decided by considering this "symmetry."

Finally, the meaning of "does not exit". Seeing the electric field emanating perpendicularly from an "infinite plane," some people mistakenly think, "There's no electric field 'outside' the plane." That's not correct. Here, "outside" refers to the curved side surface of the cylindrical Gaussian surface we set up. The infinite plane emits a uniform electric field perpendicularly on both sides, but that field is parallel to the cylinder's side surface, so the electric flux through the side is zero. If you have two planes, like capacitor plates, the field between them strengthens to $E = \sigma / \varepsilon_0$. Be sure to confirm this difference in the simulator by changing the value of σ.

Related Engineering Fields

The calculations you're experimenting with in this simulator actually form the foundation of various advanced technologies. The first that comes to mind is capacitance design and evaluation. The basic principle behind chip capacitors on your smartphone's motherboard or large capacitors used in power systems is essentially an extension of the "infinite plane" model. Understanding the electric field distribution between plates is directly linked to calculating capacitance values and assessing the risk of insulation breakdown (discharge).

Another major field is high voltage and insulation engineering. Calculating the electric field from power lines (which is close to the "infinite line charge" model!) is essential for assessing impacts on other structures or the human body and for predicting corona discharge. For instance, when evaluating whether the electric field strength from a 500kV transmission line to the ground surface is below regulatory limits, these fundamental principles are the basis. Furthermore, when analyzing the three-dimensional electric field concentration around conductors inside Gas-Insulated Switchgear (GIS) using CAE (e.g., ANSYS Maxwell or COMSOL Multiphysics), Gauss's Law is the source of the core equation (Poisson's equation) for the numerical computation.

It also deeply relates to semiconductor device engineering. The electric field within the gate oxide of a MOSFET critically affects channel formation and reliability. Here, one-dimensional electric field calculations, treating the ultra-thin oxide layer as an "infinite plane," play a fundamental role. Conceptually, the change in the electric field when you vary the "surface charge density σ" in this simulator is the same as the change in the electric field within the oxide when you change the gate voltage.

For Further Learning

Once you've grasped the "intuition" of Gauss's Law with this simulator, try taking the next step into the equations and vector calculus. First, understand the meaning of the integral form equation shown on the simulator screen, $\oint_S \mathbf{E}\cdot d\mathbf{A}= Q_{enc}/\varepsilon_0$, at the level of each symbol. Confirm that $d\mathbf{A}$ is the "surface element vector" and $\mathbf{E}\cdot d\mathbf{A}$ is the vector dot product (= $E dA \cos\theta$). This is the operation that "sums up only the component perpendicularly penetrating the surface."

Then, learning about its expansion into the differential form will broaden your horizons. Applying the integral form of Gauss's Law to an arbitrarily small region leads to the differential form $\nabla \cdot \mathbf{E} = \rho / \varepsilon_0$, where $\rho$ is the charge density [C/m³]. This equation means "at each and every point in space, the divergence (source) of the electric field is determined by the charge density at that point." This is precisely the core part of the Poisson's equation that CAE software solves when calculating electrostatic fields.

As a concrete next step, tackling applied problems combined with the "superposition principle" is recommended. For example, consider the electric field distribution created by two parallel infinite line charges (one positive, the other negative). The simulator only lets you choose one type of charge distribution, but reality involves combinations of distributions. By superimposing the fields created by each using vector addition, you can calculate more complex and practical electric field patterns. This is the essential concept behind the calculations performed over the entire mesh in actual CAE analysis.