O'Reilly logo

Computational Modeling and Visualization of Physical Systems with Python by Jay Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7

Electromagnetic fields

In the simulation of few-body problems in Chapter 4, gravity was the sole interaction at large distances. If the particles are charged, they will interact via electromagnetic forces which are much stronger than gravity at the same distance. For example, the ratio of the Coulomb force to gravity between a proton and an electron is about 1039 at a given separation, making gravity utterly negligible. In fact, macroscopic properties of all ordinary matter are determined by electromagnetic interactions. Forces such as tension in a string (Section 6.3), spring forces, friction, etc., are all manifestation of electromagnetic forces between atoms.

Like gravity, electromagnetic interactions occur through action at a distance via electromagnetic fields described by classical field equations, the Maxwell’s equations. In this chapter, we are interested in the simulation of electric potentials and fields in electrostatics and propagation of electromagnetic waves. Both scalar and vector fields in electromagnetism will be studied by solving the appropriate PDEs first encountered in Chapter 6. We discuss two mesh-based methods for solving the 2D Poisson and Laplace equations and related boundary value problems: an iterative self-consistent (relaxation) method, and a noniterative finite element method first introduced for 1D problems in Chapter 6. Complementing mesh-based methods, we introduce a meshfree method using radial basis functions for solving PDEs. Finally, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required