planck.h file
Blackbody source and group integrals.
The integrated blackbody is the isotropic radiance $B(T) = \sigma T^4 / \pi$, which equals $a c T^4 / 4\pi$. A group with nu_hi <= 0 spans the whole spectrum and returns that integral. T <= 0 returns ok = false.
Functions
-
auto vm_planck_b(vm_
float_ t T, bool* ok) -> vm_ float_ t - Integrated blackbody radiance
$B(T) = \sigma T^4 / \pi$. -
auto vm_planck_bnu(vm_
float_ t nu, vm_ float_ t T, bool* ok) -> vm_ float_ t - Spectral blackbody radiance
$B_\nu(T)$. -
auto vm_planck_group(vm_
float_ t nu_lo, vm_ float_ t nu_hi, vm_ float_ t T, bool* ok) -> vm_ float_ t - Group integral of
$B_\nu$between two frequencies. -
auto vm_planck_db_dt(vm_
float_ t T, bool* ok) -> vm_ float_ t - Temperature derivative
$dB/dT = 4 \sigma T^3 / \pi$.
Function documentation
vm_ float_ t vm_planck_b(vm_ float_ t T,
bool* ok)
Integrated blackbody radiance $B(T) = \sigma T^4 / \pi$.
| Parameters | |
|---|---|
| T | Temperature. |
| ok | Set false when T <= 0; may be NULL. |
| Returns | Radiance, or 0 when T <= 0. |
vm_ float_ t vm_planck_bnu(vm_ float_ t nu,
vm_ float_ t T,
bool* ok)
Spectral blackbody radiance $B_\nu(T)$.
| Parameters | |
|---|---|
| nu | Frequency. |
| T | Temperature. |
| ok | Set false when T <= 0; may be NULL. |
| Returns | Spectral radiance, or 0 when T <= 0 or nu <= 0. |
vm_ float_ t vm_planck_group(vm_ float_ t nu_lo,
vm_ float_ t nu_hi,
vm_ float_ t T,
bool* ok)
Group integral of $B_\nu$ between two frequencies.
| Parameters | |
|---|---|
| nu_lo | Lower frequency bound. |
| nu_hi | Upper frequency bound, or <= 0 for infinity. |
| T | Temperature. |
| ok | Set false when T <= 0 or the band is empty; may be NULL. |
| Returns | Group radiance. |
nu_hi <= 0 means the upper limit is infinity and returns the analytic integrated radiance. A finite band uses a fixed Gauss quadrature in the dimensionless frequency.
vm_ float_ t vm_planck_db_dt(vm_ float_ t T,
bool* ok)
Temperature derivative $dB/dT = 4 \sigma T^3 / \pi$.
| Parameters | |
|---|---|
| T | Temperature. |
| ok | Set false when T <= 0; may be NULL. |
| Returns | Derivative, or 0 when T <= 0. |