Computational Electromagnetism
Numerical simulation of electromagnetic fields through discretization, convergence, and error control.
Conceptual context
Computational electromagnetism turns a continuous field problem into a discrete representation that a computer can solve. The domain is divided into cells, is approximated at nodes, and is recovered from differences between neighboring values. The choice of is not merely graphical: it determines which spatial structures can be resolved and how far lies from . A coarse mesh may erase strong gradients, whereas an excessively fine mesh may increase cost without improving accuracy when other errors dominate. The central goal is to recognize when follows the expected convergence law and when it does not.
🟢 Essential level
An electromagnetic simulation replaces continuous space with a network of points. describes the characteristic separation between those points.
Reducing it allows the numerical representation to follow variations of and more closely, especially near electrodes, edges, and material interfaces. Consequently, usually decreases as the mesh is refined. The improvement is not automatic, however. It depends on correct boundary conditions, a stable algorithm, and a trustworthy . may also be limited by solver tolerance, roundoff, or geometric singularities. The key practice is to compare several meshes rather than trust one run. A regular error trend supports convergence; an irregular trend signals that another source of error is controlling the result. Mesh refinement is therefore an experiment performed on the numerical model itself, not merely a request for more pixels.
This experimental discipline separates a credible simulation from a pretty picture: only a sequence of meshes compared under identical conditions can demonstrate that the error decreases for the right reason, rather than by numerical coincidence.
🔵 Formal level
Basic formulas
Two-dimensional electrostatics links , , and . On a rectangular grid, the continuous equation is replaced by central differences involving and :
Two-dimensional discretized Poisson equation
The component is then obtained from the negative discrete gradient of :
Electric field from potential
Rearranging this relation for potential, and denote the same nodal potentials as evaluated at the central node and at the neighboring node to the east, respectively.
The discrepancy between and is quantified by:
Relative electric-field error
Inverting this relation for the numerical field gives , the same recovered from a target relative error.
Real student questions
Is a finer mesh always better? It improves spatial resolution, but it may be wasteful when another error dominates or the physical model is wrong.
Why can the field converge more slowly than the potential? Because is obtained by differentiating , and differentiation amplifies local variation and numerical noise.
What should be used as a reference? An analytical solution, a reliable measurement, or a much more refined simulation whose own error has been assessed.
Can the error be small while the simulation is wrong? Yes. compares two results and does not independently validate materials, equations, or boundary conditions.
Why does an FDTD simulation blow up? A common cause is choosing too large for , , and .
Final synthesis
controls how much spatial detail the simulation preserves. In a regular second-order scheme, decreases predictably until other errors dominate. Confidence comes from convergence evidence, physical coherence, and stability, not from a single run.
Formal development
This section is part of the complete theory. See the subscription options to access it.
🔴 Structural level
This section is part of the complete theory. See the subscription options to access it.
Deep physical interpretation
This section is part of the complete theory. See the subscription options to access it.
Order of magnitude
This section is part of the complete theory. See the subscription options to access it.
Personalized resolution method
This section is part of the complete theory. See the subscription options to access it.
Special cases and extended example
This section is part of the complete theory. See the subscription options to access it.
Cross-cutting connections and study paths
This section is part of the complete theory. See the subscription options to access it.