from __future__ import division
%pylab inline
from scipy.optimize import root
from fluids import *
from thermo import Chemical
from fluids.constants import g
# Dados do problema
water=Chemical('H2O',T=293.15)
mu=water.mu
rf=water.rho
rp=4840
dp=0.005
u=v_terminal(D=dp, rhop=rp, rho=rf, mu=mu, Method=None)
#Cáculo do erro do pacote fluids
Re=u*rf*dp/mu
def Heywood(x):
24*(1+0.15*x**0.6787)*x-fi
if Re>1000 and Re<1e5:
um=sqrt(3*(rp-rf)*g*dp/rf)
elif Re< 2:
um=(rp-rf)*g*dp**2/18/mu
else:
fi=4*(rp-rf)*g*dp**3/3/mu**2
root(Heywood,x0=500)
print("A velocidade é um = %.3f m/s c/ erro de %.1f %%"%(u,(u-um)/um*100))
# Dados do problema
water=Chemical('H2O',T=293.15)
mu=water.mu
rf=water.rho
up=1.;rp=4840
def fi_Cheng(Re):
return Cheng(Re=Re)/Re-psi
psi=4*(rp-rf)*g*mu/(3*rf**2*up**3)
Rem=root(fi_Cheng,x0=0.1).x[0]
De=Rem*mu/rf/up
#Cáculo do erro se Regime se de Newton ou Stokes
if Re>1000 and Re<1e5:
Dn=up**2*rf/(rp-rf)/g/3
elif Re< 2:
Dn=sqrt(18*up*mu/(rp-rf)/g)
else:
Dn=(up**2*rf/(rp-rf)/g/3+sqrt(18*up*mu/(rp-rf)/g))/2
print("O diâmetro é De = %.1e m c/ erro de %.1f %%"%(De,(De-Dn)/Dn*100))
# Dados do problema
water=Chemical('H2O',T=293.15)
mu=water.mu
rf=water.rho
rp=4840
dp=0.005
V=[]
L=[]
T=arange(0,0.5,0.01)
um=0.803
for i in T:
a,b=integrate_drag_sphere(D=dp, rhop=rp, rho=rf, mu=mu, t=i, V=0, Method=None, distance=True)
V.append(a)
L.append(b)
if a<=um*0.999:
tm=i
em=b
plot(T,V,label='$v\ (m/s)$')
plot(T,L,label='$L\ (m)$')
arrow(0,um,tm,0,width=0.001,head_width=0.01,linestyle='--')
arrow(tm,um,0,-um+b,width=0.001,head_width=0.01,linestyle='--')
arrow(tm,b,-tm,0,width=0.001,head_width=0.01,linestyle='--')
grid(True)
xlabel('$t\ (s)$')
ylabel('$L\ (m)\ or\ \\nu (m/s)$')
legend(bbox_to_anchor=(1.01, 1.01))
print("A partícula percorre %.2f m e demora %.2f s até atingir a sua velocidade terminal."%(b,tm))

# Dados do problema
water=Chemical('H2O',T=293.15)
mu=water.mu
rf=water.rho
rp=4840
dp1=0.001
dp2=0.005
L=1
H=1
Q=1
#Cálculo aproximado
Area=L*H
uh=Q/Area
th=L/uh
um1=v_terminal(D=dp1, rhop=rp, rho=rf, mu=mu, Method=None)
um2=v_terminal(D=dp2, rhop=rp, rho=rf, mu=mu, Method=None)
print("A particulas percorrem %.2f e %.2f m"%(um1*th,um2*th))
#Cálculo levando em conta o estado transiente
# O tempo disponível na horizontal é o mesmo th
a1,b1=integrate_drag_sphere(D=dp1, rhop=rp, rho=rf, mu=mu, t=th, V=0, Method=None, distance=True)
a2,b2=integrate_drag_sphere(D=dp2, rhop=rp, rho=rf, mu=mu, t=th, V=0, Method=None, distance=True)
print("A partículas percorrem %.2f e %.2f m"%(b1,b2))
Caleb Bell (2016). thermo: Chemical properties component of Chemical Engineering Design Library (ChEDL) https://github.com/CalebBell/thermo.
Caleb Bell (2016-2018). fluids: Fluid dynamics component of Chemical Engineering Design Library (ChEDL) https://github.com/CalebBell/fluids.
Benyahia, F., and K. E. O’Neill. "Enhanced Voidage Correlations for Packed Beds of Various Particle Shapes and Sizes." Particulate Science and Technology 23, no. 2 (April 1, 2005): 169-77. doi:10.1080/02726350590922242.
Timmerman, Peter, and Jacobus P. van der Weele. "On the Rise and Fall of a Ball with Linear or Quadratic Drag." American Journal of Physics 67, no. 6 (June 1999): 538-46. doi.org/10.1119/1.19320.