turbo-design 1.1.2__tar.gz → 1.1.4__tar.gz

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.

Files changed (32) hide show
  1. {turbo_design-1.1.2 → turbo_design-1.1.4}/PKG-INFO +2 -3
  2. {turbo_design-1.1.2 → turbo_design-1.1.4}/pyproject.toml +1 -1
  3. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/bladerow.py +5 -1
  4. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/passage.py +17 -12
  5. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/td_math.py +1 -1
  6. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/__init__.py +0 -0
  7. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/arrayfuncs.py +0 -0
  8. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/cantera_gas/co2.yaml +0 -0
  9. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/compressorspool.py +0 -0
  10. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/coolant.py +0 -0
  11. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/enums.py +0 -0
  12. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/inlet.py +0 -0
  13. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/isentropic.py +0 -0
  14. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/__init__.py +0 -0
  15. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/compressor/__init__.py +0 -0
  16. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/losstype.py +0 -0
  17. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/TD2.py +0 -0
  18. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/__init__.py +0 -0
  19. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/ainleymathieson.py +0 -0
  20. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/craigcox.py +0 -0
  21. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/fixedefficiency.py +0 -0
  22. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/fixedpressureloss.py +0 -0
  23. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/kackerokapuu.py +0 -0
  24. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/loss/turbine/traupel.py +0 -0
  25. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/lossinterp.py +0 -0
  26. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/outlet.py +0 -0
  27. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/radeq.py +0 -0
  28. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/rotor.py +0 -0
  29. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/solve_radeq.py +0 -0
  30. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/spool.py +0 -0
  31. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/stage.py +0 -0
  32. {turbo_design-1.1.2 → turbo_design-1.1.4}/turbodesign/turbinespool.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: turbo-design
3
- Version: 1.1.2
3
+ Version: 1.1.4
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
@@ -10,7 +10,6 @@ Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
- Classifier: Programming Language :: Python :: 3.13
14
13
  Requires-Dist: cantera
15
14
  Requires-Dist: findiff
16
15
  Requires-Dist: matplotlib
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "turbo-design"
3
- version = "1.1.2"
3
+ version = "1.1.4"
4
4
  description = "TurboDesign is a library used to design turbines and compressors using radial equilibrium."
5
5
  authors = ["Paht Juangphanich <paht.juangphanich@nasa.gov>"]
6
6
  packages = [
@@ -463,10 +463,10 @@ class BladeRow:
463
463
  "Vx":self.Vx.tolist(),
464
464
  "Vr":self.Vr.tolist(),
465
465
  "Vt":self.Vt.tolist(),
466
+ "U":self.U.tolist(),
466
467
  "V":self.V.tolist(),
467
468
  "M":self.M.tolist(),
468
469
  "M_rel":self.M_rel.tolist(),
469
- "U":self.U.tolist(),
470
470
  "W":self.W.tolist(),
471
471
  "Wt":self.Wt.tolist(),
472
472
  "omega":self.omega,
@@ -488,6 +488,10 @@ class BladeRow:
488
488
  "aspect_ratio":self.aspect_ratio,
489
489
  "num_blades":self.num_blades,
490
490
  "area": self.area,
491
+ "radius":self.r.tolist(),
492
+ "x":self.x.tolist(),
493
+ "dx":self.x[-1]-self.x[0],
494
+ "dr":self.r[-1]-self.r[0],
491
495
  "mprime":self.mprime[-1],
492
496
  "Reynolds":self.Reynolds,
493
497
  "axial_chord":self.axial_chord
@@ -1,22 +1,22 @@
1
1
  from typing import List, Tuple
2
2
  import numpy as np
3
3
  import numpy.typing as npt
4
- from scipy.interpolate import interp1d
4
+ from scipy.interpolate import PchipInterpolator
5
5
  from pyturbo.helper import line2D
6
6
  from .enums import PassageType
7
7
  from scipy.optimize import minimize_scalar
8
8
  from findiff import FinDiff
9
- from pyturbo.helper import convert_to_ndarray
9
+ from pyturbo.helper import convert_to_ndarray,xr_to_mprime
10
10
  import matplotlib.pyplot as plt
11
11
 
12
12
  class Passage:
13
- xhub:interp1d
14
- rhub:interp1d
13
+ xhub:PchipInterpolator
14
+ rhub:PchipInterpolator
15
15
  xhub_pts:npt.NDArray
16
16
  rhub_pts:npt.NDArray
17
17
 
18
- xshroud:interp1d
19
- rshroud:interp1d
18
+ xshroud:PchipInterpolator
19
+ rshroud:PchipInterpolator
20
20
  xshroud_pts:npt.NDArray
21
21
  rshroud_pts:npt.NDArray
22
22
 
@@ -25,6 +25,7 @@ class Passage:
25
25
 
26
26
  x_streamlines:npt.NDArray
27
27
  r_streamlines:npt.NDArray
28
+ hub_arc_len:float
28
29
 
29
30
  def __init__(self,xhub:List[float],rhub:List[float],
30
31
  xshroud:List[float],rshroud:List[float],
@@ -41,12 +42,15 @@ class Passage:
41
42
  assert len(xhub) == len(xshroud), "xHub and xShroud should be the same length"
42
43
  assert len(rhub) == len(rshroud), "rHub and rShroud should be the same length"
43
44
 
45
+ hub_arc_len = xr_to_mprime(np.vstack([xhub,rhub]).transpose())[1]
46
+ self.hub_arc_len = hub_arc_len[-1]
47
+
48
+ self.xhub = PchipInterpolator(hub_arc_len/hub_arc_len[-1],xhub) # Get the xhub,rhub in terms of the hub arc len
49
+ self.rhub = PchipInterpolator(hub_arc_len/hub_arc_len[-1],rhub)
50
+ self.xshroud = PchipInterpolator(hub_arc_len/hub_arc_len[-1],xshroud)
51
+ self.rshroud = PchipInterpolator(hub_arc_len/hub_arc_len[-1],rshroud)
52
+
44
53
  self.n = len(xhub)
45
- t_streamline = np.linspace(0,1,len(xhub))
46
- self.xhub = interp1d(t_streamline,xhub)
47
- self.rhub = interp1d(t_streamline,rhub)
48
- self.xshroud = interp1d(t_streamline,xshroud)
49
- self.rshroud = interp1d(t_streamline,rshroud)
50
54
 
51
55
  self.xhub_pts = convert_to_ndarray(xhub)
52
56
  self.rhub_pts = convert_to_ndarray(rhub)
@@ -148,7 +152,7 @@ class Passage:
148
152
  (Tuple) containing:
149
153
 
150
154
  cut (line2D): line from hub to shroud
151
- t_hub (float): t corresponding to xhub location
155
+ t_hub (float): Percentage along hub arc length
152
156
  t_shroud (float): t corresponding to intersection of bisector of hub
153
157
 
154
158
  """
@@ -195,6 +199,7 @@ class Passage:
195
199
  np.NDArray: _description_
196
200
  """
197
201
  t_hub = np.linspace(axial_location[0],axial_location[1],100)
202
+ t_hub = convert_to_ndarray(t_hub)*self.hub_length
198
203
 
199
204
  shroud_pts_cyl = np.vstack([self.xshroud(t_hub),self.rshroud(t_hub)]).transpose()
200
205
  hub_pts_cyl = np.vstack([self.xhub(t_hub),self.rhub(t_hub)]).transpose()
@@ -195,7 +195,7 @@ def compute_quantities(row:BladeRow,upstream:BladeRow):
195
195
  else:
196
196
  row.P0 = upstream.P0
197
197
  row.T0 = upstream.T0 - T0_coolant_weighted_average(row)
198
- 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)
199
199
  row.P = row.P0 * (row.T/row.T0)**((row.gamma)/(row.gamma-1))
200
200
  row.T0R = row.T + row.W**2 / (2*row.Cp)
201
201
  row.P0R = row.P*(row.T0R/row.T)**((row.gamma)/(row.gamma-1))