# Chapter 4: Acceleration Vibration and Density

### Example 4.1, Page Number:209

In [1]:
import math
#(a)

#variable Declaration
k=50.0                       #Spring constant
m=0.005                      # mass in kg

#calculation
wn=math.sqrt(k/m)

#result
print('(a)\nNatural frequency(wn)= %d rad/s' %wn)

#(b)

#calculation
Cc=2*(m*k)**(0.5)

#result
print('\n(b)\nCc=%d' %Cc)

(a)
Natural frequency(wn)= 100 rad/s

(b)
Cc=1

### Example 4.2, Page Number:209

In [2]:
#(a)
import math

#variable Declaration
Cc=1.0                     # damping ratio
C=0.7*Cc                   # Critical damping ratio
m=0.005                    # mass
k=50.0                     # spring constant

#calculation
w=math.sqrt((k/m)-(C/(2*m))**2)

#result

#(b)

#variable Declaration
w1=250.0                    # angular velocity

#calculation
theta=C*w1/(k-m*w1**2)
print('\ntheta=%f' %theta)
fi=math.atan(-theta)
fi=fi*180.0/math.pi

#result
print('\nfi = %d°'%fi)

(a)

theta=-0.666667

fi = 33°

### Example 4.3, PAge Number: 210

In [3]:
import math

#variable Declaration
m=0.005                # mass
c=0.7                  # damping ratio

#calculation
y=-math.log(0.01)
t=y*2*m/c

#result
print('t=%.4f Secs' %t)

t=0.0658 Secs

### Example 4.4, Page Number:210

In [4]:
#variable Declaration
rg1=1200.0                        #resistance in Ohm
rg2=1200.0                        #resistance in Ohm
rg3=1200.0                        #resistance in Ohm
rg4=1200.0                        #resistance in Ohm

#calculation
D1=rg1*5.0/100.0
D2=rg2*5.0/100.0
D3=rg3*5.0/100.0
D4=rg4*5.0/100.0
E=12.0
v=E*(((rg1+D1)/(rg1+D1+rg2-D2))-((rg4-D4)/(rg3+D3+rg4-D4)))
v=v*1000.0

#result
print('V0=%d mV' %v)

V0=600 mV

### Example 4.5, Page Number:211

In [5]:
#variable declaration
g=0.06                  # voltage sensitivity

#calculation
t=2.5*10**-3
p=20*9.8*10**4
E=g*t*p

#Result
print('E=%d V' %E)

E=294 V

### Example 4.6, Page Number: 211

In [6]:
#resistance in Ohm
c0=25.0                        # capacitance in pF
x0=0.5                         # distance between plates
x1=0.05                        # steady state displacement

#calculations
c1=c0*x0/(x0-x1)
c2=c0*x0/(x0+x1)

#result
print('C1=%.2f pF\nC2=%.2f pF'%(c1,c2))

C1=27.78 pF
C2=22.73 pF

### Example 4.7, Page Number: 211

In [7]:
#(a)

sg_at_60=1.02

#calculation
API=(141.5/sg_at_60)-131.5

#result
print('(a)\nDegrees API = %.2f°API' %API)

#(b)

#calculation
Be=145-145/sg_at_60

#result
print('\n(b)\nDegrees Baume(heavy) = %.1f°Be' %Be)

#(c)

#calculation
Bk=(sg_at_60-1)*1000

#result
print('\n(c)\nDegrees Barkometer = %d°Bk' %Bk)

#(d)

#calculation
Q=(sg_at_60-1)*1000

#result
print('\n(c)\nDegrees Quevenne = %d°Q' %Q)

#(e)

#calculation
Tw=200*(sg_at_60-1.0)

#result
print('\n(d)\nDegrees Twaddel = %d°Tw' %Tw)

(a)
Degrees API = 7.23°API

(b)
Degrees Baume(heavy) = 2.8°Be

(c)
Degrees Barkometer = 20°Bk

(c)
Degrees Quevenne = 20°Q

(d)
Degrees Twaddel = 4°Tw

### Example 4.8, Page NUmber: 212

In [8]:
import math

#variable Declaration
T=0.5                   # Torque Tube Force
sg1=1.02                # Maximum spe.gravity to be measured
sg2=0.98                # Minimum spe.gravity to be measured
wt=1000*10**-6

#calculation
v=T/((sg1-sg2)*wt)
v=math.ceil(v)

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

V=12500 cm^3

### Example 4.9, Page Number: 212

In [9]:
import math

#variavle declaration
sg1=0.85                # Maximum spe.gravity to be measured
sg2=0.8                 # Minimum spe.gravity to be measured
span=150.0              # D/P cell span

#a

#calculation
H=span/(sg1-sg2)

#result
print('(a)\nH=%d mm = %dm' %(H,H/1000))

#b

#calculation
span_min=1500.0
span2=span_min*(sg1-sg2)
span2=math.ceil(span2)

#result
print('\n(b)\nD/P span = %d mm' %span2)

(a)
H=3000 mm = 3m

(b)
D/P span = 75 mm

### Example 4.10, Page Number:212

In [10]:
#variable declaration
Ww=12-2                    # Width of water
dw=1000.0                  # density of water

#calculation
v=Ww/dw
dx=(10-2)/v
sg=dx/dw

#result
print('Specific Gravity of X =%.1f' %sg)

Specific Gravity of X =0.8

### Example 4.11, PAge Number: 213

In [11]:
#(a)

#variable declaration
wt=1.5                      # weight of object

#calculation
v_obj=2.0/1000
dx=wt/v_obj
sg=dx/1000

#result
print('(a)\nSpecific Gravity = %.2f' %sg)

#(b)

sgl=0.8                     # specific grav of liquid
dens=800.0                  # density

#calculation
W1=dens*v_obj-wt

#result
print('\n(b)\nW1 = %.1f kg' %W1)

#(c)

#variable declaration
sg2=1.2                     # spe. grav.
dens2=1200.0                # density

#calculation
W2=dens2*v_obj-wt

#result
print('\n(c)\nW2 = %.1f kg' %W2)

(a)
Specific Gravity = 0.75

(b)
W1 = 0.1 kg

(c)
W2 = 0.9 kg