summaryrefslogtreecommitdiff
path: root/1019/CH2/EX2.22/Example_2_22.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1019/CH2/EX2.22/Example_2_22.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-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.22/Example_2_22.sce')
-rw-r--r--1019/CH2/EX2.22/Example_2_22.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/1019/CH2/EX2.22/Example_2_22.sce b/1019/CH2/EX2.22/Example_2_22.sce
new file mode 100644
index 000000000..145225218
--- /dev/null
+++ b/1019/CH2/EX2.22/Example_2_22.sce
@@ -0,0 +1,24 @@
+//Example 2.22
+clear;
+clc;
+
+//Given
+T1=373; //initial temperature in K
+R=8.314;// gas constant in J K^-1 mol^-1
+Cv=2.5*R; //specific heat capacity at constant volume of the gas in J K^-1 mol^-1
+n=1;//moles of the gas
+V=1.4;// coefficient of adiabatic expansion (gamma)
+
+// To determine net work done and efficiency
+w1=(-1)*R*T1*log(2);//work done in 1st step in J
+q=-w1;//heat absorbed in J
+T2=T1*((2/3)^(V-1));//final temperature in K
+w2=Cv*(T2-T1);//work done in 2nd step in J
+w3=(-1)*R*T2*log(1/2);//work done in 3rd step in J
+w4=Cv*(T1-T2);//work done in final step in J
+W=w1+w2+w3+w4;//total work done in J
+N=-100*W/q;//efficiency in percent
+mprintf('Net work done = %f',W);
+mprintf('\n delE = 0 since it is a cyclic process');
+mprintf('\n efficiency = %f percent',N);
+//end \ No newline at end of file