Chapter 6 Pressure and Sound Measurement

Example 6_1 pgno329

In [13]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : MANOMETERS
# Example 1 # Page 329
D1=0.1   #('Enter the diameter of well =:')
D2=0.01    #('Enter the diameter of the tube =:')
g=9.81;
pho_air=1.23   #('Enter the density of air in kg/m**3 =:')
pho_liquid=1200.  #('Enter the density of liquid in manometer =:')
h=1.     #('Enter the height by which liquid decreases in smaller area arm when exposed to the nominal pressure of p2 =:')
# Let the pressure difference is represented by P=p1-p2
print("The pressure difference is given by:")
print("P=h*(1+((D2/D1)**2)*g*(pho_liquid-pho_air))")
P=h*(1+((D2/D1)**2)*g*(pho_liquid-pho_air))*10**-3;
print'So the pressure difference is given by  kPa \n',round(P,3)
The pressure difference is given by:
P=h*(1+((D2/D1)**2)*g*(pho_liquid-pho_air))
So the pressure difference is given by  kPa 
0.119

Example 6_2 pgno:329

In [14]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : MANOMETERS
# Example 2 # Page 329
pho_l=900.  
print("pho_l=900 ")  #('Enter the density of the fluid =:')
Pa= 500000. 
print("Pa= 500000 ")  #('Enter the air pressure =:')
t=298. 
print("t=298 ")   #('Air is at what temperature(in deg cent) =:')
R=287.;
print("R=287;")
g=9.81;
T=t+273;
print("pho_a=Pa/(R*T);")
pho_a=Pa/(R*T);
print'The density of air is d kg/m**3 \n',round(pho_a,3)
h=.2    #('Enter the difference in the height of the fluid in the manometer=:')
print("Pres_diff=(g*h)*(pho_l-pho_a)")
Pres_diff=(g*h)*(pho_l-pho_a)*10**-3
print'The differential pressure is  kPa\n',round(Pres_diff,3)
pho_l=900 
Pa= 500000 
t=298 
R=287;
pho_a=Pa/(R*T);
The density of air is d kg/m**3 
3.051
Pres_diff=(g*h)*(pho_l-pho_a)
The differential pressure is  kPa
1.76

Example 6_3 pgno:337

In [15]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : Elastic Transducers
# Example 3 # Page 337
Sa=1000.
print("Sa=1000")    #('Enter the sensitivity of LVDT =:')
#Properties of diaphragm
E=200*10**9   #('Enter the value of modulus of elasticity=:')
print("E=200*10**9 ")
v=0.3  #('Enter the Poissons ratio=:')
print("v=0.3 ")
d=0.2   #('Enter the diameter of diaphragm=:')
print("d=0.2  ")
R=d*(1./2.);
P_max=2*10**6  #('What is the maximum pressure?')
print("P_max=2*10**6 ")
p=7800   #('What is the density of steel?')
print("Thickness is given by:")
print("t=(3*P_max*R**4*(1-v**4)/(4*E))**(1/4);")
t=(3*P_max*R**4*(1-v**4)/(4*E))**(1/4)
T=t*1000;
print'Thickness is  mm\n',T
#To calculate the lowest pressure in kPa which may be sensed by this instrument , resolution and the natural frequency of the diaphragm
y=.001   #('Enter  the l)east value of measurement=:')
p_min=(y*16*E*t**3)/(3*R**4*(1-v**2)*Sa)
print'So the minimum pressure and resolution is  Pa \n',p_min
f=(10.21/R**2)*((E*t**2)/(12*(1-v**2)*p))**(1/2)
print'The natural frequency of diaphragm is d Hz',f
Sa=1000
E=200*10**9 
v=0.3 
d=0.2  
P_max=2*10**6 
Thickness is given by:
t=(3*P_max*R**4*(1-v**4)/(4*E))**(1/4);
Thickness is  mm
1000.0
So the minimum pressure and resolution is  Pa 
11721611721.6
The natural frequency of diaphragm is d Hz 1021.0

Example 6_4 pgno:338

In [16]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : Design of Pressure Transducers
# Example 4 # Page 338
p_max=10*10**6    #('Enter the capacity of the transducer=:')
D=.05   #('Enter the diameter of diaphragm=:')
R=D/2;
v=0.3;   # poissons ratio
E=200*10**9;
# We know that
# y=3pR**4(1-v**2)/16t**3E
# if y<t/4, the non linearity is restricted to 0.3%
#So t is given by
t=(3*p_max*R**4*(1-v**2)/(4*E))**(1./4.)
print(t)
print'thickness comes out to be d m\n',t
Sr_max=(3*p_max*R**2)/(4*t**2)
print'So the max radial stress is d Pa\n',Sr_max
print'The given fatigue strength is 500MPa\n' 
if (Sr_max > 500*10**6):
      print("The diaphragm must be redesigned");
      t1=((3*p_max*R**2)/(4*500*10**6))**(1./2.);
      print'The required thickness is d m\n',t1
else:
    	print("The design is OK");

# Let the voltage ratio be represented by Err
Err=(820*p_max*R**2*(1-v**2))/(E*(t1**2))
print'The voltage ratio is d\n', Err
# For maximum power dissipation
PT=1.
RT=120.
Ei=2*(PT*RT)**(1./2.);
print("Let the sensitivity of the transducer be represented by ss")
ss=(820*R**2*(1-v**2)*Ei)/(E*t1**2)
print'sensitivity is d\n', round(ss)
# Part c
S_LVDT=(ss*16*t**3*E)/(3*R**4*(1-v**2)*Ei)
print'SENSITIVITY OF LVDT IS d \n',round(S_LVDT)
0.00191076894253
thickness comes out to be d m
0.00191076894253
So the max radial stress is d Pa
1283881477.53
The given fatigue strength is 500MPa

The diaphragm must be redesigned
The required thickness is d m
0.00306186217848
The voltage ratio is d
2.48733333333
Let the sensitivity of the transducer be represented by ss
sensitivity is d
0.0
SENSITIVITY OF LVDT IS d 
5207.0

Example 6_5 pgno:347

In [17]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : Pressure Gage
# Example 5 # Page 347
from math import pi,sqrt
p_max=10*10**6    #('Enter the maximum differential pressure')
fn=20000.  #(' Enter the frequency')
E=200*10**9;   # modulus of elasticity
v=0.3;   # poissons ratio
p=7800.    # density of steel
print("Let t/R be represented by TR ")
TR=((3*p_max*(1-v**2))/(4*E))**(1/4)
# we know R**2/t = r2t=10.21(Et**2/12(1-v**2)p)**0.5/R**2     using it , we have
r2t=(10.21*sqrt(E/(12*(1-v**2)*p)))/fn
R=TR*r2t;
print'value of R is d m\n', R

t=R*TR;
print' value of t is d m \n',round(t,2)

eo=8.85*10**-12
er=1.0006;
d=.001   #('Enter the distance between the plates of capacitor=:')
S=-(eo*er*pi*R**2)/d**2;
# variation of capacitor distance with respect to pressure is given by
q=(3*R**4*(1-v**2))/(16*E*t**3)
# total sensitivity of the pressure transducer is given by
sensitivity=S*q*10**18;
print' So the total sensitivity of the pressure transducer is given by pF/MPa\n',round(sensitivity,2)
Let t/R be represented by TR 
value of R is d m
0.782261801366
 value of t is d m 
0.78
 So the total sensitivity of the pressure transducer is given by pF/MPa
-11.36

Example 6_6 pgno:357

In [18]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : High Pressure Measurement
# Example 6 # Page 357
R1=100   #(' Enter the resistance of Mangnin wire=:')
print("R1=100")
b=25*10**-12; # standard for mangnin
print("b=25*10**-12;")
print("u=0.5")
u=0.5    #(' enter the uncertainty in measuring pressure for gage=:')
# to calculate maximum uncertainty in differential pressure
udp=u*(10-0.1)*10**6/100;
uR=R1*b*udp;
print'So the maximum uncertainty in measuring resistance is d ohm \n',uR
#to calculate the output bridge voltage for 10 MPa
Ei=5   #('enter the input voltage=:')
print("p1=0.1*10**6")
print("R2=R1*(1+b*p1)")
print("p2=10*10**6 ")
p1=0.1*10**6     #('enter the pressure at which bridge is assumed to be balanced=:')
R2=R1*(1+b*p1)
p2=10*10**6    #('enter the pressure at which output voltage is to be calculated=:')
R3=R1*(1+b*p2);
dR=R3-R2;
r=1;
Eo=(r*dR*Ei)/((1+r)**2*R2)
print' The output bridge voltage is d volt\n',round(Eo,4)
R1=100
b=25*10**-12;
u=0.5
So the maximum uncertainty in measuring resistance is d ohm 
0.00012375
p1=0.1*10**6
R2=R1*(1+b*p1)
p2=10*10**6 
 The output bridge voltage is d volt
0.0003

Example 6_7 pgno:362

In [19]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : McLeod Gage
# Example 7 # Page 362
print("Vb=150*10**-6")
print("d=1.5*10**-3")
print("a=pi*d**2/4;")
from math import pi,sqrt
Vb=150*10**-6   #('enter the volume of the Mc Leod gage=:')
d=1.5*10**-3   #('enter the diameter of capillary=:')
a=pi*d**2./4.;
p=40*10**-6    #('enter the pressure for which the gage reading is to be noted=:')
#y=(-p*area_cap+sqrt((p*area_cap)**2-4*p*area_cap*Vb))/(2*area_cap);
l=p*a;

y=(sqrt(l**2+(4*l*Vb))-l)/(2*a)
print'The gage reading comes out to be d mof Hg\n',round(y,3)
Vb=150*10**-6
d=1.5*10**-3
a=pi*d**2/4;
The gage reading comes out to be d mof Hg
0.058

Example 6_8 pgno:363

In [20]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : Knudsen Gage
# Example 8 # Page 363

Td=40.   #('enter the temperature difference=:')
Tv=300. #('enter the gas temperature at which the force has to be calculated=:')
p=2*10**-6   #('enter the pressure(in m of Hg)=:')
pa=p*13600*9.81;
k=4*10**-4;    # knudsen constant
F=(pa*Td)/(k*Tv);
print'So the  required force is  N',F
So the  required force is  N 88.944

Example 6_9 pgno:369

In [21]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : Sound Measurement
# Example 9# Page 369
from math import sqrt
print("Lp=104")
Lp=104  #('enter the sound pressure level in decibles=:')
print("pa=20*10**-6;")
print("p=sqrt(10**(Lp/10)*pa**2);")
pa=20*10**-6;   # rms pressure threshold of hearing
p=sqrt(10**(Lp/10)*pa**2);
print'root mean square sound pressure is Pa\n',p
Lp=104
pa=20*10**-6;
p=sqrt(10**(Lp/10)*pa**2);
root mean square sound pressure is Pa
2.0

Example 6_10 pgno:370

In [22]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : Sound Measurement
# Example 10# Page 370
Lp1=75   #('enter the sound level first machine=:')
Lp2=77   #('enter the sound level second machine=:')
Lp3=79   #('enter the sound level third machine=:')
from math import log10

print("Since the noise levels are incoherent,the total sound pressure is the sum of the mean square value of the individual sound pressures")

Lp_total=10*log10(10**(Lp1/10)+10**(Lp2/10)+10**(Lp3/10));
print'The total sound pressure is dB',round(Lp_total,2)
#decibles are normally rounded off to the nearest integers
Since the noise levels are incoherent,the total sound pressure is the sum of the mean square value of the individual sound pressures
The total sound pressure is dB 74.77

Example 6_11 pgno:371

In [23]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : Knudsen Gage
# Example 11 # Page 371

Td=20.   #('enter the temperature difference=:')
Tv=500. #('enter the gas temperature at which the force has to be calculated=:')
p=6*10**-6   #('enter the pressure(in m of Hg)=:')
pa=p*13600*9.81;
k=4*10**-4;    # knudsen constant
F=(pa*Td)/(k*Tv);
print'So the  required force is  N',round(F)
So the  required force is  N 80.0

Example 6_12 pgno:373

In [24]:
#CHAPTER 6 _ PRESSURE AND SOUND MEASUREMENT
#Caption : McLeod Gage
# Example 12 # Page 373

from math import pi,sqrt
Vb=110*10**-6   #('enter the volume of the Mc Leod gage=:')
d=1.72*10**-3   #('enter the diameter of capillary=:')
a=pi*d**2./4.;
p=80*10**-6    #('enter the pressure for which the gage reading is to be noted=:')
#y=(-p*area_cap+sqrt((p*area_cap)**2-4*p*area_cap*Vb))/(2*area_cap);
l=p*a;

y=(sqrt(l**2+(4*l*Vb))-l)/(2*a)
print'The gage reading comes out to be d mof Hg\n',round(y,4)
The gage reading comes out to be d mof Hg
0.0615