One million elements, one minute
We solved an eddy current problem with one million conductor elements on a laptop with 16 GB of RAM, at 1 MHz, in about one minute, using about 4 GB.
One million elements is the copper only: every trace and every turn of wire. The surrounding air is never discretised, and the electromagnetic field in the surrounding space still comes out of the solution.
At 1 MHz the skin depth in copper is about 65 micrometres, roughly twice the 35 micrometres of 1 oz copper, so the current is already redistributing itself across the trace. The cost of the solution does not depend on the frequency over the whole range where the magnetoquasistatic approximation holds; above that you need a full wave model, and that is a limit of the physics, not of the solver.
Why the conventional routes struggle
Four established approaches are the obvious things to try. All four are good tools inside their range, and none of them gets to this result on this machine. The numbers below are published, and three of the four comparisons come from our own papers.
Finite elements
I have twenty years of experience with eddy current problems in finite elements, including writing the codes, so this is not an argument about anyone else's software. Three things keep the method out of this class of problem. The air has to be meshed too, and for a printed circuit board one million elements in the copper means ten to twenty million in the air, often more; in many real cases the air mesh around a multilayer coil with 35 micrometre copper simply cannot be built. Convergence: in the air the conductivity is zero, the term that makes the curl curl system non singular disappears, and what is left has a very large kernel of gradients. How badly this bites depends on formulation and preconditioner, and on air dominated geometries we have not found a combination, multigrid included, that converges in few iterations. Motion generally means rebuilding the mesh at every position, unless the motion has the symmetry a sliding interface can exploit, which covers a rotating machine and not a target that also tilts and shifts.
Integral methods, and what the name coversIntegra
l methods come in three forms: volume integral, surface integral and PEEC, the partial element equivalent circuit method. PEEC was originally built on parallelepipeds with current directions fixed in advance; give it finite element style basis functions and it becomes a volume integral method. What they share is the property that matters here: only the conductors are discretised, with no air mesh and no truncation boundary. What separates them is how they handle the dense matrix that this choice produces.
Dense matrices
The matrix is full, so memory grows with the square of the unknowns. On the million element benchmark of our CMAME paper the standard dense formulation allocates 8,141 GB, about eight terabytes. There is nothing to tune.
ACA, adaptive cross approximation
The standard answer in the literature, and it is worth being blunt about how little it buys. On a 252 thousand tetrahedra model, compression brought peak memory to 8 percent of the dense case, from 426 GB to 34.8 GB, but the total time only to 43 percent, from 26,495 seconds to 11,437. A factor of twelve on memory, a factor of two on time, in a problem where the gap to close is three orders of magnitude.At scale the gap becomes decisive. On the million element benchmark, on the same machine, ACA took more than 24 hours where the method described below took 649 seconds, and it still needed more memory for a quarter of the problem. Compression is what makes these models fit. It is not what makes them fast.
Fast multipole
The best of the published compression techniques in our own benchmark. The usual objection is the iteration count, but there is a second one that is almost never counted: the cost of a single interaction. With the usual element bases a pair of elements does not cost one integral but one per pair of basis functions, which is thirty six weighted interaction integrals for a six edge basis and sixteen for a face based Raviart Thomas or Rao Wilton Glisson basis. The VINCO framework uses element wise uniform basis functions, and a pair of tetrahedra costs one. That is not a trade of accuracy for speed. Our papers state the two as equivalent: the VINCO discretisation gives the same discrete solution, and on a tetrahedral mesh its stiffness matrix coincides with the one built from Raviart Thomas basis functions.To be exact, that factor is the cost of the direct, near field part of the operator, and fast multipole acceleration changes how the far field is evaluated. It does not remove the complexity that spatially varying basis functions introduce, but the remaining overhead is implementation dependent, so read sixteen or thirty six as a near field cost and not as a universal per iteration one.
FFT on voxels
Of everything above, this is the only route that is really competitive on feasibility. The comparison has to be made at equal accuracy, though, and that is where it comes apart. One million voxels is not one million tetrahedra.We have the numbers for a real case: the transmitter coil of an inductive position sensor, 35 micrometre copper on 0.8 mm board, measured on a Bode100 from 10 kHz to 10 MHz and simulated with all three approaches.
The FFT approach required a computational grid of approximately 120 million cells, at 35 micrometre resolution, whereas the geometry conforming formulation used about 800,000 conductor tetrahedra. The tetrahedral model also agreed more closely with the experimental measurements, precisely because it represents the curved features.There is a second cost buried in that grid. The FFT works on the whole box, not only on the cells that contain copper: in that example 229 thousand conductor cells sat inside a grid of 120 million, an air to conductor volume ratio of 522. The cost of the air comes back through the window, in the one family of methods that existed to avoid it.None of this is an objection invented for a blog post.
The CMAME paper names three limitations of the voxel route: the FFT buys its speed by requiring a Cartesian mesh; a voxelised geometry carries the well known staircase error, the same error that makes everyone prefer finite elements over finite differences; and a voxel grid rules out local mesh refinement. Our conclusion from that study, stated as we found it, is that voxel grids with FFT acceleration suit problems with fewer than about a million elements, with no curved features, and with a geometry well aligned to the structured grid. A coil on a printed circuit board is none of those three things.