A Byte of PhysicsLogo

Continuous charge distributions

Continuous charge models replace many discrete sources with a density function and an integral. A line, surface, or volume density does not remove discrete computation; it says what total charge a small cell represents. Numerically, the integral becomes a weighted sum whose cell geometry and resolution are part of the model input.

Think like a programmer

Represent source geometry, density, and quadrature weights independently. A line element uses dq = λ(s) Δs; an area element uses dq = σ(x,y) ΔA; a volume element uses dq = ρ(x,y,z) ΔV. Keep the probe fixed while refining the source mesh, and return the field plus a convergence record rather than only an arrow image.

Model checklist

Inputs
Density function and SI units, source geometry and bounds, cell centres and weights, probe positions, electric constant/permittivity policy, singularity exclusion radius, refinement sequence, and vector residual tolerance.
State
Weighted element charges, source-to-probe displacements, per-element field contributions, accumulated field vector, total represented charge, and refinement history.
Rule
Evaluate density at a documented quadrature point, multiply by the element measure, compute the inverse-square vector contribution, and sum compatible contributions.
Output
Field vector in V/m, represented charge, contribution ledger, near-source exclusions, and change between resolutions.
Check
Sum of element charges approaches the known total charge; symmetry cancels forbidden components; doubling resolution changes the selected probe field below tolerance; an analytic line/ring/plane reference agrees where its assumptions hold; no source cell at a singular probe is silently replaced by zero.
\[\mathbf E=\int k\frac{dq\,\mathbf r}{r^3}\]

The source-to-probe vector must be recomputed for each cell. For an element centred at r' and a probe at r, use R = r − r'; the field contribution points along R for positive dq and opposite it for negative dq. A common bug is to use only distance, which preserves a plausible magnitude but destroys cancellation and direction. Another is to reuse an area weight after changing a grid’s spacing.

\[\mathbf E(\mathbf r)\approx\sum_i k\,\frac{\Delta q_i\,(\mathbf r-\mathbf r_i)}{\lVert\mathbf r-\mathbf r_i\rVert^3},\qquad \Delta q_i=\rho(\mathbf r_i)\,\Delta V_i\]

Start with a geometry where symmetry gives a cheap oracle. At the centre of a uniformly charged ring, every contribution has an opposite partner and the net field is zero. On the symmetry axis, transverse components should cancel even before the total has converged. These tests validate indexing, signs, and weights. Then compare a finite, well-separated probe with an analytic result or a much finer reference grid. Report component changes as well as a magnitude change: cancellation can make relative errors misleading when the expected result is near zero.

Refinement is an experiment. Hold physical geometry, density, probe point, quadrature rule, and singularity policy fixed. Halve the maximum cell size, recompute, and compare the two estimates. If the density has a sharp edge, discontinuity, or concentrated feature, uniform refinement may be inefficient; record any adaptive policy and ensure it does not move or double-count source charge. Total-charge conservation is a separate check from field convergence.

The self-field question must be explicit. A point probe located inside an ideal continuum may require an analytic principal-value treatment, a finite-sized test charge, or a model-specific regularization. Skipping one cell is an algorithmic choice that changes with resolution; it cannot be presented as the exact physical answer without a stated limiting argument.

Try this experiment

Prediction: Refining a symmetric distribution improves forbidden-component cancellation, while an unbalanced cell weight creates a visible nonzero component.

Discretize a uniform ring or symmetric line using paired source cells. Verify total represented charge and the zero-field symmetry point. Double the cells while leaving the probe fixed and log the component residuals. Deliberately perturb one cell weight, predict the sign of the error, then restore it. State what your program does if the probe lands on a source cell.

Where this model breaks

Discretization can miss sharp density changes and singular self-fields. Analytic symmetries may be more accurate where available. The electrostatic superposition model also omits moving-charge retardation, material polarization unless included, conductor charge rearrangement, and quantum-scale charge structure.

Summary

Approximate continuous charge with explicit density-weighted samples, but treat total charge, symmetry, singularity policy, and mesh convergence as first-class outputs. Use analytic cases to validate a numerical sum before exploring unsupported geometries.

Glossary

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Continuous Charge Distributions, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Electrostatics, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Continuous Charge Distributions as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Continuous Charge Distributions into a test

Approximate charge-density integrals with weighted source samples and refinement checks.

  1. Name the inputs and units that the electrostatics model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: