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

FARADAY : float Faraday constant \(F\) in Coulombs per mole (\(\text{C}\cdot\text{mol}^{-1}\)). Represents the magnitude of electric charge per mole of electrons (\(F = e \cdot N_A \approx 96485.332\,\text{C}\cdot\text{mol}^{-1}\)). GAS_CONSTANT : float Molar gas constant \(R\) in Joules per mole per Kelvin (\(\text{J}\cdot\text{mol}^{-1}\cdot\text{K}^{-1}\)). Represents the constant of proportionality in the ideal gas law (\(R = k_B \cdot N_A \approx 8.31446\,\text{J}\cdot\text{mol}^{-1}\cdot\text{K}^{-1}\)). STANDARD_TEMPERATURE : float Standard thermodynamic temperature \(T^\circ\) in Kelvin (\(298.15\,\text{K}\), corresponding to \(25\,^\circ\text{C}\)).

Aliases

F : float Shorthand alias for FARADAY. R : float Shorthand alias for GAS_CONSTANT. T_STD : float Shorthand alias for STANDARD_TEMPERATURE.

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']