Example #1
0
from CoolProp.CoolProp import PropsSI as ps
import matplotlib.pyplot as plt

st = Stream()

T0 = 100
T1 = 600
Delta_T = 50

s0 = 1e5
s1 = 1e8
s_num = 1000
S = np.linspace(s0, s1, s_num)

for T in range(T0, T1, Delta_T):
    st.temperature_celcius = T
    enthalpy = []
    for i in range(s_num):
        st.pressure = ps('P', 'S', S[i], 'T', st.temperature, 'water')
        enthalpy.append(st.h)
    plt.plot(S, enthalpy, label='$T$='+str(T)+'˚C')
h0 = []
h1 = []
num = 1000
S_s =
p = np.linspace(P0, P_s, num)
for i in range(num):
    h0.append(ps('H','Q', 0, 'P', p[i], 'water'))
    h1.append(ps('H','Q', 1, 'P', p[i], 'water'))
plt.plot(p, h0, '--', color = 'red')
plt.plot(p, h1, '--', color = 'red')
Example #2
0
from Stream import Stream
import numpy as np
from CoolProp.CoolProp import PropsSI as ps
import matplotlib.pyplot as plt

T_i = 500  #  初温,˚C
p_c = 4000  # 排气压力,Pa
mass_flow_rate = 61.3  # 主汽流量,kg/s

st_i = Stream()
st_i.temperature_celcius = T_i
st_i.flow_rate = mass_flow_rate

st_o = Stream()
st_o.pressure = p_c

st_c = Stream()
st_c.pressure = p_c
st_c.quality = 0

number = 40  # number组数据,压力从p0增加到p1
p0 = 10e6
p1 = 80e6
p = np.linspace(p0, p1, number)
T0 = 400
T1 = 850
Delta_T = 50
T = range(T0, T1, Delta_T)
for j in T:
    st_i.temperature_celcius = j
    efficiency_ideal = []