PINNs for Mechanical Engineers
PINNs for mechanical engineers

Teach your neural network the physics.

Learn to build physics-informed neural networks (PINNs) for dynamics, heat transfer and CFD. 27 hands-on PyTorch notebooks that run in your browser. Work through them in a weekend, and the skills are yours for good.

  • Runs in Google Colab
  • Nothing to install
  • Answers included
4.9/5 from 8 ratings·398 bookings on Topmate
mass–spring–damper TRAINING
ExactNoisy dataPINN
Epoch
0
Loss
–

A real 28,000-epoch training run. The network only gets 12 noisy measurements from the first 0.4 s, plus the equation. The physics fills in the rest. The notebooks also show you how to make animations like this one.

27hands-on notebooks
3series: dynamics, heat, CFD
4.9/5from 8 ratings
398bookings on Topmate
Topmate badgesTop 0.1%Top 1%People’s ChoiceCommunity CareDebut ’25/’26
What is a physics-informed neural network?

A neural network that has to respect the physics.

A normal neural network only learns from data. With a few noisy measurements, it guesses badly everywhere else. A physics-informed neural network (PINN) is also trained on the governing equation, so its answer has to make physical sense across the whole domain.

In the animation above, the white dots are the only data. Everything the orange curve does after 0.4 s comes from the physics alone.

Data loss

Match the measurements you have.

Physics loss

Obey the equation everywhere, even where there’s no data.

What the network minimises

PyTorch autograd gives you the derivatives. The notebooks show you how, step by step.

Runs in your browser

Nothing to install. Just a browser.

Every lesson is a Jupyter notebook you can open in Google Colab. Colab is free and runs on Google’s computers, so it works on any laptop, even a work machine you can’t install software on.

  1. Get your notebooksInstant download after checkout.
  2. Open them in Google ColabUpload the notebook. No Python setup, no environments.
  3. Press runYou’re training your first PINN within minutes.
colab.research.google.com
dynamics_pinn.ipynb example
Physics loss · write the equation into the loss
▶
def physics_loss(model, t):
    x    = model(t)
    x_t  = grad(x, t)
    x_tt = grad(x_t, t)
    return ((m*x_tt + c*x_t + k*x)**2).mean()
▶
train(model, epochs=28000)
plot_prediction(model)
How it works

Three cells to a working PINN

In [1]:

Start from the equation

Each notebook opens with a real engineering problem and the equation that governs it. No black boxes.

In [2]:

Write the physics loss

Use PyTorch autograd to take derivatives of the network and turn the equation into something it can learn from.

In [3]:

Train, check and animate

Train, compare against a known answer, and animate the learning. Stuck? Full answers are included for every exercise.

One weekend

Finish it in a weekend. Keep the skills for good.

Each notebook is short and focused. Here’s one way to pace it.

Saturday morning

Dynamics

9 notebooks. Your first PINN, then coupled masses.

Saturday afternoon

Heat transfer

8 notebooks. From 1D rods to 2D plates and unknown properties.

Sunday

CFD

10 notebooks. Navier–Stokes and classic benchmark flows.

Monday

Your own problem

You know how to write any equation into a loss and train it.

A suggested pace. Go faster or slower as you like.

Not ready to buy? Learn for free.

I share PINN examples, code breakdowns and animations on LinkedIn. Follow along and see if the way I teach suits you.

Follow on LinkedIn
Is it for you?

Made for engineers, not ML researchers

A good fit if you…

  • are a mechanical engineer, student or researcher
  • work with dynamics, heat transfer or fluid flow
  • want to see working code, not just theory
  • know a little Python and want to learn by doing

Not the right fit if you…

  • want a deep theory course on machine learning
  • are looking for a no-code tool or a ready-made solver
  • don’t want to write any code at all
Reviews from Topmate

What engineers say

4.9
★★★★★8 ratings · 398 bookings
Helpful 4Insightful 3Friendly 3
“Great resource with research grade examples. I used this for my thesis.”

The worksheets are structured very nicely and let me focus on the theory. Highly recommended for anyone tackling real engineering problems.

Sarah Ravi★★★★★ · 29 Apr 2026
“Great introduction to PINNs presenting clearly physical and implementation details. Requires very little understanding of python and pytorch.”
Verified buyer★★★★★ · 26 Jul 2026
“Excellent course! The worksheets made complex topics easy to follow and covered a lot of areas. Highly recommended for anyone wanting a practical introduction to PINNs.”
Soph Dubois★★★★★ · 30 Apr 2026
“I found Mastering CFD PINNs: A Coding Guide to be very insightful and well-structured. The explanations were clear, and the coding examples made complex concepts much easier to understand and apply. It’s a valuable resource for anyone looking to explore the intersection of CFD and physics-informed neural networks.”
Christopher Sathiya Satchi★★★★★ · 28 Apr 2026
“Very insightful both from a computational and from a physical perspective.”
Verified buyer★★★★★ · 26 Jul 2026
PINNs for Mechanical Engineers logo
About

I came to machine learning from mechanical engineering, so I know how steep the learning curve can feel.

These notebooks are everything I wish I’d had when I started: real engineering problems, clear physics, and code you can run, change and break. I’m sharing what I’ve learned so you can skip the frustration.

Pricing

Get all three and save £28

Best deal · complete packageSave £28

Everything you get

Dynamics series 9 notebooks
£19
Heat transfer series 8 notebooks
£19
CFD series 10 notebooks
£19
Full answers for every exercise
Included
Runs in Google Colab, nothing to install
Included
How to animate your results
Included
Bought separately
£57
£29one payment · yours to keep
Get the complete package

Prices in GBP. Secure checkout and instant delivery through Topmate.

Or buy one series Dynamics PINNs9 notebooks£19 Heat Transfer PINNs8 notebooks£19 CFD PINNs10 notebooks · best seller£19

Buying two? The package costs £10 less than two singles, and you get the third series too.

FAQ

Questions

What is a PINN?

A physics-informed neural network is a neural network trained to satisfy a physical law, such as an ODE or PDE, as well as any data you have. The equation is built into the loss, so the network is penalised whenever its answer breaks the physics.

Do I need to install anything?

No. You can open every notebook in Google Colab and run it in your browser. If you prefer, they also run in your own Python setup with PyTorch and Jupyter.

How long does it take?

You can work through all three series in a weekend. Each notebook is short and focused, so you can also do one at a time.

Do I need a background in machine learning?

No. The notebooks start from the engineering problem and build up the machine learning step by step. Some basic Python will help.

What is an inverse PINN and why is it useful?

An inverse PINN learns an unknown value in the equation, such as a thermal conductivity or a damping coefficient, from a few measurements. It’s useful when you know the physics but not all of the material properties.

Can PINNs replace CFD?

Not in general. Traditional CFD is still faster and more reliable for most standard simulations. PINNs are most useful for inverse problems, combining sparse measurements with physics, and building fast surrogate models.

Ready when you are

Ready to train your first PINN?

Open the first notebook in your browser and start this weekend.

£29 £57All 3 series · runs in Colab
Get the package