Skip to content

Constants Module (softpotato.constants)

The softpotato.constants module provides standardized physical and electrochemical constants defined according to CODATA 2018 / 2019 SI conventions.

constants

Physical and chemical constants with standardized SI definitions.

This module provides fundamental physical and electrochemical constants sourced from CODATA (via scipy.constants) and standardized IUPAC conventions.

Constants
Constant Symbol Value Units Description
FARADAY \(F\) \(\approx 96485.332\) \(\text{C}\cdot\text{mol}^{-1}\) Faraday constant (\(F = e \cdot N_A\)); electric charge per mole of electrons
GAS_CONSTANT \(R\) \(\approx 8.31446\) \(\text{J}\cdot\text{mol}^{-1}\cdot\text{K}^{-1}\) Molar gas constant (\(R = k_B \cdot N_A\)); ideal gas law proportionality constant
STANDARD_TEMPERATURE \(T^\circ\) \(298.15\) \(\text{K}\) Standard thermodynamic temperature (corresponding to \(25\,^\circ\text{C}\))
Aliases
Alias Target Description
F FARADAY Shorthand alias for Faraday constant (\(F\))
R GAS_CONSTANT Shorthand alias for molar gas constant (\(R\))
T_STD STANDARD_TEMPERATURE Shorthand alias for standard thermodynamic temperature (\(T^\circ\))

Examples:

>>> from softpotato.constants import FARADAY, GAS_CONSTANT, STANDARD_TEMPERATURE
>>> round(FARADAY, 2)
96485.33
>>> round(GAS_CONSTANT, 4)
8.3145
>>> STANDARD_TEMPERATURE
298.15
>>> from softpotato.constants import F, R, T_STD
>>> F == FARADAY and R == GAS_CONSTANT and T_STD == STANDARD_TEMPERATURE
True

FARADAY module-attribute

FARADAY: float = float(_const.physical_constants['Faraday constant'][0])

GAS_CONSTANT module-attribute

GAS_CONSTANT: float = float(_const.R)

STANDARD_TEMPERATURE module-attribute

STANDARD_TEMPERATURE: float = 298.15

F module-attribute

F: float = FARADAY

R module-attribute

R: float = GAS_CONSTANT

T_STD module-attribute

T_STD: float = STANDARD_TEMPERATURE

AVOGADRO module-attribute

AVOGADRO: float = float(_const.N_A)

BOLTZMANN module-attribute

BOLTZMANN: float = float(_const.k)

ELEMENTARY_CHARGE module-attribute

ELEMENTARY_CHARGE: float = float(_const.e)

VACUUM_PERMITTIVITY module-attribute

VACUUM_PERMITTIVITY: float = float(_const.epsilon_0)

__all__ module-attribute

__all__ = ['AVOGADRO', 'BOLTZMANN', 'ELEMENTARY_CHARGE', 'FARADAY', 'GAS_CONSTANT', 'STANDARD_TEMPERATURE', 'T_STD', 'VACUUM_PERMITTIVITY', 'F', 'R']