0% found this document useful (0 votes)
161 views

Matlab Code

1) The document presents equations and calculations to determine thermodynamic properties of steam from the Redlich-Kwong equation of state. 2) It provides the critical temperature and pressure for steam and defines equations for the Redlich-Kwong constants, compressibility factor, and enthalpy. 3) MATLAB code is used to solve the Redlich-Kwong polynomial equation numerically to calculate the molar volume, compressibility factor, enthalpy, and specific volume of steam at 1000C and 1 atm pressure.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views

Matlab Code

1) The document presents equations and calculations to determine thermodynamic properties of steam from the Redlich-Kwong equation of state. 2) It provides the critical temperature and pressure for steam and defines equations for the Redlich-Kwong constants, compressibility factor, and enthalpy. 3) MATLAB code is used to solve the Redlich-Kwong polynomial equation numerically to calculate the molar volume, compressibility factor, enthalpy, and specific volume of steam at 1000C and 1 atm pressure.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Dt:13-08-2019 D.

Kiranmai
17021A2636
4.THERMODYNAMIC PROPERTIES OF STEAM FROM REDLICH KWONG
EQUATION
Problem Statement:
Calculate the molar volume (m3/kgmole), specific volume (m3/kg), compressibility
factor, enthalpy (KJ/kg) of water at a specified temperature of 1000C and pressure 1 atm using
Redlich Kwong equation .With solution of polynomial equation by fzero function using
MATLAB.
For steam., Tc=647.4K; Pc=218.3atm
Equations and numerical data:
RT a
P= -
V−b V(V+b)√T
5
R2 T2C
a=0.42748( )
PC

RTC
b=0.08664( )
PC
𝑃𝑉
z=
𝑅𝑇

P=Pressure in pascals
T=Temperature in kelvin
V=Volume in m3/kg.mole
R=8.314 J/mole.kelvin
TC=Critical temperature in kelvin
PC=Critical pressure in pascals
a=Redlich kwong constant 1 in m6.pascal/mole.kelvin
b=Redlich kwong constant 2 in m3/mole
Z=Compressibility factor
Exact thermodynamic reaction.,
V ∂P ∂P
HV-HV0=∫∞ [T ( )+ V( )] dV
∂TV ∂TV

1.5a b
HV-HV0=RT(z-1- ln (1 + ))
bR1.5
T V
T
HV0=Hl0+∆Hvap0+∫T Cp dT
0

T a a2 a3
∫T Cp dT =a(T-T0 )+ 2 (T2 − T02 ) + (T3 − T03 ) + (T4 − T04 )
1
0 3 4

∆Hvap=2501.3KJ/kg. mole (given)


Hl0=0
T0=273.15K
a0=7.7
a1=0.04594×10-2
a2=0.2521×10-5
a3=-0.08587×10-9
HV=Enthalpy in KJ/kg. mole
HV0=Ideal gas enthalpy in KJ/kg, mole
∆Hvap0=Latent heat of vaporization of steam in KJ/kg
Cp=Specific heat in cal/kilo. mole
z=Compressibility factor
Mathematical method used:
SOLUTION OF POLYNOMIAL EQUATION
MATLAB code:
FUNCTION FILE (tpsrk.m)
%thermodynamic properties of steam from Redlich Wong equation
function fv=tpsrk(v)
tc=647.4; %critical temperature in kelvin
pc=218.3*101325; %critical pressure in atm is converted into
pascals
r=8.314; %universal gas constant in (m^3*pascal)/
(gram-mole*kelvin)
t=100+273.15; %temperature in kelvin
p=1*101325; %pressure in atm is converted into pascals
a=0.42748*((r^2*tc^(5/2))/pc); %rk constant 1 in (m^6*pascal/mole^2)
b=0.08664*((r*tc)/pc); %rk constant 2 in (m^3/mole)
fv=(p+(a/(v*(v+b)*(t^(1/2)))))*(v-b)-(r*t); %rearranged rk equation

MAIN FILE (tpsrkb.m)


clc
clear all
tc=647.4; %critical temperature in kelvin
pc=218.3*101325; %critical pressure in atm is converted into
pascals
r=8.314; %universal gas constant in (m^3*pascal)/
(gram-mole*kelvin)
t=100+273.15; %given temperature in kelvin
p=1*101325; %pressure in atm is converted into pascals
t0=273.15; %temperature in kelvin
a=0.42748*((r^2*tc^(5/2))/pc); %rk constant 1 in (m^6*pascal/mole^2)
b=0.08664*((r*tc)/pc); %rk constant 2 in (m^3/mole)
m=18.01528*10^-3; %mass in mole
a0=7.7;
a1=0.04594*10^-2;
a2=0.2521*10^-5;
a3=-0.08587*10^-9;
hl0=0;
delhv0vap=2501.3; %latent heat of vapourization of steam
v=30; %molar volume in (m^3/kilomole)
xsolve=fzero(@tpsrk,v,[]);
fprintf(‘For steam\n’)
fprintf(‘Molar volume,m^3/kmol\n’)
v=xsolve*1000 %molar volume in m^3/kg.mole
fprintf(‘Compressibility factor\n’)
z=(p*v)/(r*1000*t) %compressibility factor
cpdt=(a0*(t-t0)+(a1/2)*(t^2-t0^2)+(a2/3)*(t^3-t0^3)+(a3/4)*(t^4-t0^4))*(4.18/18);
hv0=hl0+delhv0vap+cpdt; %ideal gas enthalpy
fprintf (‘Enthalpy,KJ/kg\n’)
hv=hv0+(r*t*(z-1-(((1.5*a)/(b*r*t^1.5))*(log(1+(b/v))))))*(10^-3)
%enthalpy in (KJ/kg)
fprintf(‘Specific volume,m^3/kg\n’)
sv=v/m %specific volume in m^3/kg
Output:
For steam
Molar volume,m^3/kmol
v=
30.4000
Compressibility factor
z=
0.9929
Enthalpy,KJ/kg
hv =
2.6896e+03
Specific volume, m^3/kg
sv =
1.6875e+03

You might also like