aquakin.PFRSolution#
- class aquakin.PFRSolution(x, C, model)[source]#
Bases:
_HasNamedSpecies,PlottableSolutionMixin,ExportableSolutionMixinSolution returned by
PlugFlowReactor.solve().- Variables:
x (jnp.ndarray) – Axial positions at which the solution was recorded, shape
(n_points,).C (jnp.ndarray) – Concentration profile, shape
(n_points, n_species). This is the raw integrated state. If the model setsclip_negative_states, individual entries may be small transient negatives: themax(C, 0)clamp is applied only when evaluating the reaction rates (and state-derived conditions), not to the saved state. These are a normal numerical transient, not an error; clip withjnp.maximum(sol.C, 0.0)for display if needed.model (CompiledModel) – Model used to produce this solution.
- Parameters:
x (Array)
C (Array)
model (CompiledModel)
- __init__(x, C, model)#
- Parameters:
x (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__(x, 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", .xCmodel