NEURON
nrnunits_modern.h File Reference

Go to the source code of this file.

Macros

#define _electron_charge_codata2018   1.602176634e-19 /* coulomb exact*/
 NMODL translated MOD files get unit constants typically from share/lib/nrnunits.lib.in. More...
 
#define _avogadro_number_codata2018   6.02214076e+23 /* exact */
 
#define _boltzmann_codata2018   1.380649e-23 /* joule/K exact */
 
#define _faraday_codata2018   (_electron_charge_codata2018*_avogadro_number_codata2018) /* 96485.33212... coulomb/mol */
 
#define _gasconstant_codata2018   (_boltzmann_codata2018*_avogadro_number_codata2018) /* 8.314462618... joule/mol-K */
 
#define _e_over_k_codata2018   (.001*_electron_charge_codata2018/_boltzmann_codata2018) /* 11.604518... K/mV */
 

Macro Definition Documentation

◆ _avogadro_number_codata2018

#define _avogadro_number_codata2018   6.02214076e+23 /* exact */

Definition at line 20 of file nrnunits_modern.h.

◆ _boltzmann_codata2018

#define _boltzmann_codata2018   1.380649e-23 /* joule/K exact */

Definition at line 21 of file nrnunits_modern.h.

◆ _e_over_k_codata2018

#define _e_over_k_codata2018   (.001*_electron_charge_codata2018/_boltzmann_codata2018) /* 11.604518... K/mV */

Definition at line 26 of file nrnunits_modern.h.

◆ _electron_charge_codata2018

#define _electron_charge_codata2018   1.602176634e-19 /* coulomb exact*/

NMODL translated MOD files get unit constants typically from share/lib/nrnunits.lib.in.

But there were other source files that hardcode some of the constants. Here we gather a few modern units into a single place (but, unfortunately, also in nrnunits.lib.in). Legacy units cannot be gathered here because they can differ slightly from place to place.

These come from https://physics.nist.gov/cuu/Constants/index.html. Termed the "2018 CODATA recommended values", they became available on 20 May 2019 and replace the 2014 CODATA set.

See oc/hoc_init.c, nrnoc/eion.c, nrniv/kschan.h

Definition at line 19 of file nrnunits_modern.h.

◆ _faraday_codata2018

#define _faraday_codata2018   (_electron_charge_codata2018*_avogadro_number_codata2018) /* 96485.33212... coulomb/mol */

Definition at line 22 of file nrnunits_modern.h.

◆ _gasconstant_codata2018

#define _gasconstant_codata2018   (_boltzmann_codata2018*_avogadro_number_codata2018) /* 8.314462618... joule/mol-K */

Definition at line 23 of file nrnunits_modern.h.