the thermal conductivity
delta t
delta x
the length of the rod
the initial conditions as a function of position x
the boundary conditions as a 2-tuple for endpoints 0 and xm
Show the flaw by printing the error message.
Show the flaw by printing the error message.
the method where the error occurred
the error message
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.
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.
the time the solution is desired
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.
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: -r*u(i-1, j2) + 2.*(1.+r)*u(i, j2) - r*u(i+1, j2) = r*u(i-1, j1) + 2.*(1.-r)*u(i, j1) + r*u(i+1, j1) This equation is solved simultaneously: solve for u in mat * u = vec
the time the solution is desired
people.sc.fsu.edu/~jpeterson/5-CrankNicolson.pdf
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