Charging policies describe how the **source voltage** is computed at each timestep. Each policy class implements:
get_voltage(t, y)
where \( y = [V, I, R, T, \text{SOC}, \text{SEI}, V_{transient}] \)
Applies a fixed voltage during the charge cycle.
\[ V_{\text{source}}(t) = V_{set} \]
In code:
return self.voltage
Adjusts the source voltage to maintain a desired current.
\[ V_{\text{source}}(t) = I_{set} \cdot R(t) + \text{OCV}(\text{SOC}(t)) \]
Matches real-world CC charging through voltage regulation.
Alternates between charging at a fixed current and resting.
\[ V_{\text{source}}(t) = \begin{cases} I_{set} \cdot R(t) + \text{OCV}, & (t \bmod (t_{on}+t_{off})) < t_{on} \\ \text{OCV}, & \text{otherwise} \end{cases} \]
Uses a sinusoidally varying current magnitude.
\[ V_{\text{source}}(t) = | I_{set} \sin(2\pi f t) | \cdot R(t) + \text{OCV} \]
These physical mechanisms produce the ODEs governing voltage, temperature, SOC, SEI, and transient behavior.
The SOC evolves via: \[ \frac{d\,\text{SOC}}{dt} = \frac{I(t)}{C_{\text{nominal}} \cdot 3600} \]
Sums ohmic heating and cooling to ambient temperature.
Ohmic heating: \[ \frac{dT}{dt} = \frac{I^2 R}{m c} \]
Cooling: \[ \frac{dT}{dt} = -k(T - T_{amb}) \]
Growth rate governed by Arrhenius temperature scaling and SOC/current stress.
\[ k_T = k_0 e^{-E_a / (RT)} \]
Stress term: \[ f_{QI} = (1+2\,\text{SOC}^2)(1 + 0.1|I|) \]
Combined: \[ \frac{d(\text{SEI})}{dt} = k_T f_{QI} \]
Includes dependence on anode potential, current nonlinearity, and exponential SOC scaling.
\[ f_{QI} = A \exp\left(\gamma_{\text{soc}}(U_{ref} - U_{ocv})\right) \left(1 + \beta_I |I| \right)^\nu \]
\[ \frac{d(\text{SEI})}{dt} = k_0 e^{-E_a/(RT)} \;\; f_{QI} \]
Models overpotential dynamics using an RC circuit: \[ \frac{dV_c}{dt} = -\frac{1}{RC} V_c + \frac{1}{C} I \]