pytheos package

Submodules

pytheos.conversion module

pytheos.conversion.moduli_to_velocities(rho, K_s, G)

convert moduli to velocities mainly to support Burnman operations

Parameters:
  • rho – density in kg/m^3
  • v_phi – adiabatic bulk modulus in Pa
  • v_s – shear modulus in Pa
Returns:

bulk sound speed and shear velocity

pytheos.conversion.velocities_to_moduli(rho, v_phi, v_s)

convert velocities to moduli mainly to support Burnman operations

Parameters:
  • rho – density in kg/m^3
  • v_phi – bulk sound speed in m/s
  • v_s – shear velocity in m/s
Returns:

K_s and G

pytheos.conversion.vol_mol2uc(v_mol, z_uc)

convert unit cell volume in A^3 to molar volume in m^3/mol

Parameters:
  • v_mol – molar volume in m^3/mol
  • z_uc – number of formula unit in a unit cell (z)
Returns:

unit-cell volume in A^3

pytheos.conversion.vol_uc2mol(v_uc, z_uc)

convert unit cell volume in A^3 to molar volume in m^3/mol

Parameters:
  • v_uc – unit-cell volume in A^3
  • z_uc – number of formula unit in a unit cell (z)
Returns:

molar volume

pytheos.eqn_anharmonic module

pytheos.eqn_anharmonic.zharkov_panh(v, temp, v0, a0, m, n, z, t_ref=300.0, three_r=24.943379399999998)

calculate pressure from anharmonicity for Zharkov equation the equation is from Dorogokupets 2015

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • a0 – parameter in K-1 for the Zharkov equation
  • m – parameter for the Zharkov equation
  • n – number of elements in a chemical formula
  • z – number of formula unit in a unit cell
  • three_r – 3 times gas constant
Returns:

anharmonic contribution for pressure in GPa

pytheos.eqn_bm3 module

2017/05/03 No need to put isuncertainties because there is no particularly function to be problematic to the functions here.

pytheos.eqn_bm3.bm3_big_F(p, v, v0)

calculate big F for linearlized form not fully tested

Parameters:
  • p
  • f
Returns:

pytheos.eqn_bm3.bm3_dPdV(v, v0, k0, k0p, precision=1e-05)

calculate dP/dV for numerical calculation of bulk modulus according to test this differs from analytical result by 1.e-5

Parameters:
  • v – volume
  • v0 – volume at reference conditions
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at different conditions
  • precision – precision for numerical calculation (default = 1.e-5*v0)
Returns:

dP/dV

pytheos.eqn_bm3.bm3_g(p, v0, g0, g0p, k0, k0p)

calculate shear modulus at given pressure. not fully tested with mdaap.

Parameters:
  • p – pressure
  • v0 – volume at reference condition
  • g0 – shear modulus at reference condition
  • g0p – pressure derivative of shear modulus at reference condition
  • k0 – bulk modulus at reference condition
  • k0p – pressure derivative of bulk modulus at reference condition
Returns:

shear modulus at high pressure

pytheos.eqn_bm3.bm3_k(p, v0, k0, k0p)

calculate bulk modulus, wrapper for cal_k_bm3 cannot handle uncertainties

Parameters:
  • p – pressure
  • v0 – volume at reference conditions
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at different conditions
Returns:

bulk modulus at high pressure

pytheos.eqn_bm3.bm3_k_num(v, v0, k0, k0p, precision=1e-05)

calculate bulk modulus numerically from volume, not pressure according to test this differs from analytical result by 1.e-5

Parameters:
  • v – volume
  • v0 – volume at reference conditions
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at different conditions
  • precision – precision for numerical calculation (default = 1.e-5*v0)
Returns:

dP/dV

pytheos.eqn_bm3.bm3_p(v, v0, k0, k0p, p_ref=0.0)

calculate pressure from 3rd order Birch-Murnathan equation

Parameters:
  • v – volume at different pressures
  • v0 – volume at reference conditions
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at different conditions
  • p_ref – reference pressure (default = 0)
Returns:

pressure

pytheos.eqn_bm3.bm3_small_f(v, v0)

calculate finite strain little f for linearized form not fully tested

Parameters:
  • v – volume
  • v0 – volume at reference conditions
Returns:

small f

pytheos.eqn_bm3.bm3_v(p, v0, k0, k0p, p_ref=0.0, min_strain=0.01)

find volume at given pressure using brenth in scipy.optimize

Parameters:
  • p – pressure
  • v0 – volume at reference conditions
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at different conditions
  • p_ref – reference pressure (default = 0)
  • min_strain – minimum strain value to find solution (default = 0.01)
Returns:

volume at high pressure

pytheos.eqn_bm3.bm3_v_single(p, v0, k0, k0p, p_ref=0.0, min_strain=0.01)

find volume at given pressure using brenth in scipy.optimize this is for single p value, not vectorized this cannot handle uncertainties

Parameters:
  • p – pressure
  • v0 – volume at reference conditions
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at different conditions
  • p_ref – reference pressure (default = 0)
  • min_strain – minimum strain value to find solution (default = 0.01)
Returns:

volume at high pressure

pytheos.eqn_bm3.cal_big_F(p, f)

calculate finite strain big F for linearized form not fully tested

Parameters:
  • p – pressure
  • f – small f
Returns:

big F

pytheos.eqn_bm3.cal_g_bm3(p, g, k)

calculate shear modulus at given pressure

Parameters:
  • p – pressure
  • g – [g0, g0p]
  • k – [v0, k0, k0p]
Returns:

shear modulus at high pressure

pytheos.eqn_bm3.cal_k_bm3(p, k)

calculate bulk modulus

Parameters:
  • p – pressure
  • k – [v0, k0, k0p]
Returns:

bulk modulus at high pressure

pytheos.eqn_bm3.cal_k_bm3_from_v(v, k)
pytheos.eqn_bm3.cal_p_bm3(v, k, p_ref=0.0)

calculate pressure from 3rd order Birch-Murnaghan equation

Parameters:
  • v – volume at different pressures
  • k – [v0, k0, k0p]
  • p_ref – reference pressure, default = 0.
Returns:

static pressure

pytheos.eqn_bm3.cal_small_f(v, v0)

calculate finite strain little f for linearized form not fully tested

Parameters:
  • v – volume
  • v0 – volume at reference condition
Returns:

small f

pytheos.eqn_bm3.cal_v_bm3(p, k)

calculate volume from bm3 equation. wrapper for bm3_v

Parameters:
  • p – pressure
  • k – [v0, k0, k0p]
Returns:

volume at high pressure

pytheos.eqn_debye module

pytheos.eqn_debye.debye_E(x)

calculate Debye energy using old fortran routine

Params x:Debye x value
Returns:Debye energy
Note:this is a wraper function (vectorization) for debye_E_single
pytheos.eqn_debye.debye_E_single(x)

calculate Debye energy using old fortran routine

Params x:Debye x value
Returns:Debye energy

pytheos.eqn_electronic module

pytheos.eqn_electronic.tsuchiya_pel(v, temp, v0, a, b, c, d, n, z, three_r=24.943379399999998, t_ref=300.0)

calculate electronic contributions in pressure for the Tsuchiya equation

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • a – parameter for the Tsuchiya equation
  • b – parameter for the Tsuchiya equation
  • c – parameter for the Tsuchiya equation
  • d – parameter for the Tsuchiya equation
  • n – number of atoms in a formula unit
  • z – number of formula unit in a unit cell
  • t_ref – reference temperature, 300 K
  • three_r – 3 times gas constant
Returns:

electronic contribution in GPa

Note:

n, z, three_r are not used but in there for consistency with other electronic contribution equations

pytheos.eqn_electronic.zharkov_pel(v, temp, v0, e0, g, n, z, t_ref=300.0, three_r=24.943379399999998)

calculate electronic contributions in pressure for the Zharkov equation the equation can be found in Sokolova and Dorogokupets 2013

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • e0 – parameter in K-1 for the Zharkov equation
  • g – parameter for the Zharkov equation
  • n – number of atoms in a formula unit
  • z – number of formula unit in a unit cell
  • t_ref – reference temperature, 300 K
  • three_r – 3 times gas constant
Returns:

electronic contribution in GPa

pytheos.eqn_hugoniot module

pytheos.eqn_hugoniot.hugoniot_p(rho, rho0, c0, s)

calculate pressure along a Hugoniot

Parameters:
  • rho – density in g/cm^3
  • rho0 – density at 1 bar in g/cm^3
  • c0 – velocity at 1 bar in km/s
  • s – slope of the velocity change
Returns:

pressure in GPa

pytheos.eqn_hugoniot.hugoniot_rho(p, rho0, c0, s, min_strain=0.01)

calculate density in g/cm^3 from a hugoniot curve

Parameters:
  • p – pressure in GPa
  • rho0 – density at 1 bar in g/cm^3
  • c0 – velocity at 1 bar in km/s
  • s – slope of the velocity change
  • min_strain – defining minimum v/v0 value to search volume for
Returns:

density in g/cm^3

Note:

this is a wrapper function by vectorizing hugoniot_rho_single

pytheos.eqn_hugoniot.hugoniot_rho_single(p, rho0, c0, s, min_strain=0.01)

calculate density in g/cm^3 from a hugoniot curve

Parameters:
  • p – pressure in GPa
  • rho0 – density at 1 bar in g/cm^3
  • c0 – velocity at 1 bar in km/s
  • s – slope of the velocity change
  • min_strain – defining minimum v/v0 value to search volume for
Returns:

density in g/cm^3

pytheos.eqn_hugoniot.hugoniot_t(rho, rho0, c0, s, gamma0, q, theta0, n, mass, three_r=24.943379399999998, t_ref=300.0, c_v=0.0)

calculate temperature along a hugoniot

Parameters:
  • rho – density in g/cm^3
  • rho0 – density at 1 bar in g/cm^3
  • c0 – velocity at 1 bar in km/s
  • s – slope of the velocity change
  • gamma0 – Gruneisen parameter at 1 bar
  • q – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature in K
  • n – number of elements in a chemical formula
  • mass – molar mass in gram
  • three_r – 3 times gas constant. Jamieson modified this value to compensate for mismatches
  • t_ref – reference temperature, 300 K
  • c_v – heat capacity, see Jamieson 1983 for detail
Returns:

temperature along hugoniot

pytheos.eqn_hugoniot.hugoniot_t_single(rho, rho0, c0, s, gamma0, q, theta0, n, mass, three_r=24.943379399999998, t_ref=300.0, c_v=0.0)

internal function to calculate pressure along Hugoniot

Parameters:
  • rho – density in g/cm^3
  • rho0 – density at 1 bar in g/cm^3
  • c0 – velocity at 1 bar in km/s
  • s – slope of the velocity change
  • gamma0 – Gruneisen parameter at 1 bar
  • q – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature in K
  • n – number of elements in a chemical formula
  • mass – molar mass in gram
  • three_r – 3 times gas constant. Jamieson modified this value to compensate for mismatches
  • t_ref – reference temperature, 300 K
  • c_v – heat capacity, see Jamieson 1983 for detail
Returns:

temperature along hugoniot

pytheos.eqn_jamieson module

2017/05/18 At the moment the functions here are not being revealed
to the users. I need to check if any of these functions are being called from other functions in pytheos.
pytheos.eqn_jamieson.hugoniot_p_nlin(rho, rho0, a, b, c)

calculate pressure along a Hugoniot throug nonlinear equations presented in Jameison 1982

Parameters:
  • rho – density in g/cm^3
  • rho0 – density at 1 bar in g/cm^3
  • a – prefactor for nonlinear fit of Hugoniot data
  • b – prefactor for nonlinear fit of Hugoniot data
  • c – prefactor for nonlinear fit of Hugoniot data
Returns:

pressure along Hugoniot in GPa

pytheos.eqn_jamieson.jamieson_pst(v, v0, c0, s, gamma0, q, theta0, n, z, mass, c_v, three_r=24.943379399999998, t_ref=300.0)

calculate static pressure at 300 K from Hugoniot data using the constq formulation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • c0 – velocity at 1 bar in km/s
  • s – slope of the velocity change
  • gamma0 – Gruneisen parameter at 1 bar
  • q – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature in K
  • n – number of elements in a chemical formula
  • z – number of formula unit in a unit cell
  • mass – molar mass in gram
  • c_v – heat capacity
  • three_r – 3 times gas constant. Jamieson modified this value to compensate for mismatches
  • t_ref – reference temperature, 300 K
Returns:

static pressure in GPa

Note:

2017/05/18 I am unsure if this is actually being used in pytheos

pytheos.eqn_jamieson.jamieson_pth(v, v0, c0, s, gamma0, q, theta0, n, z, mass, c_v, three_r=24.943379399999998, t_ref=300.0)

calculate thermal pressure from Hugoniot data using the constq formulation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • c0 – velocity at 1 bar in km/s
  • s – slope of the velocity change
  • gamma0 – Gruneisen parameter at 1 bar
  • q – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature in K
  • n – number of elements in a chemical formula
  • z – number of formula unit in a unit cell
  • mass – molar mass in gram
  • c_v – heat capacity
  • three_r – 3 times gas constant. Jamieson modified this value to compensate for mismatches
  • t_ref – reference temperature, 300 K
Returns:

static pressure in GPa

Note:

2017/05/18 I am unsure if this is actually being used in pytheos

pytheos.eqn_kunc module

2017/05/03 kunc_k is not available yet because I did not derive analytical form yet.

pytheos.eqn_kunc.cal_p_kunc(v, k, order=5, uncertainties=True)

calculate Kunc EOS, see Dorogokupets2015 for functional form

Parameters:
  • v – unit-cell volume in A^3
  • k – [v0, k0, k0p]
  • order – order for the Kunc equation
  • uncertainties – use of uncertainties package
Returns:

pressure in GPa

Note:

internal function

pytheos.eqn_kunc.kunc_dPdV(v, v0, k0, k0p, order=5, precision=1e-05)

calculate dP/dV for numerical calculation of bulk modulus according to test this differs from analytical result by 1.e-5

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • precision – precision for numerical calc (default = 1.e-5 * v0)
Returns:

dP/dV

pytheos.eqn_kunc.kunc_k_num(v, v0, k0, k0p, order=5, precision=1e-05)

calculate bulk modulus numerically from volume, not pressure according to test this differs from analytical result by 1.e-5

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • precision – precision for numerical calc (default = 1.e-5 * v0)
Returns:

bulk modulus

pytheos.eqn_kunc.kunc_p(v, v0, k0, k0p, order=5)

calculate Kunc EOS see Dorogokupets 2015 for detail

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • order – order for the Kunc equation
Returns:

pressure in GPa

pytheos.eqn_kunc.kunc_v(p, v0, k0, k0p, order=5, min_strain=0.01)

find volume at given pressure using brenth in scipy.optimize

Parameters:
  • p – pressure in GPa
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • order – order of Kunc function
  • min_strain – defining minimum v/v0 value to search volume for
Returns:

unit-cell volume at high pressure in GPa

Note:

a wrapper function vectorizing kunc_v_single

pytheos.eqn_kunc.kunc_v_single(p, v0, k0, k0p, order=5, min_strain=0.01)

find volume at given pressure using brenth in scipy.optimize

Parameters:
  • p – pressure in GPa
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • order – order of Kunc function
  • min_strain – defining minimum v/v0 value to search volume for
Returns:

unit-cell volume at high pressure in GPa

pytheos.eqn_therm module

pytheos.eqn_therm.alphakt_pth(v, temp, v0, alpha0, k0, n, z, t_ref=300.0, three_r=24.943379399999998)

calculate thermal pressure from thermal expansion and bulk modulus

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • alpha0 – thermal expansion parameter at 1 bar in K-1
  • k0 – bulk modulus in GPa
  • n – number of atoms in a formula unit
  • z – number of formula unit in a unit cell
  • t_ref – reference temperature
  • three_r – 3R in case adjustment is needed
Returns:

thermal pressure in GPa

pytheos.eqn_therm_Dorogokupets2007 module

pytheos.eqn_therm_Dorogokupets2007.altshuler_debyetemp(v, v0, gamma0, gamma_inf, beta, theta0)

calculate Debye temperature for Altshuler equation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • gamma_inf – Gruneisen parameter at infinite pressure
  • beta – volume dependence of Gruneisen parameter
  • theta0 – Debye temperature at 1 bar in K
Returns:

Debye temperature in K

pytheos.eqn_therm_Dorogokupets2007.altshuler_grun(v, v0, gamma0, gamma_inf, beta)

calculate Gruneisen parameter for Altshuler equation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • gamma_inf – Gruneisen parameter at infinite pressure
  • beta – volume dependence of Gruneisen parameter
Returns:

Gruneisen parameter

pytheos.eqn_therm_Dorogokupets2007.dorogokupets2007_pth(v, temp, v0, gamma0, gamma_inf, beta, theta0, n, z, three_r=24.943379399999998, t_ref=300.0)

calculate thermal pressure for Dorogokupets 2007 EOS

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • gamma_inf – Gruneisen parameter at infinite pressure
  • beta – volume dependence of Gruneisen parameter
  • theta0 – Debye temperature at 1 bar in K
  • n – number of elements in a chemical formula
  • z – number of formula unit in a unit cell
  • three_r – 3 times gas constant. Jamieson modified this value to compensate for mismatches
  • t_ref – reference temperature, 300 K
Returns:

thermal pressure in GPa

pytheos.eqn_therm_Dorogokupets2015 module

pytheos.eqn_therm_Dorogokupets2015.dorogokupets2015_pth(v, temp, v0, gamma0, gamma_inf, beta, theta01, m1, theta02, m2, n, z, t_ref=300.0, three_r=24.943379399999998)

calculate thermal pressure for Dorogokupets 2015 EOS

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • gamma_inf – Gruneisen parameter at infinite pressure
  • beta – volume dependence of Gruneisen parameter
  • theta01 – Debye temperature at 1 bar in K
  • m1 – weighting factor, see Dorogokupets 2015 for detail
  • theta02 – Debye temperature at 1 bar in K
  • m2 – weighting factor, see Dorogokupets 2015 for detail
  • n – number of elements in a chemical formula
  • z – number of formula unit in a unit cell
  • three_r – 3 times gas constant. Jamieson modified this value to compensate for mismatches
  • t_ref – reference temperature, 300 K
Returns:

thermal pressure in GPa

pytheos.eqn_therm_Speziale module

2017/05/03 I believe now I settle down with the uncertainties issue through isuncertainties check.

pytheos.eqn_therm_Speziale.integrate_gamma(v, v0, gamma0, q0, q1, theta0)

internal function to calculate Debye temperature

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • q0 – logarithmic derivative of Gruneisen parameter
  • q1 – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature at 1 bar in K
Returns:

Debye temperature in K

pytheos.eqn_therm_Speziale.speziale_debyetemp(v, v0, gamma0, q0, q1, theta0)

calculate Debye temperature for the Speziale equation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • q0 – logarithmic derivative of Gruneisen parameter
  • q1 – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature at 1 bar in K
Returns:

Debye temperature in K

pytheos.eqn_therm_Speziale.speziale_grun(v, v0, gamma0, q0, q1)

calculate Gruneisen parameter for the Speziale equation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • q0 – logarithmic derivative of Gruneisen parameter
  • q1 – logarithmic derivative of Gruneisen parameter
Returns:

Gruneisen parameter

pytheos.eqn_therm_Speziale.speziale_pth(v, temp, v0, gamma0, q0, q1, theta0, n, z, t_ref=300.0, three_r=24.943379399999998)

calculate thermal pressure for the Speziale equation

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • q0 – logarithmic derivative of Gruneisen parameter
  • q1 – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature at 1 bar in K
  • n – number of atoms in a formula unit
  • z – number of formula unit in a unit cell
  • t_ref – reference temperature
  • three_r – 3R in case adjustment is needed
Returns:

thermal pressure in GPa

pytheos.eqn_therm_Tange module

2017/05/03 I believe now I settle down with the uncertainties issue through isuncertainties check.

pytheos.eqn_therm_Tange.tange_debyetemp(v, v0, gamma0, a, b, theta0)

calculate Debye temperature for the Tange equation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • a – volume-independent adjustable parameters
  • b – volume-independent adjustable parameters
  • theta0 – Debye temperature at 1 bar in K
Returns:

Debye temperature in K

pytheos.eqn_therm_Tange.tange_grun(v, v0, gamma0, a, b)

calculate Gruneisen parameter for the Tange equation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • a – volume-independent adjustable parameters
  • b – volume-independent adjustable parameters
Returns:

Gruneisen parameter

pytheos.eqn_therm_Tange.tange_pth(v, temp, v0, gamma0, a, b, theta0, n, z, t_ref=300.0, three_r=24.943379399999998)

calculate thermal pressure for the Tange equation

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature in K
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • a – volume-independent adjustable parameters
  • b – volume-independent adjustable parameters
  • theta0 – Debye temperature at 1 bar in K
  • n – number of atoms in a formula unit
  • z – number of formula unit in a unit cell
  • t_ref – reference temperature
  • three_r – 3R in case adjustment is needed
Returns:

thermal pressure in GPa

pytheos.eqn_therm_constq module

2017/05/03 I believe now I settle down with the uncertainties issue through isuncertainties check.

pytheos.eqn_therm_constq.constq_debyetemp(v, v0, gamma0, q, theta0)

calculate Debye temperature for constant q

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • q – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature at 1 bar
Returns:

Debye temperature in K

pytheos.eqn_therm_constq.constq_grun(v, v0, gamma0, q)

calculate Gruneisen parameter for constant q

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • q – logarithmic derivative of Grunseinen parameter
Returns:

Gruneisen parameter at a given volume

pytheos.eqn_therm_constq.constq_pth(v, temp, v0, gamma0, q, theta0, n, z, t_ref=300.0, three_r=24.943379399999998)

calculate thermal pressure for constant q

Parameters:
  • v – unit-cell volume in A^3
  • temp – temperature
  • v0 – unit-cell volume in A^3 at 1 bar
  • gamma0 – Gruneisen parameter at 1 bar
  • q – logarithmic derivative of Gruneisen parameter
  • theta0 – Debye temperature in K
  • n – number of atoms in a formula unit
  • z – number of formula unit in a unit cell
  • t_ref – reference temperature
  • three_r – 3R in case adjustment is needed
Returns:

thermal pressure in GPa

pytheos.eqn_vinet module

2017/05/03 Solve uncertainties problem by adding new function isuncertainties

pytheos.eqn_vinet.cal_k_vinet(p, k)

calculate bulk modulus in GPa

Parameters:
  • p – pressure in GPa
  • k – [v0, k0, k0p]
Returns:

bulk modulus at high pressure in GPa

pytheos.eqn_vinet.cal_k_vinet_from_v(v, v0, k0, k0p)

calculate bulk modulus in GPa

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
Returns:

bulk modulus at high pressure in GPa

pytheos.eqn_vinet.cal_p_vinet(v, k, uncertainties=True)

calculate pressure from vinet equation

Parameters:
  • v – volume at different pressures
  • k – [v0, k0, k0p]
Returns:

static pressure

Note:

internal function

pytheos.eqn_vinet.cal_v_vinet(p, k)

calculate volume from vinet equation. wrapper for vinet_v

Parameters:
  • p – pressure in GPa
  • k – [v0, k0, k0p]
Returns:

unit cell volume at high pressure in A^3

Note:

internal function

pytheos.eqn_vinet.vinet_dPdV(v, v0, k0, k0p, precision=1e-05)

calculate dP/dV for numerical calculation of bulk modulus according to test this differs from analytical result by 1.e-5

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • precision – precision for numerical calc (default = 1.e-5 * v0)
Returns:

dP/dV

pytheos.eqn_vinet.vinet_k(p, v0, k0, k0p, numerical=False)

calculate bulk modulus, wrapper for cal_k_vinet cannot handle uncertainties

Parameters:
  • p – pressure in GPa
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
Returns:

bulk modulus at high pressure in GPa

pytheos.eqn_vinet.vinet_k_num(v, v0, k0, k0p, precision=1e-05)

calculate bulk modulus numerically from volume, not pressure according to test this differs from analytical result by 1.e-5

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • precision – precision for numerical calc (default = 1.e-5 * v0)
Returns:

dP/dV

pytheos.eqn_vinet.vinet_p(v, v0, k0, k0p)

calculate pressure from vinet equation

Parameters:
  • v – unit-cell volume in A^3
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
Returns:

pressure in GPa

pytheos.eqn_vinet.vinet_v(p, v0, k0, k0p, min_strain=0.01)

find volume at given pressure

Parameters:
  • p – pressure in GPa
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • min_strain – defining minimum v/v0 value to search volume for
Returns:

unit cell volume at high pressure in A^3

Note:

wrapper function vetorizing vinet_v_single

pytheos.eqn_vinet.vinet_v_single(p, v0, k0, k0p, min_strain=0.01)

find volume at given pressure using brenth in scipy.optimize this is for single p value, not vectorized

Parameters:
  • p – pressure in GPa
  • v0 – unit-cell volume in A^3 at 1 bar
  • k0 – bulk modulus at reference conditions
  • k0p – pressure derivative of bulk modulus at reference conditions
  • min_strain – defining minimum v/v0 value to search volume for
Returns:

unit cell volume at high pressure in A^3

pytheos.etc module

pytheos.etc.isuncertainties(arg_list)

check if the input list contains any elements with uncertainties class

Parameters:arg_list – list of arguments
Returns:True/False

pytheos.fit_anharmonic module

class pytheos.fit_anharmonic.ZharkovAnhModel(n, z, independent_vars=[‘v’, ‘temp’], param_names=[‘v0’, ‘a0’, ‘m’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Zharkov anharmonic fitting

pytheos.fit_electronic module

class pytheos.fit_electronic.ZharkovElecModel(n, z, independent_vars=[‘v’, ‘temp’], param_names=[‘v0’, ‘e0’, ‘g’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Zharkov electronic contribution fitting

pytheos.fit_static module

class pytheos.fit_static.BM3Model(independent_vars=[‘v’], param_names=[‘v0’, ‘k0’, ‘k0p’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for BM3 fitting

class pytheos.fit_static.KuncModel(independent_vars=[‘v’], param_names=[‘v0’, ‘k0’, ‘k0p’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Kunc fitting

class pytheos.fit_static.VinetModel(independent_vars=[‘v’], param_names=[‘v0’, ‘k0’, ‘k0p’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Vinet fitting

pytheos.fit_thermal module

class pytheos.fit_thermal.ConstqModel(n, z, independent_vars=[‘v’, ‘temp’], param_names=[‘v0’, ‘gamma0’, ‘q’, ‘theta0’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Constant Q model fitting

class pytheos.fit_thermal.Dorogokupets2007Model(n, z, independent_vars=[‘v’, ‘temp’], param_names=[‘v0’, ‘gamma0’, ‘gamma_inf’, ‘beta’, ‘theta0’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Dorogokupets2007 model fitting

class pytheos.fit_thermal.Dorogokupets2015Model(n, z, independent_vars=[‘v’, ‘temp’], param_names=[‘v0’, ‘gamma0’, ‘gamma_inf’, ‘beta’, ‘theta01’, ‘m1’, ‘theta02’, ‘m2’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Dorogokupets2015 model fitting

class pytheos.fit_thermal.SpezialeModel(n, z, independent_vars=[‘v’, ‘temp’], param_names=[‘v0’, ‘gamma0’, ‘q0’, ‘q1’, ‘theta0’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Speziale model fitting

class pytheos.fit_thermal.TangeModel(n, z, independent_vars=[‘v’, ‘temp’], param_names=[‘v0’, ‘gamma0’, ‘a’, ‘b’, ‘theta0’], prefix=”, missing=None, name=None, **kwargs)

Bases: lmfit.model.Model

lmfit Model class for Tange model fitting

Module contents

PythEOS

PythEOS is an open source python toolbox for equation of state (EOS). It includes: - a range of different equations - EOS fitting tools - a range of pressure scales

Some important motivations are: - reproducible error propagation for EOS - flexible EOS fitting with a wide range of combinations of static, thermal, electronic, and anharmonic effects - reliable conversion of pressure scale

Notations

param n:number of elements in a chemical formula
param z:number of formula unit in a unit cell
param m:molar mass in gram
param p:pressure in GPa
param v:unit-cell volume in A^3
param temp:temperature in K
param rho:density in g/cm^3
param k0:bulk modulus at reference conditions
param k0p:pressure derivative of bulk modulus at reference conditions
param c0:velocity at 1 bar in km/s
param s:slope of the velocity change
param rho0:density at 1 bar in g/cm^3
param v0:unit-cell volume in A^3 at 1 bar
param e0:parameter in K-1 for the Zharkov equation
param g:parameter for the Zharkov equation
param gamma0:Gruneisen parameter at 1 bar
param q:logarithmic derivative of Gruneisen parameter
param theta0:Debye temperature in K
param t_ref:reference temperature, 300 K
param three_r:3 times gas constant. Jamieson modified this value to compensate for mismatches
param c_v:heat capacity
param min_strain:
 defining minimum v/v0 value to search volume for
param params_hugoniot:
 hugoniot parameters. [rho0 in g/cm3, c0 in km/s, s] for linear case and [rho0 in g/cm3, a in km/s, b, c in s/km] for non-linear case. See Jamieson for detail.
param params_therm:
 thermal parameters for the constq equations [v0 in A3, gamma0, q, theta0 in K]
param c_v:heat capacity for hugoniot temperature calculation
param nonlinear:
 nonlinear Us-Up fit particularly for Jamieson’s gold scale
param reference:
 reference for the EOS