summaryrefslogtreecommitdiff
path: root/944/CH5/EX5.43/example5_43_TACC.sce
blob: de6ac8496e3c1aa8425a08891fee32d1ff8597e5 (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
//example 5.43

clear;
clc;

//Given:
disp("H2(g,1atm)|HCl(aq)|HCl(aq)|H2(g,1atm)");
m1=0.02;//concentration[M]
Y1=0.88;//mean ionic activity coefficient
m2=1;//concentration[M]
Y2=0.81;//mean ionic activity coefficient
R=8.314;//universal gas constant[J/K/mol]
T=298;//Temperature[K]
F=96487;//Faraday's constant[coulombs/mol]
t=0.178;//Tranference number of Cl-1

//To find the e.m.f of the cell
E=-2*t*R*T*(log(m1*Y1/m2/Y2))/F;//e.m.f of the cell[volts]
printf("The e.m.f of the cell is %f volts",E);