solprop.modes.fill#

Share gas-fill resolution, freezing and loss policy across hollow-waveguide modes.

GasFillMixin is the base of every gas-filled hollow mode (MarcatiliMode and the rectangular wall pair): it resolves the fill into species and density paths, freezes it at a position, samples its susceptibility, and applies the shared loss vocabulary (loss_scale or an absolute alpha). It contributes methods only; each concrete frozen dataclass declares its own fields, so the public constructors and their arithmetic are its own. LossFunction is the callable form of a mode’s alpha, EVANESCENT_INDEX_FLOOR the floor the full model puts under Re n_eff, and _sqrt1p_minus_one the rounding-safe refractivity every gas-filled guide forms.

Module Attributes

LossFunction

A power attenuation coefficient in 1/m as a function of angular frequency.

EVANESCENT_INDEX_FLOOR

Smallest real effective index the full model will return.

Classes

GasFillMixin()

Provide material and loss methods for frozen hollow-mode dataclasses.

class solprop.modes.fill.GasFillMixin[source]#

Bases: Displayed

Provide material and loss methods for frozen hollow-mode dataclasses.

Subclasses declare gas, pressure, temperature, susceptibility, mixture, density, alpha and loss_scale fields. The model attribute selects the evanescent floor: "full" applies it and "reduced" does not. No dataclass fields or constructor are supplied here.

The loss vocabulary is shared by every hollow mode. loss_scale multiplies the model’s own loss: 1 (the default) is the model, 0 is lossless, and it must be finite and non-negative. alpha replaces the model’s loss by an absolute power attenuation coefficient in 1/m: a number, or a callable alpha(omega). The two are alternatives, so an alpha beside a loss_scale other than 1 is refused.

absorption_by_species(omega, z=0.0)[source]#

Attribute material intensity loss to populations to first order in chi.

Return rho_s(z) omega Im(gamma_s(omega)) / c in mixture order. This dilute-material attribution excludes wall leakage and the higher-order square-root and waveguide corrections in the mode’s total attenuation. loss_scale scales it, so loss_scale=0 removes it. An alpha replaces the total loss and therefore supplies no species attribution.

Parameters:
omeganumpy.ndarray

Positive angular frequencies in rad/s, within each species’ support.

zfloat, optional

Position in m at which to evaluate the component densities.

Returns:
numpy.ndarray

Non-negative intensity absorption in m^-1, shape (n_species, n_omega). A single gas or vacuum has one row.

Raises:
ModeError

If omega is non-positive or non-finite, the mode declares an alpha, whose total attenuation cannot be assigned to individual species, or a single gas’s susceptibility is absorbing (a mixture component attributes it).

alpha: float | Callable[[Float[ndarray, 'n_omega']], Float[ndarray, 'n_omega']] | None#
density: ZProfile#
property fill_species: Species | None[source]#

Single species a fill without a mixture carries.

The species of the density path, whose equation of state gives the density and, for an optmat law, whose susceptibility is the fill’s; None for vacuum or a mixture.

gas: Gas | str | None#
loss_scale: float#
mixture: Mixture | None#
model: Literal['full', 'reduced']#
pressure: float | ZProfile | None#
susceptibility: GasSusceptibility | None#
temperature: float | ZProfile | None#
with_mixture(mixture)[source]#

Return the same mode geometry with the supplied ordered gas mixture.

Parameters:
mixturesolprop.physdata.mixtures.Mixture

New populations, density paths and temperature: the mode’s gas, pressure and temperature are replaced by the mixture’s.

Returns:
GasFillMixin

A new instance of the same concrete dataclass.

Raises:
ModeError

If the concrete mode is not a dataclass.

solprop.modes.fill.LossFunction#

A power attenuation coefficient in 1/m as a function of angular frequency.

The callable form of every mode’s alpha. It may carry its analytic frequency derivative as a derivative attribute of the same signature; without one, the slope is differenced where it is needed.

alias of Callable[[Float[ndarray, 'n_omega']], Float[ndarray, 'n_omega']]