Skip to content

Commit

Permalink
correct unit of Stefan-Boltzmann-Constant (#11)
Browse files Browse the repository at this point in the history
correct unit of Stefan-Boltzmann-Constant
  • Loading branch information
giordano committed Apr 28, 2019
2 parents 6e965c2 + 60e4385 commit b99e9f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ end
| `SpeedOfLightInVacuum` | `c_0` | 2.99792458e8 | `m s^-1` |
| `StandardAccelerationOfGravitation` | `g_n` | 9.80665 | `m s^-2` |
| `StandardAtmosphere` | `atm` | 101325.0 | `Pa` |
| `StefanBoltzmannConstant` | `σ` | 5.670367e-8 | `m^2` |
| `StefanBoltzmannConstant` | `σ` | 5.670367e-8 | `W m^-2 K^-4` |
| `ThomsonCrossSection` | `σ_e` | 6.6524587158e-29 | `m^2` |
| `WienWavelengthDisplacementLawConstant` | `b` | 0.0028977729 | `K m` |

Expand Down
4 changes: 2 additions & 2 deletions src/codata2014.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module CODATA2014

using PhysicalConstants, Measurements, Unitful

import Unitful: Ω, A, C, F, J, kg, K, m, mol, N, Pa, s, T
import Unitful: Ω, A, C, F, J, kg, K, m, mol, N, Pa, s, T, W
import PhysicalConstants: @constant, @derived_constant

@constant(FineStructureConstant, α, "Fine-structure constant", 7.297_352_5664e-3,
Expand Down Expand Up @@ -75,7 +75,7 @@ import PhysicalConstants: @constant, @derived_constant
BigFloat(10_973_731_568_508)/BigFloat(1_000_000), m^-1,
6.5e-5, BigFloat(65)/BigFloat(1_000_000), "CODATA 2014")
@constant(StefanBoltzmannConstant, σ, "Stefan-Boltzmann constant", 5.670_367e-8,
BigFloat(5670_367)/BigFloat(100_000_000_000_000), m^2,
BigFloat(5670_367)/BigFloat(100_000_000_000_000), W * m^-2 * K^-4,
1.3e-13, BigFloat(13)/BigFloat(100_000_000_000_000), "CODATA 2014")
@constant(ThomsonCrossSection, σ_e, "Thomson cross section", 0.665_245_871_58e-28,
BigFloat(66_524_587_158)/BigFloat(1000_000_000_000_000_000_000_000_000_000_000_000_000),
Expand Down
4 changes: 3 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using PhysicalConstants.CODATA2014, Measurements, Unitful
using Test

import PhysicalConstants.CODATA2014: α, atm, c_0, e, ε_0, h, ħ, µ_0
import PhysicalConstants.CODATA2014: α, atm, c_0, e, ε_0, h, ħ, k_B, µ_0, σ

@testset "Base" begin
@test ustrip(big(h)) == big"6.626070040e-34"
Expand Down Expand Up @@ -39,6 +39,8 @@ end
@test ε_0 @inferred(1 / (μ_0 * c_0 ^ 2))
@test @inferred(big(0) + α) == big(α)
@test @inferred* 1.0) == float(α)
@test (pi ^ 2 * k_B ^ 4) / (60 * ħ ^ 3 * c_0 ^ 2)
σ atol = measurement(σ).val.err * unit(σ)
end

@testset "Show" begin
Expand Down

0 comments on commit b99e9f8

Please sign in to comment.