summaryrefslogtreecommitdiff
path: root/1922/CH8/EX8.3/8_3.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1922/CH8/EX8.3/8_3.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 '1922/CH8/EX8.3/8_3.sce')
-rwxr-xr-x1922/CH8/EX8.3/8_3.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/1922/CH8/EX8.3/8_3.sce b/1922/CH8/EX8.3/8_3.sce
new file mode 100755
index 000000000..be78de929
--- /dev/null
+++ b/1922/CH8/EX8.3/8_3.sce
@@ -0,0 +1,23 @@
+clc
+clear
+//Initialization of variables
+ye=0.434
+Pt=40.25 //kPa
+xe=0.616
+Pe1=22.9 //kPa
+Pe2=29.6 //kPa
+//calculations
+ge= ye*Pt/(xe*Pe1)
+gb=(1-ye)*Pt/((1-xe)*Pe2)
+E= log10(ge) *(1+ (1-xe)*log(gb) /(xe*log(ge)))^2
+B= log10(gb) *(1+ xe/(1-xe) *log(ge) /log(gb))^2
+xe2=0.4
+xb2=0.6
+lnge2=E/(1+ E*xe2/(B*xb2))^2
+lngb2=B/(1+ B*xb2/(E*xe2))^2
+ge2=10^(lnge2)
+gb2=10^(lngb2)
+Pt1=ge2*Pe1
+Pt2=gb2*Pe2
+//results
+printf("Total pressure in case 1 = %.2f kPa and in case 2 = %.2f kPa",Pt1, Pt2 )