BB_SPECTRAL_RAD

This function computes blackbody spectral radiance at a specified wavelength using Planck’s law. It models the ideal thermal emission from a surface at absolute temperature T and is useful for radiation analysis in thermal engineering and heat-transfer calculations.

The spectral radiance is given by:

I_{\lambda}(\lambda, T) = \frac{2 h c^2}{\lambda^5\left[\exp\left(\frac{h c}{\lambda k T}\right)-1\right]}

where h is Planck’s constant, c is the speed of light, k is Boltzmann’s constant, \lambda is wavelength, and T is absolute temperature.

Excel Usage

=BB_SPECTRAL_RAD(T, wavelength)
  • T (float, required): Temperature of the surface (K).
  • wavelength (float, required): Wavelength of interest (m).

Returns (float): Spectral radiance in W/(m^2srm), or an error message if invalid.

Example 1: Blackbody radiance at 800 K and 4 micrometers

Inputs:

T wavelength
800 0.000004

Excel formula:

=BB_SPECTRAL_RAD(800, 0.000004)

Expected output:

1311690000

Example 2: Blackbody radiance at 5778 K and 500 nm

Inputs:

T wavelength
5778 5e-7

Excel formula:

=BB_SPECTRAL_RAD(5778, 5e-7)

Expected output:

26375700000000

Example 3: Blackbody radiance at 1000 K and 1 micrometer

Inputs:

T wavelength
1000 0.000001

Excel formula:

=BB_SPECTRAL_RAD(1000, 0.000001)

Expected output:

67204600

Example 4: Blackbody radiance at 300 K and 10 micrometers

Inputs:

T wavelength
300 0.00001

Excel formula:

=BB_SPECTRAL_RAD(300, 0.00001)

Expected output:

9924030

Python Code

Show Code
from ht.radiation import blackbody_spectral_radiance as ht_blackbody_spectral_radiance

def bb_spectral_rad(T, wavelength):
    """
    Compute blackbody spectral radiance at a wavelength.

    See: https://ht.readthedocs.io/en/latest/ht.radiation.html

    This example function is provided as-is without any representation of accuracy.

    Args:
        T (float): Temperature of the surface (K).
        wavelength (float): Wavelength of interest (m).

    Returns:
        float: Spectral radiance in W/(m^2*sr*m), or an error message if invalid.
    """
    try:
        T_val = float(T)
        wavelength_val = float(wavelength)
        if T_val <= 0:
            return "Error: T must be greater than 0"
        if wavelength_val <= 0:
            return "Error: wavelength must be greater than 0"
        return ht_blackbody_spectral_radiance(T_val, wavelength_val)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Temperature of the surface (K).
Wavelength of interest (m).