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
A power attenuation coefficient in 1/m as a function of angular frequency. |
|
Smallest real effective index the full model will return. |
Classes
Provide material and loss methods for frozen hollow-mode dataclasses. |
- class solprop.modes.fill.GasFillMixin[source]#
Bases:
DisplayedProvide material and loss methods for frozen hollow-mode dataclasses.
Subclasses declare gas, pressure, temperature, susceptibility, mixture, density,
alphaandloss_scalefields. 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_scalemultiplies the model’s own loss: 1 (the default) is the model, 0 is lossless, and it must be finite and non-negative.alphareplaces the model’s loss by an absolute power attenuation coefficient in 1/m: a number, or a callablealpha(omega). The two are alternatives, so analphabeside aloss_scaleother 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)) / cin 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_scalescales it, soloss_scale=0removes it. Analphareplaces 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).
- 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;
Nonefor vacuum or a mixture.
- susceptibility: GasSusceptibility | 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 aderivativeattribute 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']]