Electricity & magnetism

Electric Field Superposition Explorer

Adds the electric fields and potentials of up to 8 point charges in a plane (superposition). Shows the field strength, direction and potential on a 17 x 17 grid, four field lines traced from every charge by the midpoint method, and the field and potential at a probe point, refuses charges out of range or too close together plainly, and scores five challenges such as cancelling the field at a point. For learning electrostatics.

Last updated

Calculator overview

Inputs and outputs

This summary comes from the calculator's published input and output contract.

Inputs

Probe point x (m) (required)
About this input

The x coordinate of the probe point, -4 to 4 m. While a challenge is selected the challenge's own target point is used instead.

Default 1 Range -4 to 4
Probe point y (m) (required)
About this input

The y coordinate of the probe point, -4 to 4 m.

Default 0 Range -4 to 4
Challenge number (required)
About this input

0 for none, or 1 to 5 to score your charges against a challenge: cancel the field at a point, make the potential zero, choose a charge value, point the field straight up, or complete a symmetric arrangement.

Default 0 Range 0 to 5
Charges (row k is charge k; leave a row blank when it is not used) (required)
About this input

Up to 8 point charges. Row k is charge k: x and y in metres from -4 to 4, and the charge in nanocoulombs from -10 to 10, not 0. Leave a row blank for a charge you do not use; charges must be at least 0.2 m apart.

Default 1 row
ColumnRange or allowed values
x (m) -4 to 4
y (m) -4 to 4
Charge (nC) -10 to 10

Outputs

Field direction at the probe (degrees from +x)
About this output

The direction of the field at the probe point, in degrees from the +x axis, counter-clockwise positive, from -180 to 180; blank where the field is zero.

No unit declared
Field strength at the probe (V/m)
About this output

The strength of the electric field at the probe point, in V/m.

No unit declared
Potential on the grid (V)
About this output

The potential at each grid point, in volts; blank within 0.1 m of a charge.

No unit declared
Model version
About this output

The version of the workbook model that produced these results.

No unit declared
Formula module versions
About this output

The versions of the formula modules inside the workbook: the superposition sums with the field-line tracing, and the challenge scoring.

No unit declared
Field at the probe, x part (V/m)
About this output

The x part of the electric field at the probe point, in V/m.

No unit declared
Probe point used, y (m)
About this output

The y coordinate of the point where the probe results apply.

No unit declared
Total charge (nC)
About this output

The sum of the charges in use, in nanocoulombs.

No unit declared
Probe point used, x (m)
About this output

The x coordinate of the point where the probe results apply: your probe point, or the challenge's target point.

No unit declared
Field at the probe, y part (V/m)
About this output

The y part of the electric field at the probe point, in V/m.

No unit declared
Potential at the probe (V)
About this output

The electric potential at the probe point, in volts, taking 0 V far from every charge.

No unit declared
Model Status
About this output

OK when the results are computed; CHECK when the probe sits within 0.1 m of a charge or at a point where the field is exactly zero; NOT VALID with the charge to fix when the inputs cannot be used.

No unit declared
Challenge score
About this output

100 when the selected challenge is met, otherwise 0.

No unit declared
Challenge result
About this output

No challenge selected, MET or NOT MET.

No unit declared
Challenge: the value scored
About this output

The value the selected challenge scores at its target point: a field strength in V/m, a potential in V or a direction in degrees.

No unit declared
Challenge feedback
About this output

A hint for the selected challenge, or why it is met; blank with no challenge.

No unit declared
Challenge goal
About this output

What the selected challenge asks for; blank with no challenge.

No unit declared
Charges in use
About this output

How many rows of the charge table are in use.

No unit declared
Field lines: y of each point (m)
About this output

The y coordinate of every point of every field line, laid out as the x table.

No unit declared
Field strength on the grid (V/m)
About this output

The field strength at each of the 17 x 17 grid points from -4 to 4 m (0.5 m apart), in V/m; the first column is the y of the row. Blank within 0.1 m of a charge.

No unit declared
Field lines: x of each point (m)
About this output

The x coordinate of every point of every field line: one row per line (4 a charge), points 0 to 20 across; later points blank once the line ends.

No unit declared
Field direction on the grid (degrees from +x)
About this output

The field direction at each grid point, in degrees from the +x axis; blank within 0.1 m of a charge and where the field is zero.

No unit declared
Field lines: charge, points and how each ends
About this output

For each field line: its charge, how many points it kept and how it ended (REACHED_CHARGE, LEFT_PLOT, ZERO_FIELD or MAX_STEPS). Line L starts at 45 + 90 x MOD(L - 1, 4) degrees around its charge.

No unit declared
This page is provided by LogicCommons for informational purposes only. Results are analysis outputs computed from the inputs you supply and are not professional advice. Verify all inputs and results independently.

LogicCommons is in beta. If a result, label, or reference looks wrong, tell us here; we read every message.

Methodology

Purpose and model boundary

This lab adds up the electric fields and potentials of up to 8 point charges placed in a plane, the idea called superposition. For the charges as placed it returns the field strength, field direction and potential at every point of a 17 x 17 grid from -4 to 4 m, four field lines traced out from every charge, and the field and potential at one probe point. Five scored challenges ask you to arrange charges so that fields or potentials cancel or point a given way. It is a learning tool for electrostatics: the charges are ideal points in a flat plane, at rest, in empty space. It is not a model of real conductors, insulators, charged equipment or three-dimensional charge distributions, and it is not for any electrical safety or design decision.

The model is the calculation authority. The page sends the charges you place and the values you set to the model and draws only what the model returns; it computes no field value itself.

Inputs and units

Input Meaning and unit
Charges Up to 8 point charges; row k of the charge table is charge k. Each has an x and a y position in metres, from -4 to 4, and a charge in nanocoulombs (nC), from -10 to 10 and not 0. A positive charge is positive, a negative charge negative. A row with all three cells blank is not used, and blank rows may sit anywhere in the table. Charges in use must be at least 0.2 m apart.
Probe point x, y The point where the field and potential are reported, each from -4 to 4 m. While a challenge is selected, the challenge's own target point is used instead (the probe inputs must still be in range).
Challenge number 0 for none, or a whole number from 1 to 5 to score the charges against a challenge.

Sign conventions: x is to the right and y is up, in metres, over a plot area from -4 to 4 m in each direction. A direction is measured in degrees from the +x axis, counter-clockwise positive, from -180 to 180; a field pointing along -x reads 180, never -180. Potential is taken as 0 V far from every charge.

Where each input is set: the charges and the probe point are set only on the canvas. You add a +1 nC charge with the Add button and a tap on the plane, drag it to move it, tap it to change its sign and size, and remove it with Delete; you drag the probe P to move it. The challenge number is set in the input panel.

Governing relationships

Each charge's field and potential follow Coulomb's law for a point charge, and the model adds the contributions of all charges in use (superposition). With charges in nanocoulombs, Coulomb's constant is k = 8.9875517923 V·m per nC (8.9875517923 × 10⁹ N·m²/C² times 10⁻⁹ C per nC).

For a point P and a charge qᵢ at (xᵢ, yᵢ):

  • dx = Px − xᵢ, dy = Py − yᵢ, r² = dx² + dy², r³ = r²·√r²
  • Exᵢ = k·qᵢ·dx / r³, Eyᵢ = k·qᵢ·dy / r³ (the field is a vector)
  • Vᵢ = k·qᵢ / √r² (the potential is a plain number)
  • Ex, Ey and V are the sums over every charge in use, in row order. The field adds as vectors, so its parts can cancel; the potential adds as signed numbers.
  • Field strength |E| = √(Ex² + Ey²); direction = the angle of (Ex, Ey) from +x, by ATAN2, in degrees.

Zero and rounding rules: a field strength below 1×10⁻⁹ V/m counts as zero, with field parts 0 and no direction; a potential below 1×10⁻⁹ V in size reads 0. A field part smaller than 1×10⁻¹² times the field strength counts as 0 in the reported parts and the direction, so that rounding noise cannot flip a direction between +180 and -180.

The field grid. The grid points are at x and y = -4, -3.5, …, 4 (17 points each way, 0.5 m apart). At each point the model sums the field strength, direction and potential as above. A grid point closer than 0.1 m to a charge in use has no finite value and is left blank.

Field lines, traced by the midpoint method. Each charge starts four lines, 0.15 m from the charge at 45, 135, 225 and 315 degrees. A line from a positive charge follows the field E; a line from a negative charge follows −E, so lines of both signs run away from their own charge. Each step is 0.25 m long:

  1. Find the field E₁ at the current point and take a half step of 0.125 m along its direction to a midpoint.
  2. Find the field E₂ at the midpoint and take the full 0.25 m step from the current point along E₂'s direction.

A line ends, with its end status, at the first of these tests to hold, checked in this order:

  • a point leaves the plot area (that outside point is kept): LEFT_PLOT;
  • a point comes closer than 0.2 m to any charge in use (its own charge counts after the first step): REACHED_CHARGE;
  • it has taken 20 steps (21 points, numbered 0 to 20): MAX_STEPS;
  • the field at the point or at the midpoint is below 1×10⁻⁹ V/m: ZERO_FIELD.

The probe. The field parts, strength, direction and potential at the probe point follow the same sums.

Calculation sequence

The model works through the relationships above in this order:

  1. It checks the charge rows, the probe point and the challenge number, in the order of the status list under Errors and warnings.
  2. It fixes the point to report: the probe point, or in a challenge the challenge's own target point.
  3. It sums the field and potential of every charge in use at each of the 17 x 17 grid points.
  4. It traces the four field lines of every charge by the midpoint method, and records how each ends.
  5. It sums the field and potential at the reported point.
  6. It sets the status and, in a challenge, scores the challenge.

Outputs and interpretation

  • Status: OK, CHECK or NOT VALID (see Validation and status logic and Errors and warnings).
  • Field strength on the grid (V/m), field direction on the grid (degrees from +x) and potential on the grid (V): each is 17 rows, one per y from -4 (first row) to 4, with the row's y in the first column and the values at x = -4 to 4 across. The page draws them as field arrows and a potential map. Points within 0.1 m of a charge are blank, and the direction is also blank where the field is zero.
  • Field lines: the x and y of every point of every line, one row per line (lines 1 to 4 belong to charge 1, lines 5 to 8 to charge 2, and so on), points p0 to p20 across; later points are blank once a line ends, and the rows of an unused charge are blank. A third table gives each line's charge, the number of points it kept and how it ended.
  • Probe results: the probe point used, the field's x and y parts and strength in V/m, its direction in degrees from +x, and the potential in V. The field strength falls as 1/r² from a single charge and the potential as 1/r.
  • Charges in use and total charge (nC): the count of rows in use and the sum of their charges.
  • Challenge outputs: the goal, the value scored at the challenge's target point (a field strength in V/m, a potential in V or a direction in degrees), the result (No challenge selected, MET or NOT MET), a score of 100 when met or 0, and a feedback hint.
  • Model and formula module versions.

Challenges

Choosing challenge 1 to 5 fixes some charges' positions or values and scores the arrangement at the challenge's own target point, which replaces the probe point. A challenge is MET only when the inputs are valid, every fixed position and value is unchanged, the number of charges in use is exactly the number the challenge asks for, and the test at the target point holds.

  1. Place a +1 nC charge so that the field of it and a fixed +4 nC charge is 0.1 V/m or less at (0, 0).
  2. Place a -1 nC charge so that the potential of it and a fixed +2 nC charge is within 0.1 V of zero at (0, 0).
  3. Choose the size and sign of a third charge at a fixed position so that the field of three charges is 0.1 V/m or less at (0, 0).
  4. Choose the charge at (1, 0), beside a fixed charge at (-1, 0), so that the field at (0, 1) points straight up (90 degrees, within 1 degree) with a strength of at least 1 V/m.
  5. Place a fourth +1 nC charge among three fixed +1 nC charges so that the field at (0, 0) is 0.1 V/m or less.

Validation and status logic

The status reads the first match in the list under Errors and warnings: the NOT VALID input checks first, then the two CHECK items for the probe point, then OK. An exact cancellation, such as the answer to a cancelling challenge, is a null point: the status reads CHECK there, and that is expected.

Assumptions and limitations

  • Ideal point charges in a two-dimensional plane, at rest in empty space. Not modelled: three dimensions, distributed charge, conductors and dielectrics, moving charges and magnetism, and the field within 0.1 m of a charge.
  • A fixed 17 x 17 grid at 0.5 m spacing; four lines a charge, each at most 20 steps of 0.25 m, so 5 m of path. A line can end with MAX_STEPS before reaching the edge.
  • The field lines are a fixed-step picture of the field's direction. They can cut corners near a charge and are not exact paths.
  • A field strength below 1×10⁻⁹ V/m is zero; a field part below 1×10⁻¹² of the strength reads 0. A value lying within about 1×10⁻⁹ of a threshold (zero field, the 0.1 m and 0.2 m radii, the plot edge or a challenge test) may fall either way.

Restrictions and non-computing states

  • At most 8 charges; positions from -4 to 4 m; charges from -10 to 10 nC, not 0, at least 0.2 m apart.
  • Under NOT VALID every result is blank except the count of charges in use and the version texts. With a valid challenge number selected, the challenge result reads NOT MET with a score of 0, the goal and the not-met hint still show, and the value scored is blank. When the challenge number itself is not valid, the result reads No challenge selected and the goal and hint are blank.
  • Under the first CHECK the five probe results are blank, while the grids and field lines are still computed.

Errors and warnings

The status messages, first match wins:

  • NOT VALID: charge k needs x and y from -4 to 4 m and a charge from -10 to 10 nC, or leave the row blank when a row in use has a cell blank, not a number or out of range.
  • NOT VALID: charge k is 0 nC; enter a nonzero charge or clear the row when a charge in use is 0.
  • NOT VALID: at least one charge is needed when every row is blank.
  • NOT VALID: charges j and k are closer than 0.2 m when two charges in use are less than 0.2 m apart.
  • NOT VALID: the probe point must be from -4 to 4 m in x and in y when a probe coordinate is blank or out of range.
  • NOT VALID: the challenge number must be a whole number from 0 to 5 when the challenge number is blank, not a number, not a whole number, or outside 0 to 5. A number such as 2.5 gives this status; it is not treated as no challenge.
  • CHECK: the probe point is within 0.1 m of charge k, where a point charge's field has no finite value; the probe results are blank.
  • CHECK: the field at the probe point is zero (a null point), so it has no direction when the field strength at the probe reads 0.
  • OK otherwise.

References

This laboratory is an educational model of point charges in empty space. Each charge q at distance r produces a field of size k q / r^2, pointing away from a positive charge and toward a negative one, and a potential k q / r, where k = 1 / (4 pi epsilon_0) is Coulomb's constant. By the superposition principle the fields add as vectors and the potentials as plain numbers. Field lines are traced from each charge by the midpoint (second-order Runge-Kutta) method with a fixed step.

Sources and further reading

  • Coulomb's law, superposition, field lines and the potential of point charges: D. J. Griffiths, Introduction to Electrodynamics, 4th edition, Cambridge University Press, 2017, chapter 2, Electrostatics. doi:10.1017/9781108333511
  • The same ideas at an introductory level: S. J. Ling, J. Sanny and W. Moebs, University Physics Volume 2, OpenStax, 2016, sections 5.3, Coulomb's Law, 5.4, Electric Field, and 7.3, Calculations of Electric Potential. OpenStax, section 5.3
  • The vacuum electric permittivity epsilon_0, from which Coulomb's constant is derived: National Institute of Standards and Technology, CODATA Internationally Recommended Values of the Fundamental Physical Constants, vacuum electric permittivity. NIST
  • The midpoint (second-order Runge-Kutta) method used to trace the field lines: W. H. Press, S. A. Teukolsky, W. T. Vetterling and B. P. Flannery, Numerical Recipes: The Art of Scientific Computing, 3rd edition, Cambridge University Press, 2007, chapter 17, Integration of Ordinary Differential Equations, section 17.1, Runge-Kutta Method.
  • A classic lecture treatment of electrostatics and superposition: R. P. Feynman, R. B. Leighton and M. Sands, The Feynman Lectures on Physics, volume II, chapter 4, Electrostatics. Caltech online edition

No table or text from any of these publications is reproduced, and none of their authors or publishers has reviewed or endorses this laboratory.

This laboratory is for learning. Its results hold only within its stated ranges; it is not a tool for electrostatic safety or for designing equipment.

Results are informational and not professional advice. See our Terms of Use. Powered by SpreadsheetWeb · About · Privacy · Terms