summaryrefslogtreecommitdiff
path: root/167/CH8/EX8.4/ex4.sce
blob: f2442f24f7a937d26299278e06c1580baf77d5f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//example 4
//irreversibility during cooling of an iron block
clear
clc
m=500 //mass of iron block in kg
cavg=0.45 //kJ/kg-K
T1=473 //Initial Temp. in K
T2=300 //Final Temp. in K
Wrev=m*cavg*((T1-T2)-T2*log(T1/T2)) //reversible work in kJ
Wu=0
I=Wrev-Wu //irreversibility of the process in kJ
printf("\n Hence, the reversible owrk for the pressure ois = %.0f kJ. \n",Wrev);
printf("\n and irreversibility of the process is = %.0f kJ. \n",I);