Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meanline #6

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
150 changes: 150 additions & 0 deletions src/turborocket/meanline/lossmodels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
"""

This file contains a series of loss-model utilities functions for mean-line design of turbines

Each Loss model is encapsulated into an object with a series of functions calculating loss contributions.

Loss-Models currently implemented:

- craigcox: Loss Model by Craig and Cox
- kackerOkapuu: Loss Model by Kacker and Okapuu (1982)
- Aungier: Loss Modely by Aungier

"""

import numpy as np

class Aungier:
"""

The Aungier Loss Model

Variables:
Y_p: Profile Loss parameters
K_mod: Experience factor (derived from the kackerOkapuu method)
K_inc: Off-design incidence factor
K_m: Mach Number Factor
K_p: Compressibility Factor
K_RE: Reynolds Number Factor

Y_p1: Profile Loss coefficient for nozzle blades (beta_1 = 0)
Y_p2: Profile Loss coefficent for rotor blades (beta_1 = alpha_2)

Y_s: Secondary Flow Losses for low aspect ratio

"""

def __init__():
# Intialising core parameters of the loss model
return

def Y(self):
"""
Total Pressure Loss Coefficient (Y)

This function solves for the profile loss coefficient of the turbine stage, characterising the increase in total pressure of the turbine exit stage

Y = (P_t1 - P_t2) / (P_t2 - P_2)

Variables:
Y_p: The Profile Loss Coefficient
Y_s: The Secondary Flow loss coefficient
Y_tcl: The blade clearnace loss coefficient
Y_te: The trailing edge loss coefficient
Y_ex: The supersonic expansion loss coefficient
Y_sh: The shock loss coefficient
T_lw: The lashing wire loss coefficient (rotors)
"""

return Y_p + Y_s + Y_tcl + T_te + Y_ex + Y_sh + Y_lw

def delta_h_par(self):
"""
Parasitic Losses (delta_h_par)

The parasitic losses accounts for waster work due to losses in disk friction, shear forces and partial admission.

These are reflected in an increase in total enthalph of the discharge flow
relative to the value produced when the flow passes through the blade row.

In contrast to the pressure loss coefficient, these losses do not affect total pressure, but do influence stage efficiency.

Variables:
delta_h_adm: Partial admission losses (rotors)
delta_h_df: Disk friction work (diaphragm-disk rotors)
delta_h_seal: Leakage bypass loss (shourded rotors and rotor balance holes)
delta_h_gap: Clearnace gap windage loss (shrouded blades and nozzles of diaphragm-disk rotors)
delta_h_q: moisture work loss (rotors)
"""

return delta_h_adm + delta_h_df + delta_h_seal + delta_h_gap + delta_h_q

def yp(self):
"""
The Profile Loss Coefficient (Y_p)

This pressure loss coefficient characterises the profile losses of the turbine stage

Variables:
K_mod: kackerOkapuu Experience factor
K_inc: Correction for off-design incidence effects
K_m: Correction for Mach Number effects
K_p: correction for Compressibility effects
K_re: correction for Reynolds Number effects
Y_p1: profile loss coefficient for nozzle blades (beta_1 = 90)
Y_p2: profile loss coefficients for impulse blades (alpha_2 = beta_1)

Returns:
_type_: _description_
"""

prt = (y_p1 + ((beta_1/alpha_2)**2 ) * (y_p2 - y_p1))*((5*t/c)**(beta_1/alpha_2)) - delta_y_te

y_p = k_mod * k_inc * k_m * k_p * k_re * prt;

return y_p

def F_ar(self):

if h_c < 2:
f_ar = 0.5 * (2*c/h)**(0.7)
else:
f_ar = (c/h)

return f_ar

def Y_s(self):
y_bar_s = 0.0334 * F_ar * (C_l / (s_c))**2 * (np.cos(alpha_2)/np.cos(beta_1))*(np.cos(alpha_2)**2/np.cos(alpha_m)***3)

y_s = k_s*k_re*(y_bar_s**2 / (1 + 7.5*y_bar_s))**(1/2)

return y_s

def Y_sh(self):

y_bar_sh = 0.8*x_1**2 + x_2**2

y_sh = (y_bar_sh**2 / (1 + y_bar_sh**2))**(1/2)

return y_sh

def Y_ex(self):

y_ex = ((M2 - 1)/M2)**2;

return y_ex

def Y_te(self):

y_te = ((t_2/s) * np.sin(beta_g) - t_2)**2

return y_te

def Y_tcl(self):

if TIP_TYPE = "shrouded":
B = 0.37
else:
B = 0.47

Y_tcl = B*(c/h)*(t_cl / c)**(0.78) * (C_l/(s/c))**2 * (np.cos(alpha_2)**2 /np.cos(alpha_m)**3)
127 changes: 127 additions & 0 deletions src/turborocket/profiling/Supersonic/circular.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
"""
Circular.py

This source file encapsulates all the functions required for sizing the circular sections of the tubrine blade, following the free vortex assumption.

The following equations follows the method for supersonic turbine design presented in NASA TN D-4421.

Free vortex flow is assumed for the blade flow.

# noqa: E501
"""

import numpy as np


def M_star(gamma, M):
"""
Critical Velocity Ratio

This function computes the critical velocity ratio of the flow as a function of Mach number and specific heat ratio.

Variables:
gamma: Specific Heat Ratio
M: Mach Number

# noqa: E501
"""

crit_vel_rat = (
(((gamma + 1) / 2) * M**2) / (1 + ((gamma - 1) / 2) * M**2)
) ** (1 / 2)

return crit_vel_rat


def prandtl_meyer(gamma, crit_vel_rat):
"""
Prandtl Meyer Angle (v)

This function computes the Prandtl-Meyer angle v based on the mach number of a flow.

# noqa: E501
"""

v = np.pi / 4 * (((gamma + 1) / (gamma - 1)) ** (1 / 2) - 1) + (1 / 2) * (
(((gamma + 1) / (gamma - 1)) ** (1 / 2))
* np.arcsin((gamma - 1) * crit_vel_rat**2 - gamma)
+ np.arcsin((gamma + 1) / crit_vel_rat**2 - gamma)
)

return v


def arc_angles_upper(beta_o, beta_i, v_i, v_o, v_u):
"""
Upper Circular Arc Angles Alpha

This function computes the circular arc angles based on the inlet and outlet angles,
coupled with their prantl-meyer angles

Variables:
alpha_l_i: Lower Arc Inlet Angle
alpha_l_o: Lower Arc Outlet Angle
alpha_u_i: Upper Arc Inlet Angle
alpha_u_o: Upper Arc Outlet Angle
beta_i: Inlet relative flow angle
beta_o: Exit relative

# noqa: E501
"""

alpha_u_i = beta_i - (v_u - v_i)

alpha_u_o = beta_o + (v_u - v_o)

return [alpha_u_i, alpha_u_o]


def arc_angles_lower(beta_o, beta_i, v_i, v_o, v_l):
"""
Lower Circular Arc Angles Alpha

This function computes the arc angles based on the inlet and outlet angles, coupled with their prantl-meyer angles

Variables:
alpha_l_i: Lower Arc Inlet Angle
alpha_l_o: Lower Arc Outlet Angle
alpha_u_i: Upper Arc Inlet Angle
alpha_u_o: Upper Arc Outlet Angle
beta_i: Inlet relative flow angle
beta_o: Exit relative

# noqa: E501
"""

alpha_l_i = beta_i - (v_i - v_l)

alpha_l_o = beta_o + (v_o - v_l)

return [alpha_l_i, alpha_l_o]


def beta_o(M_i, M_o, gamma, beta_i):
""" """

exit_o = -np.arccos(
(
(M_i / M_o)
* ((1 + (gamma - 1) / 2 * M_o**2) / (1 + (gamma - 1) / 2 * M_i**2))
** ((gamma + 1) / (2 * (gamma - 1)))
)
* np.cos(beta_i)
)

return exit_o


def A_rat(beta_i, beta_o):
"""
The Area Ratio (A_i / A_o)

This equation computes the area ratio of the supersonic turbine blade, assuming that the spacings are equal on the inlet and exit sides of the turbine (Axial turbine)

# noqa: E501
"""

return np.cos(beta_i) / np.cos(beta_o)
Loading
Loading