PhysicalConstants

class PhysicalConstants

Subclassed by feasst::CODATA2010, feasst::CODATA2014, feasst::CODATA2018, feasst::PhysicalConstantsCustom

Conversions

Utility functions for unit conversion.

double number_density_to_grams_per_cm3(const double density, const double molecular_weight)

Convert the number density (1/A^3) to g/cm^3.

param molecular_weight:

1/A^3

double grams_per_cm3_to_number_density(const double density, const double molecular_weight)

Convert the density in g/cm^3 to number density (1/A^3)

param molecular_weight:

g/cm^3

Base constants

virtual const double boltzmann_constant() const = 0

Boltzman constant in units of Joules per Kelvin.

virtual const double avogadro_constant() const = 0

Avogadro’s constant units of number of particles per mol.

virtual const double permitivity_vacuum() const = 0

Permitivity of vacuum in units of C^2/J/m.

virtual const double elementary_charge() const = 0

Elementary charge in units of C.

Derivatives

Constants derived from the base constants.

const double ideal_gas_constant() const

Ideal gas constant in units of Joules per Kelvin per mol.

const double charge_conversion() const

Convert e^2/Angstrom to kJ/mol by a factor of units (kJ*A/e^2/mol)

class CODATA2018 : public feasst::PhysicalConstants

Physical constants from CODATA 2018

Public Functions

const double boltzmann_constant() const

Boltzman constant in units of Joules per Kelvin.

const double avogadro_constant() const

Avogadro’s constant units of number of particles per mol.

const double permitivity_vacuum() const

Permitivity of vacuum in units of C^2/J/m.

const double elementary_charge() const

Elementary charge in units of C.

class CODATA2014 : public feasst::PhysicalConstants

Physical constants from CODATA 2014 http://dx.doi.org/10.1103/RevModPhys.88.035009 http://dx.doi.org/10.1063/1.4954402

Public Functions

const double boltzmann_constant() const

Boltzman constant in units of Joules per Kelvin.

const double avogadro_constant() const

Avogadro’s constant units of number of particles per mol.

const double permitivity_vacuum() const

Permitivity of vacuum in units of C^2/J/m.

const double elementary_charge() const

Elementary charge in units of C.

class CODATA2010 : public feasst::PhysicalConstants

Physical constants from CODATA 2010 http://dx.doi.org/10.1103/RevModPhys.84.1527 http://dx.doi.org/10.1063/1.4724320

Public Functions

const double boltzmann_constant() const

Boltzman constant in units of Joules per Kelvin.

const double avogadro_constant() const

Avogadro’s constant units of number of particles per mol.

const double permitivity_vacuum() const

Permitivity of vacuum in units of C^2/J/m.

const double elementary_charge() const

Elementary charge in units of C.

class PhysicalConstantsCustom : public feasst::PhysicalConstants

Define custom physical constants.

Public Functions

PhysicalConstantsCustom(argtype args = argtype())

args:

  • boltzmann_constant

  • avogadro_constant

  • permitivity_vacuum

  • elementary_charge

const double boltzmann_constant() const

Boltzman constant in units of Joules per Kelvin.

const double avogadro_constant() const

Avogadro’s constant units of number of particles per mol.

const double permitivity_vacuum() const

Permitivity of vacuum in units of C^2/J/m.

const double elementary_charge() const

Elementary charge in units of C.