A Gaussian-Process surrogate that predicts steady-state cooling-loop performance — junction-temperature proxy and cold-plate thermal resistance — from operating conditions, in microseconds instead of solving the physics. It is trained on samples of a 1D thermal-hydraulic loop model, and it is the real-time rung of a multi-fidelity workflow: the kind of fast, uncertainty-aware model a digital twin uses for monitoring, optimization, and anomaly detection.
inputs (operating conditions) outputs (performance)
Q_chip [W] T_wall [°C] (junction proxy)
pump_speed [-] --> surrogate --> R_th [K/W] (+ uncertainty)
T_cold_in [°C]
On 125 operating points held out from training, the surrogate reproduces the 1D model with R² = 1.00000 for both outputs (wall-temperature error ~3e-4 °C).
A note on honesty: near-perfect accuracy is expected here, because the 1D model is a smooth, deterministic map and 500 samples cover it densely. The accuracy is not the interesting result — the method is. The identical Gaussian-Process workflow, trained on a few hundred expensive evaluations of a model that has no closed form (a 3D CFD cold-plate run costing minutes each), delivers the same microsecond inference and the same calibrated uncertainty. This repo demonstrates that workflow end-to-end on a cheap, verifiable problem.
Once trained, the surrogate predicts in ~9 µs, about 10× faster than re-solving the 1D model (~85 µs). Against a high-fidelity 3D evaluation — seconds to minutes — the speedup is millions-fold, which is the entire reason to build a reduced-order model: it turns an offline simulation into something fast enough for real-time control loops and live monitoring.
A Gaussian Process returns a confidence interval with every prediction. The band collapses where the model has training data and widens where it does not — so an operating point that lands in a high-uncertainty region is, by construction, one the model has not seen: a candidate anomaly to flag.
(Shown on a deliberately sparse 1D slice so the mechanism is visible; the production surrogate's band is uniformly tight inside its dense training envelope.)
The Gaussian Process uses a separate length scale per input (ARD). A large
length scale means the output barely depends on that input. The learned values
show the surrogate independently discovered the loop's physics — R_th depends
only on pump speed, not on heat load or coolant temperature:
| target | Q_chip | pump_speed | T_cold_in |
|---|---|---|---|
| T_wall | 506 | 5.6 | 2463 |
| R_th | 100000 | 1.7 | 100000 |
(R_th = 1/hA + 1/(ṁ·cp) — a function of flow alone. The surrogate was never
told this; it learned it from data.)
git clone https://github.com/sgoudarzi/cooling-loop-surrogate.git
cd [repo]
pip install -r requirements.txt
python rom_surrogate.py # train, report held-out accuracy + speed, save model
python make_figures.py # regenerate the figures above
python generate_data.py # (optional) resample the 1D model -> rom_dataset.csvgenerate_data.py needs loop1d.py (the 1D model) alongside it; the repo ships
a pre-generated rom_dataset.csv so the surrogate trains out of the box.
import joblib
models = joblib.load("rom_model.joblib")
# [Q_chip=900 W, pump_speed=0.85, T_cold_in=28 °C]
T_wall = models["T_wall"].predict([[900, 0.85, 28]])[0]
T_wall, sigma = models["T_wall"].predict([[900, 0.85, 28]], return_std=True)- 3D — conjugate-heat-transfer cold-plate CFD (high fidelity) → [link]
- 1D — thermal-hydraulic loop model (system level, fast) → https://github.com/sgoudarzi/cooling-loop-1d
- ROM — this surrogate (real-time, uncertainty-aware) → here
The 1D model generates the data; this surrogate makes it real-time. Swap the 1D data source for 3D CFD samples and the same code becomes a CFD surrogate.
Built by Sahar Goudarzi · LinkedIn

