forked from WMD-group/CZTS-model
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86cb26b
commit 58c2f20
Showing
5 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from materials\n", | ||
"import numpy as np\n", | ||
"\n", | ||
"from plot_potential import plot_potential\n", | ||
"\n", | ||
"T = np.linspace(600,1200,100) # K\n", | ||
"P = np.array( np.logspace(1,7,100),ndmin=2).transpose() # Pa\n", | ||
"\n", | ||
"#D_mu_S8 = 1/8*(S8.mu_kJ(T, P) - alpha_S.mu_kJ(T, P))\n", | ||
"mu_S2 = 1/2*S2.mu_kJ(T, P)\n", | ||
"mu_Ss = 1/8 *alpha_S.mu_kJ(T, P)\n", | ||
"mu_S8 = 1/8 * S8.mu_kJ(T, P)\n", | ||
"D_mu = 1/2 * S2.mu_kJ(T, P) - 1/8 *alpha_S.mu_kJ(T, P)\n", | ||
"#D_mu = 1/2* S2.mu_kJ(T, P) - 1/8 * S8.mu_kJ(T, P)\n", | ||
"\n", | ||
"E_Ss = (-.12378465E+04) - (-.12377738E+04) + (1) * (mu_Ss) * 0.0103636 + (+2)*(3.15+0.846)\n", | ||
"E_S8 = (-.12378465E+04) - (-.12377738E+04) + (1) * (mu_S8) * 0.0103636 + (+2)*(3.15+0.846)\n", | ||
"E_S2 = (-.12378465E+04) - (-.12377738E+04) + (1) * (mu_S2) * 0.0103636 + (+2)*(3.15+0.846)\n", | ||
"kbt = (1.380649e-23) * T / (1.6e-19)\n", | ||
"n_S2 = np.log10(1 * 64 * np.exp(-E_S2/kbt))\n", | ||
"n_S8 = np.log10(1 * 64 * np.exp(-E_S8/kbt))\n", | ||
"n_Ss = np.log10(1 * 64 * np.exp(-E_Ss/kbt))\n", | ||
"\n", | ||
"\n", | ||
"n =(- D_mu * 1000 / ((1.380649e-23) * (6.0221408e+23) * T))\n", | ||
"\n", | ||
"D_mu_label = 'ln(n(V$_{S}$)/n(V$_{S(ref)}$))'\n", | ||
"formation = 'V$_{S}$$^{+2}$ formation energy (eV)'\n", | ||
"con_label= 'V$_{S}$$^{+2}$ Defect concentration (log10)'\n", | ||
"scale_range = [0,35]\n", | ||
"\n", | ||
"#plot_potential(T,P,E_S2,formation,scale_range,filename='plots/FormationS2.png')\n", | ||
"plot_potential(T,P,mu_Ss,con_label,scale_range,filename='plots/muSs_y.png')\n", | ||
"plot_potential(T,P,E_S8,con_label,scale_range,filename='plots/E8.png')\n", | ||
"plot_potential(T,P,n_S2,con_label,scale_range,filename='plots/ConcentrationS2_y.png')\n", | ||
"plot_potential(T,P,n_S8,con_label,scale_range,filename='plots/ConcentrationS8_y.png')\n", | ||
"plot_potential(T,P,n_Ss,con_label,scale_range,filename='plots/ConcentrationSs_y.png')" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3.9.16 64-bit", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"name": "python", | ||
"version": "3.9.16" | ||
}, | ||
"orig_nbformat": 4, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "397704579725e15f5c7cb49fe5f0341eb7531c82d19f2c29d197e8b64ab5776b" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
File renamed without changes.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
def main(): | ||
from materials | ||
import numpy as np | ||
|
||
from plot_potential import plot_potential | ||
|
||
T = np.linspace(600,1200,100) # K | ||
P = np.array( np.logspace(1,7,100),ndmin=2).transpose() # Pa | ||
|
||
#D_mu_S8 = 1/8*(S8.mu_kJ(T, P) - alpha_S.mu_kJ(T, P)) | ||
mu_S2 = 1/2*S2.mu_kJ(T, P) | ||
mu_Ss = 1/8 *alpha_S.mu_kJ(T, P) | ||
mu_S8 = 1/8 * S8.mu_kJ(T, P) | ||
D_mu = 1/2 * S2.mu_kJ(T, P) - 1/8 *alpha_S.mu_kJ(T, P) | ||
#D_mu = 1/2* S2.mu_kJ(T, P) - 1/8 * S8.mu_kJ(T, P) | ||
|
||
E_Ss = (-.12378465E+04) - (-.12377738E+04) + (1) * (mu_Ss) * 0.0103636 + (+2)*(3.15+0.846) | ||
E_S8 = (-.12378465E+04) - (-.12377738E+04) + (1) * (mu_S8) * 0.0103636 + (+2)*(3.15+0.846) | ||
E_S2 = (-.12378465E+04) - (-.12377738E+04) + (1) * (mu_S2) * 0.0103636 + (+2)*(3.15+0.846) | ||
kbt = (1.380649e-23) * T / (1.6e-19) | ||
n_S2 = np.log10(1 * 64 * np.exp(-E_S2/kbt)) | ||
n_S8 = np.log10(1 * 64 * np.exp(-E_S8/kbt)) | ||
n_Ss = np.log10(1 * 64 * np.exp(-E_Ss/kbt)) | ||
|
||
|
||
n =(- D_mu * 1000 / ((1.380649e-23) * (6.0221408e+23) * T)) | ||
|
||
D_mu_label = 'ln(n(V$_{S}$)/n(V$_{S(ref)}$))' | ||
formation = 'V$_{S}$$^{+2}$ formation energy (eV)' | ||
con_label= 'V$_{S}$$^{+2}$ Defect concentration (log10)' | ||
scale_range = [0,35] | ||
|
||
#plot_potential(T,P,E_S2,formation,scale_range,filename='plots/FormationS2.png') | ||
plot_potential(T,P,mu_Ss,con_label,scale_range,filename='plots/muSs_y.png') | ||
plot_potential(T,P,E_S8,con_label,scale_range,filename='plots/E8.png') | ||
plot_potential(T,P,n_S2,con_label,scale_range,filename='plots/ConcentrationS2_y.png') | ||
plot_potential(T,P,n_S8,con_label,scale_range,filename='plots/ConcentrationS8_y.png') | ||
plot_potential(T,P,n_Ss,con_label,scale_range,filename='plots/ConcentrationSs_y.png') | ||
|
||
if __name__ == "__main__": | ||
main() |