1: Acoustics

Example number 1.1, Page number 12

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration
p=50;                   #sound waves with output power(W)
r=4;                    #Distance(m)

#Calculation
I=p/(4*math.pi*r**2)       #Intensity(W/m**2)

#Result
print "Intensity of sound at a distance of 4m from the source is",round(I,2),"W/m**2"
Intensity of sound at a distance of 4m from the source is 0.25 W/m**2

Example number 1.2, Page number 12

In [5]:
#importing modules
import math
from __future__ import division

#Variable declaration
Io=10**-12;              #Initial intensity of sound(W/m**2)
d=50;                    #number of decibels given by 10log(Io/I1)
P=70;                    #Output power(W)

#Calculation
I1=(10**5)*Io;     #Intensity(W/m**2)
r=math.sqrt(P/(4*math.pi*I1));   #distance(m)

#Result
print "The distance at which sound reduces to a level of 50dB is",round(r/10**3,2),"*10**3 m"
The distance at which sound reduces to a level of 50dB is 7.46 *10**3 m

Example number 1.3, Page number 12

In [7]:
#importing modules
import math
from __future__ import division

#Variable declaration
v=8000;             #volume of the hall(m**3)
T=1.5;             #Reverberation time(sec)

#Calculation
A=(0.161*v)/T;      #Total absorption time(m**2 sabine)

#Result
print "The total reverberation in the hall is",round(A,2),"m**2 sabine"
The total reverberation in the hall is 858.67 m**2 sabine

Example number 1.4, Page number 12

In [9]:
#importing modules
import math
from __future__ import division

#Variable declaration
l=25;                          #length of the hall(m)
b=20;                         #breadth of the hall(m)
h=10;                        #height of the hall(m)
T=4;                         #Reverberation time(s)

#Calculation
V=l*b*h;                     #Volume of the hall(m**3)
A=(0.161*V)/T;             #Total absorption time(m**2 sabine)
a=A/(2*((l*b)+(b*h)+(l*h)));  #a is absorption co-efficient

#Result
print "The average absorption co-efficients of surfaces is",round(a,3)
The average absorption co-efficients of surfaces is 0.106

Example number 1.5, Page number 12

In [11]:
#importing modules
import math
from __future__ import division

#Variable declaration
Y=77*(10**10);                               #Youngs modulus for quartz(dyne/cm**2)
rho=2.6;                                     #density of quartz(g/cm**3)
t=0.4;                                       #thickness(cm)

#Calculation
f=((1/(2*t))*math.sqrt(Y/rho))*10**-3;              #frequency(kHz)

#Result
print "The frequency of ultrasonic waves produced is",int(f),"kHz"
The frequency of ultrasonic waves produced is 680 kHz

Example number 1.6, Page number 12

In [13]:
#importing modules
import math
from __future__ import division

#Variable declaration
Y=81*10**10;                              #Young's modulus for barium titanate(dynes/cm**2)
rho=5.51;                                 #density of barium titanate(g/cm**3)
f=900;                                    #frequency of ultrasonic waves(kHZ)

#Calculation
t=((1/(2*f))*math.sqrt(Y/rho))*10**-2;           #thickness of crystal(mm)

#Result
print "The thickness of the crystal to produce ultrasonic waves is",round(t,2),"mm"
The thickness of the crystal to produce ultrasonic waves is 2.13 mm

Example number 1.7, Page number 13

In [15]:
#importing modules
import math
from __future__ import division

#Variable declaration
r=3;                        #distance(m)
I=0.86;                     #Intensity of sound source(W/m**2)

#Calculation
P=4*math.pi*r**2*I;             #Power of the sound source(W)

#Result
print "The output power of the sound source is",round(P,2),"W"
The output power of the sound source is 97.26 W

Example number 1.8, Page number 13

In [17]:
#importing modules
import math
from __future__ import division

#Variable declaration
d=60;                    #Number of decibels given by 10*log(I/I0)
I0=10**-12;               #Initial intensity of sound(W/m**2)
I=10**-6;                 #since 10log(I/I0)=60
r=200;                    #distance(m)

#Calculation
P=4*math.pi*r**2*I;      #output power of the sound source(W)

#Result
print "The output power of the sound source is",round(P,1),"W"
The output power of the sound source is 0.5 W

Example number 1.9, Page number 13

In [19]:
#importing modules
import math
from __future__ import division

#Variable declaration
V=9250;                       #volume of the hall(m**3)
A=900;                        #Total absorption(m**2 sabine)

#Calculation
T=(0.161*V)/A;                 #Reverberation time(s)

#Result
print "The reverberation time in a hall is",round(T,2),"s"
The reverberation time in a hall is 1.65 s

Example number 1.10, Page number 13

In [20]:
#importing modules
import math
from __future__ import division

#Variable declaration
f1=400;                          #Initial frequency(kHZ)
f2=500;                          #New frequency(kHZ)
t1=3;                           #initial thickness of the crystal(mm)

#Calculation
t2=(f1*t1)/f2;                  #required thickness(mm)

#Result
print "The required thickness of the crystal is",t2,"mm"
The required thickness of the crystal is 2.4 mm

Example number 1.11, Page number 13

In [23]:
#importing modules
import math
from __future__ import division

#Variable declaration
t1=2;                     #Initial thickness(mm)
t2=2.8;                   #New thickness(mm)

#Calculation
F=t1/t2;                  #ratio of new to old frequencies

#Result
print "The ratio of new to old frequencies is",round(F,3),
The ratio of new to old frequencies is 0.714