cooling¶
Finding the cooling time at which a material becomes clearable.
cooling
¶
Finding when a material becomes clearable.
This package computes no decay of its own. The caller supplies a series of materials at increasing cooling times, which is what a depletion calculation already produces, and this finds where the clearance index crosses the threshold.
Classes:
-
IngrowthError–Raised when the index climbs back above the threshold after clearing.
Functions:
-
index_series–Evaluate the clearance index at each cooling time.
-
time_to_clear–Find the cooling time at which a material first meets a set of limits.
IngrowthError
¶
Bases: ValueError
Raised when the index climbs back above the threshold after clearing.
An index that rises with cooling time means a daughter is growing in faster than its parent decays, so a material can meet the limits at one time and fail them later. Reporting only the first crossing would be actively misleading, so this is raised instead.
index_series
¶
time_to_clear
¶
time_to_clear(series: Mapping[float, Material], limit_set, *, allow_ingrowth: bool = False, **kwargs) -> float | None
Find the cooling time at which a material first meets a set of limits.
The index falls roughly exponentially with cooling time, so this interpolates logarithmically in the index between the two samples that bracket the threshold. Interpolating linearly instead would place the crossing systematically late, by a factor that grows with the spacing of the samples.
Parameters:
-
(series¶Mapping[float, Material]) –Cooling time in seconds to the material at that time. Times need not be sorted or evenly spaced.
-
–limit_set¶A registered limit set name, or a
LimitSet. -
(allow_ingrowth¶bool, default:False) –Return the first crossing even when the index later climbs back above the threshold, rather than raising
IngrowthError. -
–**kwargs¶Passed through to
clearance_index.
Returns:
-
float | None–The cooling time in seconds at which the index first falls below the
-
float | None–threshold. If the earliest sample already meets it, that sample's time
-
float | None–is returned rather than zero, since the series says nothing about
-
float | None–anything earlier.
Noneif the series never meets it.
Raises:
-
ValueError–If fewer than two times are given.
-
IngrowthError–If the index climbs back above the threshold at a later time, so the material does not stay clear.