forgot to move 2 files :D
This commit is contained in:
17
Messing Around/Druckrohrleitung.py
Normal file
17
Messing Around/Druckrohrleitung.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import numpy as np
|
||||
|
||||
def simple_time_delay(delta_p_profile,delay,timestep):
|
||||
rounded_delay = timestep * np.round(delay/timestep)
|
||||
print('Delay was rounded to ', rounded_delay)
|
||||
n_pad = int(rounded_delay/timestep)
|
||||
output_delta_p_profile = np.pad(delta_p_profile[0:-n_pad],[n_pad,0],constant_values=0)
|
||||
return output_delta_p_profile
|
||||
|
||||
## testing
|
||||
if __name__ == "__main__":
|
||||
delta_p_profile = np.ones([100])
|
||||
delay = 4
|
||||
timestep = 0.2
|
||||
|
||||
print(simple_time_delay(delta_p_profile, delay, timestep))
|
||||
|
||||
12
Messing Around/Durchflussraten.py
Normal file
12
Messing Around/Durchflussraten.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import numpy as np
|
||||
from math import pi
|
||||
|
||||
|
||||
def Hagen_Poiseuille(P_above,P_below,dx,constants=[1,1]):
|
||||
dP = P_above-P_below
|
||||
r = constants[0]
|
||||
vis = constants[1]
|
||||
Q = (pi*r**4)/(8*vis)*dP/dx
|
||||
return Q
|
||||
|
||||
|
||||
Reference in New Issue
Block a user