Commit 69ef7531 by Sarina Canelake

Merge pull request #1641 from manuel-freire/master

298.15 K is 25 C, not 0 (0 is defined to be at 273.15)

#os
parents 4efafe41 cdc3ad1c
...@@ -96,3 +96,4 @@ Gabe Mulley <gabe@edx.org> ...@@ -96,3 +96,4 @@ Gabe Mulley <gabe@edx.org>
Iain Dunning <idunning@mit.edu> Iain Dunning <idunning@mit.edu>
Olivier Marquez <oliviermarquez@gmail.com> Olivier Marquez <oliviermarquez@gmail.com>
Florian Dufour <neurolit@gmail.com> Florian Dufour <neurolit@gmail.com>
Manuel Freire <manuel.freire@fdi.ucm.es>
...@@ -57,7 +57,7 @@ DEFAULT_VARIABLES = { ...@@ -57,7 +57,7 @@ DEFAULT_VARIABLES = {
'pi': numpy.pi, 'pi': numpy.pi,
'k': scipy.constants.k, # Boltzmann: 1.3806488e-23 (Joules/Kelvin) 'k': scipy.constants.k, # Boltzmann: 1.3806488e-23 (Joules/Kelvin)
'c': scipy.constants.c, # Light Speed: 2.998e8 (m/s) 'c': scipy.constants.c, # Light Speed: 2.998e8 (m/s)
'T': 298.15, # 0 deg C = T Kelvin 'T': 298.15, # Typical room temperature: 298.15 (Kelvin), same as 25C/77F
'q': scipy.constants.e # Fund. Charge: 1.602176565e-19 (Coulombs) 'q': scipy.constants.e # Fund. Charge: 1.602176565e-19 (Coulombs)
} }
......
...@@ -370,7 +370,7 @@ class EvaluatorTest(unittest.TestCase): ...@@ -370,7 +370,7 @@ class EvaluatorTest(unittest.TestCase):
('pi', 3.1416, 1e-4), ('pi', 3.1416, 1e-4),
('k', 1.3806488e-23, 1e-26), # Boltzmann constant (Joules/Kelvin) ('k', 1.3806488e-23, 1e-26), # Boltzmann constant (Joules/Kelvin)
('c', 2.998e8, 1e5), # Light Speed in (m/s) ('c', 2.998e8, 1e5), # Light Speed in (m/s)
('T', 298.15, 0.01), # 0 deg C = T Kelvin ('T', 298.15, 0.01), # Typical room temperature (Kelvin)
('q', 1.602176565e-19, 1e-22) # Fund. Charge (Coulombs) ('q', 1.602176565e-19, 1e-22) # Fund. Charge (Coulombs)
] ]
for (variable, value, tolerance) in default_variables: for (variable, value, tolerance) in default_variables:
......
...@@ -580,7 +580,7 @@ default. These include: ...@@ -580,7 +580,7 @@ default. These include:
- ``pi`` - ``pi``
- ``k``: the Boltzmann constant (~1.38e-23 in Joules/Kelvin) - ``k``: the Boltzmann constant (~1.38e-23 in Joules/Kelvin)
- ``c``: the speed of light in m/s (2.998e8) - ``c``: the speed of light in m/s (2.998e8)
- ``T``: the positive difference between 0K and 0°C (285.15) - ``T``: typical room temperature (298.15 Kelvin, same as 25C/77F)
- ``q``: the fundamental charge (~1.602e-19 Coloumbs) - ``q``: the fundamental charge (~1.602e-19 Coloumbs)
Operators and Functions Operators and Functions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment