๐Ÿ‡บ๐Ÿ‡ฆ ะฃะบั€ะฐั—ะฝััŒะบะฐ

๐Ÿ”ฅ Heat Conduction Simulator

The 2D heat equation โˆ‚T/โˆ‚t = ฮฑโˆ‡ยฒT solved in real time via FTCS finite differences. Click or drag to paint hot / cold sources and watch thermal energy diffuse across the grid.

Brush

Physics

Statistics

Max T0.0 ยฐC
Min T0.0 ยฐC
Avg T0.0 ยฐC
Step0
Tip: Paint a hot spot then add cold walls nearby. ฮฑ controls how fast heat spreads โ€” higher values reach equilibrium sooner. The FTCS scheme is stable for ฮฑยทdt/dxยฒ < 0.25.

About this simulation

This simulator solves the 2D heat equation โˆ‚T/โˆ‚t = ฮฑโˆ‡ยฒT on a 160ร—160 grid in real time. Heat spreads by conduction: each cell exchanges thermal energy with its four neighbours, so sharp hot and cold spots gradually smooth out until the field relaxes toward equilibrium. The grid is updated with the explicit FTCS finite-difference scheme, a classic numerical method for diffusion problems, letting you watch how thermal diffusivity governs the pace at which temperature gradients dissolve across a surface.

๐Ÿ”ฌ What it shows

It visualises diffusion of temperature on a square grid governed by the heat equation โˆ‚T/โˆ‚t = ฮฑโˆ‡ยฒT. Each step applies the Forward-Time Central-Space (FTCS) update, where a cell's new value is its old value plus ฮฑ times the discrete Laplacian of its four neighbours. The colour map runs from black (zero) through red, yellow and white for hot regions, and through blue to cyan for cold regions. The boundary is held fixed at 0 ยฐC (Dirichlet condition).

๐ŸŽฎ How to use

Pick the Hot or Cold brush, then click or drag on the grid to paint heat sources. The Brush temp slider sets magnitude (10โ€“200 ยฐC) and Brush radius sets the painted disc (1โ€“8 cells). Under Physics, Diffusivity ฮฑ (0.05โ€“0.50) controls how fast heat spreads, and Steps / frame (1โ€“20) sets the simulation speed. The Statistics panel reports max, min and average temperature and the step count; "Clear grid" resets the field to zero.

๐Ÿ’ก Did you know?

The explicit FTCS scheme is only conditionally stable: in 2D the dimensionless number ฮฑยทdt/dxยฒ must stay below 0.25, or rounding errors amplify each step and the solution blows up. That is why the diffusivity slider here is capped at 0.50 with dt = dx = 1, keeping the method on the edge of its stability limit.

Frequently asked questions

What is the heat equation this simulation solves?

It is the 2D heat (or diffusion) equation, written โˆ‚T/โˆ‚t = ฮฑโˆ‡ยฒT, where T is temperature, t is time, ฮฑ is the thermal diffusivity and โˆ‡ยฒ is the Laplacian. It states that the rate of temperature change at a point is proportional to how much that point differs from the average of its surroundings, which makes heat flow from hot regions to cold ones.

How does the FTCS method actually compute each step?

Forward-Time Central-Space replaces the derivatives with finite differences on the grid. Each cell's next temperature equals its current value plus ฮฑ times the sum of its four neighbours minus four times itself. Because the new field depends only on the old field, every cell can be updated independently in a single explicit pass, which is fast but limited by a stability condition.

What do the diffusivity and speed sliders change?

Diffusivity ฮฑ scales how strongly each cell pulls toward the average of its neighbours, so higher ฮฑ makes heat spread faster and reach equilibrium sooner. Steps / frame sets how many FTCS updates run before each redraw, effectively a time-speed control: more steps per frame advances simulated time faster but does not change the underlying physics.

Is this physically accurate?

The model is a faithful discretisation of the ideal heat equation for an isotropic, homogeneous medium with fixed-temperature (Dirichlet) edges at 0 ยฐC. It is a teaching tool, so it uses dimensionless grid units rather than real material constants, and it ignores convection, radiation and temperature-dependent properties. The qualitative behaviour of conductive heat flow is, however, captured correctly.

Why does heat eventually fade to zero?

The four edges of the grid are clamped to 0 ยฐC, so they continually drain thermal energy out of the domain. With no internal heat source sustaining it, conduction smooths every gradient and energy leaks through these fixed boundaries until the whole field relaxes to the boundary value of zero. Repainting hot or cold spots injects fresh energy and restarts the diffusion.

About Heat Conduction Simulator

Heat conduction is the transfer of thermal energy through a material without bulk motion of the material itself. It occurs when atoms and electrons with higher kinetic energy collide with neighbouring particles, transferring energy from hotter regions to cooler ones. Fourier's law states that the heat flux is proportional to the negative temperature gradient: q = -kโˆ‡T, where k is the thermal conductivity.

The simulation solves the heat equation โˆ‚T/โˆ‚t = ฮฑโˆ‡ยฒT, where ฮฑ = k/(ฯcโ‚š) is the thermal diffusivity. This parabolic partial differential equation describes how temperature evolves over time and space. Numerical methods such as finite differences discretise the domain into a grid, updating each cell based on the temperatures of its neighbours.

Heat conduction governs countless engineering applications: cooling of electronic chips, thermal management in buildings, design of heat sinks and insulators, and industrial processes from casting to annealing. Understanding conduction allows engineers to select materials, thicknesses, and geometries that manage heat flow safely and efficiently.

Frequently Asked Questions

What is thermal conductivity and how does it vary between materials?

Thermal conductivity (k) measures how readily a material conducts heat, in W/(mยทK). Metals like copper (~400 W/mยทK) are excellent conductors, while air (~0.025 W/mยทK) and aerogels (~0.015 W/mยทK) are excellent insulators.

What is the difference between heat conduction and convection?

Conduction transfers heat through direct particle-to-particle contact within a stationary material. Convection transfers heat by the bulk movement of a fluid (liquid or gas). Both often occur together, but the heat equation models conduction specifically.

What is thermal diffusivity?

Thermal diffusivity (ฮฑ = k/ฯcโ‚š) combines conductivity, density, and specific heat to measure how quickly a temperature disturbance spreads through a material. High diffusivity means rapid temperature equalisation โ€” metals diffuse heat much faster than wood or plastic.

What boundary conditions are used in heat conduction simulations?

Common boundary conditions include fixed temperature (Dirichlet), fixed heat flux (Neumann), or convective cooling (Robin/Newton's law of cooling). The choice depends on the physical setup โ€” for example, a surface cooled by a fan uses the convective condition.

How do insulators reduce heat conduction?

Insulators have very low thermal conductivity, so the temperature gradient must be steep to drive even a small heat flux. Materials like fibreglass, foam, and aerogel trap still air in tiny pockets, preventing both conduction and convection, achieving very low effective k values.

About Heat Conduction

Heat conduction is the transfer of thermal energy through a material by the interaction of neighboring atoms and electrons, without bulk movement of the material itself. It is governed by Fourier's law: q = minus k times the temperature gradient, where q is the heat flux (W/m²), k is the thermal conductivity (W/m·K), and the negative sign indicates heat flows from hot to cold. Combining Fourier's law with energy conservation gives the heat equation: partial T / partial t = alpha times the Laplacian of T, where alpha = k / (rho times c_p) is the thermal diffusivity, rho is density, and c_p is specific heat capacity.

The heat equation is a parabolic partial differential equation that describes how temperature distributions evolve over time. In 1D with constant thermal diffusivity, the solution for an initial temperature pulse is a Gaussian that spreads out over time: T(x,t) = T_0 / sqrt(4 pi alpha t) times exp(minus x squared / 4 alpha t). Steady-state solutions (partial T / partial t = 0) satisfy Laplace's equation and depend only on boundary conditions, not on thermal diffusivity. Key boundary condition types include: Dirichlet (prescribed temperature), Neumann (prescribed heat flux, including insulated boundaries with zero flux), and Robin or convective (surface heat transfer to a fluid).

This simulator solves the 2D heat equation numerically using explicit finite differences or the alternating direction implicit (ADI) method, starting from user-defined initial temperature distributions. You can set boundary temperatures or heat fluxes on each edge, add internal heat sources, change material properties (conductivity, diffusivity), and watch isothermal contours and temperature color maps evolve toward steady state — demonstrating the heat equation's role in electronics thermal management, building insulation design, geological heat flow, and manufacturing process control.

Frequently Asked Questions

What is the difference between heat conduction, convection, and radiation?

Heat conduction transfers energy through a stationary material by atomic and molecular collisions (or electron transport in metals) — no material moves, only energy propagates. Thermal convection transfers heat by bulk movement of fluid: warm fluid rises (natural convection) or is forced past a surface (forced convection), carrying thermal energy with it. Thermal radiation transfers energy via electromagnetic waves (primarily infrared) through vacuum or transparent media — no physical medium is required, which is why the Sun heats the Earth through space. In engineering applications all three modes occur simultaneously; the dominant mode depends on geometry, material properties, and temperature differences.

What is thermal diffusivity and how does it differ from thermal conductivity?

Thermal conductivity k (W/m times K) measures how well a material conducts heat in steady state — how much heat flux a given temperature gradient drives. Thermal diffusivity alpha = k / (rho times c_p) in m squared per second measures how quickly temperature changes propagate through a material in transient situations. A material with high k but also high rho times c_p (thermal mass) can conduct heat well yet change temperature slowly — like cast iron. Thermal diffusivity determines the timescale for heat to penetrate: the thermal penetration depth after time t is approximately the square root of (alpha times t).

What are the boundary conditions for the heat equation?

Three standard boundary conditions govern heat equation solutions: Dirichlet (first kind) — temperature is prescribed at the boundary, representing a surface held at constant temperature. Neumann (second kind) — heat flux is prescribed; setting zero flux gives a perfectly insulated (adiabatic) boundary. Robin (third kind / convective) — the surface loses heat to a fluid by Newton's law of cooling: minus k times (partial T / partial n) = h times (T minus T_fluid), where h is the convective heat transfer coefficient. Each boundary type fundamentally changes the temperature distribution.

How does the heat equation describe cooling of a hot object?

Newton's law of cooling states that the rate of heat loss is proportional to the temperature difference between object and surroundings: dT/dt = minus (1/tau) times (T minus T_ambient), giving exponential cooling T(t) = T_ambient + (T_0 minus T_ambient) times e raised to the power (minus t / tau). This lumped capacitance model is valid when temperature is uniform throughout the object (Biot number Bi = h times L / k much less than 1). For objects where temperature gradients exist internally, the full heat equation must be solved. The Biot number distinguishes surface-dominated cooling from conduction-limited cooling where spatial temperature gradients matter internally.

How is the heat equation used in engineering applications?

The heat equation underlies thermal design across engineering disciplines: electronics cooling — finite element thermal analysis predicts junction temperatures in integrated circuits under varying power loads, guiding heat sink design to keep chips below 85°C junction temperature limits. Building energy modeling — solving the heat equation through walls, roofs, and windows with time-varying solar and ambient temperature boundary conditions optimizes insulation placement and HVAC sizing. Manufacturing — laser and electron beam heating during additive manufacturing, welding, and heat treatment is modeled to predict microstructure evolution and residual stresses.