summaryrefslogtreecommitdiff
path: root/884/CH18/EX18.6/Example18_6.sce
blob: fcae148f64897c04bceb3ee6f4b2a0706dcddc70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//computation of equilibrium constant from free energy of a rxn

clear;
clc;

printf("\t Example 18.6\n");

T=298;//temperature, K
R=8.314;//gas constant, J/K mol
GH2=0;//free energy of formation of H2, kJ/mol
GH2O=-237.2;//free energy of formation of H2O, kJ/mol
GO2=0;//free energy of formation of O2, kJ/mol
deltaG=1000*(2*GH2+GO2-2*GH2O);//free energy of rxn, J/mol

Kp=exp(-deltaG/(R*T));//equilibrium constant for rxn

printf("\t the equilibrium constant for the given reaction is : %2.0f*10^-84\n",Kp*10^84);

//End