pybamm.
_BaseSolution
(t, y, t_event=None, y_event=None, termination='final time', copy_this=None)[source]¶(Semi-private) class containing the solution of, and various attributes associated with, a PyBaMM model. This class is automatically created by the Solution class, and should never be called from outside the Solution class.
Parameters: |
|
---|
inputs
¶Values of the inputs
model
¶Model used for solution
save_data
(filename, variables=None, to_format='pickle')[source]¶Save solution data only (raw arrays)
Parameters: |
|
---|
t
¶Times at which the solution is evaluated
t_event
¶Time at which the event happens
termination
¶Reason for termination
y
¶Values of the solution
y_event
¶Value of the solution at the time of the event
pybamm.
Solution
(t, y, t_event=None, y_event=None, termination='final time')[source]¶Class extending the base solution, with additional functionality for concatenating different solutions together
Extends: _BaseSolution
append
(solution, start_index=1, create_sub_solutions=False)[source]¶Appends solution.t and solution.y onto self.t and self.y.
Note: by default this process removes the initial time and state of solution to
avoid duplicate times and states being stored (self.t[-1] is equal to
solution.t[0], and self.y[:, -1] is equal to solution.y[:, 0]). Set the optional
argument start_index
to override this behavior
sub_solutions
¶List of sub solutions that have been concatenated to form the full solution