summaryrefslogtreecommitdiff
path: root/2066/CH4
diff options
context:
space:
mode:
Diffstat (limited to '2066/CH4')
-rwxr-xr-x2066/CH4/EX4.1/4_1.sce17
-rwxr-xr-x2066/CH4/EX4.11/4_11.sce19
-rwxr-xr-x2066/CH4/EX4.12/4_12.sce22
-rwxr-xr-x2066/CH4/EX4.14.b/4_14b.sce16
-rwxr-xr-x2066/CH4/EX4.14/4_14.sce14
-rwxr-xr-x2066/CH4/EX4.16/4_16.sce17
-rwxr-xr-x2066/CH4/EX4.17/4_17.sce10
-rwxr-xr-x2066/CH4/EX4.2/4_2.sce13
-rwxr-xr-x2066/CH4/EX4.3/4_3.sce26
-rwxr-xr-x2066/CH4/EX4.4/4_4.sce16
-rwxr-xr-x2066/CH4/EX4.5.a/4_5a.sce14
-rwxr-xr-x2066/CH4/EX4.5.b/4_5b.sce15
-rwxr-xr-x2066/CH4/EX4.6.b/4_6b.sce30
-rwxr-xr-x2066/CH4/EX4.6/4_6.sce17
-rwxr-xr-x2066/CH4/EX4.7/4_7.sce19
-rwxr-xr-x2066/CH4/EX4.8/4_8.sce13
-rwxr-xr-x2066/CH4/EX4.9/4_9.sce15
17 files changed, 293 insertions, 0 deletions
diff --git a/2066/CH4/EX4.1/4_1.sce b/2066/CH4/EX4.1/4_1.sce
new file mode 100755
index 000000000..9d0180e9b
--- /dev/null
+++ b/2066/CH4/EX4.1/4_1.sce
@@ -0,0 +1,17 @@
+clc
+clear
+//Initialization of variables
+rho=1.5 //g/cc
+g=32.2 //ft/s^2
+dzds=-0.5
+x1=0
+x2=3
+//calculations
+function dpds = func(s)
+ dpds=-rho*g*dzds - rho*(3+9*s)*9
+endfunction
+r1=func(x1)
+r2=func(x2)
+//results
+printf("At the upper end, dp/ds = %.1f lb/ft^2 per foot",r1)
+printf("\n At the lower end, dp/ds = %.1f lb/ft^2 per foot",r2)
diff --git a/2066/CH4/EX4.11/4_11.sce b/2066/CH4/EX4.11/4_11.sce
new file mode 100755
index 000000000..c65f1beeb
--- /dev/null
+++ b/2066/CH4/EX4.11/4_11.sce
@@ -0,0 +1,19 @@
+clc
+clear
+//Initialization of variables
+gam=62.4
+ds=12 //in
+dd=10 //in
+Q=4 //ft^3/s
+pd=40 //psia
+ps=-6 //psia
+zd=5 //ft
+zs=0
+g=32.2 //ft/s^2
+//calculations
+vs=Q/(%pi/4 *(ds/12)^2)
+vd=Q/(%pi/4 *(dd/12)^2)
+emp = (pd-ps)*144/gam + zd-zs + (vd^2 - vs^2)/(2*g)
+hpp=emp*Q*gam/550
+//results
+printf("Horsepower input of the test pump = %.1f hp",hpp)
diff --git a/2066/CH4/EX4.12/4_12.sce b/2066/CH4/EX4.12/4_12.sce
new file mode 100755
index 000000000..fd7906033
--- /dev/null
+++ b/2066/CH4/EX4.12/4_12.sce
@@ -0,0 +1,22 @@
+clc
+clear
+//Initialization of variables
+d1=12 //in
+d2=8 //in
+v1=15 //ft/s
+p1=12 //psig
+p2=5.85 //psig
+rho=1.94 //ft^3/slug
+angle=60 //degrees
+//calculations
+Q=%pi/4 *(d1/12)^2 *v1
+v2=Q/(%pi/4 *(d2/12)^2)
+pa1=p1*%pi/4 *(d1)^2
+pa2=p2*%pi/4 *(d2)^2
+qv1=rho*Q*v1
+qv2=rho*Q*v2
+Fx=pa1+qv1+ cosd(angle)*(pa2+qv2)
+Fy=sind(angle)*(pa2+qv2)
+//results
+printf("Horizontal component of force = %d lb",Fx)
+printf("\n Vertical component of force = %d lb",Fy)
diff --git a/2066/CH4/EX4.14.b/4_14b.sce b/2066/CH4/EX4.14.b/4_14b.sce
new file mode 100755
index 000000000..f02356ac2
--- /dev/null
+++ b/2066/CH4/EX4.14.b/4_14b.sce
@@ -0,0 +1,16 @@
+clc
+clear
+//Initialization of variables
+de=4 //in
+T=1000 //lb
+g=32.2 //ft/s^2
+vele=8.5 //lb/s
+pe=16.5 //psia
+pa=14.7 //psia
+pa2=1 //psia
+//calculations
+Ae=%pi/4 *de^2
+Ve= (T-(pe-pa)*Ae)*g/vele
+T2=vele/g *Ve + (pe-pa2)*Ae
+//results
+printf("Thrust = %d lb",T2)
diff --git a/2066/CH4/EX4.14/4_14.sce b/2066/CH4/EX4.14/4_14.sce
new file mode 100755
index 000000000..542bd5f8a
--- /dev/null
+++ b/2066/CH4/EX4.14/4_14.sce
@@ -0,0 +1,14 @@
+clc
+clear
+//Initialization of variables
+de=4 //in
+T=1000 //lb
+g=32.2 //ft/s^2
+vele=8.5 //lb/s
+pe=16.5 //psia
+pa=14.7 //psia
+//calculations
+Ae=%pi/4 *de^2
+Ve= (T-(pe-pa)*Ae)*g/vele
+//results
+printf("Exit velocity = %d ft/s",Ve)
diff --git a/2066/CH4/EX4.16/4_16.sce b/2066/CH4/EX4.16/4_16.sce
new file mode 100755
index 000000000..802c8ca54
--- /dev/null
+++ b/2066/CH4/EX4.16/4_16.sce
@@ -0,0 +1,17 @@
+clc
+clear
+//Initialization of variables
+q=240 //ft^3/sec/ft
+v1=60 //ft/s
+gam=62.4
+rho=1.94 //slug/ft^3
+g=32.2 //ft/s^2
+//calculations
+y1=q/v1
+v2=8.6 //ft/s
+y2=28 //ft
+hl= (y1+ v1^2 /(2*g)) - (y2+ v2^2 /(2*g))
+hpp=hl*q*gam/550
+//results
+printf("Downstream depth = %.1f ft",y2)
+printf("\n Horsepower dissipation = %d hp per foot width",hpp)
diff --git a/2066/CH4/EX4.17/4_17.sce b/2066/CH4/EX4.17/4_17.sce
new file mode 100755
index 000000000..42a137b94
--- /dev/null
+++ b/2066/CH4/EX4.17/4_17.sce
@@ -0,0 +1,10 @@
+clc
+clear
+//Initialization of variables
+dh=3 //in
+L=12 //in
+g=32.2 //ft/s^2
+//calculations
+a=dh/L *g
+//results
+printf("Acceleration = %.2f ft/s^2",a)
diff --git a/2066/CH4/EX4.2/4_2.sce b/2066/CH4/EX4.2/4_2.sce
new file mode 100755
index 000000000..b11a26705
--- /dev/null
+++ b/2066/CH4/EX4.2/4_2.sce
@@ -0,0 +1,13 @@
+clc
+clear
+//Initialization of variables
+g=32.2 //ft/s^2
+v1=3 //ft/s
+z1=1.5 //ft
+rho=1.5 //g/cc
+z2=0
+v2=30 //ft/s
+//calculations
+dp= rho*(v2^2 /2 - g*z1 +g*z2 - v1^2 /2)
+//results
+printf("pressure difference = %.1f lb/ft^2",dp)
diff --git a/2066/CH4/EX4.3/4_3.sce b/2066/CH4/EX4.3/4_3.sce
new file mode 100755
index 000000000..09e2ef136
--- /dev/null
+++ b/2066/CH4/EX4.3/4_3.sce
@@ -0,0 +1,26 @@
+clc
+clear
+//Initialization of variables
+pd=15 //psia
+rhod=0.005//slug/ft^3
+pi=150 //psia
+rhoi=0.03 //slug/ft^3
+dz=-25 //ft
+vd=1000 //ft/s
+vi=100 //ft/s
+ud=200 //Btu/slug
+ui=250 //Btu/slug
+g=32.2 //ft/s^2
+J=778
+uff=5 //ft/s
+Q=50 //Btu/sec
+//calculations
+pr=pd/rhod*144 - pi/rhoi *144
+zr=g*(dz)
+vr=(vd^2 -vi^2)/2
+ur=(ud-ui)*J
+jeh=J*Q*g/uff
+gem=pr+zr+vr+ur+jeh
+power=gem*uff/g
+//results
+printf("Power transferred = %d ft-lb/sec",power)
diff --git a/2066/CH4/EX4.4/4_4.sce b/2066/CH4/EX4.4/4_4.sce
new file mode 100755
index 000000000..6fb3b8a15
--- /dev/null
+++ b/2066/CH4/EX4.4/4_4.sce
@@ -0,0 +1,16 @@
+clc
+clear
+//Initialization of variables
+r0=1
+ri=0
+//calculations
+function v= func1(y)
+ v= 2*y^(1/7) *(y-1)
+endfunction
+V=intg(ri,r0,func1)
+function alpha= func2(y)
+ alpha= 1/ (%pi*V^3) *2*%pi *(y)^(3/7) *(y-1)
+endfunction
+a2=intg(ri,r0,func2)
+//results
+printf("Kinetic energy correction factor = %.2f",a2)
diff --git a/2066/CH4/EX4.5.a/4_5a.sce b/2066/CH4/EX4.5.a/4_5a.sce
new file mode 100755
index 000000000..a30d0f4b8
--- /dev/null
+++ b/2066/CH4/EX4.5.a/4_5a.sce
@@ -0,0 +1,14 @@
+clc
+clear
+//Initialization of variables
+gam=62.4
+pu=40 //psia
+zu=25 //ft
+vu=8 //ft/s
+g=32.2 //ft/s^2
+vl=8 //ft/s
+zl=0 //ft
+//calculations
+pl= gam*(pu*144/gam +zu-zl+ (vu^2 -vl^2)/(2*g))/144
+//results
+printf("Pressure at the lower end if friction is neglected = %.2f psig",pl)
diff --git a/2066/CH4/EX4.5.b/4_5b.sce b/2066/CH4/EX4.5.b/4_5b.sce
new file mode 100755
index 000000000..19abb7f77
--- /dev/null
+++ b/2066/CH4/EX4.5.b/4_5b.sce
@@ -0,0 +1,15 @@
+clc
+clear
+//Initialization of variables
+hl=5
+gam=62.4
+pu=40 //psia
+zu=25 //ft
+vu=8 //ft/s
+g=32.2 //ft/s^2
+vl=8 //ft/s
+zl=0 //ft
+//calculations
+pl= gam*(pu*144/gam +zu-zl-hl+ (vu^2 -vl^2)/(2*g))/144
+//results
+printf("Pressure at the lower end if friction is neglected = %.2f psig",pl)
diff --git a/2066/CH4/EX4.6.b/4_6b.sce b/2066/CH4/EX4.6.b/4_6b.sce
new file mode 100755
index 000000000..6ac02975a
--- /dev/null
+++ b/2066/CH4/EX4.6.b/4_6b.sce
@@ -0,0 +1,30 @@
+clc
+clear
+//Initialization of variables
+gam=62.4
+pa=0
+za=15 //ft
+va=0
+pg=0
+zg=0
+g=32.2 //ft/s^2
+d=4 //in
+dg=2 //in
+zd=25 //ft
+//calculations
+vg= sqrt(2*g*(pa/gam +za+va^2 /(2*g) -pg/gam - zg))
+Ag=%pi/4 *(dg/12)^2
+Q=Ag*vg
+A=%pi/4 *(d/12)^2
+v4=Q/A
+pc=-v4^2 *gam/(2*g*144)
+pgd= za-zd - v4^2 /(2*g)
+pd=pgd*gam/144
+pe=-v4^2 *gam/(2*g*144)
+pfg= za- v4^2 /(2*g)
+pf=pfg*gam/144
+//results
+printf("Pressure at C = %.2f psig",pc)
+printf("\n Pressure at D = %.2f psig",pd)
+printf("\n Pressure at E = %.2f psig",pe)
+printf("\n Pressure at F = %.2f psig",pf)
diff --git a/2066/CH4/EX4.6/4_6.sce b/2066/CH4/EX4.6/4_6.sce
new file mode 100755
index 000000000..472cbc7a2
--- /dev/null
+++ b/2066/CH4/EX4.6/4_6.sce
@@ -0,0 +1,17 @@
+clc
+clear
+//Initialization of variables
+gam=62.4
+pa=0
+za=15 //ft
+va=0
+pg=0
+zg=0
+g=32.2 //ft/s^2
+dg=2 //in
+//calculations
+vg= sqrt(2*g*(pa/gam +za+va^2 /(2*g) -pg/gam - zg))
+Ag=%pi/4 *(dg/12)^2
+Q=Ag*vg
+//results
+printf("discharge = %.2f ft^3/sec",Q)
diff --git a/2066/CH4/EX4.7/4_7.sce b/2066/CH4/EX4.7/4_7.sce
new file mode 100755
index 000000000..092ab853e
--- /dev/null
+++ b/2066/CH4/EX4.7/4_7.sce
@@ -0,0 +1,19 @@
+clc
+clear
+//Initialization of variables
+d1=6 //ft
+d2=3 //in
+pa=2 //ft
+d=13.6
+sg=0.75
+h1=5 //sec
+h2=3 //sec
+g=32.2 //ft/s^2
+//calculations
+pag=pa/12 *d/sg
+function time = func(h)
+ time= -d1^2 /(d2/12)^2 /(sqrt(2*g)) *(pag+h)^(-0.5)
+endfunction
+ti=intg(h1,h2,func)
+//results
+printf("Time required = %.1f sec",ti)
diff --git a/2066/CH4/EX4.8/4_8.sce b/2066/CH4/EX4.8/4_8.sce
new file mode 100755
index 000000000..7319f38fe
--- /dev/null
+++ b/2066/CH4/EX4.8/4_8.sce
@@ -0,0 +1,13 @@
+clc
+clear
+//Initialization of variables
+x=12 //ft
+angle=30 //degrees
+g=32.2 //ft/s^2
+z=-2 //ft
+d=2 //in
+//calculations
+vj= x/cosd(angle) *sqrt(g/(2*(x*tand(angle) -z)))
+Q=%pi/4 *(d/12)^2 *vj
+//results
+printf("Rate of flow = %.2f ft^3/s",Q)
diff --git a/2066/CH4/EX4.9/4_9.sce b/2066/CH4/EX4.9/4_9.sce
new file mode 100755
index 000000000..f38b6a912
--- /dev/null
+++ b/2066/CH4/EX4.9/4_9.sce
@@ -0,0 +1,15 @@
+clc
+clear
+//Initialization of variables
+x=10 //in of mercury
+sg=13.6 //g/cc
+d1=8 //in
+d2=4 //in
+g=32.2 //ft/s^2
+//calculations
+vdiff=x/12 *sg- x/12
+Vts=vdiff/(1-(d2/d1)^4)
+Vt=sqrt(2*g*Vts)
+Q=Vt*%pi/4 *(d2/12)^2
+//results
+printf("Discharge = %.2f ft^3/s",Q)