turbo-design 1.3.0__tar.gz → 1.3.1__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.3.0 → turbo_design-1.3.1}/PKG-INFO +2 -3
  2. {turbo_design-1.3.0 → turbo_design-1.3.1}/pyproject.toml +1 -1
  3. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/radeq.py +3 -3
  4. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/turbinespool.py +3 -1
  5. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/__init__.py +0 -0
  6. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/arrayfuncs.py +0 -0
  7. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/bladerow.py +0 -0
  8. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/cantera_gas/co2.yaml +0 -0
  9. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/compressorspool.py +0 -0
  10. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/coolant.py +0 -0
  11. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/enums.py +0 -0
  12. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/inlet.py +0 -0
  13. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/isentropic.py +0 -0
  14. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/__init__.py +0 -0
  15. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/compressor/__init__.py +0 -0
  16. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/losstype.py +0 -0
  17. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/TD2.py +0 -0
  18. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/__init__.py +0 -0
  19. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/ainleymathieson.py +0 -0
  20. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/craigcox.py +0 -0
  21. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/fixedefficiency.py +0 -0
  22. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/fixedpressureloss.py +0 -0
  23. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/kackerokapuu.py +0 -0
  24. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/loss/turbine/traupel.py +0 -0
  25. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/lossinterp.py +0 -0
  26. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/outlet.py +0 -0
  27. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/passage.py +0 -0
  28. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/rotor.py +0 -0
  29. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/solve_radeq.py +0 -0
  30. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/spool.py +0 -0
  31. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/stage.py +0 -0
  32. {turbo_design-1.3.0 → turbo_design-1.3.1}/turbodesign/td_math.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.3.0
3
+ Version: 1.3.1
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.3.0"
3
+ version = "1.3.1"
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 = [
@@ -102,13 +102,13 @@ def radeq(row:BladeRow,upstream:BladeRow,downstream:BladeRow=None) -> BladeRow:
102
102
  if (C>1) & ((gamma/(gamma-1))<2):
103
103
  raise Exception("Invalid value of C {C}, change reduce alpha or Vm")
104
104
  B = (1-C)**(gamma/(gamma-1))
105
- A = P0 * gamma/(gamma-1) * (1-C)**(1/(gamma-1))
105
+ A = P0 * gamma/(gamma-1) * (1-C)**(1/(gamma-1)) * (1+np.tan(alpha)**2)/(2*Cp)
106
106
 
107
107
  epsilon = 1e-10 # or another small threshold
108
108
  if abs(rm) > epsilon:
109
- dVm_dr = Cp*T0/(Vm*A*(1+np.tan(alpha)**2)) * (rho*(Vt**2/r + Vm**2/rm * np.cos(phi) - Vr*dVm_dm) - B*dP0_dr) + Vm/(2*T0) *dT0_dr # Eqn 6
109
+ dVm_dr = Vm/(2*T0**2) * dT0_dr - rho/(2*A*Vm) * (Vt**2/r + Vm/rm*np.cos(phi)-Vr*dVm_dm) + B/(2*A*Vm) * dP0_dr # Eqn 21
110
110
  else:
111
- dVm_dr = Cp*T0/(Vm*A*(1+np.tan(alpha)**2)) * (rho*(Vt**2/r - Vr*dVm_dm) - B*dP0_dr) + Vm/(2*T0) *dT0_dr # Eqn 6
111
+ dVm_dr = Vm/(2*T0**2) * dT0_dr - rho/(2*A*Vm) * (Vt**2/r) + B/(2*A*Vm) * dP0_dr # Eqn 21, modified
112
112
 
113
113
  ydot = np.array([dP0_dr,dT0_dr,dVm_dr])
114
114
 
@@ -278,7 +278,7 @@ class TurbineSpool(Spool):
278
278
 
279
279
  print(f"Looping to converge massflow")
280
280
  past_err = -100; loop_iter = 0; err = 0.001
281
- while np.abs((err-past_err)/err)>0.05:
281
+ while (np.abs((err-past_err)/err)>0.05) and loop_iter<10:
282
282
  if len(outlet_P) == 1:
283
283
  # x = balance_massflows(0.658,self.blade_rows[:-1],self.blade_rows[0].P0,self.blade_rows[-1].P)
284
284
  res = minimize_scalar(fun=balance_massflows,args=(self.blade_rows,self.blade_rows[0].P0,self.blade_rows[-1].P),bounds=outlet_P[0],tol=0.001,options={'disp': True},method='bounded')
@@ -302,7 +302,9 @@ class TurbineSpool(Spool):
302
302
  self.blade_rows[-1].transfer_quantities(self.blade_rows[-2])
303
303
  self.blade_rows[-1].P = self.blade_rows[-1].get_static_pressure(self.blade_rows[-1].percent_hub_shroud)
304
304
 
305
+ past_err = err
305
306
  err = self.__massflow_std__(self.blade_rows)
307
+ loop_iter += 1
306
308
  print(f"Loop {loop_iter} massflow convergenced error:{err}")
307
309
 
308
310
  # calculate Reynolds number