GREY_TRANSMITTANCE

This function computes the transmittance of radiation through a grey participating medium from the extinction coefficient, molar density, and path length. It applies an exponential attenuation model analogous to Beer-Lambert behavior for absorbing media.

The transmittance is calculated as:

tau = b^{-\epsilon \rho_m l}

where \epsilon is the extinction coefficient, \rho_m is the molar density, l is the path length, and b is the selected exponential base. Larger extinction coefficients, denser media, or longer path lengths all reduce the transmitted fraction.

Excel Usage

=GREY_TRANSMITTANCE(extinction_coefficient, molar_density, length, base)
  • extinction_coefficient (float, required): Extinction coefficient at the modeled frequency (m^2/mol).
  • molar_density (float, required): Molar density of the material (mol/m^3).
  • length (float, required): Path length through the material (m).
  • base (float, optional, default: 2.718281828459045): Exponent base used in the transmittance calculation (-).

Returns (float): Transmittance fraction through the material, or an error message if invalid.

Example 1: Atmospheric water vapor transmittance

Inputs:

extinction_coefficient molar_density length
0.00038 55300 0.01

Excel formula:

=GREY_TRANSMITTANCE(0.00038, 55300, 0.01)

Expected output:

0.810471

Example 2: Transmittance with base ten

Inputs:

extinction_coefficient molar_density length base
0.0002 20000 0.005 10

Excel formula:

=GREY_TRANSMITTANCE(0.0002, 20000, 0.005, 10)

Expected output:

0.954993

Example 3: Short path length

Inputs:

extinction_coefficient molar_density length
0.001 1000 0.0001

Excel formula:

=GREY_TRANSMITTANCE(0.001, 1000, 0.0001)

Expected output:

0.9999

Example 4: Longer path length with dilute gas

Inputs:

extinction_coefficient molar_density length
0.00005 500 0.2

Excel formula:

=GREY_TRANSMITTANCE(0.00005, 500, 0.2)

Expected output:

0.995012

Python Code

Show Code
from ht.radiation import grey_transmittance as ht_grey_transmittance

def grey_transmittance(extinction_coefficient, molar_density, length, base=2.718281828459045):
    """
    Compute grey-body transmittance from extinction and path length.

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

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

    Args:
        extinction_coefficient (float): Extinction coefficient at the modeled frequency (m^2/mol).
        molar_density (float): Molar density of the material (mol/m^3).
        length (float): Path length through the material (m).
        base (float, optional): Exponent base used in the transmittance calculation (-). Default is 2.718281828459045.

    Returns:
        float: Transmittance fraction through the material, or an error message if invalid.
    """
    try:
        extinction_coefficient_val = float(extinction_coefficient)
        molar_density_val = float(molar_density)
        length_val = float(length)
        base_val = float(base)
        if extinction_coefficient_val < 0:
            return "Error: extinction_coefficient must be non-negative"
        if molar_density_val < 0:
            return "Error: molar_density must be non-negative"
        if base_val <= 0:
            return "Error: base must be greater than 0"
        if length_val < 0:
            return "Error: length must be non-negative"
        return ht_grey_transmittance(
            extinction_coefficient=extinction_coefficient_val,
            molar_density=molar_density_val,
            length=length_val,
            base=base_val,
        )
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Extinction coefficient at the modeled frequency (m^2/mol).
Molar density of the material (mol/m^3).
Path length through the material (m).
Exponent base used in the transmittance calculation (-).