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 /1427/CH25/EX25.17/25_17.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 '1427/CH25/EX25.17/25_17.sce')
-rw-r--r-- | 1427/CH25/EX25.17/25_17.sce | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/1427/CH25/EX25.17/25_17.sce b/1427/CH25/EX25.17/25_17.sce new file mode 100644 index 000000000..771787855 --- /dev/null +++ b/1427/CH25/EX25.17/25_17.sce @@ -0,0 +1,16 @@ +//ques-25.17
+//Calculating pressure for carbon dioxide using ideal gas equation and van der Waals equation
+clc
+V=8;//volume (in L)
+m=88;//mass of CO2 (in g)
+M=44;//molar mass of CO2 (in g/mol)
+T=273+27;//temperature (in K)
+a=3.6;//(in L^2 atm/mol^2)
+b=0.043;//(in L/mol)
+R=0.0821;//(in L atm/K/mol)
+n=m/M;//moles of CO2
+//Ideal Gas equation
+P1=(n*R*T)/V;
+//Van der Waals equation
+P2=(n*R*T)/(V-n*b)-(a*n^2)/V^2;
+printf("The pressure for carbon dioxide using ideal gas equation is %.2f atm and using van der Waals equation is %.3f atm.",P1,P2);
|