summaryrefslogtreecommitdiff
path: root/884/CH19/EX19.6/Example19_6.sce
blob: c1b32224759ac73c6e539c31227886f9989a57bd (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
25
26
27
//computation of standard free energy change for a reaction

clear;
clc;

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

n=2;
F=96500;//faraday constant, J/V mol

Co2=0.15;//conc of Co2+ ions, M
Fe2=0.68;//conc of Fe2+ ions, M

E0cathode=-0.44;//standard electrode potential of cathode(Fe2+/Fe), V
E0anode=-0.28;//standard electrode potential of anode(Co2+/Co), V

E0cell=E0cathode-E0anode;//standard emf of the cell, V

Ecell=E0cell-0.0257/2*log(Co2/Fe2);//calculation of cell potential at non standard conditions, V

if(Ecell>0) then
    printf("\t the reaction would proceed spontaneously in the direction written \n");
else
    printf("\t the reaction is not spontaneously in the direction written \n");
    end;

//End