From d4600b5926d76638ae6d7cf3255bc97d35ae868d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georg=20=C2=B4Brantegger?= Date: Thu, 9 Jun 2022 15:00:40 +0200 Subject: [PATCH] Volume and height changes dependend on flux profiles --- Druckrohrleitung.py | 17 +++++++++++++++++ __pycache__/Druckrohrleitung.cpython-38.pyc | Bin 0 -> 718 bytes 2 files changed, 17 insertions(+) create mode 100644 __pycache__/Druckrohrleitung.cpython-38.pyc diff --git a/Druckrohrleitung.py b/Druckrohrleitung.py index e69de29..2aeb9d9 100644 --- a/Druckrohrleitung.py +++ b/Druckrohrleitung.py @@ -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)) + diff --git a/__pycache__/Druckrohrleitung.cpython-38.pyc b/__pycache__/Druckrohrleitung.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82b5992033035e9dac453474553e485a0a559029 GIT binary patch literal 718 zcmYjPKW`H;6t{hLaw$zC5FilCtyx&u5NZp}hE!E5Fq}@ZuCcisxwB8UuPD`J3XFUJ znA(vqz!zZRD|ls!#Dv7ob6P>3^nTX+y+6Mv+pmYi9R&9K*VWk}LFi`)wv9n>2yR~h z2qbWYQY?swKA@DyNYFVk`x0ML!9=ehS2$&&pY}wY_GK)IWU?pwt7wHW^q!*eU=4H7 z@iYp@jrHLSI!EC44M0a6y2Kss$Rl)x@1kYoh`?R6A{e=-ivqvGOA1xAgNh|{=pE~j zARX)I1N4zRL>(2RAYs!_(X!X|K${+4+?&WMUnK8yn;6|HAw}YJVlaq~u^&yfvMyJS zpXXI8?YQTOYCPMNde)dyIUfa}w!Dx&YH~5|`;m~9%Xz~aqu-X5^bCl6;bT|U(mL6s z!y7TaNu*41==4~n_jT)<)&+ih!dGO5u+kp`aQ-waq&7u1(bKk;%GvBh8vFg5s>=1_{~u3GJDnRnGZpl