end of day commit - working on turbine class
This commit is contained in:
22
Turbinen/Durchflusskennlinie.csv
Normal file
22
Turbinen/Durchflusskennlinie.csv
Normal file
@@ -0,0 +1,22 @@
|
||||
,11.4,11.2,11,10.8,10.6,10.4,10.2,10,9.8
|
||||
0,0,0,0,0,0,0,0,0,0
|
||||
0.05,44.6719225,43.934144,43.3914212,43.005945,42.7411852,42.5620659,42.4351104,42.3285595,42.2124611
|
||||
0.1,93.5257218,92.1813802,91.0120507,89.9819869,89.0566946,88.2030946,87.3896575,86.5865116,85.7655241
|
||||
0.15,142.455373,140.502298,138.703994,137.026824,135.438371,133.907593,132.404945,130.902474,129.373898
|
||||
0.2,191.35358,188.792245,186.365298,184.041241,181.789769,179.581903,177.390108,175.188376,172.952294
|
||||
0.25,240.112708,236.946245,233.893698,230.92573,228.014163,225.132101,222.254034,219.355912,216.415204
|
||||
0.3,288.625576,284.85976,281.187353,277.581187,274.01522,270.464644,266.905977,263.31713,259.677456
|
||||
0.35,336.786234,332.429439,328.145567,323.909615,319.697669,315.487006,311.256165,306.985012,302.654777
|
||||
0.4,384.490739,379.553866,374.669505,369.814802,364.967956,360.108307,355.216403,350.274048,345.264331
|
||||
0.45,431.637894,426.134271,420.662881,415.202987,409.734875,404.239922,398.700655,393.100789,387.425251
|
||||
0.5,478.129951,472.075209,466.032607,459.983487,453.910176,447.796055,441.625591,435.384378,429.059145
|
||||
0.55,523.873268,517.285198,510.689413,504.069281,497.409128,490.694283,483.911113,477.047044,470.090565
|
||||
0.6,568.778912,561.677293,554.548395,547.377555,540.151033,532.856054,525.480827,518.014558,510.447451
|
||||
0.65,612.763186,605.169605,597.529525,589.830179,582.059697,574.207132,566.262474,558.216649,550.061519
|
||||
0.7,655.7481,647.685753,639.558081,631.354134,623.063835,614.677994,606.188309,597.587364,588.868614
|
||||
0.75,697.661758,689.155243,680.565018,671.881864,663.097416,654.204159,645.195426,636.065384,626.809013
|
||||
0.8,738.438667,729.51377,720.487263,711.35157,702.099947,692.726469,683.226022,673.594278,663.827671
|
||||
0.85,778.019972,768.703447,759.267942,749.707427,740.016685,730.191293,720.227602,710.122707,699.874419
|
||||
0.9,816.35361,806.672962,796.856534,786.899741,776.798797,766.550685,756.153132,745.604572,734.904109
|
||||
0.95,853.394385,843.377654,833.208949,822.885029,812.403437,801.762466,790.961126,779.999101,768.876705
|
||||
1,889.103974,878.779525,868.287549,857.626044,846.793778,835.790258,824.615682,813.270891,801.757325
|
||||
|
@@ -1,19 +1,30 @@
|
||||
def turbine_flux(p,LA,p_exp,cubic_coeff,quadratic_coeff,linear_coeff,const_coeff):
|
||||
return (p*1e-5)**p_exp*(cubic_coeff*LA**3+quadratic_coeff*LA**2+linear_coeff*LA+const_coeff)
|
||||
from matplotlib.pyplot import fill
|
||||
import numpy as np
|
||||
from scipy.interpolate import interp2d
|
||||
|
||||
#importing pressure conversion function
|
||||
import sys
|
||||
import os
|
||||
current = os.path.dirname(os.path.realpath(__file__))
|
||||
parent = os.path.dirname(current)
|
||||
sys.path.append(parent)
|
||||
from functions.pressure_conversion import pressure_conversion
|
||||
|
||||
class Francis_turbine_class:
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self,CSV_name='Durchflusskennlinie.csv'):
|
||||
self.raw_csv = np.genfromtxt(CSV_name,delimiter=',')
|
||||
|
||||
def extract_csv(self,CSV_pressure_unit='bar'):
|
||||
self.raw_ps_vec,_ = pressure_conversion(self.raw_csv[0,1:],CSV_pressure_unit,'Pa')
|
||||
self.raw_LA_vec = self.raw_csv[1:,0]
|
||||
self.raw_Qs_mat = self.raw_csv[1:,1:]
|
||||
|
||||
def get_Q_fun(self):
|
||||
Q_fun = interp2d(self.raw_ps_vec,self.raw_LA_vec,self.raw_Qs_mat,bounds_error=False,fill_value=None)
|
||||
return Q_fun
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def set_turbine_flux_parameters(self,p_exp,cubic_coeff,quadratic_coeff,linear_coeff,const_coeff):
|
||||
# extracted from the Muschelkurve of the Turbine and used to calculate the turbine flux for a given pressure
|
||||
self.p_exp = p_exp
|
||||
self.cubic_coeff = cubic_coeff
|
||||
self.quadratic_coeff = quadratic_coeff
|
||||
self.linear_coeff = linear_coeff
|
||||
self.const_coeff = const_coeff
|
||||
|
||||
def get_turbine_flux(self,pressure,Leitapparatöffnung):
|
||||
self.flux = turbine_flux(pressure,Leitapparatöffnung,self.p_exp,self.cubic_coeff,self.quadratic_coeff,self.linear_coeff,self.const_coeff)
|
||||
return self.flux
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user