import math
#initialisation of variables
print('At distance equal to x=xi at which N = concentration n of doped silicon wafers , the net impurity density is zero. Thus xi is the distance at which junction is formed')
q = 1.6*(10**-19) #Charge of electron
yn=1300.0 #mobility of silicon
p = 0.5 #resistivity in ohm=cm
y=2.2
#Calculations
t=2.0*3600 #in sec.
xi = 2.7*(10**-4) #Junction Depth in cm.
n = 1/(p*yn*q) #Concentration of doped silicon wafer
print("The concentration n = %.2f cm^-3 x 10^16" %(n/10**16))
print('The junction is formed when N = n')
#y = xi/(2*(D*t)^0.5)
D=((xi)**2/((2*y)**2*t)) #Diffusion Constant
#Results
print("The value of Diffusion Constant for Boron = %.2f cm^2/sec X 10^-13" %(D*10**13))
import math
#initialisation of variables
d=5.2*10**-13 #from previous example
depth=1.7*10**-4
t=2*3600.0
c=2.5*10**17 # boron concentration cm^3
#Calculations
y = depth/(2*(math.sqrt(d*t)))
q=(c*(math.sqrt(math.pi*4*10**-13*3420)))/(math.exp(-((depth**2)/(4*4*10**-13*3420))))
#Results
print("The value of Y is = %.2f " %(y))
print("The value of Q is = %.2f cm2 X 10^15 " %(q/10**15))
import math
#initialisation of variables
y=100.0*10**-4 #mm
h=500.0 #cm^2/V-s
p=10.0**16 #boron of concentration
#Calculations
Rs=1.0/(1.6*10**-19*h*p*y)
#Results
print("The value of Rs sheet resistance is = %.2f ohm/sqare" %(Rs))
import math
#initialisation of variables
Rs=100.0 #ohm/square
l=50.0 #mm
w=10 #mm
#Calculations
R=Rs*(l/w)
#Results
print("The resistance of defused resistor is = %.2f ohm" %(R))
import math
#initialisation of variables
A=100*10**-8 #mm^2
q=1.6*10**-19
Nd=10**16 #donor concentration /cm^3
e=11.9*8.85*10**-14
Vj=0.82 #v
#Calculations
C=A*math.sqrt((q*Nd*e)/(2*Vj))
#Results
print("The capacitance is = %.f fF" %(C*10**15))
import math
#initialisation of variables
A=100*10*10**-8 #mm^2
q=1.6*10**-19
e=11.9*8.85*10**-14
Vj=0.98 #v
Mn=1300.0
pn=0.01
#Calculations
Nd=1/(q*Mn*pn) #donor concentration /cm^3
C=A*math.sqrt((q*Nd*e)/(2*Vj))
#Results
print("The capacitance is = %.f pF" %(C*10**12))
import math
#initialisation of variables
e=3.9*8.85*10**-14
d=20*10**-8
#Calculations
C=(e/d)*(10**9/10**8)
#Results
print("The capacitance per unit area is = %.2f fF/mM^2" %(C*10**6))