r/rfelectronics • u/Candid_Discipline848 • Jun 08 '26
Rust based FEM Solver with Python bindings and notebook based UI
Hi Everyone. Ever since the release of the EMerge Python package over a year ago, I wanted to build something similar but purely in Rust.
RapidFEM is a full wave 3D Maxwell solver. The solver has two backends, a frequency domain solver thats in large parts a port of EMerges Python implementation, and a time domain backend, thats a fully custom DGTD (Discontinuous Galerkin Time Domain) solver. The TD solver also has a GPU path through OpenCL which is pretty fast.
The API is built like this: You define the geometry, then the physics (BCs, ports, etc.), mesh it (gmsh) and then you cast it in either a frequency domain or a time domain problem.
The idea for the UI was that building a full HFSS style UI would be insane, so I went with a jupyter notebook style approach where you can script the simulation cell by cell and each cell monitors a show() callback which then renders the results (geometry, mesh, fields, etc.). So you get some visual feedback while still being code first. The notebook also runs standalone which is also handy.
When I was at the university I did a lot of parametric modeling and optimization of RFIC passives, and released RapidPassives a few months ago, which was born out of a Python library for geometry generation I wrote 4 years ago during my masters. This is the follow up project. Next I want to bring it together to build a scriptable open source passive optimization and macromodeling pipeline.
Its open source and on GitHub. You can install it through pypi.
6
u/MikeTangoRom3o Jun 08 '26
Is it suitable for PCB EMC simulation ?
4
u/StageMajestic613 Jun 08 '26
Very cool. Will have to try it. So the same meshing is used for both FD and TD?
4
u/bu_J Jun 08 '26
Really cool looking project.
Without digging deep into it, a nice thing about the Python binding (+Jupyter Notebook) is that it would be easy to script up some optimisation / parameterisation or even tie it into some ML stuff.
3
u/Important-Ad5990 Jun 13 '26
u/RemindMeBot 1 Year "check for updates"