Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def trackFlow(fin,fout,r,H,h,tmax,topen):
- vtotal = [math.pi*r**2*H]
- hold=[0]
- vold=[0]
- t=0
- Times=[0]
- while (t<= tmax and h<= H or h>= t):
- if (topen<= fout and topen>=100):
- v = [vold[-1]+ round((fin-fout)*t)]
- h = [hold[-1]+ round((((fin-fout)*t)/math.pi*r**2))]
- else:
- t=t+0.1
- hold.append(h)
- vold.append(v)
- Times.append(t)
- return (vold,hold,Times)
Add Comment
Please, Sign In to add comment