Example #1
0
hh1 = arange(50., 4500., 20) * 1e3

x = []
y = []
u = []
v = []
for p in pp:
    plot(hh1 / 1e3, [freesteam.steam_ph(p, h).T for h in hh1], alpha=0.8)
    if 0:
        for h in hh:
            try:
                S = freesteam.steam_ph(p, h)
                x += [S.h / 1.e3]
                y += [S.T]
                dy = freesteam.freesteam_deriv(S, 'T', 'h', 'p')
                dx = 0.0005
                m = math.sqrt(dx**2 + dy**2)
                u += [dx / m]
                v += [dy / m]
            except:
                pass

plot([0, 4500], [550 + 273.15, 550 + 273.15], 'b--')

s = freesteam.steam_pT(12e6, 550 + 273.15).s
pp = linspace(3e6, 12e6)
hh = [freesteam.steam_ps(p, s).h / 1e3 for p in pp]
TT = [freesteam.steam_ps(p, s).T for p in pp]
plot(hh, TT, 'g--')
Example #2
0
hh1 = arange(50.,4500.,20)*1e3


x = []
y = []
u = []
v = []
for p in pp:
	plot(hh1/1e3,[freesteam.steam_ph(p,h).T for h in hh1],alpha=0.8)
	if 0:
		for h in hh:
			try:
				S = freesteam.steam_ph(p,h)
				x += [S.h/1.e3]
				y += [S.T]
				dy = freesteam.freesteam_deriv(S,'T','h','p')
				dx = 0.0005
				m = math.sqrt(dx**2 + dy**2)
				u += [dx/m]
				v += [dy/m]
			except:
				pass

plot([0,4500],[550+273.15,550+273.15],'b--')

s = freesteam.steam_pT(12e6, 550+273.15).s
pp = linspace(3e6,12e6)
hh = [freesteam.steam_ps(p,s).h/1e3 for p in pp]
TT = [freesteam.steam_ps(p,s).T for p in pp]
plot(hh,TT,'g--')
Example #3
0
    #sys.exit(1)

# QUIVER SHOWING PARTIAL DERVIATIVE (dT/ds)p

ss1 = arange(0., 10., 0.5) * 1e3

x = []
y = []
u = []
v = []
for p in pp:
    for s in ss1:
        if freesteam.bounds_ps(p, s, 0):
            continue
        S = freesteam.steam_ps(p, s)
        assert (fabs(S.s - s) < 1e-5)
        dy = freesteam.freesteam_deriv(S, "Tsp")
        dx = 1
        m = math.sqrt(dx**2 + dy**2)
        x += [s / 1.e3]
        y += [S.T]
        u += [dx / m]
        v += [dy / m]

quiver(x, y, u, v, alpha=0.6)
axis([0, 10, 273.15, 1073.15])
#axis([2,6,573.15,1073.15])
xlabel('s / [kJ/kgK]')
ylabel('T / [K]')
show()
Example #4
0
	#sys.exit(1)

# QUIVER SHOWING PARTIAL DERVIATIVE (dT/ds)p

ss1 = arange(0.,10.,0.5)*1e3

x = []
y = []
u = []
v = []
for p in pp:
	for s in ss1:
		if freesteam.bounds_ps(p,s,0):
			continue
		S = freesteam.steam_ps(p,s)
		assert(fabs(S.s - s) < 1e-5)
		dy = freesteam.freesteam_deriv(S,"Tsp")
		dx = 1
		m = math.sqrt(dx**2 + dy**2)
		x += [s/1.e3]
		y += [S.T]
		u += [dx/m]
		v += [dy/m]

quiver(x,y,u,v,alpha=0.6)
axis([0,10,273.15,1073.15])
#axis([2,6,573.15,1073.15])
xlabel('s / [kJ/kgK]')
ylabel('T / [K]')
show()