The `ParabolicPDE' class is used to solve parabolic partial differential equations like the Heat Equation. Let 'u(x, t)' = temperature of a rod at position '0 <= x <= xm' and time 't' > 0. Numerically solve the
Heat Equation: u_t = k * u_xx with initial conditions u(x, 0) = ic(x) boundary conditions (u(0, t), u(xm, t)) = bc
Value parameters
bc
the boundary conditions as a 2-tuple for end-points 0 and 'xm'
dt
delta 't'
dx
delta 'x'
ic
the initial conditions as a function of position 'x'
Solve for the temperature of the rod at time 't', returning the vector of temperatures representing the temperature profile of the rod over its length. This method uses an Explicit Finite Difference technique to solve the PDE.
Solve for the temperature of the rod at time 't', returning the vector of temperatures representing the temperature profile of the rod over its length. This method uses an Explicit Finite Difference technique to solve the PDE.
Solve for the temperature of the rod at time 't', returning the vector of temperatures representing the temperature profile of the rod over its length. This method uses the Implicit Crank-Nicolson technique to solve the PDE, which provides greater stability and accuracy. Implicit recurrence equation: -ru(i-1, j2) + 2.(1.+r)u(i, j2) - ru(i+1, j2) = ru(i-1, j1) + 2.(1.-r)u(i, j1) + ru(i+1, j1) This equation is solved simultaneously: solve for 'u' in 'mat * u = vec'
Solve for the temperature of the rod at time 't', returning the vector of temperatures representing the temperature profile of the rod over its length. This method uses the Implicit Crank-Nicolson technique to solve the PDE, which provides greater stability and accuracy. Implicit recurrence equation: -ru(i-1, j2) + 2.(1.+r)u(i, j2) - ru(i+1, j2) = ru(i-1, j1) + 2.(1.-r)u(i, j1) + ru(i+1, j1) This equation is solved simultaneously: solve for 'u' in 'mat * u = vec'