-
Notifications
You must be signed in to change notification settings - Fork 2
/
minGdiff.m
24 lines (19 loc) · 1.26 KB
/
minGdiff.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function [G_diff]=minGdiff(Dmn_int,deltaE_Mn,E0,R,Temp,delta_int,C0_mn,V_int)
% V_int=Velocity;
% V_int=-1e-10;
Dim_a=Dmn_int*(deltaE_Mn-E0)/(R*Temp*V_int*delta_int); % dimensionless parameter a
Dim_b=Dmn_int*(deltaE_Mn+E0)/(R*Temp*V_int*delta_int); % dimensionless parameter b
Dim_v=abs(V_int*delta_int/Dmn_int); % dimensionless parameter v
G_diff1=Dim_a.^2*R*Temp*V_int*C0_mn*delta_int/(Dmn_int*Dim_v*(1+2*Dim_a+Dim_a.^2));
G_diff1=G_diff1*(-exp(Dim_v+Dim_v*Dim_a)+exp(Dim_v+Dim_v*Dim_a)*Dim_v+ ...
exp(Dim_v+Dim_v*Dim_a)*Dim_v*Dim_a+1)*exp(-Dim_v-Dim_v*Dim_a);
G_diff2=-Dim_b*R*Temp*V_int*C0_mn*delta_int/(Dmn_int*Dim_v*(1+Dim_a+2*Dim_b+2*Dim_a*Dim_b+ ...
Dim_b^2+Dim_b^2*Dim_a));
G_diff2=G_diff2*(Dim_a*exp(Dim_v+Dim_v*Dim_b)+Dim_a*Dim_b*exp(Dim_v+Dim_v*Dim_b)+ ...
Dim_b*exp(2*Dim_v+Dim_v*Dim_b+Dim_v*Dim_a)-Dim_a*exp(2*Dim_v+Dim_v*Dim_b+Dim_v*Dim_a)- ...
Dim_v*Dim_b*exp(2*Dim_v+Dim_v*Dim_b+Dim_v*Dim_a)+Dim_a*exp(Dim_v+Dim_v*Dim_a)- ...
Dim_v*Dim_b^2*exp(2*Dim_v+Dim_v*Dim_b+Dim_v*Dim_a)- ...
Dim_v*Dim_b^2*Dim_a*exp(2*Dim_v+Dim_v*Dim_b+Dim_v*Dim_a)-Dim_a- ...
Dim_v*Dim_a*Dim_b*exp(2*Dim_v+Dim_v*Dim_b+Dim_v*Dim_a)-Dim_a*Dim_b- ...
Dim_b*exp(Dim_v+Dim_v*Dim_a))*exp(-2*Dim_v-Dim_v*Dim_b-Dim_v*Dim_a);
G_diff=(G_diff1+G_diff2)/100; % [J/mol]