Laser

Example number 2.1, Page number 59

In [1]:
#importing modules
import math

#Variable declaration
h=6.626*10**-34;
c=3*10**8;
lamda=632.8*10**-9;    #wavelength in m
P=5*10**-3;        #output power in W

#Calculation
E=(h*c)/lamda;    #energy of one photon
E_eV=E/(1.6*10**-19);   #converting J to eV
E_eV=math.ceil(E_eV*1000)/1000;   #rounding off to 3 decimals
N=P/E;    #number of photons emitted


#Result
print("energy of one photon in eV is",E_eV);
print("number of photons emitted per second is",N);
('energy of one photon in eV is', 1.964)
('number of photons emitted per second is', 1.5917094275077976e+16)

Example number 2.2, Page number 60

In [2]:
#importing modules
import math

#Variable declaration
h=6.626*10**-34;
c=3*10**8;
lamda=632.8*10**-9;    #wavelength in m

#Calculation
E=(h*c)/lamda;   #energy of one photon
E_eV=E/(1.6*10**-19);   #converting J to eV
E_eV=math.ceil(E_eV*1000)/1000;   #rounding off to 3 decimals

#Result
print("energy of one photon in eV is",E_eV);
('energy of one photon in eV is', 1.964)

Example number 2.3, Page number 60

In [3]:
#importing modules
import math

#Variable declaration
E1=0;        #value of 1st energy level in eV
E2=1.4;       #value of 2nd energy level in eV
lamda=1.15*10**-6;
h=6.626*10**-34;
c=3*10**8;

#Calculation
E=(h*c)/lamda;   #energy of one photon
E_eV=E/(1.6*10**-19);   #converting J to eV
E3=E2+E_eV;
E3=math.ceil(E3*100)/100;   #rounding off to 2 decimals

#Result
print("value of E3 in eV is",E3);

#answer given in the book for E3 is wrong
('value of E3 in eV is', 2.49)

Example number 2.4, Page number 60

In [6]:
#Variable declaration
h=6.626*10**-34;
c=3*10**8;
E2=3.2;        #value of higher energy level in eV
E1=1.6;        #value of lower energy level in eV

#Calculation
E=E2-E1;   #energy difference in eV
E_J=E*1.6*10**-19;      #converting E from eV to J
lamda=(h*c)/E_J;    #wavelength of photon

#Result
print("energy difference in eV",E);
print("wavelength of photon in m",lamda);
('energy difference in eV', 1.6)
('wavelength of photon in m', 7.76484375e-07)

Example number 2.5, Page number 60

In [8]:
#Variable declaration
h=6.626*10**-34;
c=3*10**8;
E=1.42*1.6*10**-19;     #band gap of GaAs in J

#Calculation
lamda=(h*c)/E;   #wavelength of laser

#Result
print("wavelength of laser emitted by GaAs in m",lamda);
('wavelength of laser emitted by GaAs in m', 8.74911971830986e-07)

Example number 2.6, Page number 61

In [9]:
#importing modules
import math

#Variable declaration
T=300;     #temperature in K
lamda=500*10**-9;        #wavelength in m
h=6.626*10**-34;
c=3*10**8;
k=1.38*10**-23;

#Calculation
#from maxwell and boltzmann law, relative population is given by
#N1/N2=exp(-E1/kT)/exp(-E2/kT)
#hence N1/N2=exp(-(E1-E2)/kT)=exp((h*new)/(k*T));
#new=c/lambda
R=(h*c)/(lamda*k*T);
RP=math.exp(R);

#Result
print("relative population between N1 and N2 is",RP);
('relative population between N1 and N2 is', 5.068255595981255e+41)

Example number 2.7, Page number 61

In [11]:
#importing modules
import math

#Variable declaration
T=300;   #temperature in K
h=6.626*10**-34;
c=3*10**8;
k=1.38*10**-23;
lamda=600*10**-9;    #wavelength in m

#Calculation
R=(h*c)/(lamda*k*T);
Rs=1/(math.exp(R)-1);

#Result
print("the ratio between stimulated emission to spontaneous emission is",Rs);
('the ratio between stimulated emission to spontaneous emission is', 1.7617782449453023e-35)

Example number 2.8, Page number 62

In [14]:
#importing modules
import math

#Variable declaration
P=5*10**-3;          #output power in W
I=10*10**-3;        #current in A
V=3*10**3;        #voltage in V

#Calculation
e=(P*100)/(I*V);
e=math.ceil(e*10**6)/10**6;   #rounding off to 6 decimals

#Result
print("efficiency of laser in % is",e);
('efficiency of laser in % is', 0.016667)

Example number 2.9, Page number 62

In [1]:
#importing modules
import math

#Variable declaration
P=1e-03;    #output power in W
d=1e-06;    #diameter in m

#Calculation
r=d/2;      #radius in m
I=P/(math.pi*r**2);    #intensity
I=I/10**9;
I=math.ceil(I*10**4)/10**4;   #rounding off to 4 decimals

#Result
print("intensity of laser in W/m^2 is",I,"*10**9");
('intensity of laser in W/m^2 is', 1.2733, '*10**9')

Example number 2.10, Page number 62

In [2]:
#importing modules
import math

#Variable declaration
lamda=632.8*10**-9;   #wavelength in m
D=5;      #distance in m
d=1*10**-3;      #diameter in m

#Calculation
deltatheta=lamda/d;   #angular speed
delta_theta=deltatheta*10**4;
r=D*deltatheta;
r1=r*10**3;       #converting r from m to mm
A=math.pi*r**2;   #area of the spread

#Result 
print("angular speed in radian is",delta_theta,"*10**-4");
print("radius of the spread in mm is",r1);
print("area of the spread in m^2 is",A);
('angular speed in radian is', 6.328, '*10**-4')
('radius of the spread in mm is', 3.164)
('area of the spread in m^2 is', 3.1450157329451454e-05)
In [ ]: