turbo-design 1.3.2__tar.gz → 1.3.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.
- {turbo_design-1.3.2 → turbo_design-1.3.4}/PKG-INFO +2 -3
- {turbo_design-1.3.2 → turbo_design-1.3.4}/pyproject.toml +1 -1
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/bladerow.py +1 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/radeq.py +14 -11
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/spool.py +1 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/td_math.py +2 -1
- turbo_design-1.3.2/turbodesign/.DS_Store +0 -0
- turbo_design-1.3.2/turbodesign/loss/.DS_Store +0 -0
- turbo_design-1.3.2/turbodesign/loss/__pycache__/__init__.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/__pycache__/__init__.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/__pycache__/losstype.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/__pycache__/losstype.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/TD2.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/TD2.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/__init__.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/__init__.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/ainleymathieson.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/ainleymathieson.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/craigcox.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/craigcox.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/fixedefficiency.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/fixedefficiency.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/fixedpressureloss.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/fixedpressureloss.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/kackerokapuu.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/kackerokapuu.cpython-312.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/traupel.cpython-310.pyc +0 -0
- turbo_design-1.3.2/turbodesign/loss/turbine/__pycache__/traupel.cpython-312.pyc +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/__init__.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/arrayfuncs.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/cantera_gas/co2.yaml +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/compressorspool.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/coolant.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/enums.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/inlet.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/isentropic.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/__init__.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/compressor/__init__.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/losstype.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/TD2.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/__init__.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/ainleymathieson.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/craigcox.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/fixedefficiency.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/fixedpressureloss.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/kackerokapuu.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/loss/turbine/traupel.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/lossinterp.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/outlet.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/passage.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/rotor.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/solve_radeq.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/stage.py +0 -0
- {turbo_design-1.3.2 → turbo_design-1.3.4}/turbodesign/turbinespool.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: turbo-design
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.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,12 +1,12 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
from scipy.interpolate import interp1d,PchipInterpolator
|
|
2
3
|
from scipy.integrate import solve_ivp
|
|
3
4
|
import numpy as np
|
|
4
|
-
import numdifftools as nd
|
|
5
5
|
from .bladerow import BladeRow
|
|
6
6
|
from .enums import RowType
|
|
7
7
|
import math
|
|
8
8
|
|
|
9
|
-
def radeq(row:BladeRow,upstream:BladeRow,downstream:BladeRow=None) -> BladeRow:
|
|
9
|
+
def radeq(row:BladeRow,upstream:BladeRow,downstream:Optional[BladeRow]=None) -> BladeRow:
|
|
10
10
|
"""Solves the radial equilibrium equation for axial machines and returns the convergence.
|
|
11
11
|
|
|
12
12
|
Note:
|
|
@@ -81,8 +81,8 @@ def radeq(row:BladeRow,upstream:BladeRow,downstream:BladeRow=None) -> BladeRow:
|
|
|
81
81
|
else:
|
|
82
82
|
func_Vm_m = PchipInterpolator([up_m, row_m],[up_Vm, Vm])
|
|
83
83
|
else:
|
|
84
|
-
func_Vm_m = PchipInterpolator([up_m, row_m],[up_Vm, Vm])
|
|
85
|
-
dVm_dm = func_Vm_m.derivative()(row_m)
|
|
84
|
+
func_Vm_m = PchipInterpolator([up_m, row_m],[up_Vm, Vm]) # type: ignore
|
|
85
|
+
dVm_dm = func_Vm_m.derivative()(row_m) # type: ignore
|
|
86
86
|
|
|
87
87
|
# Upstream
|
|
88
88
|
dT_dr = float(interp1d(row_radius, np.gradient(row.T,row_radius))(r))
|
|
@@ -94,12 +94,12 @@ def radeq(row:BladeRow,upstream:BladeRow,downstream:BladeRow=None) -> BladeRow:
|
|
|
94
94
|
# dP0_dr = float(interp1d(row.percent_hub_shroud, np.gradient(row.P0,row_radius))((r-row_radius[0])/(row_radius[-1]-row_radius[0])))
|
|
95
95
|
|
|
96
96
|
C = (1 + np.tan(alpha)**2) * Vm**2/(2*Cp*T0)
|
|
97
|
-
if (C>1)
|
|
98
|
-
raise Exception("Invalid value of C {C}
|
|
97
|
+
if (C>1):
|
|
98
|
+
raise Exception(f"Invalid value of C {C:0.2f} which causes Vm to be nan.\nChange reduce alpha/beta for {row.row_type} {row.id}")
|
|
99
99
|
B = (1-C)**(gamma/(gamma-1))
|
|
100
100
|
A = -P0 * gamma/(gamma-1) * (1-C)**(1/(gamma-1)) * (1 + np.tan(alpha)**2)/(2*Cp)
|
|
101
101
|
|
|
102
|
-
eqn15_rhs = Vt**2/r - Vm**2/rm*np.
|
|
102
|
+
eqn15_rhs = Vt**2/r - Vm**2/rm*np.cos(phi) - Vr*dVm_dm # right hand side of equation 15
|
|
103
103
|
eqn15_rhs_simple = Vt**2/r # right hand side of equation 15 simplified for axial machines
|
|
104
104
|
|
|
105
105
|
epsilon = 1e-10 # or another small threshold
|
|
@@ -107,7 +107,6 @@ def radeq(row:BladeRow,upstream:BladeRow,downstream:BladeRow=None) -> BladeRow:
|
|
|
107
107
|
dVm_dr = T0/(2*Vm*A) * (rho*eqn15_rhs - B*dP0_dr) + Vm/(2*T0) * dT0_dr # Eqn 21
|
|
108
108
|
else:
|
|
109
109
|
dVm_dr = T0/(2*Vm*A) * (rho*eqn15_rhs_simple - B*dP0_dr) + Vm/(2*T0) * dT0_dr # Eqn 21, simple
|
|
110
|
-
|
|
111
110
|
ydot = np.array([dP0_dr,dT0_dr,dVm_dr])
|
|
112
111
|
|
|
113
112
|
return ydot
|
|
@@ -133,18 +132,22 @@ def radeq(row:BladeRow,upstream:BladeRow,downstream:BladeRow=None) -> BladeRow:
|
|
|
133
132
|
# P0_new = interp1d(hub_to_tip,res[:,0])(row_radius)
|
|
134
133
|
# T0_new = interp1d(hub_to_tip,res[:,1])(row_radius)
|
|
135
134
|
# Vm_new = interp1d(hub_to_tip,res[:,2])(row_radius)
|
|
136
|
-
|
|
135
|
+
r_eval = row.r - mean_radius
|
|
137
136
|
# mean_radius_to_tip = np.linspace(0,tip_radius-mean_radius,len(row_radius)*5)
|
|
138
|
-
res1 = solve_ivp(ode_radeq_streamtube, t_span =[0, tip_radius-mean_radius], y0 = ics
|
|
137
|
+
res1 = solve_ivp(ode_radeq_streamtube, t_span =[0, tip_radius-mean_radius], y0 = ics,
|
|
138
|
+
t_eval=np.linspace(0,tip_radius-mean_radius,len(row_radius)*2))
|
|
139
139
|
|
|
140
140
|
# mean_radius_to_hub = np.linspace(0,hub_radius-mean_radius,len(row_radius)*5)
|
|
141
|
-
res2 = solve_ivp(ode_radeq_streamtube, t_span = [hub_radius-mean_radius
|
|
141
|
+
res2 = solve_ivp(ode_radeq_streamtube, t_span = [0,hub_radius-mean_radius], y0 = ics,
|
|
142
|
+
t_eval=np.linspace(0,hub_radius-mean_radius,len(row_radius)*2))
|
|
142
143
|
|
|
143
144
|
mid_to_tip_vals = res1.y.transpose()
|
|
144
145
|
mid_to_tip_r = res1.t + mean_radius
|
|
145
146
|
mid_to_hub_vals = res2.y.transpose()
|
|
146
147
|
mid_to_hub_r = res2.t + mean_radius
|
|
147
148
|
mid_to_hub_vals = np.flipud(mid_to_hub_vals)
|
|
149
|
+
mid_to_hub_r = np.flipud(mid_to_hub_r)
|
|
150
|
+
|
|
148
151
|
hub_to_tip_vals = np.concatenate([mid_to_hub_vals[:-1,:],mid_to_tip_vals])
|
|
149
152
|
|
|
150
153
|
r = np.concatenate([mid_to_hub_r[:-1], mid_to_tip_r])
|
|
@@ -69,6 +69,7 @@ class Spool:
|
|
|
69
69
|
1. Conventional: Stator-Rotor-Stator-Rotor-etc. Set the RPM equally across all
|
|
70
70
|
2. Counter Rotation: We either use the RPM already persecribed for each blade row.
|
|
71
71
|
'''
|
|
72
|
+
self.blade_rows[i].id = i
|
|
72
73
|
if (type(self.blade_rows[i]) != Inlet) and (type(self.blade_rows[i]) != Outlet):
|
|
73
74
|
self.blade_rows[i].rpm = rpm
|
|
74
75
|
self.blade_rows[i].axial_chord = self.blade_rows[i].location * self.passage.hub_length
|
|
@@ -132,7 +132,8 @@ def compute_power(row:BladeRow,upstream:BladeRow) -> None:
|
|
|
132
132
|
a = np.sqrt(row.gamma*row.R*row.T_is)
|
|
133
133
|
row.T0_is = row.T_is * (1+(row.gamma-1)/2*(row.V/a)**2)
|
|
134
134
|
|
|
135
|
-
row.power = row.massflow[-1] * row.Cp * (upstream.T0
|
|
135
|
+
row.power = row.massflow[-1] * (row.Cp * (upstream.T0 - row.T0)).mean()
|
|
136
|
+
# row.power = sum(v * w for v, w in zip(row.power[1:], np.diff(row.massflow))) # Massflow weighted average
|
|
136
137
|
row.eta_static = row.power/ (row.massflow[-1]*row.Cp*(upstream.T0.mean()-row.T_is.mean()))
|
|
137
138
|
row.eta_total = (upstream.T0.mean() - row.T0.mean()) / (upstream.T0.mean() - row.T0_is.mean())
|
|
138
139
|
row.stage_loading = row.Cp*(upstream.T0.mean() - row.T0.mean())/row.U.mean()**2
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|