diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1019/CH2/EX2.21/Example_2_21.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '1019/CH2/EX2.21/Example_2_21.sce')
-rw-r--r-- | 1019/CH2/EX2.21/Example_2_21.sce | 25 |
1 files changed, 25 insertions, 0 deletions
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 |