turbo-design 1.1.1__py3-none-any.whl → 1.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of turbo-design might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: turbo-design
3
- Version: 1.1.1
3
+ Version: 1.1.3
4
4
  Summary: TurboDesign is a library used to design turbines and compressors using radial equilibrium.
5
5
  Author: Paht Juangphanich
6
6
  Author-email: paht.juangphanich@nasa.gov
@@ -1,11 +1,11 @@
1
1
  turbodesign/__init__.py,sha256=N8Nu0I1vrlEHYJZZ7yhhg-FtbNbLyrgjy7hoicygUqg,325
2
2
  turbodesign/arrayfuncs.py,sha256=GHIlTyLfeNsNCQQoh5m1aXK3iyvU6RjdYQipkqpU_ps,519
3
- turbodesign/bladerow.py,sha256=Ie3TDxaLzOSM38dQ0xNyjFEwHWbHXMq1FcksTVEvkqc,24540
3
+ turbodesign/bladerow.py,sha256=I0KYtw7c5cy32vxq1D54TrIkfsdbRlDWsnoCIADtCUA,24582
4
4
  turbodesign/cantera_gas/co2.yaml,sha256=M2o_RzxV9B9rDkgkXJC-l3voKraFZguTZuKKt4F7S_c,887
5
5
  turbodesign/compressorspool.py,sha256=z8ZVczJ-EdZvIqqZArC6UdwC5MbU2SZh_MT2CGq5avY,2600
6
6
  turbodesign/coolant.py,sha256=nuj7ryUXuBhuOPt2jHjHwtEM_LVno7A8Wm14P0lJn-8,436
7
7
  turbodesign/enums.py,sha256=T4aFrGMnx9fgZkrExMBIY2IbCueA0utqr_afk-TUe9Q,1188
8
- turbodesign/inlet.py,sha256=q-gzmA58SU0Z-y4Mwv7_fybJJ5Jn8t_w-6obG95IvpU,6317
8
+ turbodesign/inlet.py,sha256=QeSvFi35JeOPevjQrz1TmAhoWkScXT9BRA_5oRTnDEE,6322
9
9
  turbodesign/isentropic.py,sha256=YLTmNx69e_M5fTuLOmk_KvaQ6ABv0aZsityfBihJOmI,2003
10
10
  turbodesign/loss/__init__.py,sha256=ZJomzXa6ElduFruURukCrFwJQXMWS2aW8JSaVQ-M2r8,46
11
11
  turbodesign/loss/compressor/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
@@ -20,14 +20,14 @@ turbodesign/loss/turbine/kackerokapuu.py,sha256=hUmZdyA1hAhN3_xbwBhka2dyk0Aq9rqq
20
20
  turbodesign/loss/turbine/traupel.py,sha256=aZxFE9JDcCfi1gy-fqS1SxjjlhuDG-H-g3LPurty1M0,4164
21
21
  turbodesign/lossinterp.py,sha256=B2KEobp-nD9jwD6UINgBmTlH9kKyWg3UNvXxqfUsr-k,6198
22
22
  turbodesign/outlet.py,sha256=SwTwoL6XnWlsrE5A6wLxu3qXkydDDUsdKKeBbJm4mrQ,2069
23
- turbodesign/passage.py,sha256=eZGaB5Gq9Frm80TTDJaLm1TxJV2-_fHHIeqjPuvtb8E,9550
23
+ turbodesign/passage.py,sha256=a3DMc-QdlFEdjOEL1cockcTUFu_1iT1PSDrGo1qKN9s,9659
24
24
  turbodesign/radeq.py,sha256=RCsiQzcHvR5dozK6XG0eysAhXYewF0BY_qX0f1knURo,10091
25
25
  turbodesign/rotor.py,sha256=tHl9o5H4aQ6Etd4gqa8Ime1UK7k0de4GLt5Yb1sJdGs,1376
26
26
  turbodesign/solve_radeq.py,sha256=2VGzFSVkyN0rTPFHaCQiD3v166cdEs39x7x7RuzLgmw,1886
27
27
  turbodesign/spool.py,sha256=h4m--HR5g8o01Kkhl4Mbvx7WORQez3YpncDE7XxbNaw,14172
28
28
  turbodesign/stage.py,sha256=UP45sDKDLsAkO_WfDWJ6kqXU7cYKh_4QO01QZnSN1oQ,166
29
- turbodesign/td_math.py,sha256=En8g8AcldaZN9qmG33wrt2EuTqKfSQ8UO2PWod6a0IE,15970
29
+ turbodesign/td_math.py,sha256=GjJdH9Mym1_vMSDT7lxilzSLVHBM5-Z5UE0wfsH2hr4,16153
30
30
  turbodesign/turbinespool.py,sha256=U_TMv5XNTlRWP9NJWTaaFWfNeTEGEuSVWt3HDi8QyFI,26124
31
- turbo_design-1.1.1.dist-info/METADATA,sha256=C1hmGnuG5wJahAn1UDbHQPQCwfUeGK4Mx3XgwGucUHg,734
32
- turbo_design-1.1.1.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
33
- turbo_design-1.1.1.dist-info/RECORD,,
31
+ turbo_design-1.1.3.dist-info/METADATA,sha256=F1sI0aDeah1bWEhX57xeQTvt5aMMwHR9bkWyV7VFa-M,734
32
+ turbo_design-1.1.3.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
33
+ turbo_design-1.1.3.dist-info/RECORD,,
turbodesign/bladerow.py CHANGED
@@ -486,6 +486,7 @@ class BladeRow:
486
486
  "euler_power":self.euler_power,
487
487
  "axial_chord":self.axial_chord,
488
488
  "aspect_ratio":self.aspect_ratio,
489
+ "num_blades":self.num_blades,
489
490
  "area": self.area,
490
491
  "mprime":self.mprime[-1],
491
492
  "Reynolds":self.Reynolds,
turbodesign/inlet.py CHANGED
@@ -54,7 +54,8 @@ class Inlet(BladeRow):
54
54
  self.beta2_metal = [0]
55
55
  self.P0_fun = interp1d(self.percent_hub_shroud,P0)
56
56
  self.T0_fun = interp1d(self.percent_hub_shroud,T0)
57
-
57
+ self.mprime = [0]
58
+
58
59
 
59
60
  def initialize_velocity(self,passage:Passage,num_streamlines:int):
60
61
  """Initialize velocity calculations. Assumes streamlines and inclination angles have been calculated
@@ -67,7 +68,6 @@ class Inlet(BladeRow):
67
68
 
68
69
  cutline,_,_ = passage.get_cutting_line(self.axial_location)
69
70
  self.x,self.r = cutline.get_point(np.linspace(0,1,num_streamlines))
70
-
71
71
  for _ in range(10):
72
72
  T0_T = (1+(self.gamma-1)/2 * self.M**2)
73
73
 
@@ -115,7 +115,7 @@ class Inlet(BladeRow):
115
115
  Area += 2*np.pi*C*(S/2*dx**2+self.r[j-1]*dx)
116
116
 
117
117
  self.calculated_massflow = self.rho.mean()*self.Vm.mean() * Area
118
-
118
+
119
119
 
120
120
  def get_total_pressure(self,percent_hub_shroud:Union[float,npt.NDArray]):
121
121
  """Returns the static pressure at a certain percent hub_shroud
turbodesign/passage.py CHANGED
@@ -184,7 +184,7 @@ class Passage:
184
184
  rshroud = self.rshroud(t_shroud)
185
185
  return line2D([xhub,rhub],[xshroud,rshroud]), t_hub, t_shroud
186
186
 
187
- def get_xr_slice(self,t_span:float,axial_location:float):
187
+ def get_xr_slice(self,t_span:float,axial_location:Tuple[float,float]):
188
188
  """Returns the xr coordinates of a streamline, a line that is parallel to both hub and shroud
189
189
 
190
190
  Args:
@@ -194,7 +194,7 @@ class Passage:
194
194
  Returns:
195
195
  np.NDArray: _description_
196
196
  """
197
- t_hub = np.linspace(0,axial_location,100)
197
+ t_hub = np.linspace(axial_location[0],axial_location[1],100)
198
198
 
199
199
  shroud_pts_cyl = np.vstack([self.xshroud(t_hub),self.rshroud(t_hub)]).transpose()
200
200
  hub_pts_cyl = np.vstack([self.xhub(t_hub),self.rhub(t_hub)]).transpose()
@@ -228,7 +228,9 @@ class Passage:
228
228
  cut,_,_ = self.get_cutting_line(p)
229
229
  x,r = cut.get_point(np.linspace(0,1,10))
230
230
  plt.plot(x,r,label=f'{p}',linestyle='dashed')
231
-
231
+
232
+
233
+ plt.ylim([-self.rshroud_pts.max()*0.1, self.rshroud_pts.max()])
232
234
  plt.legend()
233
235
  plt.axis('scaled')
234
236
  plt.show()
turbodesign/td_math.py CHANGED
@@ -86,8 +86,10 @@ def compute_reynolds(rows:List[BladeRow],passage:Passage):
86
86
  rows (List[BladeRow]): Blade row to calculate the Reynolds number
87
87
  passage (Passage): Passage
88
88
  """
89
- for row in rows:
90
- xr = passage.get_xr_slice(0.5,row.axial_location)
89
+
90
+ for i in range(1,len(rows)):
91
+ row = rows[i]
92
+ xr = passage.get_xr_slice(0.5,[rows[i-1].axial_location,row.axial_location])
91
93
  dx = np.diff(xr[:,0])
92
94
  dr = np.diff(xr[:,1])
93
95
  c = np.sum(np.sqrt(dx**2+dr**2))
@@ -102,7 +104,8 @@ def compute_reynolds(rows:List[BladeRow],passage:Passage):
102
104
  mu = row.mu
103
105
  row.Reynolds = c*V*rho/mu
104
106
  row.mprime = mp
105
- row.axial_chord = c
107
+ row.axial_chord = max(c,1E-12) # Axial chord
108
+ # row.num_blades = int(2*np.pi*row.r.mean() / row.pitch_to_chord * row.axial_chord)
106
109
 
107
110
 
108
111
 
@@ -192,7 +195,7 @@ def compute_quantities(row:BladeRow,upstream:BladeRow):
192
195
  else:
193
196
  row.P0 = upstream.P0
194
197
  row.T0 = upstream.T0 - T0_coolant_weighted_average(row)
195
- row.T = row.T0 * (1+(row.gamma-1)/2*row.M**2)
198
+ row.T = row.T0 / (1+(row.gamma-1)/2*row.M**2)
196
199
  row.P = row.P0 * (row.T/row.T0)**((row.gamma)/(row.gamma-1))
197
200
  row.T0R = row.T + row.W**2 / (2*row.Cp)
198
201
  row.P0R = row.P*(row.T0R/row.T)**((row.gamma)/(row.gamma-1))