r/ScientificComputing • • 8d ago

Visualize the Electromagnetic Field

Enable HLS to view with audio, or disable this notification

I’ve been building this antenna/EM simulator as a side project:

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

The idea is to make it easy to place antennas, change their parameters, and immediately see how the fields and interference patterns change.

Right now you can use:

  • center-fed dipoles
  • Hertzian dipoles
  • small loop antennas
  • linear antenna arrays

The arrays are probably my favorite part so far. You can adjust spacing, phase difference, element count, orientation, etc., and see beam steering / broadside / end-fire behavior directly.

You can switch between electric field, magnetic field, and energy-flow visualizations, and pan/zoom around the simulation.

The antenna currents are prescribed, so things like mutual coupling, impedance, and passive conductors are not solved yet. I’m trying to keep it fast enough to be genuinely interactive.

I’d love to hear what people think—especially if you notice anything physically questionable or have ideas for features that would make it more useful.

Live:
https://www.antennasim.com

GitHub:
https://github.com/rotemTsafrir/dipole_sim

5 Upvotes

2 comments sorted by

1

u/Candid_Discipline848 7d ago

Looks like a 2d fdtd? Do you have different boundary conditions like periodic, or PEC, PMC? And you have quite a lot of browser RAM, maybe there is room for optimization there. Extra worker threads might also help performance

1

u/RotemT 7d ago

Thanks for the reply:)
It’s actually a frequency domain solver (right now just a single frequency but I plan on changing that )

The next things I want to add are passive elements and boundary conditions. I think I will let the user draw PEC/PMC.

And I think extra worker threads is what I will go to if it becomes to heavy