Validating a GPU solidification solver: from +51% to within 3.7%

A fast solver that gives a wrong answer makes a wrong feeding decision look certain. When I wrote the solidification solver behind FoundryFlash, I spent as much time checking it as writing it. This post covers that checking and the error that mattered most. What the solver computes The solver integrates the transient heat equation in enthalpy form, which handles the latent heat released during freezing without special treatment: $$\rho \frac{\partial H}{\partial t} = \nabla \cdot \left( k \nabla T \right), \qquad T = T(H)$$It uses control-volume finite elements on linear tetrahedra and balances energy on the dual volume around each node. Time stepping is implicit backward Euler, solved with a Jacobi-preconditioned conjugate-gradient method. The mould is a region of its own: heat crosses the metal-mould interface through a heat-transfer coefficient \(h\), with flux \(q = h \, (T_\text{metal} - T_\text{mould})\). ...

October 6, 2026 · 3 min · Eugen Miknevic

Voxels or tetrahedra: what casting AI needs from the mesh

Many casting simulation codes discretise the part on a structured cubic grid. That made sense on the hardware of the 1980s, and for many parts it still works. It is a weak base for two things foundries want now: simulating the free-form shapes that 3D-printed moulds and cores make possible, and training AI that proposes casting technology. Where the staircase hurts A cubic grid turns a curved or inclined surface into a staircase. On a plane inclined at 45°, the staircase overstates the wetted area by \(\sqrt{2} \approx 1.41\), and doubly curved surfaces are worse. The surface normal also points along a grid axis everywhere instead of following the real surface. ...

October 6, 2026 · 3 min · Eugen Miknevic