コード例 #1
0
def solve_geometry(RHT, one, two, thr, mdot, R, gamma, cp):

    # def f_geometry(geometry, one, two, thr, mdot, R, gamma, cp):


    # blade geometry at 2
    f.blade_geometry(mdot, two.rho, two.vel.Vx, RHT, two)

    # rotational velocity
    two.vel.Omega = two.vel.U/two.geo.Rm
    two.vel.RPM = f.RPM(two.vel.Omega)

    # massflow and characteristics at inlet
    one.rho0 = f.static_density(one.P0, one.T0, R)                                  # = one.P0/one.T0/R
    one.rho, one.vel.V, one.geo.A = solve_rhox(0.9999*one.rho0, one.rho0, one.T0, mdot,  two.geo.A, gamma, cp)  # iteraciones hasta converger
    one.vel.Vx = one.vel.V
    one.T = one.T0 - one.vel.V**2/2/cp
    one.P = f.T2P(one.P0, one.T, one.T0, gamma)                     # = one.P0*(one.T/one.T0)**(gamma/(gamma-1)) # isentropic
    one.vel.a, one.vel.M = f.sonic(gamma, R, one.T, one.vel.V)

    # blade geometry at 1
    f.blade_geometry(mdot, one.rho, one.vel.V, RHT, one)

    # blade geometry at 3
    # what
    thr.geo.A = mdot/thr.vel.Vx/thr.rho
    thr.geo.h = thr.geo.A/np.pi/2/two.geo.Rm
    thr.geo.Rt = two.geo.Rm+thr.geo.h/2
    thr.geo.Dm = thr.geo.Rt*2 - thr.geo.h
    thr.geo.Rm = thr.geo.Dm/2

    thr.vel.Omega = thr.vel.U/thr.geo.Rm
    thr.vel.RPM = f.RPM(thr.vel.Omega)
コード例 #2
0
ファイル: main.py プロジェクト: alosola/tfg
# compute total condtions
# thr.T0, thr.P0 = f.relative_temperature_pressure(thr.T, thr.P, thr.vel.M, gamma)
# thr.T0 = thr.T*(1+(gamma-1)/2*thr.vel.M**2)
# thr.P0 = thr.P*(1+(gamma-1)/2*thr.vel.M**2)**(gamma/(gamma-1))

thr.T0, thr.P0 = f.total_conditions(thr.T, thr.vel.V, thr.P, cp, gamma)

DeltaH_T2 = cp*(one.T0-thr.T0)






# blade geometry at 2
two.geo.Rt, two.geo.Rh, two.geo.h, two.geo.Rm, two.geo.Dm, A2 = f.blade_geometry(mdot, two.rho, two.vel.Vx, RHT)

# rotational velocity
two.vel.Omega = two.vel.U/two.geo.Rm
two.vel.RPM = f.RPM(two.vel.Omega)

# massflow and characteristics at inlet
one.rho0 = f.static_density(one.P0, one.T0, R)                                  # = one.P0/one.T0/R
one.rho = solve_rhox(0.9999*one.rho0, one.rho0, one.T0, mdot, A2, gamma, cp)  # iteraciones hasta converger
one.vel.V = np.sqrt(2*cp*one.T0*(1-(one.rho/one.rho0)**(gamma-1)))
one.T = one.T0 - one.vel.V**2/2/cp
one.P = f.T2P(one.P0, one.T, one.T0, gamma)                     # = one.P0*(one.T/one.T0)**(gamma/(gamma-1)) # isentropic
one.vel.a, one.vel.M = f.sonic(gamma, R, one.T, one.vel.V)
one.geo.A = mdot/one.rho/one.vel.V

# blade geometry at 1
コード例 #3
0
V3u_euler = -DeltaH_prod / U2 + V2u

# assume axial speed constant
V3x = W3x
V3 = np.sqrt(V3x**2 + V3u**2)
alpha3 = np.arctan(V3u / V3x)
Mach3c = V3 / a3
DeltaH_T1 = U3 * (V2u - V3u)  # euler formulation

# compute total condtions
T03 = T3 * (1 + (gamma - 1) / 2 * Mach3**2)
P03 = P3 * (1 + (gamma - 1) / 2 * Mach3**2)**(gamma / (gamma - 1))
DeltaH_T2 = cp * (T01 - T03)

# blade geometry at 2
R2tip, R2hub, h2, R2mean, D2mean, A2 = blade_geometry(mdot, rho2, V2x, RHT)

# rotational velocity
Omega2 = U2 / R2mean
RPM = 60 * Omega2 / 2 / np.pi

# massflow and characteristics at inlet
rho01 = P01 / T01 / R
rho1 = rhox_converge(0.9999 * rho01, rho01, T01, mdot, A2, gamma,
                     cp)  # iteraciones hasta converger
V1 = np.sqrt(2 * cp * T01 * (1 - (rho1 / rho01)**(gamma - 1)))
T1 = T01 - V1**2 / 2 / cp
P1 = P01 * (T1 / T01)**(gamma / (gamma - 1))  # isentropic
a1 = np.sqrt(T1 * gamma * R)
Mach1 = V1 / a1
A1 = mdot / rho1 / V1