bmlite.SPM.dae#
The dae module provides the system of differential algebraic equations (DAE)
for the SPM model. In addition, the bandwidth function is included in this
module, which helps determine the lower and upper bandwidths of residuals
so the 'band' linear solver option can be used in the IDASolver class.
Functions#
Module Contents#
- bmlite.SPM.dae.residuals(t, sv, svdot, res, inputs)[source]#
The DAE residuals
res = M*y' - f(t, y)for the SPM model.- Parameters:
t (float) – Value of time [s].
sv (1D array) – Solution/state variables at time
t.svdot (1D array) – Solution/state variable time derivatives at time
t.res (1D array) – An array the same size as
svandsvdot. The values are filled in withres = M*y' - f(t, y)inside this function.inputs ((sim : SPM Simulation object, exp : experiment dict)) – The simulation object and experimental details dictionary inputs that describe the specific battery and experiment to simulate.
- Returns:
outputs (tuple[np.ndarray]) – If the experimental step
modeis set topost, then the following post-processed variables will be returned in a tuple. Otherwise, returns None.Variable
Description [units] (type)
sdot_an
anode Li+ production [kmol/m3/s] (1D array)
sdot_ca
cathode Li+ production [kmol/m3/s] (1D array)