summaryrefslogtreecommitdiff
path: root/3685/CH11/EX11.6/Ex11_6.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3685/CH11/EX11.6/Ex11_6.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 '3685/CH11/EX11.6/Ex11_6.sce')
-rw-r--r--3685/CH11/EX11.6/Ex11_6.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/3685/CH11/EX11.6/Ex11_6.sce b/3685/CH11/EX11.6/Ex11_6.sce
new file mode 100644
index 000000000..53f1ca192
--- /dev/null
+++ b/3685/CH11/EX11.6/Ex11_6.sce
@@ -0,0 +1,17 @@
+clc
+R = 8.3143 // Gas constant in kJ/kg-mol-K
+N1 = 0.5 // Mole no. of first system
+N2 = 0.75 // Mole no. of second system
+T1 = 200 // Initial temperature of first system in K
+T2 = 300 // Initial temperature of second system in K
+v = 0.02 // Total volume in m^3
+printf("\n Example 11.6\n")
+Tf = (T2*N2+T1*N1)/(N1+N2)
+Uf_1 = (3/2)*(R*N1*Tf)*(10^-3)
+Uf_2 = (3/2)*(R*N2*Tf)*(10^-3)
+pf = (R*Tf*(N1+N2)*(10^-3))/v
+Vf_1 = R*N1*(10^-3)*Tf/pf
+Vf_2 = v-Vf_1
+printf("\n Energy of first system is %f kJ,\n Energy of second system is %f kJ,\n Volume of first system is %f m^3,\n Volume of second system is %f m^3,\n Pressure is %d kN/m^2,\n Temperature is %d K.",Uf_1,Uf_2,Vf_1,Vf_2,pf,Tf)
+//The answers vary due to round off error
+