summaryrefslogtreecommitdiff
path: root/167/CH7/EX7.7/ex7.sce
blob: edc9062a35c7858a1fff40f80e92d706212fcc0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//ques7
//Effect of Density of a Liquid on Entropy
clear
clc

//state 1
P1=1//pressure in MPa
T1=110//temperature in K
s1=4.875//entropy in kJ/Kg.K from table
Cp1=3.471//specific heat at constant pressure in kJ/Kg.K from table

//state 2
P2=5//pressure in MPa
T2=120//temperature in K
s2=5.145//entropy in kJ/Kg.K
Cp2=3.486//specific heat at constant pressure in kJ/Kg.K

s=s2-s1;//entropy change in kJ/kg.K
printf('(a) Change in entropy per unit mass = %.3f kJ/kg.K \n',s);

//(b) Approximating liquid methane as an incompressible substance
c=(Cp1+Cp2)/2;//average specific heat 
s=c*log(T2/T1);//entropy change in kJ/Kg
printf(' (b) Entropy change per unit mass = %.3f kJ/kg.K',s);