Processing math: 100%
Step 4: Formulating a recursive algorithm
- Nature of the algorithm: compute u in space at t=Δt,2Δt,3Δt,...
- Two time levels are involved in the general discrete equation:
n+1 and n
- uni is already computed for i=0,…,Nx,
and un+1i is the unknown quantity
Solve the discretized PDE for the unknown un+1i:
un+1i=uni+F(uni+1−2uni+uni−1)
where
F=αΔtΔx2