diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1457/CH2/EX2.2/2_2.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1457/CH2/EX2.2/2_2.sce')
-rwxr-xr-x | 1457/CH2/EX2.2/2_2.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/1457/CH2/EX2.2/2_2.sce b/1457/CH2/EX2.2/2_2.sce new file mode 100755 index 000000000..99bfa664d --- /dev/null +++ b/1457/CH2/EX2.2/2_2.sce @@ -0,0 +1,24 @@ +clc
+//Initialization of variables
+wA=53.5 //lb/ft^3
+wA2=8.4 //kN/m^3
+wB=78.8 //lb/ft^3
+wB2=12.3 //kN/m^3
+PB=30 //psi
+PB2=200 //kN/m^2
+AB=1.3 //ft
+AB2=40/100 //m
+BC=6.5 //ft
+BC2=2 //m
+CD=10 //ft
+CD2=3 //m
+//Calculations
+PAbyGB=PB*144/wB - AB*13.55*62.4/wB - (BC+CD) + (AB+BC)*wA/wB
+PA=PAbyGB*wB/144.
+PAbyGB2=PB2/wB2 - AB2*13.55*9.81/wB2 - (BC2+CD2) + (AB2+BC2)*wA2/wB2
+PA2=PAbyGB2*wB2
+//Results
+printf('English units')
+printf("\n Final pressure = %.1f psi",PA)
+printf('\n SI Units')
+printf("\n Final pressure = %d kPa",PA2+1)
|