added set steady state functionality

This commit is contained in:
Georg ´Brantegger
2022-07-21 15:27:15 +02:00
parent d966904606
commit 2331c7cc5b
3 changed files with 32 additions and 5 deletions

View File

@@ -31,4 +31,10 @@ class Francis_Turbine:
LA_diff_max = self.d_LA_max_dt*timestep
if abs(LA_diff) > LA_diff_max:
LA_diff = np.sign(LA_diff)*LA_diff_max
self.LA = self.LA-LA_diff
self.LA = self.LA-LA_diff
def set_steady_state(self,ss_flux,ss_pressure):
ss_LA = self.LA_n*ss_flux/self.Q_n*np.sqrt(self.p_n/ss_pressure)
self.set_LA(ss_LA)
if ss_LA < 0 or ss_LA > 1:
print('LA out of range')