summaryrefslogtreecommitdiff
path: root/32/CH4/EX4.19
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /32/CH4/EX4.19
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 '32/CH4/EX4.19')
-rwxr-xr-x32/CH4/EX4.19/4_19.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/32/CH4/EX4.19/4_19.sce b/32/CH4/EX4.19/4_19.sce
new file mode 100755
index 000000000..bd111e58a
--- /dev/null
+++ b/32/CH4/EX4.19/4_19.sce
@@ -0,0 +1,23 @@
+//pathname=get_absolute_file_path('4.19.sce')
+//filename=pathname+filesep()+'4.19-data.sci'
+//exec(filename)
+//Volume of 1st tank(in m^3):
+v1=1.8
+//Volume of 2nd tank(in m^3):
+v2=3.6
+//Initial pressure(in bar):
+p1=12
+//Initial temperature(in K):
+T1=40+273
+//Gas constant for argon(in kJ/kg.K):
+R=0.208
+//By gas law for final and initial state:
+pf=p1*v1/(v1+v2)
+printf("\nRESULT\n")
+printf("\nFinal pressure = %d bar",pf)
+//As there is no heat transfer, change in internal energy is 0:
+Tf=T1
+dH=0
+W=0
+printf("\nChange in enthalpy = %d",dH)
+printf("\nWork done =%d",W) \ No newline at end of file