Heat Equation (2D)

pdevisualizer.heat2d.step_heat(u, α, dt, dx, dy)[source]

Perform one time step of the 2D heat equation using finite differences.

pdevisualizer.heat2d.solve_heat(u0, α=1.0, dt=0.1, dx=1.0, dy=1.0, steps=100)[source]

Solve the 2D heat equation for a given number of time steps.

pdevisualizer.heat2d.animate_heat(u0, α=1.0, dt=0.1, dx=1.0, dy=1.0, frames=100, interval=50)[source]

Animate the 2D heat equation starting from initial field u0.