Algorithm 1.
Choose s and ε | |
Calculated Δtmax as a function of ε, s, and κ=D∕l2 | |
Choose Δt⩽Δtmax | |
whilet⩽tfinaldo | |
fori=1 to ndo | |
end for | |
fori=1 to ndo | |
Xi=Xi−ΔXi(i+1)−ΔXi(i−1)+ΔX(i+1)i+ΔX(i−1)i | |
end for | |
t=t+Δt | |
end while |
Choose s and ε | |
Calculated Δtmax as a function of ε, s, and κ=D∕l2 | |
Choose Δt⩽Δtmax | |
whilet⩽tfinaldo | |
fori=1 to ndo | |
end for | |
fori=1 to ndo | |
Xi=Xi−ΔXi(i+1)−ΔXi(i−1)+ΔX(i+1)i+ΔX(i−1)i | |
end for | |
t=t+Δt | |
end while |