Chapter 6: Level

Example 6.1,Page Number:370

In [1]:
#(a)

# variable declaration
p=1.5                      # pressure applied
a=4.0                      # mA corresponds to 0 kg/cm^2
b=20.0                     # mA corresponds to 2 kg/cm^2

#calculation
wh=(((b-a)/2)*p)+a

#result
print('(a)just at the bottom level of the tank')
print('Water head applied to the transmitter =%d mA'%wh)

#(b)

#calculation
wh2=(((b-a)/2)*p)+2*a

#result
print('\n\n(b)5m below the bottom of the tank')
print('Water head applied to the transmitter =%d mA' %wh2)

#(c)

#calculation
wh3=(((b-a)/2)*p)

#result
print('\n\n(c)5m above the bottom of the tank')
print('Water head applied to the transmitter =%d mA'%wh3)
(a)just at the bottom level of the tank
Water head applied to the transmitter =16 mA


(b)5m below the bottom of the tank
Water head applied to the transmitter =20 mA


(c)5m above the bottom of the tank
Water head applied to the transmitter =12 mA

Example 6.2, Page Number:371

In [2]:
#(a)

#variable declaration
b=20.0             # Maximum output
a=4.0              # minimum output 
op=16.0            # output in mA

#calculation
p=(op-a)*2/(b-a)
p_h=p*10.0
h=p_h-2-5

#result
print('(a)\nh = %dm'%h)

#(b)

#variable declaration
p1=1                # pressure applied

#calculation
t_op=((b-a)/2)*p1+4

#result
print('\n(b)\nTransmitter output =%d mA'%t_op)

#(c)

#variable declaration
p2=0.5                    # applied pressure

#calculation
t_op1=((b-a)/2)*p2+4

#result
print('\n(c)\nTransmitter output =%d mA'%t_op1)
(a)
h = 8m

(b)
Transmitter output =12 mA

(c)
Transmitter output =8 mA

Example 6.3, Page Number: 372

In [3]:
#(a)

#variable declaration
b=20.0                  # Maximum output
a=4.0                   # minimum output
op=16.0                 # actual output   
wt_l1=25.0              # water level (i)

#calculation
t_op=((b-a)/100)*(100-75)+4

#result
print('(a)\nWater level=+25cm\nTransmitter output = %d mA' %t_op)

#(b)

#calculation
wt_l2=-25.0            # water level (ii)
t_op2=((b-a)/100)*(100-25)+4

#result
print('\n(b)\nWater level=-25cm\nTransmitter output = %d mA' %t_op2)

#(c)

#Variable declaration
t_op3=12.0             # Transmitter output 

#calculation
H=(100.0/(b-a))*(12-4) 

#result
print('\n(c)\nHead Applied = %d cm\nLevel corresponding to 50 cm head =0 cm' %H)
(a)
Water level=+25cm
Transmitter output = 8 mA

(b)
Water level=-25cm
Transmitter output = 16 mA

(c)
Head Applied = 50 cm
Level corresponding to 50 cm head =0 cm

Example 6.4, Page Number: 373

In [4]:
#(a)

#variable declaration
a=5.0*10**-4                  #area
l=8.0                         #length
dens=6.0*1000.0               #density

#calculation
w=a*l*dens

#result
print('(a)\nWeight of the displacer if weighed in air = %d kg'%w)


#(i)

#variable declaration
sbr1=23.0                   # spring balance reading

#calculation
wloss1=w-sbr1
L1=wloss1/(1000.0*a)

#result
print('\n(i)\tL1=%dm'%L1)


#(ii)

#variable declaration
sbr2=22.0                  # spring balance reading

#calculation
wloss2=w-sbr2
L2=wloss2/(1000.0*a)

#result
print('\n(ii)\tL2=%dm'%L2)

#(iii)

#variable declaration
sbr3=21.0                # spring balance reading

#calculation
wloss3=w-sbr3
L3=wloss3/(1000.0*a)

#result
print('\n(iii)\tL3=%dm'%L3)

#(b)

#variable declaration
level=8.0                # level wen tank is full     

#calculation
wt=a*level*1000.0
spring=w-wt

#result
print('\n(b):when the tank is full\nSpring Balance reading = %d kg'%spring)
(a)
Weight of the displacer if weighed in air = 24 kg

(i)	L1=2m

(ii)	L2=4m

(iii)	L3=6m

(b):when the tank is full
Spring Balance reading = 20 kg

Example 6.5, Page Number: 374

In [5]:
#variable declaration
rho=1000.0                # density of water 
v=3.0                     # displaced volume of water 

#calculation
Bw=rho*v

#Result
print('Buoyance Force(Bw) = %d kg'%Bw)
Buoyance Force(Bw) = 3000 kg

Example 6.6, Page Number: 374

In [6]:
#variable declaration
rho=1000.0             # density of water
Bw=5000.0              # Buoyancy  Force

#calculation
v=Bw/rho

#result
print('V = %d m^3' %v)
V = 5 m^3

Example 6.7, Page Number: 374

In [7]:
#variable declaration
rho=1000.0           # density of water
h=10.0               # height of liquid

#calculation
P=rho*h

#result
print('P = %d kg/m^2 = %d kg/cm^2 '%(P,P/10000))
P = 10000 kg/m^2 = 1 kg/cm^2 

Example 6.8, Page Number: 374

In [8]:
#variable declaration
rho=1000.0               # density of water
h=15.0                   # height of liquid 
ex_p=1.0                 # External pressure on liquid

#calculation
P=(rho*h/10000.0)+ex_p

#result
print('P = %.1f kg/cm^2' %P)
P = 2.5 kg/cm^2

Example 6.9, Page Number:374

In [9]:
#variable declaration
rho=1000.0               # density of water
ex_p=0.5*10**4           # External pressure on liquid     
P=1.6*10**4              #(rho*h/10000)+ex_p

#calculation
h=(P-ex_p)/1000.0

#result
print('h = %d m' %h)
h = 11 m

Example 6.10, Page Number:375

In [10]:
#variable declaration
c2=100.0*10**-6          # capacitance in capacitance probe
r1=10.0*10**3            # value of resistor in bride
r2=100.0*10**3           # value of resistor in bride
r3=50.0*10**3            # value of resistor in bride

#calculation
Cx=r1*c2/r3
Cx=Cx*10**6

#result
print('Cx = %d microFarad'%Cx)
c=5.0

#calculation
l=Cx/c

#result
print('\nLevel on the probe = %dm'%l)
Cx = 20 microFarad

Level on the probe = 4m