-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththemodynamics_factor.py
71 lines (51 loc) · 1.15 KB
/
themodynamics_factor.py
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 6 14:12:08 2022
@author: arch9809
"""
import matplotlib.pyplot as plt
import numpy as np
LC = [
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd",
"#8c564b",
"#e377c2",
"#7f7f7f",
"#bcbd22",
"#17becf",
]
nosc = np.arange(-3, 3.1, 0.1)
g= 4-nosc
dGox = 60.3-28.5*nosc # kJ/ C mol
z = [4, 2,1,8]
m = [1,0.33,0.33,0.167]
X=[2,1,1,1]
Ered = [0.82,0.43,0.014,-0.22]
F = 96.485 # kJ/volt
R = 0.008314
T = 273.15
EA =['O2','N','Fe','SO4']
# plt.figure()
# i=3
# dGred = -z[i]*F*Ered[i]
# dGrxn = dGox + dGred
# FT = 1- np.exp((dGrxn + m[i]*50)/(X[i]*R*T))
# plt.plot(nosc, FT)
# plt.xlabel('NOSC')
# plt.ylabel('FT')
# plt.ylim([0,1.2])
plt.figure()
for i in range(0,len(z)):
dGred = -z[i]*F*Ered[i]
dGrxn = dGox + dGred
FT = 1- np.exp((dGrxn + m[i]*50)/(X[i]*R*T))
FT2= 1/(1 + np.exp( (dGrxn + F*80*0.001)/(R*T)))
plt.plot(g, FT,'-', label = EA[i],color=LC[i])
plt.plot(g, FT2,'--', label = EA[i],color=LC[i])
plt.xlabel('NOSC')
plt.ylabel('FT')
plt.legend()
plt.ylim([0,1.2])