A Free EM FEM Solver in Python!

EMerge

EMerge is an upcoming free Python library designed to provide powerful electromagnetic solvers in a user-friendly format. The core of the EMerge philosophy is ease of use and compatibility. No confusing libraries and boundary-value problem setup and other boilerplate nonsense!

Early Beta 1-9-2025!

I’ve decided to roll out an early beta release september first 2025. The project is currently available in my Github but it is not release ready form.

Why Python?

Python may not be the fastest programming language, but that’s not a drawback here. The computationally intensive tasks required for FEM solvers are efficiently handled by powerful libraries like Numba, NumPy and SciPy. These optimized packages ensure high performance while allowing EMerge to leverage Python’s ease of use and flexibility.

Python’s simplicity and versatility make it a natural fit for ease of use and integration into the engineering design process. EMerge would definitely not be the first EM solver or even FEM solver for Python. However, the goal is to make it the easiest to use by far. This is done by:

  1. Minimizing dependencies and optimizing for cross platform support. EMerge restricts itself to as few libraries as possible making installation virtually unbreakable with either pip or conda.

  2. Writing as much as possible in native Python. By coding as much as possible in Python, there is no need to interface with other software and languages. Start your simulation in Python and finish in it!

  3. Simplifying the scope; less configuration means an improved ease of use! Most engineers will not use the vast majority of features modern commercial packages offer. EMerges core philosophy is to simplify implementation options which decreases the amount of configuration for the users and improves development speed and support.

The code below shows the simplest micro-program in just 14 lines simulating a simple 50mm WR90 waveguide section.

What are the advantages?

Using Python scripts for your FEM simulations comes with significant advantages:

  • Free High-Performance and Parallel Computing
    Commercial FEM tools often charge steep fees for parallel computing licenses. With EMerge, this capability is free and unrestricted. Every simulation boils down to solving the linear equation Ax=b. EMerge provides direct access to the assembled matrices and vectors, giving you full control over how many cores, processes, or even computers handle each task.

  • Custom Optimization Without Extra Costs
    Optimization toolboxes can also come at a premium with commercial solvers. With EMerge, this isn’t an issue. Since simulations are essentially a single function call, you can seamlessly integrate them into your favorite optimization algorithms—at no extra cost.

  • Streamlined Pre- and Post-Processing
    Say goodbye to cumbersome data exports. Many commercial solvers make you deal with clunky file formats and tedious data parsing. With EMerge, you have direct access to all the simulation data, making post-processing and visualization as intuitive as any other Python computation.

Heavi Circuit Simulator

Heavi is a second project under emerge that delivers a linear component RF circuit simulator in Python. Contrary to EMerge’s FEM solver, this is currently available for free in the Download section!