SLIDE  3.0.0
A simulator for lithium-ion battery pack degradation
Loading...
Searching...
No Matches
State_ECM.hpp
Go to the documentation of this file.
1
8#pragma once
9
10#include "../../types/State.hpp"
11
12namespace slide {
13
18template <size_t N_RC = 1>
19struct State_ECM : public State<3 + N_RC>
20{
21
25 enum Index : size_t {
31 };
32
37 inline auto I() const { return (*this)[i_I]; }
38
43 inline auto &I() { return (*this)[i_I]; }
44
50 inline auto &Ir(size_t i = 0) { return (*this)[i_I + i + 1]; }
51
56 inline auto &SOC() { return (*this)[i_SOC]; }
57
62 inline auto &T() { return (*this)[i_T]; }
63};
64
66
67} // namespace slide
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27
State_ECM template class for holding the states of the ECM model.
Definition: State_ECM.hpp:20
auto & SOC()
Get the state of charge value (non-const method).
Definition: State_ECM.hpp:56
auto & I()
Get the current value (non-const method).
Definition: State_ECM.hpp:43
auto & Ir(size_t i=0)
Get the current through the parallel resistance (non-const method).
Definition: State_ECM.hpp:50
Index
Enumeration of indices for state variables.
Definition: State_ECM.hpp:25
@ i_SOC
State of charge [0-1].
Definition: State_ECM.hpp:27
@ i_I
Current, [A], + for discharge, - for charge.
Definition: State_ECM.hpp:28
@ i_T
Cell temperature [K].
Definition: State_ECM.hpp:26
@ i_Ir
Current through the parallel resistance, [I].
Definition: State_ECM.hpp:29
@ N_states
Total number of states (not recommended for usage, use .size() instead).
Definition: State_ECM.hpp:30
auto & T()
Get the temperature value (non-const method).
Definition: State_ECM.hpp:62
auto I() const
Get the current value (const method).
Definition: State_ECM.hpp:37
Definition: State.hpp:24