Unitful.jl
Unitful.jl copied to clipboard
Stefan–Boltzmann constant has unexpected units
change c to c0 https://github.com/PainterQubits/Unitful.jl/blob/e2aa6f8bb66ddf37adc0d33c7a40958dfcaaadaa/src/pkgdefaults.jl#L480
I wouldn’t say the value is wrong, the quantity is just accidentally given in "unusual units". You can convert it to SI units and get the correct value:
julia> u"σ"
5.09627837461878e9 J K^-4 s^-3 c^-2
julia> uconvert(u"W/(m^2*K^4)", u"σ")
5.6703744191844294e-8 W K^-4 m^-2
julia> upreferred(u"σ")
5.6703744191844294e-8 kg K^-4 s^-3
Nevertheless, I think this happened accidentally (and is certainly unexpected), so it should be changed by replacing c by c0 as you suggested.
I think we can do this in a feature release (I don’t consider it a breaking change, but since the value isn’t wrong, I wouldn’t call it a bugfix either).
Thanks Sebastian – I didn’t fully understand that c is a unit equal to c0.
I’m loving putting units on things in Julia.
From: Sebastian Stock @.> Sent: Monday, March 6, 2023 9:46 PM To: PainterQubits/Unitful.jl @.> Cc: Michael Kearney @.>; Author @.> Subject: Re: [PainterQubits/Unitful.jl] wrong value due to speed of light (Issue #624)
I wouldn’t say the value is wrong, the quantity is just accidentally given in "unusual units". You can convert it to SI units and get the correct value:
julia> u"σ"
5.09627837461878e9 J K^-4 s^-3 c^-2
julia> uconvert(u"W/(m^2*K^4)", u"σ")
5.6703744191844294e-8 W K^-4 m^-2
julia> upreferred(u"σ")
5.6703744191844294e-8 kg K^-4 s^-3
Nevertheless, I think this happened accidentally (and is certainly unexpected), so it should be changed by replacing c by c0 as you suggested.
I think we can do this in a feature release (I don’t consider it a breaking change, but since the value isn’t wrong, I wouldn’t call it a bugfix either).
— Reply to this email directly, view it on GitHubhttps://github.com/PainterQubits/Unitful.jl/issues/624#issuecomment-1455897050, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB7IUPHGLOYS3Q3HYBNZJSTW2W55VANCNFSM6AAAAAAVP2G2JE. You are receiving this because you authored the thread.Message ID: @.@.>>
I am reopening this so that we don’t forget to change it (I think it should be changed).