12#include "../../settings/settings.hpp"
13#include "../../types/State.hpp"
63 using z_type = std::array<value_type, nch>;
69 inline auto &
zp(
size_t i) {
return (*
this)[
i_zp + i]; }
70 inline auto &
zn(
size_t i) {
return (*
this)[
i_zn + i]; }
71 inline auto &
z(
size_t i) {
return (*
this)[
i_zp + i]; }
73 inline auto zp() {
return std::span<double>(&
zp(0), &
zn(0)); }
74 inline auto zn() {
return std::span<double>(&
zn(0), &
zn(0) +
nch); }
75 inline auto z() {
return std::span<double>(&
zp(0), &
zn(0) +
nch); }
78 inline auto &
T() {
return (*
this)[
i_T]; }
83 inline auto &
ep() {
return (*
this)[
i_ep]; }
84 inline auto &
en() {
return (*
this)[
i_en]; }
85 inline auto &
ap() {
return (*
this)[
i_ap]; }
86 inline auto &
an() {
return (*
this)[
i_an]; }
87 inline auto &
CS() {
return (*
this)[
i_CS]; }
88 inline auto &
Dp() {
return (*
this)[
i_Dp]; }
89 inline auto &
Dn() {
return (*
this)[
i_Dn]; }
95 inline auto &
I() {
return (*
this)[
i_I]; }
96 inline auto &
V() {
return (*
this)[
i_V]; }
106 inline auto I()
const {
return (*
this)[
i_I]; }
< #TODO how can we make this so it takes 29=N_states from enum?
Definition: State_SPM.hpp:21
auto & z(size_t i)
Both z_p and z_n;.
Definition: State_SPM.hpp:71
auto & zn(size_t i)
z_type, transformed li concentration at the positive inner nodes of the negative particle
Definition: State_SPM.hpp:70
auto & rDCp()
specific resistance (resistance times real surface area of the combined electrodes) [Ohm m2]
Definition: State_SPM.hpp:90
auto & Dn()
diffusion constant at reference temperature of the anode [m s-1]
Definition: State_SPM.hpp:89
void overwriteCharacterisationStates(double Dpi, double Dni, double ri)
overwrite the states related to the characterisation of a cell
Definition: State_SPM.hpp:134
auto & LLI()
lost lithium [As]
Definition: State_SPM.hpp:80
auto & ep()
volume fraction of active material in the cathode [-]
Definition: State_SPM.hpp:83
auto & T()
cell temperature [K]
Definition: State_SPM.hpp:78
auto & Dp()
diffusion constant at reference temperature of the cathode [m s-1]
Definition: State_SPM.hpp:88
auto & thickp()
thickness of the cathode [m]
Definition: State_SPM.hpp:81
auto & SOC()
thickness of the plated lithium layer [m]
Definition: State_SPM.hpp:94
std::array< value_type, N_states > states_type
Definition: State_SPM.hpp:67
auto & zp(size_t i)
z_type, transformed li concentration at the positive inner nodes of the positive particle
Definition: State_SPM.hpp:69
std::span< double > viewGeometricStates()
#Check and fix. Why this also checks SOC?
Definition: State_SPM.hpp:100
auto & rDCn()
specific resistance (resistance times real surface area of the combined electrodes) [Ohm m2]
Definition: State_SPM.hpp:91
auto & V()
voltage [V]
Definition: State_SPM.hpp:96
static constexpr auto nch
Definition: State_SPM.hpp:23
auto & I()
current [A]
Definition: State_SPM.hpp:95
std::array< value_type, nch > z_type
Definition: State_SPM.hpp:63
auto & delta_pl()
thickness of the plated lithium layer [m]
Definition: State_SPM.hpp:93
auto zn()
Definition: State_SPM.hpp:74
auto & delta()
thickness of the SEI layer [m]
Definition: State_SPM.hpp:79
auto & thickn()
thickness of the anode [m]
Definition: State_SPM.hpp:82
auto & rDCcc()
specific resistance (resistance times real surface area of the combined electrodes) [Ohm m2]
Definition: State_SPM.hpp:92
Index
Definition: State_SPM.hpp:26
@ i_CS
surface area of the cracks at the surface of the negative particle [m2]
Definition: State_SPM.hpp:38
@ i_rDCp
(ONLY CATHODE) specific resistance of both electrodes combined [Ohm m2]
Definition: State_SPM.hpp:44
@ i_en
volume fraction of active material in the anode [-]
Definition: State_SPM.hpp:35
@ i_delta_pl
thickness of the plated lithium layer [m]
Definition: State_SPM.hpp:41
@ i_rDCn
(ONLY ANODE) specific resistance of both electrodes combined [Ohm m2]
Definition: State_SPM.hpp:45
@ i_rDCcc
(ONLY SEPARATOR) specific resistance of both electrodes combined [Ohm m2]
Definition: State_SPM.hpp:46
@ i_LLI
lost lithium inventory [As]
Definition: State_SPM.hpp:31
@ N_states
Definition: State_SPM.hpp:48
@ i_zp
transformed concentration at the positive inner Chebyshev nodes of the positive particle
Definition: State_SPM.hpp:42
@ i_I
Definition: State_SPM.hpp:27
@ i_T
cell temperature [K]
Definition: State_SPM.hpp:29
@ i_zn
transformed concentration at the positive inner Chebyshev nodes of the negative particle
Definition: State_SPM.hpp:43
@ i_ap
effective surface area of the porous cathode [m2 m-3]
Definition: State_SPM.hpp:36
@ i_Dp
diffusion constant of the cathode at reference temperature [m s-1]
Definition: State_SPM.hpp:39
@ i_thickp
thickness of the cathode [m]
Definition: State_SPM.hpp:32
@ i_SOC
Definition: State_SPM.hpp:47
@ N_save
Save until i_zp.
Definition: State_SPM.hpp:49
@ i_an
effective surface area of the porous anode [m2 m-3]
Definition: State_SPM.hpp:37
@ i_Dn
diffusion constant of the anode at reference temperature [m s-1]
Definition: State_SPM.hpp:40
@ i_ep
volume fraction of active material in the cathode [-]
Definition: State_SPM.hpp:34
@ i_delta
thickness of the SEI layer [m]
Definition: State_SPM.hpp:30
@ i_thickn
thickness of the anode [m]
Definition: State_SPM.hpp:33
@ i_V
Definition: State_SPM.hpp:28
auto & an()
effective surface area of the anode [m2 m-3]
Definition: State_SPM.hpp:86
void overwriteGeometricStates(double thickpi, double thickni, double epi, double eni, double api, double ani)
overwrite the states related to the geometry of a cell
Definition: State_SPM.hpp:109
auto & ap()
effective surface area of the cathode [m2 m-3]
Definition: State_SPM.hpp:85
auto & en()
volume fraction of active material in the anode [-]
Definition: State_SPM.hpp:84
auto & CS()
surface area of the cracks at the surface of the negative particle [m2]
Definition: State_SPM.hpp:87
auto z()
Definition: State_SPM.hpp:75
auto zp()
Definition: State_SPM.hpp:73
constexpr size_t nch
Definition: settings.hpp:33
Slide namespace contains all the types, classes, and functions for the simulation framework.
Definition: Cell.hpp:27