From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1442/CH12/EX12.3/12_3.sce | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 1442/CH12/EX12.3/12_3.sce (limited to '1442/CH12/EX12.3') diff --git a/1442/CH12/EX12.3/12_3.sce b/1442/CH12/EX12.3/12_3.sce new file mode 100755 index 000000000..8c1ae21a9 --- /dev/null +++ b/1442/CH12/EX12.3/12_3.sce @@ -0,0 +1,21 @@ +clc +//initialisation of variables +m1= 0.5 //kg +cv1= 0.6496 //kJ/kg K +T1= 80 //C +m2= 1 //kg +cv2= 0.6299 //kJ/kg K +T2= 150 //C +M= 32 //kg +M1= 44 //kg +V1= 0.11437 //m^3 +V2= 0.1 //m^2 +R= 8.314 //J/mol K +//CALCULATIONS +T= (m1*cv1*(273.15+T1)+m2*cv2*(273.15+T2))/(m1*cv1+m2*cv2) +p= ((m1/M)+(m2/M1))*R*T/(V1+V2) +S= m1*(cv1*log(T/(273.15+T1))+(R/M)*log((V1+V2)/V1))+m2*(cv2*log(T/(273.15+T2))+(R/M1)*log((V1+V2)/V2)) +//RESULTS +printf (' final temperature= %.1f kPa',T) +printf (' \n final pressure= %.1f kPa',p) +printf (' \n change in entropy= %.4f kJ/K',S) -- cgit