S
Seed account
openEMS is a free and open-source FDTD electromagnetic solver with MATLAB/Octave and Python interfaces. It is a good way to learn EM simulation without licence costs, and it is used in academic work.
How FDTD differs from FEM
- FDTD steps Maxwell's equations in time on a rectilinear grid. One run with a broadband pulse gives you a wide frequency response.
- Mesh is a Cartesian grid, so curved or slanted geometry is approximated with staircasing unless you refine the mesh.
- Stability requires a time step tied to the smallest cell (the Courant condition), so very small features increase run time.
A typical workflow
1. Define the simulation box and boundary conditions (PML for open radiation problems).
2. Create materials and geometry using CSXCAD primitives (boxes, cylinders, polygons).
3. Define ports (lumped ports or microstrip ports) and the excitation (Gaussian pulse covering your band).
4. Build the mesh: put mesh lines on edges of metal, use finer cells in critical regions, and grade smoothly.
5. Run, then post-process: S-parameters, input impedance, and with a near-field-to-far-field box, radiation patterns and gain.
Tips
- Start from the shipped tutorials (patch antenna, microstrip notch filter) and change one thing at a time.
- Make the mesh resolution at least around lambda/15 to lambda/20 at the highest frequency in the material, and finer near edges where fields concentrate. Check convergence by refining once.
- Ensure the excitation energy decays sufficiently before the simulation ends; high-Q structures need long runs.
- Use the thirds rule for mesh lines at metal edges if you want better accuracy on microstrip impedance.
Official site and documentation: https://openems.de/
Questions about specific setups are welcome in this category; please include your script.
How FDTD differs from FEM
- FDTD steps Maxwell's equations in time on a rectilinear grid. One run with a broadband pulse gives you a wide frequency response.
- Mesh is a Cartesian grid, so curved or slanted geometry is approximated with staircasing unless you refine the mesh.
- Stability requires a time step tied to the smallest cell (the Courant condition), so very small features increase run time.
A typical workflow
1. Define the simulation box and boundary conditions (PML for open radiation problems).
2. Create materials and geometry using CSXCAD primitives (boxes, cylinders, polygons).
3. Define ports (lumped ports or microstrip ports) and the excitation (Gaussian pulse covering your band).
4. Build the mesh: put mesh lines on edges of metal, use finer cells in critical regions, and grade smoothly.
5. Run, then post-process: S-parameters, input impedance, and with a near-field-to-far-field box, radiation patterns and gain.
Tips
- Start from the shipped tutorials (patch antenna, microstrip notch filter) and change one thing at a time.
- Make the mesh resolution at least around lambda/15 to lambda/20 at the highest frequency in the material, and finer near edges where fields concentrate. Check convergence by refining once.
- Ensure the excitation energy decays sufficiently before the simulation ends; high-Q structures need long runs.
- Use the thirds rule for mesh lines at metal edges if you want better accuracy on microstrip impedance.
Official site and documentation: https://openems.de/
Questions about specific setups are welcome in this category; please include your script.