Computational electromagnetics · learn by doing
Learn how the three main EM solvers work, and when to use each one. Each solver makes one main decision: what to mesh, and how to model the space around the device. This decision tells you where the solver is fast and where it is slow.
Select a device. The 3D view shows the model and the real mesh of the solver that you select: Gmsh tetrahedra for FEM, a graded Yee grid for FDTD and surface triangles for MoM. The card shows which solver to use first, and why.
Each diagonal line has one value of D/λ, the size in free-space wavelengths. Inside a dielectric, multiply D/λ by approximately √εr. Select a marker to open that device.
Each solver has one building block. Select a solver, then go through the steps. Turn the 3D model to see it from all sides.
A result is correct only when it stays the same on a finer mesh. Each solver has a different test. Select a solver, then try its demos.
Adaptive mesh near a metal corner (2D illustration)
Solve. Find the elements with the largest error. Refine them. Solve again. Stop when ΔS stays below the target.
Small elements go near sharp corners and edges, where the field changes quickly. Select a solution frequency near the highest frequency that you need. The values in this demo are typical, not from a real solve.
Probe signal and stored energy of one resonance
Spectrum near the resonance
record that stops at the thresholdfull record
periods ≈ 0.037 · XdB · Q
The probe signal looks finished long before the energy is down by 50 dB. openEMS stops at −50 dB by default.
*At 10 GHz with 0.5 mm cells (about 100 steps for each period). The signal is a model of one resonance, not a full FDTD run.
Live 1D FDTD: a pulse on a grid of 240 cells
In one time step, a wave must not move more than one cell. In 1D the update is stable when S ≤ 1. In 3D with cubic cells the limit is S ≤ 1/√3 ≈ 0.577. Move the slider above 1.0 and the field increases without limit.
This rule only stops the run from blowing up. A stable run can still be wrong. Accuracy comes from the run length (above) and the cells per wavelength (below).
Δt ≤ 1 / ( c · √(1/Δx² + 1/Δy² + 1/Δz²) )
One small feature needs one small cell. That cell sets Δt for the full grid. Thus, fine details in a large domain make FDTD slow.
A wave after 10 λ of travel: exact, and on the Yee grid
exactYee grid
On the grid, waves move a little too slowly. The phase error builds up with each wavelength of travel. Halve the cell and the error decreases 4 times.
error ≈ (π²/6)(1 − S²) / N²
3D grid, wave along an axis, S = 0.99/√3. About 1.1 % at 10 cells/λ and 0.28 % at 20. Large models need more cells per λ. Check with a refinement study: 10, 15, then 20 cells/λ.
Half-wave dipole: input impedance against segments per λ (computed)
R (computed)X (computed)73.1 + j42.5 Ω, infinitely thinlimit (computed)
Current on the wire for this mesh
|I(z)|, this meshsine approximation300 segments
Method: triangle current basis on the joints between segments (the wire form of RWG), pulse testing (Harrington 1968). ΔZ = |Z(N) − Z(N/2)| / |Z(N)|, the MoM form of ΔS. The limit is 2·Z(200) − Z(100). Checked against the Python reference solver (difference less than 0.001 Ω) and AN-SOF (97.6 + j54.1 Ω against 97.59 + j54.03 Ω).
Two different tests. An iterative solver (GMRES with MLFMM) stops when its residual is small. That only means Z·I = V is solved on this mesh. It does not tell you if the mesh is fine enough. Only a finer mesh shows that the answer has converged.
Square plate, 1 m: charge on each cell and capacitance error (computed)
uniform meshedge-graded mesh
Near a metal edge, the charge and the current along the edge increase sharply. A uniform mesh misses this. Small cells at the edges fix it. This is why planar tools add an edge mesh.
Error against 40.811 pF (Read 1997). The uniform error halves each time the cells double: first order. Grading is about second order. Electrostatic, but the edge physics is the same as for the RF current.
Dense matrix: how the cost grows with a finer mesh
unknowns Nmatrix memory, N²direct solve time, N³
Halve the edge length: 4 × the unknowns, 16 × the memory, 64 × the direct-solve time.
N ≈ 3.46 · A / h² unknowns, 16 bytes for each matrix value, (8/3)·N³ operations for LU. Browser time: measured on this device, scaled as N³. For large models, MLFMM and ACA cut the cost to near N log N.
Each row gives the short answer. Select a row to read the details for each solver. 2.5D MoM is the planar type of MoM (see More methods).
MoM has three types. The number of dimensions tells you which currents the solver permits and what its Green's function includes. Other methods are for very large or very small objects.
Rays, physical optics, diffraction and planning models: try them on the companion page → How the meshes are made: the meshing deep dive →
2D cross-section (BEM or 2D FEM)
The solver assumes that the structure is infinitely long in one direction. Thus, it solves only the cross-section. The result is R, L, G and C per unit length, Z0 and the effective permittivity. Use it for transmission lines, cables and coupled traces.
Ansys 2D Extractor (2D FEM), Polar Si9000 (BEM), MMTL (open source)
2.5D (planar, also called "3D planar")
The metal is on the layers of an infinite layer stack. The currents flow in the planes. Vias add vertical current. The Green's function includes the substrate and the ground plane, so the solver meshes only the metal. Limit: the dielectrics have no edges. Thus, the solver does not model finite boards, enclosures or bondwires correctly.
Keysight Momentum (also in RFPro), Cadence AXIEM, Cadence EMX
Sonnet: 2.5D in a closed box
Sonnet solves planar circuits in a closed metal box. It uses a box Green's function that it calculates with FFTs on a uniform grid of cells. The ports are on the box walls. Thus, de-embedding is accurate. The box walls are real, so they can resonate. Sonnet Lite is a free version with a size limit.
Sonnet Suites, Sonnet Lite (free)
3D (surfaces and wires)
The solver models metal surfaces and wires of any shape in free space. Homogeneous dielectric bodies use surface equivalence. Complex dielectric bodies need volume equations, which cost much more. Wire MoM (NEC) is the special case for most HF antennas. With MLFMM, 3D MoM can solve bodies that are 10 to 500 wavelengths long.
Simcenter Feko (Siemens), CST Integral Equation, Ansys HFSS-IE, WIPL-D, Nullspace EM, NEC-2 (public domain)
Physical optics (PO), SBR, geometrical optics (GO) and the uniform theory of diffraction (UTD) are ray methods. They model each part of the surface as a small flat mirror. Engineers use them for the RCS of full aircraft and ships at X-band, and for reflector antennas. For a reflector, solve the feed horn with FEM or MoM. Then, use PO to put its pattern on the dish.
A structure that is much smaller than a wavelength operates like a circuit. A common limit is λ/20, and λ/100 is safe. Quasi-static extractors calculate R, L, C and G more quickly than a full-wave solve. They do not model radiation or distributed (transmission-line) effects.
CST, Feko and HFSS each include time-domain, frequency-domain, integral-equation and asymptotic solvers. Hybrids such as FE-BI, or MoM with PO, use a different method for each part of a problem. Usually, you must select a solver in the suite that you have.
These are the steps of one real simulation, from the model to a checked result. The numbers are typical for a 5 GHz patch on a laptop. Your numbers will be different.
Draw the patch, the feed line, the substrate (εr 3.5) and the ground plane. Give each part its material.
Put an air box around the antenna. Keep its walls λ/4 (15 mm) from the antenna. Apply a radiation boundary or a PML to the walls.
Put a wave port on the end of the feed line. The port solve gives the line mode and its impedance.
Set the solution frequency to 5 GHz and the target ΔS to 0.02. The mesh goes from approximately 5,000 to 25,000 tetrahedra in 6 passes, approximately 30 percent more for each pass. Memory is approximately 1 GB. See this loop in the FEM convergence demo.
Do an interpolating sweep from 3 to 7 GHz. It takes approximately 1 to 3 minutes. Then calculate the far-field pattern on a sphere.
Solve again with 2.5D MoM. The two resonance frequencies usually agree within 1 to 3 percent. The pattern and the back lobe will be different, because the 2.5D model has an infinite ground plane. Make sure that |S11| is less than 1 at all frequencies.
Drag the point to your size and frequency. Press the chips that fit your problem. The ranking and the tools change at once. Use the result as a first step, not a final decision.
Size and frequency: drag the point
Colour: the method that wins at each point, for your other choices. Diagonal lines: size in wavelengths.
Relative fit
Changes as you edit
The list shows commercial suites, and open-source and free alternatives. A tool is in the list for each method that it supports. The number on each card is the count of papers since 2020 that mention the tool. It shows research use, not industry use.
openEMS (FDTD) with Python scripts. Use scikit-rf to read, plot and check the S-parameters. The setup takes more time than with a commercial GUI.
gds2palace and gds2openEMS turn IHP SG13G2 GDSII layouts into Palace (FEM) or openEMS (FDTD) models. Both are open source.
Sonnet Lite is free: up to 6 ports, 64 MB of memory and 2 metal levels. It is a good tool to learn planar EM.
Ansys Electronics Desktop Student includes HFSS (limit: 64,000 elements, 4 cores). CST Studio Suite Learning Edition is free for non-commercial use, with a small mesh limit.
Tidy3D runs GPU FDTD on the vendor cloud. You pay for each run. Your model data goes to the vendor. Some companies do not permit this.
ADS with Momentum and RFPro, or Microwave Office with AXIEM and Analyst, or Virtuoso with EMX. Add one 3D FEM tool for packages and bondwires.
One 3D suite: HFSS, CST Studio Suite or Simcenter Feko. Each suite has more than one method, so you can check one result with a second method.
SIwave, Sigrity or HyperLynx for the full board. Use a 3D FEM tool for connectors and via transitions.
KLayout or gdsfactory for the layout, Gmsh for the mesh, Palace (FEM) and openEMS (FDTD) for the solve, and scikit-rf for the results.
Lumerical or Tidy3D, with MEEP as the open-source check.
Most teams buy one 3D suite and one layout EM tool. Use the second method to check the first. These lists are examples. They are not recommendations.
How frequently do papers mention each tool? The counts come from the OpenAlex database. They show which tools researchers use and write about. They do not show which tool is best.