Electromagnetic Wave Simulator Back
Electromagnetic Simulator

Electromagnetic Wave Simulator — E & B Field Visualization

Visualize a plane wave $E = E_0 \sin(kx - \omega t)$ in 3D perspective. Adjust frequency, medium, and polarization to explore wavelength, phase velocity, and impedance across the full EM spectrum.

Frequency / Medium
Frequency (log scale)
Microwave
Medium
Polarization
Amplitude E₀
V/m
Results
Results
3.00 m
Wavelength λ
c
Phase Velocity
377 Ω
Impedance Z
Skin Depth δ
E/B Field 3D Visualization
1 MHz1 GHz1 THzVisibleUVX-ray
Wave
Theory & Key Formulas
$$c = \frac{1}{\sqrt{\mu_0 \varepsilon_0}}, \quad v = \frac{c}{\sqrt{\varepsilon_r \mu_r}}$$ $$Z = \sqrt{\frac{\mu}{\varepsilon}}, \quad \mathbf{S}= \frac{\mathbf{E}\times \mathbf{B}}{\mu_0}$$

What is an Electromagnetic Plane Wave?

🙋
What exactly are we seeing in this 3D visualization? I see a red wave and a blue wave moving together.
🎓
Basically, you're seeing a snapshot of a fundamental electromagnetic wave. The red wave is the oscillating electric field (E), and the blue wave is the magnetic flux density (B). They are always perpendicular to each other and to the direction the wave is traveling. Try moving the "Frequency" slider above—you'll see the waves bunch up (shorter wavelength) as you increase the frequency.
🙋
Wait, really? They're always perpendicular? So if I change the polarization, what's actually happening?
🎓
Exactly! That's a key rule from Maxwell's equations. Changing the polarization rotates the plane in which the electric field oscillates. For instance, if you switch from linear to circular polarization, the tip of the E-field vector will trace a corkscrew path as the wave propagates. The B-field will instantly adjust to stay perpendicular to it. This simulator lets you see that 3D relationship clearly.
🙋
So the speed changes when I switch the medium from "Vacuum" to "Glass". Why does it slow down, and what happens to the fields?
🎓
Great observation! In practice, the wave slows down because it's interacting with the atoms in the material. The key is that the relationship between E and B changes. In a vacuum, their ratio is fixed by the speed of light. In glass, the magnetic field becomes relatively stronger for the same electric field amplitude. You can see this if you adjust the E₀ amplitude slider—the B-field amplitude will scale proportionally, but the factor depends on your chosen medium.

Physical Model & Key Equations

The wave's speed is fundamentally determined by the electric and magnetic properties of the medium it travels through. In a vacuum, it's the universal constant c. In a material, it's reduced by the refractive index.

$$c = \frac{1}{\sqrt{\mu_0 \varepsilon_0}}, \quad v = \frac{c}{\sqrt{\varepsilon_r \mu_r}}$$

Here, $c$ is the speed of light in vacuum, $v$ is the speed in the medium, $\mu_0$ and $\varepsilon_0$ are the vacuum permeability and permittivity, and $\varepsilon_r$ and $\mu_r$ are the material's relative values.

Two other crucial quantities are the wave impedance, which is the ratio of the electric to magnetic field amplitudes, and the Poynting vector, which describes the direction and intensity of the energy flow carried by the wave.

$$Z = \sqrt{\frac{\mu}{\varepsilon}}, \quad \mathbf{S}= \frac{\mathbf{E}\times \mathbf{B}}{\mu_0}$$

$Z$ is the impedance (in Ohms). $\mathbf{S}$ is the Poynting vector. The cross product $\mathbf{E}\times \mathbf{B}$ points in the propagation direction, confirming the orthogonal triad you see in the simulator.

Frequently Asked Questions

Increasing the frequency shortens the wavelength, narrowing the spacing between waves on the screen. Changing the medium alters the speed of light, which changes the wavelength and wave propagation speed. For example, in a medium with a higher refractive index, the wavelength becomes shorter, and the amplitude ratio of the E-field to the B-field also changes according to the impedance of the medium.
In linear polarization, the E-field and B-field oscillate in fixed directions. When switching to circular polarization, the E-field vector rotates in a spiral pattern relative to the direction of propagation, and the B-field follows this rotation accordingly. This allows for a visual comparison of the differences in electromagnetic wave behavior due to polarization.
According to Maxwell's equations, in a plane wave in a vacuum, the electric and magnetic fields are perpendicular to each other and also perpendicular to the direction of propagation. In this simulator, the E-field is displayed along the y-direction, the B-field along the z-direction, and the propagation direction along the x-axis, allowing real-time confirmation of this orthogonal relationship.
The play/pause button at the bottom of the screen controls the time evolution of the wave. Additionally, you can freely rotate and zoom in/out of the 3D space by dragging the mouse, allowing observation of the E-field and B-field oscillations from any angle. You can also manually control the time step using a slider.

Real-World Applications

Fiber Optic Communications: The light in an optical fiber is an electromagnetic wave. Engineers must understand how its polarization and wavelength behave in the glass medium (with a specific $\varepsilon_r$) to prevent signal loss and maximize data transmission rates over long distances.

Antenna Design: Every radio, WiFi, and cellular signal is an EM wave launched from an antenna. The antenna's shape and size are designed to create the desired polarization and direct the energy flow (the Poynting vector $\mathbf{S}$) effectively toward receivers.

Medical Imaging (MRI): Magnetic Resonance Imaging uses radio-frequency EM waves to manipulate the magnetic spin of atoms in your body. The precise frequency (which you adjust in the simulator) must match the resonant frequency of hydrogen nuclei in a strong magnetic field to create an image.

Radar and Lidar Systems: These systems send out pulsed EM waves and analyze the reflected signal. The wave's speed $v$ in air (which depends on humidity and pressure, affecting $\varepsilon_r$) is critical for accurately calculating distances to objects like aircraft or for autonomous vehicle navigation.

Common Misunderstandings and Points to Note

There are a few key points you should be aware of when starting to use the simulator. First, "the wave's 'frequency' does not change even if you change the medium." If you set the frequency slider to 1GHz, then even if you change the medium from air to water, it's still a 1GHz wave propagating through water. Only the wavelength and speed change. Confusing this can lead to major failures in actual antenna design, so be careful.

Next, keep in mind that what you're seeing in this simulator is an "ideal plane wave." In the real world, waves emitted from antennas are closer to spherical waves or diffract around obstacles. For example, the electromagnetic field near a smartphone antenna is not as clean a sine wave as in this animation. So, to avoid thinking "it doesn't work like the simulation!", it's important to understand this is purely a tool for grasping fundamental principles.

Also, when setting parameters, "making the amplitude E0 extremely large is often unrealistic." For instance, setting the electric field amplitude to something like 1 MV/m (megavolts per meter) in air would, in reality, cause dielectric breakdown (discharge) in the air, preventing such a clean wave from propagating. In practice, you'll almost always be working within the limits set by safety standards (like radio wave protection guidelines).

How to Use

  1. Set frequency in sFreq (1 MHz to 10 GHz range recommended for RF applications)
  2. Adjust amplitude sAmp and select medium permittivity/permeability to observe E & B field orthogonality
  3. Read wavelength λ and phase velocity from output; toggle polarization to visualize linear vs. circular wave components
  4. For lossy media, skin depth δ indicates field penetration; impedance Z controls reflection coefficients at boundaries

Worked Example

Simulate a 2.4 GHz WiFi signal in free space (μr=1, εr=1). Input frequency 2.4e9 Hz yields λ=125 mm, phase velocity vp=3×10^8 m/s, Z₀=377 Ω. Increase amplitude to 10 V/m, then switch to copper medium (σ=5.8×10^7 S/m): skin depth δ≈65 μm at 2.4 GHz, demonstrating why RF shielding requires ~3δ thickness (195 μm copper foil). Observe E-field decay exponential envelope matching e^(-x/δ) attenuation.

Practical Notes

  1. For near-field antenna design: operate below cutoff frequency; waveguide modes require λ/2 spacing minimum to avoid evanescent coupling
  2. Seawater simulations (εr≈80, σ≈5 S/m): expect dramatic skin depth reduction; 10 kHz submarine sonar uses 100+ meter wavelengths to penetrate 100 m depth
  3. Validate standing wave patterns by setting boundary conditions; quarter-wave resonators in coaxial cavities exhibit impedance transformation Z=(Z₀)²/ZL behavior