To ordinary people electronics is electronics. However, we know that the guy you want wiring your industrial furnace isn’t the guy you want designing a CPU. Neither of those guys are likely to be the ones you want building an instrumentation amplifier. However, one of the darkest arts of the electronic sects is dealing with electromagnetic fields. Not only is it a rare specialty, but it requires a lot of high-powered math. Enter OpenEMS, a free and open electromagnetic field solver.
We would like to tell you that OpenEMS makes doing things like antenna analysis easy. But that’s like saying Microsoft Word makes it easy to write a novel. In one sense, yes, but you still need to know what you are doing. In fairness, though, the project does provide a good set of tutorials, ranging from a simple wave guide to a sophisticated phased array of patch antennas. Our advice? Start with the waveguide and work your way up from there.
The software uses Octave or MATLAB for scripting, plotting, and support. You can download it for Windows or Linux.
If you want to start with something more intuitive for electromagnetic field visualization, this might help. If you prefer your models more concrete and less abstract, perhaps you should work at Lincoln Lab.
21 thoughts on “OpenEMS Makes Electromagnetic Field Solving… Merely Difficult”
Does any of this use the GPU for solving?
No, I looked through their feature list (http://openems.de/index.php/OpenEMS#Features) and it doesn’t seem to support it :/
Planning to turn it into a bitcoin miner?
Bitcoin can’t be mined efficiently with a GPU.
However, the thousands of cores in a GPU are very well suited to linear simulations, such as rigid, softbody, fluid, and particle physics, and even chemistry simulation. I’d assume it could do wonders for RF simulation.
The actual computing isn’t so heavy that you would need a GPU. The graphical rendering looks like it’s done with Qt which does support hardware acceleration.
Correction: The actual computing isn’t heavy for small problem spaces (or spaces with a low ‘detail’ or grid size). For large problem spaces it gets damn heavy, both in memory needed and in CPU speed. I did a simulation that took about 15 hours on an i7 and took up most of the 32 gigs of RAM. It all depends on what you are simulating.
OpenEMS does not use GPU for solving fields. The main speed bottleneck for openEMS is memory bandwidth. Intel processors perform much better than AMD when it comes to memory bandwidth in my experience with FDTD. I have seen some commercial solutions that claim to solve in GPU shaders with dramatic improvements in simulation times, but I have no experience with these. The other thing that can make a *huge* difference in simulation times is the mesh. Getting the mesh right can be a challenge.
FDTD parallels incredibly well because of the structure of the equation so you can get amazing performance increases by doing computation on GPUs provided you have enough memory. It’s not to hard to implement in CUDA if you want a fun project for a couple of weeks.
You can get several versions of NEC for free though and they are very fast when used appropriately and resource light.
This an awesome tip, thanks @Al
Hi HaD, Thank you for this article. Please allow me to add a bit of depth…
openEMS is an interesting open Computational Electromagnetics (CEM) suite that’s been around for a couple/few years at my comment time (now end-July 2017). Installation of openEMS is not for the faint hearted. Like any tiered development chain, I recommend you start by installing openEMS in a virtual machine (VM) first before openEMS is allowed to affect a production system (dependency collisions, environment var corruption, etc. may occur).
openEMS uses the Finite Difference Time Domain (FDTD) method. Hence you need to understand/decide if FDTD is best suited to the type of simulation you are doing. very simply put: consider surfaces/structures vs. wires, as well as the boundries of your simulation. After all, in the end any sort of classical domain elecromagnetic simulation is based on Maxwell’s Equations. Ref:
FDTD is probably more suited to things like patch microwave antennas and other planar oriented structures. A solution using the Method of Moments (MoM) is probably more suited to wire antenna structures. There are other modeling approaches, each with their own strengths and weaknesses (not to mention hybrids).
If you are working with finite wire-based structures and (perhaps) ground planes, you are probably better off using a MoM based simulator rather than a FDTD based simulator like openEMS. See the “Numerical Electromagnetics Code” link below which includes links to various NEC based packages for Windows and/or Linux/Unix.
* Computational electromagnetics (a decent overview)
* Method of Moments (a.k.a. MoM or Boundary Element Method)
* Numerical Electromagnetics Code (a.k.a. NEC, which uses MoM)
* Finite Difference Time Domain method (a.k.a. FDTD)
* Finite Element Method (a.k.a. FEM)
* Scattering Matrix Method (a.k.a. SMM)
* Comparison of EM simulation software
* Computational Electromagnetics – Codes (a list by K. Warnick 12/5/16)
Thanks for that compilation of links! Now I just have to tell my boss I need at least a week of time to read and hopefully understand some of this. :-)
Also Check Out onelab (which uses getdp as solver)…
GPU is not really as helpful as you might think… Check out the petsc homepage vor more Information in this….
Nice! Thanks. Openlab looks quite usable.
4nec2 is also a good free tool. It comes with lots of example models to learn. It’s not as capable as openEMS, but is pretty fast and easy to use.
Well, to be picky and why not, I suspect they don’t solve the EM field equations. They use numerical methods and boundary conditions to integrate and differentiate and calculate the value at a point. Then do it again and again and again….
Perhaps “Makes Electromagnetic Field Calculations…..Merely Difficult”.
Well, not to be too picky, but… while you may be correct… can you name any equations that solve anything in reality? Sure Maxwell’s equations might not explain quantum entanglement, but if you are trying to “simulate” a solution to something like EM wave propagation through a volumetric stackup of materials that includes air-box, enclosures of various types, boundary conditions, etc, then the FDTD method is probably your best bet on getting *very* close to reality if you define all the physical properties of the materials properly. OpenEMS has user-definable parameters describing effects down to the molecular level (Lorentz-Debye).
To be picky, they don’t solve the EM filed equations analytically… A numerical solution is still a solution.
FDTD, FEM and every other EM solver does solve Maxwells equations using numerical methods. To be able to solve them, the simulation space is discretized and the equations are are written in a form to calculate the discretized model. Maxwells equations are fundamental to any EM solver.
So far, I have found openEMS to be very good and results compare well to expensive commercial software for the models I have tried.
Some good papers and videos on FDTD (and related) here: http://emlab.utep.edu/ee5390cem.htm
This is the link I was actually trying to find. Check this series out: https://www.youtube.com/watch?v=y7hJAhKp2d8 (1 of 6)
I have written a couple of detailed tutorials showing how to setup a reflector antenna simulation, and another showing how to setup and design high performance corrugated horn antennas using openEMS and Octave. Here are the links to both tutorials.
These are also on the openEMS forum if you search for them. The examples here are more realistic of real-world antennas. Note that the reflector antenna uses a simple circular waveguide as the feed horn, this should be replaced with the actual feed that you wish to use and the important parameters should be changed accordingly.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)