From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 1019/CH2/EX2.21/Example_2_21.sce | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 1019/CH2/EX2.21/Example_2_21.sce (limited to '1019/CH2/EX2.21/Example_2_21.sce') diff --git a/1019/CH2/EX2.21/Example_2_21.sce b/1019/CH2/EX2.21/Example_2_21.sce new file mode 100644 index 000000000..3c0bc980f --- /dev/null +++ b/1019/CH2/EX2.21/Example_2_21.sce @@ -0,0 +1,25 @@ +//Example 2.21 +clear; +clc; + +//Given +T1=300; //initial temperature in K +T2=600; //final temperature in K +R=8.314;// gas constant in J K^-1 mol^-1 +Cv=25; //specific heat capacity at constant volume of the gas in J K^-1 mol^-1 +n=1;//moles of the gas +P1=100; //initial gas pressure in kN m^-2 +P2=1000; //final gas pressure in kN m^-2 + +// To determine net work done and efficiency +w1=R*T1*log(P2/P1);//work done in 1st step in J +w2=Cv*(T2-T1);//work done in 2nd step in J +w3=R*T2*log(P1/P2);//work done in 3rd step in J +q2=(-1)*w3;//heat taken up in J +w4=Cv*(T1-T2);//work done in final step in J +W=-(w1+w2+w3+w4);//total work done step in J +N=W/q2;//efficiency +mprintf('Net work done = %f',W); +mprintf('\n Heat absorbed = %f',q2); +mprintf('\n efficiency = %f',N); +//end \ No newline at end of file -- cgit