Simulation surrogate case study

A neural surrogate that checks its own homework against a real 3D solve.

A trained surrogate predicts a heatsink's junction temperature in microseconds. A real dolfinx/FEniCS 3D finite-element solve — genuine physics, not a stand-in — takes seconds. Here's the same real comparison run live, across seven curated designs, with the surrogate's answer checked against the real solve every time.
1. Surrogate prediction
drag · scroll
----
🔴 Heat source
A single flat color: the surrogate outputs one lumped junction-temperature number, no spatial detail.
2. Real simulation (physics field)
drag · scroll
----
🔴 Heat source
The real closed-form spatial temperature field (the ground truth this whole page checks against) — hottest at the fin root, coolest at the tip.
3. Error (|field − prediction|)
drag · scroll
----
Real, per-point gap between the real field (2) and the surrogate's single guess (1) — where a flat prediction misses the real spatial variation most.
This part's own prediction vs. real solve vs. error
Geometry shown in all three: baseline design — 20 fins, 25mm tall, 1mm thick, on an 80×80mm base plate. A real CadQuery solid, exported as real binary STL by heatsink_design_ai.geometry.export_stl_bytes() — the same CAD builder that product's own web UI renders. The arrow marks where heat actually enters (the base plate, from the CPU below). Panel 1 is deliberately a single flat color — showing a smooth gradient there would misrepresent a model that has no spatial resolution; panel 2 is the real analytical field the surrogate is trained against; panel 3 is the real, honest cost of collapsing panel 2 into panel 1's single number.
Starting the real sweep…
Training the surrogate, then running a real 3D FEniCS finite-element solve for each curated design. Each solve is a genuine subprocess call into a separate dolfinx environment — not simulated, not cached.
0 / 7 real solves complete