adapted FODE function in e-RK4 to (propably) be

able to handle negative outflux velocities
-> influx from pipeline
This commit is contained in:
Brantegger Georg
2022-06-20 09:23:59 +02:00
parent 6df9bfcda6
commit 312f6b9532
3 changed files with 20 additions and 22 deletions

View File

@@ -39,7 +39,7 @@ def get_p_halfstep(p0, p1):
p_halfstep = (p0+p1)/2
def FODE_function(x, h, alpha, p, rho=1000., g=9.81):
f = x**2/h*alpha+g-p/(rho*h)
f = x*abs(x)/h*alpha+g-p/(rho*h)
return f