[cig-commits] [commit] master: document constants and avoid scipy for Boltzmann (63e48bc)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Dec 10 22:09:29 PST 2014
Repository : https://github.com/geodynamics/burnman
On branch : master
Link : https://github.com/geodynamics/burnman/compare/c28b39d1cfe942c4cb3b292e4aba88f5850c03a6...8d345bc80879c34ccb9b2fad2290c947ac5c942a
>---------------------------------------------------------------
commit 63e48bc359ab0e4987a0aab89beee3739461a711
Author: Timo Heister <timo.heister at gmail.com>
Date: Thu Dec 11 01:02:44 2014 -0500
document constants and avoid scipy for Boltzmann
>---------------------------------------------------------------
63e48bc359ab0e4987a0aab89beee3739461a711
burnman/constants.py | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/burnman/constants.py b/burnman/constants.py
index d4f8079..36f2ff9 100644
--- a/burnman/constants.py
+++ b/burnman/constants.py
@@ -1,5 +1,21 @@
import scipy.constants
-gas_constant = scipy.constants.gas_constant # also known as R
-Avogadro = scipy.constants.Avogadro # also known as N_A
-Boltzmann = scipy.constants.Boltzmann # also k_B
+"""
+molar gas constant (R) in J mol^-1 K^-1
+"""
+gas_constant = scipy.constants.gas_constant
+
+
+"""
+Avogradro constant (N_A) in mol ^ -1
+"""
+Avogadro = scipy.constants.Avogadro
+
+
+"""
+Boltzmann constant (k_B) in J K^-1.
+
+Note that we are not using scipy.constants.Boltzmann because it is not
+available in older versions.
+"""
+Boltzmann = 1.3806488e-23
More information about the CIG-COMMITS
mailing list