PhysicalConstants

class PhysicalConstants

This class provides physical constants and conversions for convenience. The main purpose is to facilitate comparison to machine percision. For example, the molar gas constant is derived from the Boltzmann and Avogadro constants. Do not use this as a primary source for NIST physical constants. Instead, refer to the primary publications CODATA sources.

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

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)

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

class CODATA2018 : public feasst::PhysicalConstants

Physical constants from CODATA 2018. See https://doi.org/10.1103/RevModPhys.93.025010.

Public Functions

const double boltzmann_constant() const

Boltzman constant: 1.380649E-23 Joules per Kelvin.

const double avogadro_constant() const

Avogadro constant: 6.02214076E+23 particles per mol.

const double permitivity_vacuum() const

Permitivity of vacuum: 8.8541878128E-12 C^2/J/m.

const double elementary_charge() const

Elementary charge: 1.602176634E-19 C.

class CODATA2014 : public feasst::PhysicalConstants

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

Public Functions

const double boltzmann_constant() const

Boltzman constant: 1.38064852E-23 Joules per Kelvin.

const double avogadro_constant() const

Avogadro constant: 6.022140857E+23 particles per mol.

const double permitivity_vacuum() const

Permitivity of vacuum: 8.854187817E-12 C^2/J/m.

const double elementary_charge() const

Elementary charge: 1.6021766208E-19 C.

class CODATA2010 : public feasst::PhysicalConstants

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

Public Functions

const double boltzmann_constant() const

Boltzman constant: 1.3806488E-23 Joules per Kelvin.

const double avogadro_constant() const

Avogadro constant: 6.02214129E+23 particles per mol.

const double permitivity_vacuum() const

Permitivity of vacuum: 8.854187817E-12 C^2/J/m.

const double elementary_charge() const

Elementary charge: 1.602176565E-19 C.

class PhysicalConstantsCustom : public feasst::PhysicalConstants

Define custom physical constants.

Arguments

  • boltzmann_constant

  • avogadro_constant

  • permitivity_vacuum

  • elementary_charge

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.