opencr.analysis.transient
The result of a time-dependent solve.
A TransientResult keeps the densities of every state at the output
times, the electron density, the conditions and the integrator’s report. Any
output time can be turned into a steady-state-like Result
(TransientResult.at) for fluxes, dominant processes and emission, and
the whole history into an xarray dataset (TransientResult.to_dataset).
Classes
| Name | Description |
|---|---|
TransientResult | The populations against time. |
TransientResultclass#
class TransientResult(model: Model, conditions_at: Callable[[float], Conditions], system_at: Callable[[float], PopulationSystem], times: np.ndarray, evolving: np.ndarray, report: TransientReport)The populations against time.
Attributes
| Name | Description |
|---|---|
model | The model solved. |
times | The output times in s. |
evolving | The densities of the evolving states, shape (times, states). |
report | The integrator’s report. |
evolvingattributeinstance attribute#
evolving = np.asarray(evolving, dtype=float)modelattributeinstance attribute#
model = modelreportattributeinstance attribute#
report = reporttimesattributeinstance attribute#
times = np.asarray(times, dtype=float)conditionsproperty#
conditions: ConditionsThe conditions at the first time.
electron_densitypropertycached#
electron_density: np.ndarrayn_e against time in m^-3.
populationspropertycached#
populations: dict[str, np.ndarray]The density of every state against time (m^-3), by name, in network order.
atmethod#
def at(index: int = -1) -> ResultReturn the state at output time index as a Result.
Its report says how far the populations are from a steady state (the relative residual at that moment).
conditions_atmethod#
def conditions_at(time: float) -> ConditionsReturn the conditions at time.
populationmethod#
def population(state: str) -> np.ndarrayReturn the density of state against time in m^-3.
to_datasetmethod#
def to_dataset() -> xr.DatasetReturn the populations and n_e against time as an xarray dataset.