コード例 #1
0
## print data to tables
data1 = {'Variable':  ['T01', 'P01', 'V1', 'T1', 'P1', 'rho1', 'A1', 'Mach1', 'alpha1', 'mdot', 'R1tip', 'R1hub', 'h1', 'mdot'],
        'Value':     [T01, P01, V1, T1, P1, rho1, A1, Mach1, np.degrees(alpha1), mdot, R1tip, R1hub, h1, mdot],
        'Unit':      ['K', 'Pa', 'm/s', 'K', 'Pa', 'kg/m^3', 'm^2', '-', 'deg', 'kg/s', 'm', 'm', 'm', 'kg/s']}
df1 = pd.DataFrame (data1, columns = ['Variable','Value','Unit'])
print (df1)

data2 = {'Variable': ['T02', 'P02', 'V2', 'T2','P2','rho2','T2is','M2','Alpha2','V2x','V2u','W2','T02r','P02r','Beta2','W2x','W2u','Mw2','v2is','U2','Total pressure loss (stator)','A2','rh2','rt2','rm2','h2','omega'],
          'Value':    [T02, P02, V2, T2, P2,rho2,T2s,Mach2,np.degrees(alpha2),V2x,V2u,W2,T02r,P02r,np.degrees(beta2),W2x,W2u,Mach2r,V2s,U2,tpl_stator,A2,R2hub,R2tip,R2mean,h2,Omega2]}
# data2 = {'Variable': ['T02', 'P02', 'V2', 'T2','P2','rho2','T2is','M2','Alpha2','V2x','V2u','W2','T02r','P02r','Beta2','W2x','W2u','Mw2','v2is','U2','Total pressure loss (rotor?)','A2','rh2','rt2','rm2','h2','omega','H01','epsp','kinetic loss stator','optimim pitch/chord sorderberg','chord','h/c','Re dh','dh','Re c','nblades'
# ],
#          'Value':    [T02, P02, V2, T2, P2,rho2,T2s,Mach2,np.degrees(alpha2),V2x,V2u,W2,T02r,P02r,np.degrees(beta2),W2x,W2u,Mach2r,V2s,U2,tpl_rotor,A2,R2hub,R2tip,R2mean,h2,Omega2,'--','---',kinetic loss stator,optimim pitch/chord sorderberg,chord,h/c,Re dh,dh,Re c,nblades]}
df2 = pd.DataFrame (data2, columns = ['Variable','Value'])
print (df2)

data3 = {'Variable': ['M3 impose','P3 impose','T03','P03','V3','T3','P3','rho3','T3is','T3iss','M3 achieve','P3 achieve','Alpha3','V3x','V3u','W3','T03r','P03r','Beta3','W3x','W3u','Mw3','U3','Total pressure loss (rotor)','A3','rh3','rt3','rm3'],
          'Value':     [Mach3,P3,T03,P03,V3,T3,P3,rho3,T3s,'---',Mach3c,'---',np.degrees(alpha3),V3x,V3u,W3,T03r,P03r,np.degrees(beta3),W3x,W3u,Mach3r,U3,tpl_rotor,A3,R2hub,R3tip,R3mean]}
df3 = pd.DataFrame (data3, columns = ['Variable','Value'])
print (df3)


graphs.velocity_triangle(V2u, V2x, V3u, V3x, W2u, W2x, W3u, W3x)


# plt.plot([1, 2, 3], [P01, P02, P3], 'k--')
# plt.title("P0")


# plt.plot([1, 2, 3], [T01, T02b, P3], 'k--')
# plt.title("T0")
コード例 #2
0
ファイル: main.py プロジェクト: alosola/tfg
#         'Unit':      ['K', 'Pa', 'm/s', 'K', 'Pa', 'kg/m^3', 'm^2', '-', 'deg', 'kg/s', 'm', 'm', 'm', 'kg/s']}
# df1 = pd.DataFrame (datone.vel.a, columns = ['Variable','Value','Unit'])
# print (df1)

# dattwo.vel.a = {'Variable': ['two.T0', 'two.P0', 'two.vel.V', 'two.T','two.P','two.rho','two.Tis','M2','two.alpha','two.vel.Vx','two.vel.Vu','two.vel.W','two.T0r','two.P0r','Bettwo.vel.a','two.vel.Wx','two.vel.Wu','Mw2','v2is','two.vel.U','Total pressure loss (stator)','A2','rtwo.geo.h','rt2','rm2','two.geo.h','omega'],
#           'Value':    [two.T0, two.P0, two.vel.V, two.T, two.P,two.rho,two.Ts,two.vel.M,np.degrees(two.alpha),two.vel.Vx,two.vel.Vu,two.vel.W,two.T0r,two.P0r,np.degrees(two.beta),two.vel.Wx,two.vel.Wu,two.vel.Mr,two.vel.Vs,two.vel.U,tpl_stator,A2,two.geo.Rh,two.geo.Rt,two.geo.Rm,two.geo.h,two.vel.Omega]}
# # dattwo.vel.a = {'Variable': ['two.T0', 'two.P0', 'two.vel.V', 'two.T','two.P','two.rho','two.Tis','M2','two.alpha','two.vel.Vx','two.vel.Vu','two.vel.W','two.T0r','two.P0r','Bettwo.vel.a','two.vel.Wx','two.vel.Wu','Mw2','v2is','two.vel.U','Total pressure loss (rotor?)','A2','rtwo.geo.h','rt2','rm2','two.geo.h','omega','one.H0','epsp','kinetic loss stator','optimim pitch/chord sorderberg','chord','h/c','Re dh','dh','Re c','nblades'
# # ],
# #          'Value':    [two.T0, two.P0, two.vel.V, two.T, two.P,two.rho,two.Ts,two.vel.M,np.degrees(two.alpha),two.vel.Vx,two.vel.Vu,two.vel.W,two.T0r,two.P0r,np.degrees(two.beta),two.vel.Wx,two.vel.Wu,two.vel.Mr,two.vel.Vs,two.vel.U,tpl_rotor,A2,two.geo.Rh,two.geo.Rt,two.geo.Rm,two.geo.h,two.vel.Omega,'--','---',kinetic loss stator,optimim pitch/chord sorderberg,chord,h/c,Re dh,dh,Re c,nblades]}
# df2 = pd.DataFrame (dattwo.vel.a, columns = ['Variable','Value'])
# print (df2)

# datthr.vel.a = {'Variable': ['M3 impose','thr.P impose','thr.T0','thr.P0','thr.vel.V','thr.T','thr.P','thr.rho','thr.Tis','thr.Tiss','M3 achieve','thr.P achieve','Alphthr.vel.a','thr.vel.Vx','thr.vel.Vu','thr.vel.W','thr.T0r','thr.P0r','thr.beta','thr.vel.Wx','thr.vel.Wu','Mw3','thr.vel.U','Total pressure loss (rotor)','thr.geo.A','rthr.geo.h','rt3','rm3'],
#           'Value':     [thr.vel.M,thr.P,thr.T0,thr.P0,thr.vel.V,thr.T,thr.P,thr.rho,thr.Ts,'---',thr.vel.Mc,'---',np.degrees(thr.alpha),thr.vel.Vx,thr.vel.Vu,thr.vel.W,thr.T0r,thr.P0r,np.degrees(thr.beta),thr.vel.Wx,thr.vel.Wu,thr.vel.Mr,thr.vel.U,tpl_rotor,thr.geo.A,two.geo.Rh,thr.geo.Rt,thr.geo.Rm]}
# df3 = pd.DataFrame (datthr.vel.a, columns = ['Variable','Value'])
# print (df3)

# ORIGINAL GRAPH FROM JS STUDY
# graphs.velocity_triangle(753.18, 197.59, -71.35, 254.09 ,279.64, 197.6, -544.89, 254.09)


graphs.velocity_triangle(two.vel.Vu, two.vel.Vx, thr.vel.Vu, thr.vel.Vx, two.vel.Wu, two.vel.Wx, thr.vel.Wu, thr.vel.Wx)


# plt.plot([1, 2, 3], [one.P0, two.P0, thr.P], 'k--')
# plt.title("P0")


# plt.plot([1, 2, 3], [one.T0, two.T0b, thr.P], 'k--')
# plt.title("T0")
コード例 #3
0
stg = np.radians(60)
opt_pitch_chord = 0.6 * np.cos(stg) / 2 / np.cos(two.alpha)**2 / (
    one.vel.V / two.vel.Vx * np.tan(one.alpha) +
    np.tan(two.alpha)) * (one.geo.h / two.geo.h) * one.P0 / two.P0

# calculate pressure loss coefficient YP = tpl using Kacker-Okapuu
# rotor.tplKC = kackerokapuu(component, S, alpha2, alpha3, t, c, bx, h, two.vel.M, thr.vel.M, two.P, thr.P, gamma, RHT, Rec, t_o)

# PLOT TABLE OF RESULTS
#tab.convergence_parameters(one, two, thr, Mach3_init, alpha2_init, beta3_init, DeltaH_prod, DeltaH_calc)

# extra calculations fro print results (rearrange this later)
GR_enthalpy = (two.T - thr.T) / (two.T0 - thr.T0)  # Assume v1 = v3, not right
Deltabeta = two.beta - thr.beta  # por qué no negativo?
Deltaalpha = two.alpha - thr.alpha
GR_final = (two.T - thr.T) / (one.T - thr.T)
DeltaW = thr.vel.W - two.vel.W
h3h2 = thr.geo.h / two.geo.h

tab.print_all_tables(one, two, thr, Mach3_init, alpha2_init, beta3_init,
                     DeltaH_prod, DeltaH_calc, DeltaH_T, mdot, Deltabeta, psi,
                     GR, h3h2, stator, rotor, eta_stator_init, eta_rotor_init)

# ORIGINAL GRAPH FROM JS GAS GENERATOR STUDY
graphs.velocity_triangle(753.18, 197.59, -71.35, 254.09, 279.64, 197.6,
                         -544.89, 254.09)

# GRAPH VELOCITY TRIANGLE FROM RESULTS
graphs.velocity_triangle(two.vel.Vu, two.vel.Vx, thr.vel.Vu, thr.vel.Vx,
                         two.vel.Wu, two.vel.Wx, thr.vel.Wu, thr.vel.Wx)