summaryrefslogtreecommitdiff
path: root/2912/CH6/EX6.2/Ex6_2.sce
blob: 24cf08f523ec37665e6351f9b7f782ac4d5239b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//chapter 6
//example 6.2
//Calculate the temperature
//page 146
clear;
clc;
//given

k=1.38E-23; // in J/K (Boltzmann's constant)
e=1.6E-19; // in C (charge of electron)
P_E=1; // in percentage (probability that a state with an energy 0.5 eV above Fermi energy will be occupied)
E=0.5; // in eV (energy above Fermi level)
//calculate
P_E=1/100; // changing percentage into ratio
E=E*e; // changing unit from eV to J
// P_E=1/(1+exp((E-E_F)/k*T))
// Rearranging this equation, we get
// T=(E-E_F)/k*log((1/P_E)-1)
// Since E-E_F has been denoted by E  therefore
T=E/(k*log((1/P_E)-1));
printf('\nThe temperature is \tT=%.f K',T);
// Note: There is slight variation in the answer due to logarithm function