START
Supply initial condition at time
t=0 and time line n=1
Advance to next step, t=t+Δt at
n= n+1
Apply U/S boundary condition to
obtain Qn+1i at i=1
Move to next point on timeline
n+1 by x=x+Δx
Solve initial estimate of Qn+1i+1 at
k=1 using linear scheme, Find
f(Qn+1i+1)k
NO Find f’(Qn+1i+1)k
Find f(Qn+1i+1)k+1
YES f(Qn+1i+1)k+1<= NO
D/S discharge computed
ε(0.001)
YES yes STOP
Last time
step
NO