Algoritmos

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Va el algoritmo

# Problema resuelto libro White 6.9


# datos
rho = 950 # kg/m3
nu = 2e-5 # m2/s
d = 30 # cm
D = d / 100 # m
L = 100 # m
hL = 8 # m
epsd = 0.0002
g = 9.81 # m/s2
pi = 3.1415926
A = pi * D ^ 2 / 4
# ecuaciones no lineales
f(v) = hL - f * L * (v ^ 2) / (2 * g * D)
v(0) = 1 # m/s
f(f) = (-2 * log(epsd / 3.7 + 2.51 / (Re * f ^ 0.5))) ^ (-2) - f
f(0) = 0.001
# Ecuaciones explícitas
Re = v * D / nu
Q=v*A

el segundo algoritmo
# Problema 6.69 White
# Datos
L = 2000 # ft
Dz = 120 # ft
nu = 2.09e-05 # lb.s/ft3
rho = 62.321 # lbm/ft3 o 1.937 slug/ft3
P = 80 # HP
Q = 3 # ft3/s
eps = 0.0085 # ft
epsd = eps / D
g = 32.2 # ft/s2
pi = 3.1415927
Pb = 80 * 550 # ft.lbf/s
Re = rho * D * v / nu
hL = Pb / (rho * g * Q)
A=Q/v
# ecuaciones no lineales
f(v) = f * L * v / (D * 2 * g) - hL
v(0) = 9
f(D) = pi * D ^ 2 / 4 - A
D(0) = 0.2
f(f) = (-2 * log(epsd / 3.7 + 2.51 / (Re * sqrt(f)))) ^ (-2) - f
f(0) = 0.05

Va problema de tarea para el fin de semana largo:


A drainage canal is to be dug to keep a low-lying area from flooding during
heavy rains. The canal would carry the water to a river that is 1 mi away and
6 ft lower in elevation. The canal will be lined with cast concrete and will
have a semicircular cross section. If it is sized to drain all of the water
falling on a 1 mi2 area during a rainfall of 4 in./hr, what should the diameter
of the semicircle be?

You might also like