Chapter 16 :Waves

Example 16.9 , Page no:98

In [1]:
import math
from __future__ import division
 
#initialisation of variables
l=10**-4; #lambda in m
v=0.25; #velocity in m/sec

#CALCULATIONS
f=v/l; #calculating frequency

#RESULTS
print"Frequency in Hz =",round(f,3);
Frequency in Hz = 2500.0

Example 16.10 , Page no:98

In [2]:
import math
from __future__ import division
 
#initialisation of variables
v=5020; #/velocity in ft/sec
f=256; #frequency in Hz

#CALCULATIONS
l=v/f; #calculatin lamda

#RESULTS
print"Wavelength in ft =",round(l,3);
Wavelength in ft = 19.609

Example 16.11 , Page no:98

In [3]:
import math
from __future__ import division
 
#initialisation of variables
f=1/4; #frequency in Hz
l=30; #wavwlength in metre

#CALCULATIONS
v=f*l; #calculating velocity

#RESULTS
print"Velocity in m/sec =",round(v,3);
Velocity in m/sec = 7.5

Example 16.12 , Page no:98

In [4]:
import math
from __future__ import division
 
#initialisation of variables
l=3.2*10**-2; #/lambda in m
v=3*10**8; #velocity in m/sec

#CALCULATIONS
f=v/l; #calculating frequency

#RESULTS
print"Frequency in Hz =",'%.3E'%f;
Frequency in Hz = 9.375E+09

Example 16.13 , Page no:98

In [5]:
import math
from __future__ import division
 
#initialisation of variables
c=3*10**8; #velocity in m/sec
n=2.42; #refractive index

#CALCULATIONS
v=c/n; #calculating velocity

#RESULTS
print"Velocity in m/sec =",'%.3E'%v;
Velocity in m/sec = 1.240E+08

Example 16.15 , Page no:99

In [6]:
import math
from __future__ import division
 
#initialisation of variables
v=343; #velocity in m/sec
vs=20; #velocity in m/sec
fs=500; #original frquency

#CALCULATIONS
f1=(fs*v)/(v-vs); #doppler effect

#RESULTS
print"Percieved frequency in Hz =",round(f1,3);
Percieved frequency in Hz = 530.96

Example 16.16 , Page no:99

In [7]:
import math
from __future__ import division
 
#initialisation of variables
v1=-20; #velocity in m/sec
vs=0; #velocity in m/sec
fs=500; #original frquency

#CALCULATIONS
f1=(fs*(v+v1))/(v-vs); #doppler effect

#RESULTS
print"Percieved frequency in Hz =",round(f1,3);
Percieved frequency in Hz = 470.845

Example 16.17 , Page no:99

In [8]:
import math
from __future__ import division
 
#initialisation of variables
v=343; #velocity in m/sec
fs=800; #original frquency
f1=750; #percieved frquency

#CALCULATIONS
vs=v*(1-(fs/f1)); #calculating velocity

#RESULTS
print"Trains velocity in m/sec =",round(vs,3);
Trains velocity in m/sec = -22.867

Example 16.18 , Page no:99

In [9]:
import math
from __future__ import division
 
#initialisation of variables
l=0.1; #l=(v/c)

#CALCULATIONS
f=math.sqrt((1-l)/(1+l)); #ratio of frquencies f=(f/fs)
f1=f*100;

#RESULTS
print"Percent shift =",round(f1,3);
Percent shift = 90.453