An interactive browser-based electromagnetic field simulator for exploring antenna radiation, interference, polarization, and phased-array behavior.
Live demo: www.antennasim.com
The goal of this project is to provide a fast and intuitive way to experiment with antenna configurations and directly visualize how their electromagnetic fields evolve in space and time.
The simulator currently supports several antenna models.
A finite straight-wire dipole with a prescribed sinusoidal current distribution.
You can control:
The inspector also displays the antenna's electrical length, L / λ.
An ideal infinitesimal current element represented by its current moment, Iℓ.
You can control:
This is particularly useful for studying elementary dipole radiation, interference between sources, and polarization.
A circular loop with a prescribed uniform circulating current.
You can control:
The simulator displays quantities including circumference, C / λ, and magnetic moment IA.
The uniform-current model is primarily intended for electrically small loops. The interface warns when the loop becomes too large for the small-loop approximation to be appropriate.
Create a complete linear array as a single editable component.
Array elements can currently be:
The array parameters include:
Each element has the same amplitude and a phase given by:
φₙ = φ₀ + nΔφ
where Δφ is the phase difference between neighboring elements.
This makes it possible to explore:
The physical spacing automatically follows the wavelength when the simulation frequency or wave speed is changed.
The fields are visualized in the XY plane containing the antenna geometry.
Three display modes are available.
Displays the instantaneous electric field.
Displays the magnetic-field component perpendicular to the simulation plane.
Displays an energy-flow visualization based on the local relationship:
S ∝ E × B
Arrows show the local direction of energy flow.
This mode should be regarded as an intuitive energy-flux visualization rather than a calibrated power-density measurement.
The simulator uses a component-based interface designed for quickly constructing and modifying antenna configurations.
Open the component palette and choose an antenna type.
Depending on the component, placement is performed by clicking its position, endpoints, or axis direction.
Click an antenna in the workspace or select it from the scene list.
Its parameters can then be edited in the Properties panel.
The simulation area is not limited to the initially visible region.
Zoom changes the view, not the underlying physical dimensions of the simulation.
Low, Medium, and High quality modes trade computational cost for spatial and source-discretization resolution.
Higher resolution can be useful when examining smaller geometries or detailed near-field structure.
The top toolbar provides controls for:
The wavelength used by the simulation is:
λ = c / f
where:
λ is wavelengthc is the selected propagation speedf is frequencyChanging frequency or wave speed therefore changes the electrical dimensions of antennas and wavelength-relative array spacing.
| Key | Action |
|---|---|
V | Select tool |
H | Pan tool |
A | Open Add menu |
Space | Pause / resume |
Delete / Backspace | Delete selected component |
Esc | Cancel the current operation |
0 | Reset zoom |
Middle-button dragging can also be used for panning.
Antenna current distributions are represented as collections of small current elements.
The contributions from these elements are combined as complex phasors using a propagating free-space Green-function model. The resulting vector potential is sampled over the simulation grid, from which the electric and magnetic fields are calculated.
Because the sources are represented by prescribed current distributions, arbitrary combinations of antennas can interfere coherently according to their amplitudes and phases.
The implementation also caches source-field calculations where possible so that operations such as changing excitation phase or amplitude, panning, and revisiting previously calculated regions can be handled efficiently.
This project is intended primarily as an educational and visualization tool.
There are several important limitations:
These simplifications make it possible to interact with antenna configurations in real time while retaining many of the important wave phenomena the simulator is intended to demonstrate.
Some interesting experiments include:
For example, for a linear array with spacing d, the progressive phase can be varied to steer the direction in which contributions from neighboring elements add constructively.
The simulator runs entirely in the browser and is implemented in JavaScript using p5.js for rendering and interaction.
No server-side computation is required.
The simulator is actively being developed.
Possible future extensions include:
Feedback, bug reports, and suggestions are welcome.
JavaScript
99.3%
An interactive browser-based electromagnetic field simulator for exploring antenna radiation, interference, polarization, and phased-array behavior.
Live demo: www.antennasim.com
The goal of this project is to provide a fast and intuitive way to experiment with antenna configurations and directly visualize how their electromagnetic fields evolve in space and time.
The simulator currently supports several antenna models.
A finite straight-wire dipole with a prescribed sinusoidal current distribution.
You can control:
The inspector also displays the antenna's electrical length, L / λ.
An ideal infinitesimal current element represented by its current moment, Iℓ.
You can control:
This is particularly useful for studying elementary dipole radiation, interference between sources, and polarization.
A circular loop with a prescribed uniform circulating current.
You can control:
The simulator displays quantities including circumference, C / λ, and magnetic moment IA.
The uniform-current model is primarily intended for electrically small loops. The interface warns when the loop becomes too large for the small-loop approximation to be appropriate.
Create a complete linear array as a single editable component.
Array elements can currently be:
The array parameters include:
Each element has the same amplitude and a phase given by:
φₙ = φ₀ + nΔφ
where Δφ is the phase difference between neighboring elements.
This makes it possible to explore:
The physical spacing automatically follows the wavelength when the simulation frequency or wave speed is changed.
The fields are visualized in the XY plane containing the antenna geometry.
Three display modes are available.
Displays the instantaneous electric field.
Displays the magnetic-field component perpendicular to the simulation plane.
Displays an energy-flow visualization based on the local relationship:
S ∝ E × B
Arrows show the local direction of energy flow.
This mode should be regarded as an intuitive energy-flux visualization rather than a calibrated power-density measurement.
The simulator uses a component-based interface designed for quickly constructing and modifying antenna configurations.
Open the component palette and choose an antenna type.
Depending on the component, placement is performed by clicking its position, endpoints, or axis direction.
Click an antenna in the workspace or select it from the scene list.
Its parameters can then be edited in the Properties panel.
The simulation area is not limited to the initially visible region.
Zoom changes the view, not the underlying physical dimensions of the simulation.
Low, Medium, and High quality modes trade computational cost for spatial and source-discretization resolution.
Higher resolution can be useful when examining smaller geometries or detailed near-field structure.
The top toolbar provides controls for:
The wavelength used by the simulation is:
λ = c / f
where:
λ is wavelengthc is the selected propagation speedf is frequencyChanging frequency or wave speed therefore changes the electrical dimensions of antennas and wavelength-relative array spacing.
| Key | Action |
|---|---|
V | Select tool |
H | Pan tool |
A | Open Add menu |
Space | Pause / resume |
Delete / Backspace | Delete selected component |
Esc | Cancel the current operation |
0 | Reset zoom |
Middle-button dragging can also be used for panning.
Antenna current distributions are represented as collections of small current elements.
The contributions from these elements are combined as complex phasors using a propagating free-space Green-function model. The resulting vector potential is sampled over the simulation grid, from which the electric and magnetic fields are calculated.
Because the sources are represented by prescribed current distributions, arbitrary combinations of antennas can interfere coherently according to their amplitudes and phases.
The implementation also caches source-field calculations where possible so that operations such as changing excitation phase or amplitude, panning, and revisiting previously calculated regions can be handled efficiently.
This project is intended primarily as an educational and visualization tool.
There are several important limitations:
These simplifications make it possible to interact with antenna configurations in real time while retaining many of the important wave phenomena the simulator is intended to demonstrate.
Some interesting experiments include:
For example, for a linear array with spacing d, the progressive phase can be varied to steer the direction in which contributions from neighboring elements add constructively.
The simulator runs entirely in the browser and is implemented in JavaScript using p5.js for rendering and interaction.
No server-side computation is required.
The simulator is actively being developed.
Possible future extensions include:
Feedback, bug reports, and suggestions are welcome.
JavaScript
99.3%