Materials

Burnman operates on materials (type Material) most prominently in form of minerals (Mineral) and composites (Composite).

Inheritance diagram of burnman.Material, burnman.Composite, burnman.Mineral, burnman.solidsolution.SolidSolution, burnman.mineral_helpers.HelperSpinTransition

Material Base Class

class burnman.material.Material[source]

Bases: object

Base class for all materials. The main functionality is unroll() which returns a list of objects of type Mineral and their molar fractions. This class is available as burnman.Material.

The user needs to call set_method() (once in the beginning) and set_state() before querying the material with unroll() or density().

property name

Human-readable name of this material.

By default this will return the name of the class, but it can be set to an arbitrary string. Overriden in Mineral.

set_method(method)[source]

Set the averaging method. See Averaging Schemes for details.

Notes

Needs to be implemented in derived classes.

to_string()[source]

Returns a human-readable name of this material. The default implementation will return the name of the class, which is a reasonable default.

Returns
namestring

Name of this material.

debug_print(indent='')[source]

Print a human-readable representation of this Material.

print_minerals_of_current_state()[source]

Print a human-readable representation of this Material at the current P, T as a list of minerals. This requires set_state() has been called before.

set_state(pressure, temperature)[source]

Set the material to the given pressure and temperature.

Parameters
pressurefloat

The desired pressure in [Pa].

temperaturefloat

The desired temperature in [K].

reset()[source]

Resets all cached material properties.

It is typically not required for the user to call this function.

copy()[source]
unroll()[source]

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Returns
fractionslist of float

List of molar fractions, should sum to 1.0.

mineralslist of burnman.Mineral

List of minerals.

Notes

Needs to be implemented in derived classes.

evaluate(vars_list, pressures, temperatures)[source]

Returns an array of material properties requested through a list of strings at given pressure and temperature conditions. At the end it resets the set_state to the original values. The user needs to call set_method() before.

Parameters
vars_listlist of strings

Variables to be returned for given conditions

pressuresndlist or ndarray of float

n-dimensional array of pressures in [Pa].

temperaturesndlist or ndarray of float

n-dimensional array of temperatures in [K].

Returns
outputarray of array of float

Array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] and temperatures[i] and pressures[i].

property pressure

Returns current pressure that was set with set_state().

Returns
pressurefloat

Pressure in [Pa].

Notes

  • Aliased with P().

property temperature

Returns current temperature that was set with set_state().

Returns
temperaturefloat

Temperature in [K].

Notes

  • Aliased with T().

property molar_internal_energy

Returns the molar internal energy of the mineral.

Returns
molar_internal_energyfloat

The internal energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with energy().

property molar_gibbs

Returns the molar Gibbs free energy of the mineral.

Returns
molar_gibbsfloat

Gibbs free energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with gibbs().

property molar_helmholtz

Returns the molar Helmholtz free energy of the mineral.

Returns
molar_helmholtzfloat

Helmholtz free energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with helmholtz().

property molar_mass

Returns molar mass of the mineral.

Returns
molar_massfloat

Molar mass in [kg/mol].

Notes

  • Needs to be implemented in derived classes.

property molar_volume

Returns molar volume of the mineral.

Returns
molar_volumefloat

Molar volume in [m^3/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with V().

property density

Returns the density of this material.

Returns
densityfloat

The density of this material in [kg/m^3].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with rho().

property molar_entropy

Returns molar entropy of the mineral.

Returns
molar_entropyfloat

Entropy in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with S().

property molar_enthalpy

Returns molar enthalpy of the mineral.

Returns
molar_enthalpyfloat

Enthalpy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with H().

property isothermal_bulk_modulus

Returns isothermal bulk modulus of the material.

Returns
isothermal_bulk_modulusfloat

Bulk modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with K_T().

property adiabatic_bulk_modulus

Returns the adiabatic bulk modulus of the mineral.

Returns
adiabatic_bulk_modulusfloat

Adiabatic bulk modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with K_S().

property isothermal_compressibility

Returns isothermal compressibility of the mineral (or inverse isothermal bulk modulus).

Returns
(K_T)^-1float

Compressibility in [1/Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_T().

property adiabatic_compressibility

Returns adiabatic compressibility of the mineral (or inverse adiabatic bulk modulus).

Returns
adiabatic_compressibilityfloat

adiabatic compressibility in [1/Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_S().

property shear_modulus

Returns shear modulus of the mineral.

Returns
shear_modulusfloat

Shear modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_G().

property p_wave_velocity

Returns P wave speed of the mineral.

Returns
p_wave_velocityfloat

P wave speed in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_p().

property bulk_sound_velocity

Returns bulk sound speed of the mineral.

Returns
bulk sound velocity: float

Sound velocity in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_phi().

property shear_wave_velocity

Returns shear wave speed of the mineral.

Returns
shear_wave_velocityfloat

Wave speed in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_s().

property grueneisen_parameter

Returns the grueneisen parameter of the mineral.

Returns
grfloat

Grueneisen parameters [unitless].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with gr().

property thermal_expansivity

Returns thermal expansion coefficient of the mineral.

Returns
alphafloat

Thermal expansivity in [1/K].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with alpha().

property molar_heat_capacity_v

Returns molar heat capacity at constant volume of the mineral.

Returns
molar_heat_capacity_vfloat

Heat capacity in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with C_v().

property molar_heat_capacity_p

Returns molar heat capacity at constant pressure of the mineral.

Returns
molar_heat_capacity_pfloat

Heat capacity in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with C_p().

property P

Alias for pressure()

property T

Alias for temperature()

property energy

Alias for molar_internal_energy()

property helmholtz

Alias for molar_helmholtz()

property gibbs

Alias for molar_gibbs()

property V

Alias for molar_volume()

property rho

Alias for density()

property S

Alias for molar_entropy()

property H

Alias for molar_enthalpy()

property K_T

Alias for isothermal_bulk_modulus()

property K_S

Alias for adiabatic_bulk_modulus()

property beta_T

Alias for isothermal_compressibility()

property beta_S

Alias for adiabatic_compressibility()

property G

Alias for shear_modulus()

property v_p

Alias for p_wave_velocity()

property v_phi

Alias for bulk_sound_velocity()

property v_s

Alias for shear_wave_velocity()

property gr

Alias for grueneisen_parameter()

property alpha

Alias for thermal_expansivity()

property C_v

Alias for molar_heat_capacity_v()

property C_p

Alias for molar_heat_capacity_p()

Perple_X Class

class burnman.perplex.PerplexMaterial(tab_file, name='Perple_X material')[source]

Bases: burnman.material.Material

This is the base class for a PerpleX material. States of the material can only be queried after setting the pressure and temperature using set_state().

Instances of this class are initialised with a 2D PerpleX tab file. This file should be in the standard format (as output by werami), and should have columns with the following names: ‘rho,kg/m3’, ‘alpha,1/K’, ‘beta,1/bar’, ‘Ks,bar’, ‘Gs,bar’, ‘v0,km/s’, ‘vp,km/s’, ‘vs,km/s’, ‘s,J/K/kg’, ‘h,J/kg’, ‘cp,J/K/kg’, ‘V,J/bar/mol’. The order of these names is not important.

Properties of the material are determined by linear interpolation from the PerpleX grid. They are all returned in SI units on a molar basis, even though the PerpleX tab file is not in these units.

This class is available as burnman.PerplexMaterial.

property name

Human-readable name of this material.

By default this will return the name of the class, but it can be set to an arbitrary string. Overriden in Mineral.

set_state()

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters
pressurefloat

The desired pressure in [Pa].

temperaturefloat

The desired temperature in [K].

property molar_volume

Returns molar volume of the mineral.

Returns
molar_volumefloat

Molar volume in [m^3/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with V().

property molar_enthalpy

Returns molar enthalpy of the mineral.

Returns
molar_enthalpyfloat

Enthalpy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with H().

property molar_entropy

Returns molar entropy of the mineral.

Returns
molar_entropyfloat

Entropy in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with S().

property isothermal_bulk_modulus

Returns isothermal bulk modulus of the material.

Returns
isothermal_bulk_modulusfloat

Bulk modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with K_T().

property adiabatic_bulk_modulus

Returns the adiabatic bulk modulus of the mineral.

Returns
adiabatic_bulk_modulusfloat

Adiabatic bulk modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with K_S().

property molar_heat_capacity_p

Returns molar heat capacity at constant pressure of the mineral.

Returns
molar_heat_capacity_pfloat

Heat capacity in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with C_p().

property thermal_expansivity

Returns thermal expansion coefficient of the mineral.

Returns
alphafloat

Thermal expansivity in [1/K].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with alpha().

property shear_modulus

Returns shear modulus of the mineral.

Returns
shear_modulusfloat

Shear modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_G().

property p_wave_velocity

Returns P wave speed of the mineral.

Returns
p_wave_velocityfloat

P wave speed in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_p().

property bulk_sound_velocity

Returns bulk sound speed of the mineral.

Returns
bulk sound velocity: float

Sound velocity in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_phi().

property shear_wave_velocity

Returns shear wave speed of the mineral.

Returns
shear_wave_velocityfloat

Wave speed in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_s().

property molar_gibbs

Returns the molar Gibbs free energy of the mineral.

Returns
molar_gibbsfloat

Gibbs free energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with gibbs().

property molar_mass

Returns molar mass of the mineral.

Returns
molar_massfloat

Molar mass in [kg/mol].

Notes

  • Needs to be implemented in derived classes.

property density

Returns the density of this material.

Returns
densityfloat

The density of this material in [kg/m^3].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with rho().

property molar_internal_energy

Returns the molar internal energy of the mineral.

Returns
molar_internal_energyfloat

The internal energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with energy().

property molar_helmholtz

Returns the molar Helmholtz free energy of the mineral.

Returns
molar_helmholtzfloat

Helmholtz free energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with helmholtz().

property isothermal_compressibility

Returns isothermal compressibility of the mineral (or inverse isothermal bulk modulus).

Returns
(K_T)^-1float

Compressibility in [1/Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_T().

property adiabatic_compressibility

Returns adiabatic compressibility of the mineral (or inverse adiabatic bulk modulus).

Returns
adiabatic_compressibilityfloat

adiabatic compressibility in [1/Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_S().

property molar_heat_capacity_v

Returns molar heat capacity at constant volume of the mineral.

Returns
molar_heat_capacity_vfloat

Heat capacity in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with C_v().

property grueneisen_parameter

Returns the grueneisen parameter of the mineral.

Returns
grfloat

Grueneisen parameters [unitless].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with gr().

property C_p

Alias for molar_heat_capacity_p()

property C_v

Alias for molar_heat_capacity_v()

property G

Alias for shear_modulus()

property H

Alias for molar_enthalpy()

property K_S

Alias for adiabatic_bulk_modulus()

property K_T

Alias for isothermal_bulk_modulus()

property P

Alias for pressure()

property S

Alias for molar_entropy()

property T

Alias for temperature()

property V

Alias for molar_volume()

property alpha

Alias for thermal_expansivity()

property beta_S

Alias for adiabatic_compressibility()

property beta_T

Alias for isothermal_compressibility()

copy()
debug_print(indent='')

Print a human-readable representation of this Material.

property energy

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures)

Returns an array of material properties requested through a list of strings at given pressure and temperature conditions. At the end it resets the set_state to the original values. The user needs to call set_method() before.

Parameters
vars_listlist of strings

Variables to be returned for given conditions

pressuresndlist or ndarray of float

n-dimensional array of pressures in [Pa].

temperaturesndlist or ndarray of float

n-dimensional array of temperatures in [K].

Returns
outputarray of array of float

Array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] and temperatures[i] and pressures[i].

property gibbs

Alias for molar_gibbs()

property gr

Alias for grueneisen_parameter()

property helmholtz

Alias for molar_helmholtz()

property pressure

Returns current pressure that was set with set_state().

Returns
pressurefloat

Pressure in [Pa].

Notes

  • Aliased with P().

print_minerals_of_current_state()

Print a human-readable representation of this Material at the current P, T as a list of minerals. This requires set_state() has been called before.

reset()

Resets all cached material properties.

It is typically not required for the user to call this function.

property rho

Alias for density()

set_method(method)

Set the averaging method. See Averaging Schemes for details.

Notes

Needs to be implemented in derived classes.

property temperature

Returns current temperature that was set with set_state().

Returns
temperaturefloat

Temperature in [K].

Notes

  • Aliased with T().

to_string()

Returns a human-readable name of this material. The default implementation will return the name of the class, which is a reasonable default.

Returns
namestring

Name of this material.

unroll()

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Returns
fractionslist of float

List of molar fractions, should sum to 1.0.

mineralslist of burnman.Mineral

List of minerals.

Notes

Needs to be implemented in derived classes.

property v_p

Alias for p_wave_velocity()

property v_phi

Alias for bulk_sound_velocity()

property v_s

Alias for shear_wave_velocity()

Minerals

Endmembers

class burnman.mineral.Mineral(params=None, property_modifiers=None)[source]

Bases: burnman.material.Material

This is the base class for all minerals. States of the mineral can only be queried after setting the pressure and temperature using set_state(). The method for computing properties of the material is set using set_method(). This is done during initialisation if the param ‘equation_of_state’ has been defined. The method can be overridden later by the user.

This class is available as burnman.Mineral.

If deriving from this class, set the properties in self.params to the desired values. For more complicated materials you can overwrite set_state(), change the params and then call set_state() from this class.

All the material parameters are expected to be in plain SI units. This means that the elastic moduli should be in Pascals and NOT Gigapascals, and the Debye temperature should be in K not C. Additionally, the reference volume should be in m^3/(mol molecule) and not in unit cell volume and ‘n’ should be the number of atoms per molecule. Frequently in the literature the reference volume is given in Angstrom^3 per unit cell. To convert this to m^3/(mol of molecule) you should multiply by 10^(-30) * N_a / Z, where N_a is Avogadro’s number and Z is the number of formula units per unit cell. You can look up Z in many places, including www.mindat.org

property name

Human-readable name of this material.

By default this will return the name of the class, but it can be set to an arbitrary string. Overriden in Mineral.

set_method(equation_of_state)[source]

Set the equation of state to be used for this mineral. Takes a string corresponding to any of the predefined equations of state: ‘bm2’, ‘bm3’, ‘mgd2’, ‘mgd3’, ‘slb2’, ‘slb3’, ‘mt’, ‘hp_tmt’, or ‘cork’. Alternatively, you can pass a user defined class which derives from the equation_of_state base class. After calling set_method(), any existing derived properties (e.g., elastic parameters or thermodynamic potentials) will be out of date, so set_state() will need to be called again.

to_string()[source]

Returns the name of the mineral class

debug_print(indent='')[source]

Print a human-readable representation of this Material.

unroll()[source]

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Returns
fractionslist of float

List of molar fractions, should sum to 1.0.

mineralslist of burnman.Mineral

List of minerals.

Notes

Needs to be implemented in derived classes.

set_state()

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters
pressurefloat

The desired pressure in [Pa].

temperaturefloat

The desired temperature in [K].

property molar_gibbs

Returns the molar Gibbs free energy of the mineral.

Returns
molar_gibbsfloat

Gibbs free energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with gibbs().

property molar_volume

Returns molar volume of the mineral.

Returns
molar_volumefloat

Molar volume in [m^3/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with V().

property molar_entropy

Returns molar entropy of the mineral.

Returns
molar_entropyfloat

Entropy in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with S().

property isothermal_bulk_modulus

Returns isothermal bulk modulus of the material.

Returns
isothermal_bulk_modulusfloat

Bulk modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with K_T().

property molar_heat_capacity_p

Returns molar heat capacity at constant pressure of the mineral.

Returns
molar_heat_capacity_pfloat

Heat capacity in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with C_p().

property thermal_expansivity

Returns thermal expansion coefficient of the mineral.

Returns
alphafloat

Thermal expansivity in [1/K].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with alpha().

property shear_modulus

Returns shear modulus of the mineral.

Returns
shear_modulusfloat

Shear modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_G().

property formula

Returns the chemical formula of the Mineral class

property molar_mass

Returns molar mass of the mineral.

Returns
molar_massfloat

Molar mass in [kg/mol].

Notes

  • Needs to be implemented in derived classes.

property density

Returns the density of this material.

Returns
densityfloat

The density of this material in [kg/m^3].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with rho().

property molar_internal_energy

Returns the molar internal energy of the mineral.

Returns
molar_internal_energyfloat

The internal energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with energy().

property molar_helmholtz

Returns the molar Helmholtz free energy of the mineral.

Returns
molar_helmholtzfloat

Helmholtz free energy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with helmholtz().

property molar_enthalpy

Returns molar enthalpy of the mineral.

Returns
molar_enthalpyfloat

Enthalpy in [J/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with H().

property adiabatic_bulk_modulus

Returns the adiabatic bulk modulus of the mineral.

Returns
adiabatic_bulk_modulusfloat

Adiabatic bulk modulus in [Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with K_S().

property isothermal_compressibility

Returns isothermal compressibility of the mineral (or inverse isothermal bulk modulus).

Returns
(K_T)^-1float

Compressibility in [1/Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_T().

property adiabatic_compressibility

Returns adiabatic compressibility of the mineral (or inverse adiabatic bulk modulus).

Returns
adiabatic_compressibilityfloat

adiabatic compressibility in [1/Pa].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with beta_S().

property p_wave_velocity

Returns P wave speed of the mineral.

Returns
p_wave_velocityfloat

P wave speed in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_p().

property bulk_sound_velocity

Returns bulk sound speed of the mineral.

Returns
bulk sound velocity: float

Sound velocity in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_phi().

property shear_wave_velocity

Returns shear wave speed of the mineral.

Returns
shear_wave_velocityfloat

Wave speed in [m/s].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with v_s().

property C_p

Alias for molar_heat_capacity_p()

property C_v

Alias for molar_heat_capacity_v()

property G

Alias for shear_modulus()

property H

Alias for molar_enthalpy()

property K_S

Alias for adiabatic_bulk_modulus()

property K_T

Alias for isothermal_bulk_modulus()

property P

Alias for pressure()

property S

Alias for molar_entropy()

property T

Alias for temperature()

property V

Alias for molar_volume()

property alpha

Alias for thermal_expansivity()

property beta_S

Alias for adiabatic_compressibility()

property beta_T

Alias for isothermal_compressibility()

copy()
property energy

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures)

Returns an array of material properties requested through a list of strings at given pressure and temperature conditions. At the end it resets the set_state to the original values. The user needs to call set_method() before.

Parameters
vars_listlist of strings

Variables to be returned for given conditions

pressuresndlist or ndarray of float

n-dimensional array of pressures in [Pa].

temperaturesndlist or ndarray of float

n-dimensional array of temperatures in [K].

Returns
outputarray of array of float

Array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] and temperatures[i] and pressures[i].

property gibbs

Alias for molar_gibbs()

property gr

Alias for grueneisen_parameter()

property grueneisen_parameter

Returns the grueneisen parameter of the mineral.

Returns
grfloat

Grueneisen parameters [unitless].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with gr().

property helmholtz

Alias for molar_helmholtz()

property pressure

Returns current pressure that was set with set_state().

Returns
pressurefloat

Pressure in [Pa].

Notes

  • Aliased with P().

print_minerals_of_current_state()

Print a human-readable representation of this Material at the current P, T as a list of minerals. This requires set_state() has been called before.

reset()

Resets all cached material properties.

It is typically not required for the user to call this function.

property rho

Alias for density()

property temperature

Returns current temperature that was set with set_state().

Returns
temperaturefloat

Temperature in [K].

Notes

  • Aliased with T().

property v_p

Alias for p_wave_velocity()

property v_phi

Alias for bulk_sound_velocity()

property v_s

Alias for shear_wave_velocity()

property molar_heat_capacity_v

Returns molar heat capacity at constant volume of the mineral.

Returns
molar_heat_capacity_vfloat

Heat capacity in [J/K/mol].

Notes

  • Needs to be implemented in derived classes.

  • Aliased with C_v().

Solid solutions

class burnman.solidsolution.SolidSolution(name=None, solution_type=None, endmembers=None, energy_interaction=None, volume_interaction=None, entropy_interaction=None, alphas=None, molar_fractions=None)[source]

Bases: burnman.mineral.Mineral

This is the base class for all solid solutions. Site occupancies, endmember activities and the constant and pressure and temperature dependencies of the excess properties can be queried after using set_composition() States of the solid solution can only be queried after setting the pressure, temperature and composition using set_state().

This class is available as burnman.SolidSolution. It uses an instance of burnman.SolutionModel to calculate interaction terms between endmembers.

All the solid solution parameters are expected to be in SI units. This means that the interaction parameters should be in J/mol, with the T and P derivatives in J/K/mol and m^3/mol.

property name

Human-readable name of this material.

By default this will return the name of the class, but it can be set to an arbitrary string. Overriden in Mineral.

get_endmembers()[source]
set_composition(molar_fractions)[source]

Set the composition for this solid solution. Resets cached properties

Parameters
molar_fractions: list of float

molar abundance for each endmember, needs to sum to one.

set_method(method)[source]

Set the equation of state to be used for this mineral. Takes a string corresponding to any of the predefined equations of state: ‘bm2’, ‘bm3’, ‘mgd2’, ‘mgd3’, ‘slb2’, ‘slb3’, ‘mt’, ‘hp_tmt’, or ‘cork’. Alternatively, you can pass a user defined class which derives from the equation_of_state base class. After calling set_method(), any existing derived properties (e.g., elastic parameters or thermodynamic potentials) will be out of date, so set_state() will need to be called again.

set_state(pressure, temperature)[source]

(copied from set_state):

Set the material to the given pressure and temperature.

Parameters
pressurefloat

The desired pressure in [Pa].

temperaturefloat

The desired temperature in [K].

property formula

Returns molar chemical formula of the solid solution

property activities

Returns a list of endmember activities [unitless]

property activity_coefficients

Returns a list of endmember activity coefficients (gamma = activity / ideal activity) [unitless]

property molar_internal_energy

Returns molar internal energy of the mineral [J/mol] Aliased with self.energy

property excess_partial_gibbs

Returns excess partial molar gibbs free energy [J/mol] Property specific to solid solutions.

property excess_partial_volumes

Returns excess partial volumes [m^3] Property specific to solid solutions.

property excess_partial_entropies

Returns excess partial entropies [J/K] Property specific to solid solutions.

property partial_gibbs

Returns excess partial molar gibbs free energy [J/mol] Property specific to solid solutions.

property partial_volumes

Returns excess partial volumes [m^3] Property specific to solid solutions.

property partial_entropies

Returns excess partial entropies [J/K] Property specific to solid solutions.

property excess_gibbs

Returns molar excess gibbs free energy [J/mol] Property specific to solid solutions.

property gibbs_hessian

Returns an array containing the second compositional derivative of the Gibbs free energy [J]. Property specific to solid solutions.

property entropy_hessian

Returns an array containing the second compositional derivative of the entropy [J/K]. Property specific to solid solutions.

property volume_hessian

Returns an array containing the second compositional derivative of the volume [m^3]. Property specific to solid solutions.

property molar_gibbs

Returns molar Gibbs free energy of the solid solution [J/mol] Aliased with self.gibbs

property molar_helmholtz

Returns molar Helmholtz free energy of the solid solution [J/mol] Aliased with self.helmholtz

property molar_mass

Returns molar mass of the solid solution [kg/mol]

property excess_volume

Returns excess molar volume of the solid solution [m^3/mol] Specific property for solid solutions

property molar_volume

Returns molar volume of the solid solution [m^3/mol] Aliased with self.V

property density

Returns density of the solid solution [kg/m^3] Aliased with self.rho

property excess_entropy

Returns excess molar entropy [J/K/mol] Property specific to solid solutions.

property molar_entropy

Returns molar entropy of the solid solution [J/K/mol] Aliased with self.S

property excess_enthalpy

Returns excess molar enthalpy [J/mol] Property specific to solid solutions.

property molar_enthalpy

Returns molar enthalpy of the solid solution [J/mol] Aliased with self.H

property isothermal_bulk_modulus

Returns isothermal bulk modulus of the solid solution [Pa] Aliased with self.K_T

property adiabatic_bulk_modulus

Returns adiabatic bulk modulus of the solid solution [Pa] Aliased with self.K_S

property isothermal_compressibility

Returns isothermal compressibility of the solid solution (or inverse isothermal bulk modulus) [1/Pa] Aliased with self.K_T

property C_p

Alias for molar_heat_capacity_p()

property C_v

Alias for molar_heat_capacity_v()

property G

Alias for shear_modulus()

property H

Alias for molar_enthalpy()

property K_S

Alias for adiabatic_bulk_modulus()

property K_T

Alias for isothermal_bulk_modulus()

property P

Alias for pressure()

property S

Alias for molar_entropy()

property T

Alias for temperature()

property V

Alias for molar_volume()

property adiabatic_compressibility

Returns adiabatic compressibility of the solid solution (or inverse adiabatic bulk modulus) [1/Pa] Aliased with self.K_S

property alpha

Alias for thermal_expansivity()

property beta_S

Alias for adiabatic_compressibility()

property beta_T

Alias for isothermal_compressibility()

copy()
debug_print(indent='')

Print a human-readable representation of this Material.

property energy

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures)

Returns an array of material properties requested through a list of strings at given pressure and temperature conditions. At the end it resets the set_state to the original values. The user needs to call set_method() before.

Parameters
vars_listlist of strings

Variables to be returned for given conditions

pressuresndlist or ndarray of float

n-dimensional array of pressures in [Pa].

temperaturesndlist or ndarray of float

n-dimensional array of temperatures in [K].

Returns
outputarray of array of float

Array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] and temperatures[i] and pressures[i].

property gibbs

Alias for molar_gibbs()

property gr

Alias for grueneisen_parameter()

property helmholtz

Alias for molar_helmholtz()

property pressure

Returns current pressure that was set with set_state().

Returns
pressurefloat

Pressure in [Pa].

Notes

  • Aliased with P().

print_minerals_of_current_state()

Print a human-readable representation of this Material at the current P, T as a list of minerals. This requires set_state() has been called before.

reset()

Resets all cached material properties.

It is typically not required for the user to call this function.

property rho

Alias for density()

property temperature

Returns current temperature that was set with set_state().

Returns
temperaturefloat

Temperature in [K].

Notes

  • Aliased with T().

to_string()

Returns the name of the mineral class

unroll()

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Returns
fractionslist of float

List of molar fractions, should sum to 1.0.

mineralslist of burnman.Mineral

List of minerals.

Notes

Needs to be implemented in derived classes.

property v_p

Alias for p_wave_velocity()

property v_phi

Alias for bulk_sound_velocity()

property v_s

Alias for shear_wave_velocity()

property shear_modulus

Returns shear modulus of the solid solution [Pa] Aliased with self.G

property p_wave_velocity

Returns P wave speed of the solid solution [m/s] Aliased with self.v_p

property bulk_sound_velocity

Returns bulk sound speed of the solid solution [m/s] Aliased with self.v_phi

property shear_wave_velocity

Returns shear wave speed of the solid solution [m/s] Aliased with self.v_s

property grueneisen_parameter

Returns grueneisen parameter of the solid solution [unitless] Aliased with self.gr

property thermal_expansivity

Returns thermal expansion coefficient (alpha) of the solid solution [1/K] Aliased with self.alpha

property molar_heat_capacity_v

Returns molar heat capacity at constant volume of the solid solution [J/K/mol] Aliased with self.C_v

property molar_heat_capacity_p

Returns molar heat capacity at constant pressure of the solid solution [J/K/mol] Aliased with self.C_p

Mineral helpers

class burnman.mineral_helpers.HelperSpinTransition(transition_pressure, ls_mat, hs_mat)[source]

Bases: burnman.composite.Composite

Helper class that makes a mineral that switches between two materials (for low and high spin) based on some transition pressure [Pa]

debug_print(indent='')[source]

Print a human-readable representation of this Material.

property C_p

Alias for molar_heat_capacity_p()

property C_v

Alias for molar_heat_capacity_v()

property G

Alias for shear_modulus()

property H

Alias for molar_enthalpy()

property K_S

Alias for adiabatic_bulk_modulus()

property K_T

Alias for isothermal_bulk_modulus()

property P

Alias for pressure()

property S

Alias for molar_entropy()

property T

Alias for temperature()

property V

Alias for molar_volume()

property adiabatic_bulk_modulus

Returns adiabatic bulk modulus of the mineral [Pa] Aliased with self.K_S

property adiabatic_compressibility

Returns isothermal compressibility of the composite (or inverse isothermal bulk modulus) [1/Pa] Aliased with self.beta_S

property alpha

Alias for thermal_expansivity()

property beta_S

Alias for adiabatic_compressibility()

property beta_T

Alias for isothermal_compressibility()

property bulk_sound_velocity

Returns bulk sound speed of the composite [m/s] Aliased with self.v_phi

copy()
property density

Compute the density of the composite based on the molar volumes and masses Aliased with self.rho

property energy

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures)

Returns an array of material properties requested through a list of strings at given pressure and temperature conditions. At the end it resets the set_state to the original values. The user needs to call set_method() before.

Parameters
vars_listlist of strings

Variables to be returned for given conditions

pressuresndlist or ndarray of float

n-dimensional array of pressures in [Pa].

temperaturesndlist or ndarray of float

n-dimensional array of temperatures in [K].

Returns
outputarray of array of float

Array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] and temperatures[i] and pressures[i].

property formula

Returns molar chemical formula of the composite

property gibbs

Alias for molar_gibbs()

property gr

Alias for grueneisen_parameter()

property grueneisen_parameter

Returns grueneisen parameter of the composite [unitless] Aliased with self.gr

property helmholtz

Alias for molar_helmholtz()

property isothermal_bulk_modulus

Returns isothermal bulk modulus of the composite [Pa] Aliased with self.K_T

property isothermal_compressibility

Returns isothermal compressibility of the composite (or inverse isothermal bulk modulus) [1/Pa] Aliased with self.beta_T

property molar_enthalpy

Returns enthalpy of the mineral [J] Aliased with self.H

property molar_entropy

Returns enthalpy of the mineral [J] Aliased with self.S

property molar_gibbs

Returns molar Gibbs free energy of the composite [J/mol] Aliased with self.gibbs

property molar_heat_capacity_p

Returns molar heat capacity at constant pressure of the composite [J/K/mol] Aliased with self.C_p

property molar_heat_capacity_v

Returns molar_heat capacity at constant volume of the composite [J/K/mol] Aliased with self.C_v

property molar_helmholtz

Returns molar Helmholtz free energy of the mineral [J/mol] Aliased with self.helmholtz

property molar_internal_energy

Returns molar internal energy of the mineral [J/mol] Aliased with self.energy

property molar_mass

Returns molar mass of the composite [kg/mol]

property molar_volume

Returns molar volume of the composite [m^3/mol] Aliased with self.V

property name

Human-readable name of this material.

By default this will return the name of the class, but it can be set to an arbitrary string. Overriden in Mineral.

property p_wave_velocity

Returns P wave speed of the composite [m/s] Aliased with self.v_p

property pressure

Returns current pressure that was set with set_state().

Returns
pressurefloat

Pressure in [Pa].

Notes

  • Aliased with P().

print_minerals_of_current_state()

Print a human-readable representation of this Material at the current P, T as a list of minerals. This requires set_state() has been called before.

reset()

Resets all cached material properties.

It is typically not required for the user to call this function.

property rho

Alias for density()

set_averaging_scheme(averaging_scheme)

Set the averaging scheme for the moduli in the composite. Default is set to VoigtReussHill, when Composite is initialized.

set_fractions(fractions, fraction_type='molar')

Change the fractions of the phases of this Composite. Resets cached properties

Parameters
fractions: list of floats

molar or mass fraction for each phase.

fraction_type: ‘molar’ or ‘mass’

specify whether molar or mass fractions are specified.

set_method(method)

set the same equation of state method for all the phases in the composite

set_state(pressure, temperature)[source]

Update the material to the given pressure [Pa] and temperature [K].

property shear_modulus

Returns shear modulus of the mineral [Pa] Aliased with self.G

property shear_wave_velocity

Returns shear wave speed of the composite [m/s] Aliased with self.v_s

property temperature

Returns current temperature that was set with set_state().

Returns
temperaturefloat

Temperature in [K].

Notes

  • Aliased with T().

property thermal_expansivity

Returns thermal expansion coefficient of the composite [1/K] Aliased with self.alpha

to_string()

return the name of the composite

unroll()

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Returns
fractionslist of float

List of molar fractions, should sum to 1.0.

mineralslist of burnman.Mineral

List of minerals.

Notes

Needs to be implemented in derived classes.

property v_p

Alias for p_wave_velocity()

property v_phi

Alias for bulk_sound_velocity()

property v_s

Alias for shear_wave_velocity()

Composites

class burnman.composite.Composite(phases, fractions=None, fraction_type='molar', name='Unnamed composite')[source]

Bases: burnman.material.Material

Base class for a composite material. The static phases can be minerals or materials, meaning composite can be nested arbitrarily.

The fractions of the phases can be input as either ‘molar’ or ‘mass’ during instantiation, and modified (or initialised) after this point by using set_fractions.

This class is available as burnman.Composite.

property name

Human-readable name of this material.

By default this will return the name of the class, but it can be set to an arbitrary string. Overriden in Mineral.

set_fractions(fractions, fraction_type='molar')[source]

Change the fractions of the phases of this Composite. Resets cached properties

Parameters
fractions: list of floats

molar or mass fraction for each phase.

fraction_type: ‘molar’ or ‘mass’

specify whether molar or mass fractions are specified.

set_method(method)[source]

set the same equation of state method for all the phases in the composite

set_averaging_scheme(averaging_scheme)[source]

Set the averaging scheme for the moduli in the composite. Default is set to VoigtReussHill, when Composite is initialized.

set_state(pressure, temperature)[source]

Update the material to the given pressure [Pa] and temperature [K].

debug_print(indent='')[source]

Print a human-readable representation of this Material.

unroll()[source]

Unroll this material into a list of burnman.Mineral and their molar fractions. All averaging schemes then operate on this list of minerals. Note that the return value of this function may depend on the current state (temperature, pressure).

Returns
fractionslist of float

List of molar fractions, should sum to 1.0.

mineralslist of burnman.Mineral

List of minerals.

Notes

Needs to be implemented in derived classes.

to_string()[source]

return the name of the composite

property formula

Returns molar chemical formula of the composite

property molar_internal_energy

Returns molar internal energy of the mineral [J/mol] Aliased with self.energy

property molar_gibbs

Returns molar Gibbs free energy of the composite [J/mol] Aliased with self.gibbs

property molar_helmholtz

Returns molar Helmholtz free energy of the mineral [J/mol] Aliased with self.helmholtz

property molar_volume

Returns molar volume of the composite [m^3/mol] Aliased with self.V

property molar_mass

Returns molar mass of the composite [kg/mol]

property density

Compute the density of the composite based on the molar volumes and masses Aliased with self.rho

property molar_entropy

Returns enthalpy of the mineral [J] Aliased with self.S

property molar_enthalpy

Returns enthalpy of the mineral [J] Aliased with self.H

property isothermal_bulk_modulus

Returns isothermal bulk modulus of the composite [Pa] Aliased with self.K_T

property adiabatic_bulk_modulus

Returns adiabatic bulk modulus of the mineral [Pa] Aliased with self.K_S

property isothermal_compressibility

Returns isothermal compressibility of the composite (or inverse isothermal bulk modulus) [1/Pa] Aliased with self.beta_T

property adiabatic_compressibility

Returns isothermal compressibility of the composite (or inverse isothermal bulk modulus) [1/Pa] Aliased with self.beta_S

property shear_modulus

Returns shear modulus of the mineral [Pa] Aliased with self.G

property p_wave_velocity

Returns P wave speed of the composite [m/s] Aliased with self.v_p

property bulk_sound_velocity

Returns bulk sound speed of the composite [m/s] Aliased with self.v_phi

property shear_wave_velocity

Returns shear wave speed of the composite [m/s] Aliased with self.v_s

property grueneisen_parameter

Returns grueneisen parameter of the composite [unitless] Aliased with self.gr

property thermal_expansivity

Returns thermal expansion coefficient of the composite [1/K] Aliased with self.alpha

property molar_heat_capacity_v

Returns molar_heat capacity at constant volume of the composite [J/K/mol] Aliased with self.C_v

property molar_heat_capacity_p

Returns molar heat capacity at constant pressure of the composite [J/K/mol] Aliased with self.C_p

property C_p

Alias for molar_heat_capacity_p()

property C_v

Alias for molar_heat_capacity_v()

property G

Alias for shear_modulus()

property H

Alias for molar_enthalpy()

property K_S

Alias for adiabatic_bulk_modulus()

property K_T

Alias for isothermal_bulk_modulus()

property P

Alias for pressure()

property S

Alias for molar_entropy()

property T

Alias for temperature()

property V

Alias for molar_volume()

property alpha

Alias for thermal_expansivity()

property beta_S

Alias for adiabatic_compressibility()

property beta_T

Alias for isothermal_compressibility()

copy()
property energy

Alias for molar_internal_energy()

evaluate(vars_list, pressures, temperatures)

Returns an array of material properties requested through a list of strings at given pressure and temperature conditions. At the end it resets the set_state to the original values. The user needs to call set_method() before.

Parameters
vars_listlist of strings

Variables to be returned for given conditions

pressuresndlist or ndarray of float

n-dimensional array of pressures in [Pa].

temperaturesndlist or ndarray of float

n-dimensional array of temperatures in [K].

Returns
outputarray of array of float

Array returning all variables at given pressure/temperature values. output[i][j] is property vars_list[j] and temperatures[i] and pressures[i].

property gibbs

Alias for molar_gibbs()

property gr

Alias for grueneisen_parameter()

property helmholtz

Alias for molar_helmholtz()

property pressure

Returns current pressure that was set with set_state().

Returns
pressurefloat

Pressure in [Pa].

Notes

  • Aliased with P().

print_minerals_of_current_state()

Print a human-readable representation of this Material at the current P, T as a list of minerals. This requires set_state() has been called before.

reset()

Resets all cached material properties.

It is typically not required for the user to call this function.

property rho

Alias for density()

property temperature

Returns current temperature that was set with set_state().

Returns
temperaturefloat

Temperature in [K].

Notes

  • Aliased with T().

property v_p

Alias for p_wave_velocity()

property v_phi

Alias for bulk_sound_velocity()

property v_s

Alias for shear_wave_velocity()