summaryrefslogtreecommitdiff
path: root/1019/CH2/EX2.12/Example_2_12.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.12/Example_2_12.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.12/Example_2_12.sce')
-rw-r--r--1019/CH2/EX2.12/Example_2_12.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/1019/CH2/EX2.12/Example_2_12.sce b/1019/CH2/EX2.12/Example_2_12.sce
new file mode 100644
index 000000000..001d3070f
--- /dev/null
+++ b/1019/CH2/EX2.12/Example_2_12.sce
@@ -0,0 +1,21 @@
+//Example 2.12
+clear;
+clc;
+
+//Given
+R=0.082;// gas constant in atm dm^3 K^-1 mol^-1
+v1=1;// initial volume in dm^3 mol^-1
+v2=50;// fina volume in dm^3 mol^-1
+T=273;// temperature in K
+a=6.5;// van der waals constant inatm dm^6 mol^-2
+b=0.056;//atm dm^3 K^-1 mol^-1
+n=1; //moles of given gas
+
+// To determine t2,w,delH and delE
+w=(-1)*101.325*R*T*log(v2/v1);//work done in J mol^-1
+W=101.325*(-1)*((R*T*log((v2-(n*b))/(v1-(n*b))))+(a*n*n*((1/v2)-(1/v1))));//work done in J in terms of van der waals gas
+delE=(-1)*101.325*a*((1/v2)-(1/v1));//change in internal energy in J mol^-1
+q=delE-W;
+mprintf('(i) For ideal gas, W = %f J mol^-1, delE = 0,q = 0',w);
+mprintf('\n (ii) For Van der Waals gas, W = %f J mol^-1,delE = %f J mol^-1,q = %f J mol^-1',W,delE,q);
+//end \ No newline at end of file