☕ I vibe coded a Physics Simulation to answer the most important Engineering Question of our Time: When does my Coffee get cold?

☕ I vibe coded a Physics Simulation to answer the most important Engineering Question of our Time: When does my Coffee get cold?

A year ago, "vibe coding" meant asking AI to generate a simple CRUD app or a sorting algorithm. Using it to drive a professional engineering simulation tool — programmatically, from scratch, with correct physics — felt like rocket science. Something reserved for people who had already spent years mastering the APIs, the component libraries, the causality rules, the parameter naming conventions.

That's changed. Fast.

AI assistants like GitHub Copilot don't just write boilerplate anymore. Combined with the right domain documentation as context, they can navigate complex engineering software, derive physics formulas, select the correct submodels, and build reproducible simulation pipelines — all through conversation. The barrier between "I have an idea" and "I have a running simulation" has never been lower.

Here's a concrete example of what that looks like in practice. 👇

We've all been there. You pour a perfect cup, immediately get pulled into a meeting, and come back 45 minutes later to find… lukewarm sadness.

So I did what any reasonable engineer would do. I grabbed my phone, took a photo of the mug sitting right there on my desk, and built a simulation model. 🧑💻

Article content
"Subject A. Age: 3 Minutes. Under investigation."

📸 Step 1: A Photo, a Ruler, and a Mission

No lab equipment. No spec sheet. Just a picture of my own coffee mug — and GitHub Copilot did the rest.

I described the photo and Copilot estimated the geometry directly from it:

  • Height: ~96 mm
  • Wall thickness: ~5 mm
  • Volume: ~350 mL (the "large enough to matter" size)

No manual measuring. No CAD model. Just a conversational prompt and a reasonable estimate. That's the input to everything that follows.


🔥 Step 2: Model the Physics

The thermal chain is beautifully simple:

☕ Coffee → 🧱 Ceramic wall → 🫙 Outer surface → 💨 Air

Copilot derived all the physics formulas from first principles — conduction resistance through a cylindrical ceramic wall, thermal capacitance of the coffee and ceramic mass, and the convection correlation for a cylinder in air. No textbook hunting. No formula lookup. Just a description of the problem and the equations came out the other side.

Built as a dynamic simulation in Simcenter Amesim, so temperature evolves continuously every second, not just as a static spreadsheet formula.

Article content
Simcenter Amesim Simulation Model of a Coffee Mug



🎯 Step 3: Calibrate to Reality

Pure still-air convection was too slow. That makes sense — a real mug also loses heat through evaporation from the open top (20–30% of total losses) and surface radiation (10–15%). Neither of those is in this model.

The fix: back-calculate an effective air velocity that reproduces the well-known real-world benchmark of ~35–45 minutes from 90°C to 60°C for an indoor ceramic mug. Using the Engineering Toolbox convection formula for cylinders (Understanding Convective Heat Transfer: Coefficients, Formulas & Examples):

hcW = 1.16 × (10.45 − v + 10√v)

At v = 1.0 m/s, the Churchill-Bernstein correlation gives h ≈ 13 W/(m²·K) — which neatly lumps all the unmodelled losses into one physically meaningful number.

Result: 45 minutes. 🎯 Right at the top of the observed range.

Article content
Coffee mug cooling curve: This mug is losing value faster than my crypto portfolio.

🤖 Step 4: Vibe Code the whole Thing

Here's the twist: this script was entirely vibe coded — built iteratively through conversation with GitHub Copilot (Claude Sonnet) inside Microsoft Visual Studio Code. No manual GUI clicking in Amesim. Pure Python API, fully reproducible, version-controllable.

Article content
Vibe Coding inside Microsoft Visual Studio Code

The secret weapon? The Simcenter Amesim Help Documentation served locally as live context. Copilot knew which submodels to pick, what the causality rules were, how ports were numbered, and what every parameter name and unit expected — because the docs were right there in the loop.

One script. One run. Full circuit, all connections, grouped global parameters, simulation, and cooling curve plot. 📈

And the best part? The whole thing — from photo to results — took less than 10 minutes. The script builds the model, runs the simulation, and saves the plot entirely automatically in the background. No babysitting required. While it was running, I was already working on something else. ⚡ That's the real productivity shift: not just that AI writes the code faster, but that the result runs unattended and lands in your folder while your brain is elsewhere.


🏆 The Takeaway

The mug on my desk — the one I photographed this morning — cools from 90°C to 60°C in ~45 minutes. You've been warned. ⏱️

The bigger point: from a desk photo to a calibrated, reproducible thermal simulation — geometry estimation, physics derivation, model assembly, and post-processing — every single step was a conversation with an AI that had read the entire manual.

Engineering knowledge still matters. You need to know which questions to ask, whether the physics makes sense, and when the result is wrong. AI just removed the boilerplate. ⚡


🛠 Built with: Simcenter Amesim 2511 · Python API (ame_apy) · GitHub Copilot · Claude Sonnet · VS Code · Amesim Help Docs

#VibeCoding #GitHubCopilot #SimcenterAmesim #ThermalSimulation #SystemsEngineering #Python #CAE #AIAssistedEngineering #EngineeringHumor


Not surprising, Claude was trained on my newsletter 🤪 Just kidding, love it! Only Python API (you wrote)? That’s cool

To view or add a comment, sign in

More articles by Sebastian Schmid

Others also viewed

Explore content categories