~/projects/heat-transfer
NACA 0012 Airfoil Heat Transfer Simulation
Real-time computational fluid dynamics and transient heat transfer, rendered live in the browser with Blazor Server and the Canvas API.
Problem statement
Aerodynamic heat transfer sets the thermal limits for aircraft structures, turbine blades, and re-entry vehicles. Understanding how heat moves around a lifting surface is important for safe and efficient flight, but most visualizations of it require expensive simulation software.
I built this simulation to combine both fields, using numerical methods from my mechanical engineering coursework in an interactive web application that runs in any browser.
Solution approach
The simulation discretizes the heat conduction PDE over a 560×240 structured grid, using explicit Euler time integration and a second-order central-difference Laplacian. The NACA 0012 airfoil geometry is calculated from its standard thickness equation, and the flow velocities come from potential flow theory scaled to Mach 0.3 freestream conditions.
Technology stack
- .NET 10 Async server runtime
- Blazor Server-side rendering
- MudBlazor Component library
- KaTeX Math typesetting
- Canvas API 2D rendering
Live interactive simulation
Adjust thermal diffusivity, airspeed (20–300 m/s), surface temperature, and angle of attack in real time. The simulation runs on a 560×240 finite difference grid with 134,400 nodes and renders streamlines, temperature contours, and aerodynamic statistics live in the browser.
Launch simulationOutcomes & results
- Reynolds number range
- 1.3M–20.5M
- Covers laminar and turbulent regimes
- Freestream Mach number
- Mach 0.3
- Low subsonic, incompressible flow assumption
- Finite difference nodes
- 134,400
- 560×240 structured grid
Key concepts
What is the Reynolds number?
The Reynolds number (Re) compares inertial forces to viscous forces in a fluid. A low Re means smooth, layered (laminar) flow, and a high Re means chaotic, turbulent flow. For an aircraft wing, Re affects drag, boundary layer thickness, and heat transfer.
What is the Prandtl number?
The Prandtl number (Pr) is the ratio of momentum diffusivity to thermal diffusivity. For air, Pr ≈ 0.71, meaning momentum spreads slightly faster than heat. This controls the relative thickness of the velocity and thermal boundary layers around the airfoil.
What is the Nusselt number?
The Nusselt number (Nu) measures how effective convection is compared to conduction at a surface. A high Nu means convection is doing most of the work and carries heat away quickly. The simulation calculates Nu from the Reynolds and Prandtl numbers and shows it in the live statistics.
How does the finite difference method work?
The finite difference method replaces the continuous heat equation with a grid of discrete points. At each time step, the temperature at every node is updated from its neighbors using a central-difference stencil. The explicit Euler scheme then steps forward in time. It is simple and fast, but it needs a small time step to stay numerically stable.
Interested in the code?
The full source code is on GitHub. If you have questions about the implementation or want to collaborate, get in touch.