summaryrefslogtreecommitdiff
path: root/647/CH3/EX3.8/Example3_8.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /647/CH3/EX3.8/Example3_8.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '647/CH3/EX3.8/Example3_8.sce')
-rwxr-xr-x647/CH3/EX3.8/Example3_8.sce31
1 files changed, 31 insertions, 0 deletions
diff --git a/647/CH3/EX3.8/Example3_8.sce b/647/CH3/EX3.8/Example3_8.sce
new file mode 100755
index 000000000..220e5c9f5
--- /dev/null
+++ b/647/CH3/EX3.8/Example3_8.sce
@@ -0,0 +1,31 @@
+clear;
+clc;
+
+// Example: 3.8
+// Page: 101
+
+printf("Example: 3.8 - Page: 101\n\n");
+
+// Solution
+
+//*****Data*****//
+T = 500;// [K]
+P = 8*10^6;// [Pa]
+R = 8.314;// [J/mol K]
+//*************//
+
+// Solution (a)
+// By ideal gas equation of state:
+printf("Ideal Equation of State\n")
+Vm = R*T/P;// [cubic m/mol]
+printf("Molar Volume of gas is %.3e cubic m/mol\n",Vm);
+printf("\n");
+
+// Solution (b)
+// By Virial Equation of State:
+printf("Virial Equation of State\n");
+B = -0.265*10^(-3);// [cubic m/mol]
+C = 0.3025*10^(-7);// [m^6/square mol]
+deff('[y] = f(Vm)','y = (P*Vm/(R*T)) - 1 -(B/Vm) - (C/Vm^2)');
+Vm = fsolve(Vm,f);
+printf("Molar Volume of gas is %.2e cubic m/mol\n",Vm); \ No newline at end of file