from __future__ import division
print "Example 33.1 Page no 524\n\n"
#unit conversion of viscosity of blood
meu_cp=1.25#vicosity of blood in cp
meu_e=meu_cp*6.72e-4#viscosity in english unit,lb/ft.s
print "\n viscosity meu_e=%0.2e lb/ft.s"%(meu_e)
from __future__ import division
print "Example 33.2 Page no 525\n\n"
#unit conversion of poressure given in mmHg into various units
P=80#pressure given in mmHg
P1=P*(29.92/760)#pressure , in Hg
P2=P*(33.91/760)#pressure ,ft H2O
P3=P2*12#pressure ,in H2O
P4=P*(14.7/760)#pressure ,psia
P5=P*(2116/760)#pressure ,psfa
P6=P*(1.013e+5/760)#pressure ,N/m**2
print "\n P1=%0.2f inHg\n P2=%0.2f ft H2O\nP3=%0.2f in H2O\n P4=%0.2f psia\nP5=%0.2f psfa\nP6=%0.2f N/m**2"%(P1,P2,P3,P4,P5,P6)##in book answers are round off after decimal but there are exact answers
from math import sqrt
from __future__ import division
print "Example 33.5 Page no 527\n\n"
#an artery branches into two smaller equal area arteries so that velocity is same
#because q1=q2,volumetric flow rate
#q1=q2=q/2
#because s1=s2,cross sectional area
#s1=s2=s/2
#let the values
q=1#flow rate at inlet artery
q1=q/2#flow rate at outlet artery
s=1#area of inlet artery
s1=s/2#area of outlet artery
#v=q/s
D_r=sqrt(q/q1)#ratio of diameters
print "\n ratio of diameters D_r=%0.2f "%(D_r)#
from __future__ import division
print "Example 33.6 Page no 528\n\n"
#a blood vessel branches into three openings
#we have to find the velocity in 3 rd opening
a=0.2#cross sectional area of inlet 1,m**2
v=5#velocity inlet 1,mm/s
a1=0.08#area of branch1,m**2
v1=7#velocity in branch2,mm/s
a2=0.025#area of branch,m**2
v2=12#velocity in branch,mm/s
a3=0.031#area of branch,m**2
q=a*v#flow rate at inlet
q1=a1*v1#flow rate at branch 1
q2=a2*v2#flow rate at branch 2
q3=q-q1-q2#flow rate in branch 3
v3=q3/a3#velocity in branch 3
print "\n velocity v3=%0.2f mm/s"%(v3)#
from __future__ import division
from math import pi
print "Example 33.7 Page no 531\n\n"
#blood flowing through the arota
D=2.5#diameter of arota
S=pi*D**2/4#cross sectional area,cm**2
q=93.3#volumeric flow rate,cm**3/s
v=q/S#flow velocity
print "\n flow velocity v=%0.2f cm/s"%(v)#
from __future__ import division
print "Example 33.8 Page no 531\n\n"
#one of the auther of this book is 74 year old ,we have to determine the no. of times that the the auther's heart has to beat to date
Y=74#age in year
d=365#days
h=24#hours
m=60#minutes
b=80#heart beats per minutes
T=Y*d*h*m*b# no. of times heart beats
print "\n no.of times heart beats T=%0.2e "%(T)#
from __future__ import division
print "\n Example 33.9 Page no 531\n\n"
#refer to example no 33.8
Y=74#age in year
d=365#days
h=24#hours
m=60#minutes
b=80#heart beats per minutes
T=Y*d*h*m*b# no. of times heart beats
v=70#volume of blood discharge with each blood,ml
V=T*v#volume of blood that has circulated through the auther's system over his lifetime
print "\n Volume of blood V=%0.2e ml"%(V)#
from __future__ import division
print "Example 33.10 Page no 532\n\n"
#the flow of blood from the arota to the atrium is reprsented by a vessel
meu=1.1*6.72e-4#viscosity of blood
L=0.3#length of vessel,mile
g_c=32.2#grav. acc
rho=62.4#density of blood
D=2.53/30.48#diameter of vessel,ft
P_drop=32*meu*(19/30.48)*5280*L/(rho*D**2*g_c)
print "\n pressure drop P_drop=%0.2f ft*lbf/lb"%(P_drop)
#since the model is resonable from the fluid dynamics perspective
from __future__ import division
print "\n Example 33.12 Page no 534\n\n"
#estimation of power generated by human heart
P_drop=60#pressure drop in the circulatory system,mmHg
q=0.0033#volumetric flow rate,ft**3/s
hp=(q*P_drop*14.7*(144/760))#power generated
print "\npower generated hp=%0.2f hp"%(hp)##calculation error in book