diff options
Diffstat (limited to '572/CH6/EX6.10/c6_10.sce')
-rwxr-xr-x | 572/CH6/EX6.10/c6_10.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/572/CH6/EX6.10/c6_10.sce b/572/CH6/EX6.10/c6_10.sce new file mode 100755 index 000000000..be4fe25c4 --- /dev/null +++ b/572/CH6/EX6.10/c6_10.sce @@ -0,0 +1,22 @@ +//(6.10) A rigid, well-insulated tank is filled initially with 5 kg of air at a pressure of 5 bar and a temperature of 500 K. A leak develops, and air slowly escapes until the pressure of the air remaining in the tank is 1 bar. Employing the ideal gas model, determine the amount of mass remaining in the tank and its temperature.
+
+
+//solution
+
+//variable initialization
+m1 = 5 //initial mass in kg
+P1 = 5 //initial pressure in bar
+T1 = 500 //initial temperature in kelvin
+P2 = 1 //final pressure in bar
+
+//from table A-22
+pr1 = 8.411
+
+pr2 = (P2/P1)*pr1
+
+//using this value of pr2 and interpolation in table A-22
+T2 = 317 //in kelvin
+
+m2 = (P2/P1)*(T1/T2)*m1
+printf('the amount of mass remaining in the tank in kg is :\n \t m2 = %f',m2)
+printf('\n and its temperature in kelvin is : \n\t T = %f',T2)
\ No newline at end of file |