Guest User

Untitled

a guest
Apr 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import math
  2. def trackFlow(fin,fout,r,H,h,tmax,topen):
  3. vtotal = [math.pi*r**2*H]
  4. hold=[0]
  5. vold=[0]
  6. t=0
  7. Times=[0]
  8. while (t<= tmax and h<= H or h>= t):
  9. if (topen<= fout and topen>=100):
  10. v = [vold[-1]+ round((fin-fout)*t)]
  11. h = [hold[-1]+ round((((fin-fout)*t)/math.pi*r**2))]
  12. else:
  13. t=t+0.1
  14. hold.append(h)
  15. vold.append(v)
  16. Times.append(t)
  17. return (vold,hold,Times)
Add Comment
Please, Sign In to add comment