summaryrefslogtreecommitdiff
path: root/3689/CH15/EX15.3/15_3.sce
blob: f68112e1245a37016964b35a973bfa66804dbf80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
////
//Variable Declaration
g0 = 3.0  
labda = 1263e-9       //Wave length in nm
T = 500.              //Temperature, K
c = 3.00e8            //Speed of light, m/s
NA = 6.022e23         //Avagadro's Number, 1/mol
k = 1.38e-23          //Boltzmann constant, J/K
n = 1.0               //Number of moles, mol
h = 6.626e-34         //Planks's Constant, J.s

//Calcualtions
beta = 1/(k*T)
eps = h*c/labda
qE = g0 + exp(-beta*eps)
UE = n*NA*eps*exp(-beta*eps)/qE

//Results
printf("\n Energy of excited state is %4.2e J",eps)

printf("\n Electronic partition function qE is %4.3e",qE)

printf("\n Electronic contribution to internal enrgy is %4.3e J",UE)