Diving into FEM for electronics

Recently, I’ve been dabbling into FEM tools for doing EM simulations. These have been very helpful full in improving my understanding about PCB layout and has help a lot in getting the designs right the first time. The complex designs are usually 6+ layers and are quite expensive and have stricter requirements compared to 2- or 4-layer boards. So, it’s important to get them right the first time and reduce the cost not only in terms of money but also time. It no secret these FEM tool cost a ton, and no in the budget for individuals. But fundamentally these are solver that compute Maxwell’s equations. These tools I guess make it easy to setup the simulation and get results quicker. So of course I use opensource FEM tools. These include but not limited to

  • OpenEMS - Solver
  • ElmerFEM - Solver
  • FEMM – Solver, I use for PDN analysis
  • QUCS – for RF related simulation
  • Gerber2ems – addon for openEMS
  • Paraview- for visualizing the results
  • FreeCAD – for creating geometry
  • Salome – for creating geometery and meshing
  • KiCAD – for PCB design
  • Blender – for visualizing the results

So, the cost of not paying for the simulation software is to spend time learning all these software, it helps. If you have a generalist mindset. You don’t need to be an expert in all of these. But when simulation it is a must to know is to know what assumptions by the solvers.

So, the birds eye view of the process is you have geometry, this needs to be subdivided in to smaller geometry. This solver computes these smaller cells. The results depend on how you define the size of the cell, larger cell are easier/faster to compute, but you lose on the fidelity. The smaller you go, the simulation takes longer to run, but you get more insights from the results. Same goes when visualizing these, the coarse cell sizes are lighter on your GPU.

I’m most familiar with ElmerFEM and openEMS. I’n the next post I’ll describe the workflow for elmerFEM.

When I post some simulation results, I’m often asked about the files that ran it. People hope they can just change the geometry and run it for their use, but there are so many moving parts, changing one part and hoping it will run and also produce correct result is pipe dream. You really need to understand you are doing and what the software is solving, many times you have to ignore the results becasue you know its not what is expected. If you take the results at face value its correct, you might get the wrong understanding of the concepts. I really like Eric Bogatin’s rule “anticipate the results before measurements.”

No part of this post was generated using LLMs or diffusion models.