Water, fire, air, and dirt, magnets how do they work? It’s not miracles, it’s science! We’ve all played with magnets before be it on the fridge or in science class, but we might not understand what magnets really are or what they do. In this article we will learn the basic theory behind electric and magnetic fields and learn how to make a computational framework to model them.
In this article we will:
- Learn basic electromagnetic (EM) theory
- Create vector fields
- Map out EM fields using vector fields
Electromagnetism is one of the 4 fundamental forces of the universe. It is the force that governs the behavior of charged particles and electric and magnetic fields are how this force manifests itself. In this section, we will break down the theory behind each of these fields
Electric fields are inherent to charged particles. It is the reason why charged particles can repel and attract each other. By convention, we say that positively charged particles have an electric field that points outward and negatively charged particles have an electric field that points inward seen in figure 2. In the attractive case when a negatively and a positively charged particle are near each other, the field lines start at the positive charge and terminate at the negative charge as seen in figure 1.
The force charged particles exert on each other is described by Coulomb’s law. Coulomb’s law states that the force between charges is proportional to the charge of each particle divided by the distance between then. The exact equation is stated in equation 1 below.