aquakin.TrackSolution#
- class aquakin.TrackSolution(t, C, model)[source]#
Bases:
_HasNamedSpecies,PlottableSolutionMixin,ExportableSolutionMixinSolution returned by
ParticleTrackReactor.solve().C(shape(n_t, n_species)) is the raw integrated state. If the model setsclip_negative_states, entries may be small transient negatives – themax(C, 0)clamp is applied only when evaluating the reaction rates, not to the saved state. A normal numerical transient, not an error; clip withjnp.maximum(sol.C, 0.0)for display if needed.- Parameters:
t (Array)
C (Array)
model (CompiledModel)
- __init__(t, C, model)#
- Parameters:
t (Array)
C (Array)
model (CompiledModel)
- Return type:
None
Methods
C_named(species)Return the trajectory of a single species by name.
C_named_many(species)Trajectories of several species by name, as
{name: array}.__init__(t, C, model)final_named([species])Values at the last recorded point, as
{name: float}.plot([species, ax])Plot one or more species against the independent axis (time, or axial position for a PFR).
to_csv([path_or_buf, units_in_columns])Write the solution to CSV (delegates to
to_dataframe()).to_dataframe(*[, units_in_columns])Return the solution as a pandas
DataFrame.units_named(species)Return the declared units of a species (for axis/column labels).
Attributes
finalEvery species' value at the last recorded point (
{name: float}).time_unitThe time unit of
self.t("s","d", .tCmodel