fdtdx.constants

fdtdx.constants.c module-attribute

c: float = 299792458.0

Speed of light in vacuum (m/s).

fdtdx.constants.mu0 module-attribute

mu0: float = 4e-07 * pi

Vacuum permeability (H/m).

fdtdx.constants.eps0 module-attribute

eps0: float = 1.0 / mu0 * c ** 2

Vacuum permittivity (F/m).

fdtdx.constants.eta0 module-attribute

eta0: float = mu0 * c

Free space impedance (Ω).

fdtdx.constants.wavelength_to_period

wavelength_to_period(wavelength: float) -> float

Convert wavelength to time period using speed of light.

Uses the speed of light constant to calculate the corresponding time period for a given wavelength.

Parameters:
  • wavelength (float) –

    The wavelength in meters.

Returns:
  • float( float ) –

    The corresponding time period in seconds.

Source code in src/fdtdx/constants.py
69
70
71
72
73
74
75
76
77
78
79
80
81
def wavelength_to_period(wavelength: float) -> float:
    """Convert wavelength to time period using speed of light.

    Uses the speed of light constant to calculate the corresponding time period
    for a given wavelength.

    Args:
        wavelength (float): The wavelength in meters.

    Returns:
        float: The corresponding time period in seconds.
    """
    return wavelength / c