Interactive browser-based EM field simulator — looking for feedback

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
0 replies · 81 views
rotemtsafrir
Messages
1
Reaction score
0
TL;DR
a website that lets users play with antennas and visualize the electromagnetic field.
Hi,

I’ve been working on an interactive browser-based antenna/EM field simulator as a personal project:

https://rotemtsafrir.github.io/dipole_sim/

The main goal is to provide an intuitive way to experiment with antenna configurations and directly visualize the resulting electromagnetic fields.

At the moment it supports:
  • center-fed dipoles
  • Hertzian dipoles
  • small circular loops
  • linear arrays of Hertzian dipoles or small loops
For linear arrays, the user can vary the number of elements, spacing, overall amplitude and phase, progressive phase difference, and array orientation. This makes it possible to experiment with broadside and end-fire configurations, beam steering, interference, grating lobes, etc.

The simulator can display the electric field, magnetic field, and an energy-flow visualization, and the fields evolve with time.

The underlying model is deliberately simpler than a full-wave EM solver. The antenna current distributions are prescribed and discretized into small current elements, and their complex field contributions are superposed over the observation plane.

As a result, the current version does not solve for things such as:
  • mutual coupling between antennas
  • feed impedance or matching
  • induced currents
  • passive conducting structures / PEC boundaries
So I see it primarily as an educational and visualization tool rather than an alternative to MoM/FDTD/FEM software.

One of the things I find useful about it is that some antenna-array results become much more intuitive when you can actually see the fields. For example, with a two-element end-fire array, the phase difference that maximizes the field exactly in the forward direction is not necessarily the phase difference that produces a null in the opposite direction.

I’d be very interested in feedback from people with more RF/antenna experience, particularly regarding:

  • whether any of the current modeling assumptions could produce misleading visualizations
  • how best to represent the transition between near-field and far-field behavior
  • useful antenna models to add next
  • whether a dedicated far-field radiation-pattern view would be worthwhile
In the future I’m also interested in adding passive conductors / PEC structures, although that would require a substantially different approach because the induced currents would need to be solved rather than prescribed.

The simulator runs entirely in the browser using JavaScript/p5.js.

Source code:
https://github.com/rotemTsafrir/dipole_sim
 
Attachments
  • example_3_B_field.webp
    example_3_B_field.webp
    51.1 KB · Views: 1
  • example_3_E_field.webp
    example_3_E_field.webp
    151.7 KB · Views: 1
  • example_4_energy_flow.webp
    example_4_energy_flow.webp
    91 KB · Views: 1
  • hertzian_dipole_enery_flow.webp
    hertzian_dipole_enery_flow.webp
    118.6 KB · Views: 1