solprop.driver.mixtures#

Resolve material declarations and population selections at the driver boundary.

Functions

capillary_fill(material, pressure, *, ...[, ...])

Resolve one material declaration and explicit initial populations.

is_air(material)

Return whether a built-in gas's name means air.

mixture_profiles(mixture, *[, pressure])

Return the total density and available total-pressure statistic paths.

Classes

ResponseSelection(kerr, thg, plasma, raman, ...)

Retain the public response choices when updating a capillary fill.

class solprop.driver.mixtures.ResponseSelection(kerr, thg, plasma, raman, wavelength, envelope=False, length=None, selection=None, reference_field=None, field_range=None, plasma_integration=None)[source]#

Bases: object

Retain the public response choices when updating a capillary fill.

Attributes:
kerrbool

Whether to include instantaneous electronic responses.

thgbool

Whether to retain third harmonics on the field grid.

plasmabool, IonisationRate or Mapping

Global or per-label plasma selection.

ramanbool, sequence of str or Mapping

Global or per-label Raman term selection.

wavelengthfloat

Reference wavelength in m, the carrier of the default rates.

envelopebool

Preserve the envelope plasma selection when replacing a fill.

lengthfloat or None

The run’s length in m, over which a temperature path’s Raman reference temperature is averaged.

selectionMaterialSelection or None

The run’s material selection, under which an optmat-resolved fill takes its Raman response from optmat and plasma=True takes optmat’s rates.

reference_fieldfloat or None

The input’s peak field in V/m, at which an optmat rate’s constant energy per event is taken; None leaves the rates unbound.

field_rangetuple of float or None

The field amplitudes in V/m the run tabulates its rates over.

plasma_integration{‘band’, ‘trapezoid’} or None

The field plasma column’s running-integral rule (SEP 18); None takes the response’s default.

build(mixture)[source]#

Build the selected responses using the updated component declarations.

Parameters:
mixtureMixture

Ordered material, temperature and initial populations.

Returns:
tuple

Response declarations in mixture order, an optmat rate bound to the run’s reference field.

envelope: bool = False#
field_range: tuple[float, float] | None = None#
kerr: bool#
length: float | None = None#
plasma: bool | IonisationRate | Mapping[str, bool | IonisationRate]#
plasma_integration: Literal['band', 'trapezoid'] | None = None#
raman: bool | Sequence[str] | Mapping[str, bool | MolecularOptions]#
reference_field: float | None = None#
selection: MaterialSelection | None = None#
thg: bool#
wavelength: float#
solprop.driver.mixtures.capillary_fill(material, pressure, *, length, temperature, floor, susceptibility, preionisation, radius=None, vacuum_end=None, selection=None)[source]#

Resolve one material declaration and explicit initial populations.

Parameters:
materialGas, str, Mapping or Mixture

A built-in gas, mole fractions or a complete mixture declaration.

pressurefloat, sequence, ZProfile or None

Total pressure in bar; None uses one bar for a built-in gas or fractions. A supplied Mixture requires None because it already carries its paths.

lengthfloat

Capillary length in m, needed by endpoint pressure pairs.

temperaturefloat, ZProfile or None

Fill temperature in K, or a path of it along z in m; None is 293.15 K for a new fill. An existing mixture carries its own temperature: beside it this must be None or the mixture’s own (the same number or path object).

floorfloat or None

Pressure floor in bar for a new fill; incompatible with an existing mixture.

susceptibilityGasSusceptibility or None

Optical override for a single built-in gas only.

preionisationfloat, ZProfile, Mapping or None

Initial ionised fractions in [0, 1], globally or per label, each a number or a path along z in m. None retains the mixture’s declarations; omitted mapping labels retain their declarations.

radiusfloat, ZProfile or None, optional

Core radius in m of a circular hollow guide. Given, a pressure pair or (z, p) pair becomes the steady flow of solprop.gasflow.steady_fill(), which follows the bore and chokes a vacuum end; None (a rectangular guide, or a mode set without a core radius) keeps the uniform law and the numerical floor. A constant pressure or a supplied profile does not take it.

vacuum_end{‘choked’, ‘floor’} or None, optional

How an outer end below its choked pressure is treated; None chokes it where radius is given. Refused beside an existing mixture, which carries its own paths.

selectionMaterialSelection or None, optional

Resolve a built-in gas’s name, a fraction mapping’s names and "air" from optmat under this selection; None is MaterialSelection(). An existing mixture is taken as it is.

Returns:
Mixture

Ordered species, density paths and initial fractions.

Raises:
DriverError

If pressure, temperature or optical arguments conflict, or a label is unknown.

solprop.driver.mixtures.is_air(material)[source]#

Return whether a built-in gas’s name means air.

Parameters:
materialGas or str

The name given to the interface.

Returns:
bool

True for Gas.Air and for "air" in any case.

solprop.driver.mixtures.mixture_profiles(mixture, *, pressure=False)[source]#

Return the total density and available total-pressure statistic paths.

Parameters:
mixtureMixture

Ordered material populations.

pressurebool, optional

For independent densities, include the sum of partial pressures obtained by inverting each species’ equation of state at the declared temperature (at each position’s own, for a temperature path). Used to preserve an existing pressure statistic after a material update.

Returns:
dict

Density in m^-3 and, for a shared fill, pressure in bar.