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 of surfinpy.data.DataSet objects containing info about each calculation

  • stoich (surfinpy.data.DataSet) – info about the stoichiometric surface calculation

  • adsorbant_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 surface

  • data (list) – list of surfinpy.data.DataSet objects on the “adsorbed” surfaces

  • SE (float) – surface energy of the stoichiomteric surface

  • adsorbant (float) – dft energy of adsorbing species

  • coverage (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 diagram

  • min_p (int) – Minimum pressure of phase diagram

  • max_p (int) – Maximum pressure of phase diagram

Returns

system – plotting object

Return type

surfinpy.plotting.PTPlot

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 DFT

  • slab_energy ((float):) – bare slab energy from DFT

  • n_species ((int):) – number of adsorbed species at the surface

  • adsorbant_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

\gamma_{adsorbed, T, p} = \gamma_{bare} + (C(E_{ads, T} -
RTln(\frac{p}{p^o})

where \gamma_{adsorbed, T, p} is the surface energy of the surface with adsorbed species at a given temperature and pressure, \gamma_{bare} is the suface energy of the bare surface, C is the coverage of adsorbed species, E_{ads, T} is the adsorption energy, R is the gas constant, T is the temperature, and \frac{p}{p^o} is the partial pressure.

Parameters
  • AE (list) – list of adsorption energies

  • lnP ((array_like) – full pressure range

  • T (array_like) – full temperature range

  • coverage (array_like) – surface coverage of adsorbing species in each calculation

  • SE (float) – surface energy of stoichiomteric surface

  • data (list) – list of dictionaries containing info on each surface

  • nsurfaces (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 data

  • adsorbant (float) – dft energy of adsorbing species

  • max_t (int) – Maximum temperature of phase diagram

  • min_p (int) – Minimum pressure of phase diagram

  • max_p (int) – Maximum pressure of phase diagram

Returns

  • lnP (array_like) – numpy array of pressure values

  • logP (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