surfinpy.p_vs_t¶
Functions related to the generation of surface phase diagrams as a function of pressure and temperature. An explanation of theory can be found here
- surfinpy.p_vs_t.adsorption_energy(data, stoich, adsorbant_t)[source]¶
From the dft data provided - calculate the adsorbation energy of a species at the surface.
- Parameters
data (
list) – list ofsurfinpy.data.DataSetobjects containing info about each calculationstoich (
surfinpy.data.DataSet) – info about the stoichiometric surface calculationadsorbant_t (
array_like) – dft energy of adsorbing species as a function of temperature
- Returns
AE – Adsorbtion energy of adsorbing species in each calculation as a function of temperature
- Return type
array_like
- surfinpy.p_vs_t.calculate(stoich, data, SE, adsorbant, thermochem, max_t=1000, min_p=- 13, max_p=5.5, coverage=None, transform=True)[source]¶
Collects input variables and intitialises the calculation.
- Parameters
stoich (
surfinpy.data.DataSet) – information about the stoichiometric surfacedata (
list) – list ofsurfinpy.data.DataSetobjects on the “adsorbed” surfacesSE (
float) – surface energy of the stoichiomteric surfaceadsorbant (
float) – dft energy of adsorbing speciescoverage (
array_like(default None)) – Numpy array containing the different coverages of adsorbant.thermochem (
array_like) – Numpy array containing thermochemcial data downloaded from NIST_JANAF for the adsorbing species.max_t (
int) – Maximum temperature in the phase diagrammin_p (
int) – Minimum pressure of phase diagrammax_p (
int) – Maximum pressure of phase diagram
- Returns
system – plotting object
- Return type
- surfinpy.p_vs_t.calculate_adsorption_energy(adsorbed_energy, slab_energy, n_species, adsorbant_t)[source]¶
Calculates the adsorption energy in units of eV
- Parameters
adsorbed_energy ((
float):) – slab energy of slab and adsorbed species from DFTslab_energy ((
float):) – bare slab energy from DFTn_species ((
int):) – number of adsorbed species at the surfaceadsorbant_t ((
array_like):) – dft energy of adsorbing species as a function of temperature
- Returns
adsorption energy as a function of temperature
- Return type
array_like
- surfinpy.p_vs_t.calculate_surface_energy(AE, lnP, T, coverage, SE, nsurfaces)[source]¶
Calculates the surface energy as a function of pressure and temperature for each surface system according to

where
is the surface energy of the surface
with adsorbed species at a given temperature and pressure,
is the suface energy of the bare surface,
C is the coverage of adsorbed species,
is the
adsorption energy, R is the gas constant, T is the temperature, and
is the partial pressure.- Parameters
AE (
list) – list of adsorption energieslnP ((
array_like) – full pressure rangeT (
array_like) – full temperature rangecoverage (
array_like) – surface coverage of adsorbing species in each calculationSE (
float) – surface energy of stoichiomteric surfacedata (
list) – list of dictionaries containing info on each surfacensurfaces (
int) – total number of surface
- Returns
SE_array – array of integers corresponding to lowest surface energies
- Return type
array_like
- surfinpy.p_vs_t.convert_adsorption_energy_units(AE)[source]¶
Converts the adsorption energy into units of KJ/mol
- Parameters
AE (
array_like) – array of adsorption energies- Returns
array of adsorption energies in units of KJ/mol
- Return type
array_like
- surfinpy.p_vs_t.inititalise(thermochem, adsorbant, max_t, min_p, max_p)[source]¶
Builds the numpy arrays for each calculation.
- Parameters
thermochem (
array_like) – array containing NIST_JANAF thermochemical dataadsorbant (
float) – dft energy of adsorbing speciesmax_t (
int) – Maximum temperature of phase diagrammin_p (
int) – Minimum pressure of phase diagrammax_p (
int) – Maximum pressure of phase diagram
- Returns
lnP (
array_like) – numpy array of pressure valueslogP (
array_like) – log of lnP (hard coded range -13 - 5.0)T (
array_like) – array of temperature values (hard coded range 2 - 1000 K)adsrobant_t (
array_like) – dft values of adsorbant scaled to temperature