Mastering Heat Transfer PINNs: A Coding Guide

PINNs For Mechanical Engineers

profile
5
Mastering Heat Transfer PINNs: A Coding Guide
profile
Digital Product
80Sales

Physics-Informed Neural Networks are one of the most powerful tools in modern computational engineering, but most resources are buried in dense papers with no working code. This series changes that.

Working entirely in PyTorch, you will build PINNs from scratch to solve real heat transfer problems. From 1D steady conduction to 2D spatial domains, transient heat equations, and inverse identification of unknown thermal conductivity from noisy data. Every worksheet is structured so you spend your time understanding the physics and the method, not wrestling with code.

8 notebooks, one new idea each:

WS1 | 1D Steady Conduction with a Heat Source: Solve the steady-state heat equation on a rod with internal heat generation. Introduces Dirichlet and Neumann boundary conditions enforced through the loss function. Validated against the analytical parabolic solution.

WS2 | 2D Steady Heat Conduction (Laplace Equation): Extend to a 2D square domain with boundary conditions on all four edges. Introduces 2D collocation point sampling and mixed boundary condition types. PINN prediction compared against the analytical solution with a full spatial error map.

WS3 | 1D Transient Heat Conduction: Time becomes a second network input. The network now predicts T(x,t) across a full space-time domain. Introduces the three-part loss function (IC + BC + physics), input normalisation, and a learning rate scheduler. Validated against the Fourier series analytical solution at multiple time snapshots.

WS4 | Inverse PINN: Identify Unknown Thermal Conductivity: The series highlight. Thermal conductivity k is unknown. The PINN identifies it simultaneously with the temperature field from noisy synthetic measurements. A parameter convergence plot tracks k-hat approaching k-true over 35,000 training epochs. This is the same capability that experimental thermal characterisation teams build with far more complex tooling. You will have built it from scratch.

WS5 | Spatially Varying Conductivity k(x): Solve conduction in a functionally graded material where conductivity varies linearly along the rod. Introduces the expanded variable-coefficient PDE residual including the dk/dx cross-term that is absent for constant conductivity. Validated against the logarithmic analytical solution with a direct comparison between uniform and graded temperature profiles.

3 animation tutorials:

AWS1 | Transient Heat Field Animation: Watch the full T(x,t) space-time heatmap fill in during training alongside temperature profiles at multiple time snapshots converging toward their analytical values.

AWS2 | Inverse Conductivity Animation: The money shot. Watch k-hat converge toward the true conductivity value in real time, alongside the temperature prediction sharpening and the PDE residual profile shrinking.

AWS3 | Graded Material Animation: Watch the PINN prediction depart from the naive straight-line uniform-k solution and converge onto the correct logarithmic graded-k profile as training progresses.

Every worksheet includes:

Full theory and equation derivation before any code. Pre-written PyTorch code with clearly signposted fill-in-the-blank sections. Conceptual questions to test understanding. Quantitative validation against analytical or numerical reference solutions. Optional extension challenges. A complete answer key.

What is included: Eight Jupyter notebooks, each in fill-in-the-blank worksheet and complete answers versions. A technical handbook PDF. A Google Colab quick-start guide. Everything runs in Google Colab — no installation required.

Who this is for: Engineering students, researchers, and practising engineers who already know heat transfer and want to learn how to solve it with PINNs. Basic Python assumed.

Prerequisite: The Mastering Dynamics PINNs series, or equivalent PINN experience.

What are people saying

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
Apr 2026
£13