12#include "../src/slide.hpp"
21 std::string ID =
"Cell_ECM_single_default_pulse";
23 c.setBlockDegAndTherm(
true);
29 constexpr size_t Nrepeat = 3;
30 for (
size_t i = 0; i < Nrepeat; i++) {
31 cyc.CC(16, 2.7, 5 * 60, 0.1, 5, th);
32 cyc.CC(-16, 4.2, 5 * 60, 0.1, 5, th);
35 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
42 std::string ID =
"Cell_ECM_single_default_CCCV";
44 c.setBlockDegAndTherm(
true);
50 constexpr size_t Nrepeat = 3;
51 for (
size_t i = 0; i < Nrepeat; i++) {
52 cyc.CCCV(16, 2.7, 50e-3, 0.1, 5, th);
53 cyc.rest(10 * 60, 0.1, 10, th);
54 cyc.CCCV(16, 4.2, 50e-3, 0.1, 5, th);
55 cyc.rest(10 * 60, 0.1, 10, th);
58 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
66 std::string ID =
"Cell_ECM_2_RC_single_default_pulse";
68 c.setBlockDegAndTherm(
true);
74 constexpr size_t Nrepeat = 3;
75 for (
size_t i = 0; i < Nrepeat; i++) {
76 cyc.CC(16, 2.7, 5 * 60, 0.1, 5, th);
77 cyc.CC(-16, 4.2, 5 * 60, 0.1, 5, th);
80 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
87 std::string ID =
"Cell_ECM_2_RC_single_default_CCCV";
89 c.setBlockDegAndTherm(
true);
95 constexpr size_t Nrepeat = 3;
96 for (
size_t i = 0; i < Nrepeat; i++) {
97 cyc.CCCV(16, 2.7, 50e-3, 0.1, 5, th);
98 cyc.rest(10 * 60, 0.1, 10, th);
99 cyc.CCCV(16, 4.2, 50e-3, 0.1, 5, th);
100 cyc.rest(10 * 60, 0.1, 10, th);
103 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
110 constexpr double T_ENV = 15.0_degC;
112 std::string ID =
"Cell_ECM_parallel_3_default_pulse";
114 double capin{ 16 }, SOCin{ 0.5 }, Rdc_{ 2e-3 };
115 constexpr double Cp0 = 38e3;
116 constexpr double Rp0 = 15.8e-3;
117 std::array<double, 1> Rp_{ Rp0 }, inv_tau{ 1.0 / (Rp0 * Cp0) };
120 make<Cell_ECM<1>>(
"1", capin, SOCin, 1e-3, Rp_, inv_tau),
122 make<Cell_ECM<1>>(
"3", capin, SOCin, Rdc_, Rp_, inv_tau)
125 auto module =
Module_p(
"Par3", T_ENV,
true,
false, std::size(cs), 1, 1);
126 module.setSUs(cs,
false);
128 module.setBlockDegAndTherm(
true);
131 auto cyc =
Cycler(&module, ID);
135 constexpr size_t Nrepeat = 3;
136 for (
size_t i = 0; i < Nrepeat; i++) {
137 cyc.CC(16, 2.7, 5 * 60, 0.1, 5, th);
138 cyc.CC(-16, 4.2, 5 * 60, 0.1, 5, th);
141 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
147 constexpr double T_ENV = 15.0_degC;
150 std::string ID =
"Cell_ECM_parallel_3_default_CCCV";
151 double capin{ 16 }, SOCin{ 0.5 }, Rdc_{ 2e-3 };
152 constexpr double Cp0 = 38e3;
153 constexpr double Rp0 = 15.8e-3;
154 std::array<double, 1> Rp_{ Rp0 }, inv_tau{ 1.0 / (Rp0 * Cp0) };
157 make<Cell_ECM<1>>(
"1", capin, SOCin, 1e-3, Rp_, inv_tau),
159 make<Cell_ECM<1>>(
"3", capin, SOCin, Rdc_, Rp_, inv_tau)
162 auto module =
Module_p(
"Par3", T_ENV,
true,
false, std::size(cs), 1, 1);
163 module.setSUs(cs,
false);
165 module.setBlockDegAndTherm(
true);
168 auto cyc =
Cycler(&module, ID);
171 constexpr size_t Nrepeat = 3;
172 for (
size_t i = 0; i < Nrepeat; i++) {
173 cyc.CCCV(16, 2.7, 50e-3, 0.1, 5, th);
174 cyc.rest(10 * 60, 0.1, 10, th);
175 cyc.CCCV(16, 4.2, 50e-3, 0.1, 5, th);
176 cyc.rest(10 * 60, 0.1, 10, th);
179 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
185 constexpr double T_ENV = 15.0_degC;
187 std::string ID =
"Cell_ECM_parallel_3_withRcontact_CCCV";
188 double capin{ 16 }, SOCin{ 0.5 }, Rdc_{ 2e-3 };
189 constexpr double Cp0 = 38e3;
190 constexpr double Rp0 = 15.8e-3;
191 std::array<double, 1> Rp_{ Rp0 }, inv_tau{ 1.0 / (Rp0 * Cp0) };
193 std::vector<double> Rcontact{ 0.5e-3, 1e-3, 0.7e-3 };
196 make<Cell_ECM<1>>(
"1", capin, SOCin, 1e-3, Rp_, inv_tau),
198 make<Cell_ECM<1>>(
"3", capin, SOCin, Rdc_, Rp_, inv_tau)
201 auto module =
Module_p(
"Par3", T_ENV,
true,
false, std::size(cs), 1, 1);
202 module.setSUs(cs,
false);
203 module.setRcontact(Rcontact);
205 module.setBlockDegAndTherm(
true);
208 auto cyc =
Cycler(&module, ID);
211 constexpr size_t Nrepeat = 3;
212 for (
size_t i = 0; i < Nrepeat; i++) {
213 cyc.CCCV(16, 2.7, 50e-3, 0.1, 1, th);
214 cyc.rest(10 * 60, 0.1, 1, th);
215 cyc.CCCV(16, 4.2, 50e-3, 0.1, 5, th);
216 cyc.rest(10 * 60, 0.1, 10, th);
219 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
226 constexpr double T_ENV = 15.0_degC;
228 std::string ID =
"Cell_ECM_series_3_withRcontact_CCCV";
229 double capin{ 16 }, SOCin{ 0.5 }, Rdc_{ 2e-3 };
230 constexpr double Cp0 = 38e3;
231 constexpr double Rp0 = 15.8e-3;
232 std::array<double, 1> Rp_{ Rp0 }, inv_tau{ 1.0 / (Rp0 * Cp0) };
234 std::vector<double> Rcontact{ 0.5e-3, 1e-3, 0.7e-3 };
238 make<Cell_ECM<1>>(
"1", capin, SOCin, 1e-3, Rp_, inv_tau),
240 make<Cell_ECM<1>>(
"3", capin, SOCin, Rdc_, Rp_, inv_tau)
243 auto module =
Module_s(
"Ser3", T_ENV,
true,
false, std::size(cs), 1, 1);
244 module.setSUs(cs,
false);
245 module.setRcontact(Rcontact);
247 module.setBlockDegAndTherm(
true);
250 auto cyc =
Cycler(&module, ID);
254 constexpr size_t Nrepeat = 3;
255 for (
size_t i = 0; i < Nrepeat; i++) {
256 cyc.CCCV(16, module.Vmin(), 50e-3, 0.1, 1, th);
257 cyc.rest(10 * 60, 0.1, 1, th);
258 cyc.CCCV(16, module.Vmax(), 50e-3, 0.1, 5, th);
259 cyc.rest(10 * 60, 0.1, 10, th);
262 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
269 constexpr double T_ENV = 15.0_degC;
270 std::string ID =
"Cell_ECM_SmallPack";
274 c.setBlockDegAndTherm(
true);
279 auto module =
Module_p(
"SmallPack", T_ENV,
true,
false, std::size(cs), 1, 1);
280 module.setSUs(cs,
false);
283 auto cyc =
Cycler(&module, ID);
286 cyc.CC(2, 2.7, 5 * 60, 1, 10, th);
287 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
293 constexpr double T_ENV = 15.0_degC;
294 std::string ID =
"Cell_ECM_MediumPack";
297 c.setBlockDegAndTherm(
true);
301 constexpr size_t ns = 10;
302 constexpr size_t np = 32;
303 constexpr bool checkCells =
true;
305 const double Rc_s = 1e-4;
306 const double Rc_p = 2e-4;
311 double Rc2[np], Rc3[ns];
312 for (
size_t is = 0; is < np; is++) {
313 for (
size_t ic = 0; ic < ns; ic++) {
317 auto mi = make<Module_s>(
"s" + std::to_string(is), T_ENV,
true,
false, ns, 1, 1);
319 mi->setSUs(CinM, checkCells,
true);
320 mi->setRcontact(Rc3);
321 MinS[is] = std::move(mi);
325 auto module =
Module_p(
"MediumPack", T_ENV,
true,
false, ns * np, 1, 1);
326 module.setSUs(MinS,
false);
327 module.setRcontact(Rc2);
330 auto cyc =
Cycler(&module, ID);
333 cyc.CC(32, 2.7, 5 * 60, 1, 10, th);
334 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
340 constexpr double T_ENV = 15.0_degC;
341 std::string ID =
"Cell_ECM_LargePack";
344 c.setBlockDegAndTherm(
true);
348 constexpr size_t ns = 10;
349 constexpr size_t np = 64;
350 constexpr bool checkCells =
true;
352 const double Rc_s = 1e-4;
353 const double Rc_p = 2e-4;
358 double Rc2[np], Rc3[ns];
359 for (
size_t is = 0; is < np; is++) {
360 for (
size_t ic = 0; ic < ns; ic++) {
364 auto mi = make<Module_s>(
"s" + std::to_string(is), T_ENV,
true,
false, ns, 1, 1);
366 mi->setSUs(CinM, checkCells,
true);
367 mi->setRcontact(Rc3);
368 MinS[is] = std::move(mi);
372 auto module =
Module_p(
"LargePack", T_ENV,
true,
false, ns * np, 1, 1);
373 module.setSUs(MinS,
false);
374 module.setRcontact(Rc2);
377 auto cyc =
Cycler(&module, ID);
380 cyc.CC(64, 2.7, 5 * 60, 1, 10, th);
381 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
387 constexpr double T_ENV = 15.0_degC;
388 std::string ID =
"Cell_ECM_LargePackLong";
392 c.setBlockDegAndTherm(
true);
395 constexpr size_t ns = 10;
396 constexpr size_t np = 64;
397 constexpr bool checkCells =
true;
399 const double Rc_s = 1e-4;
400 const double Rc_p = 2e-4;
405 double Rc2[np], Rc3[ns];
406 for (
size_t is = 0; is < np; is++) {
407 for (
size_t ic = 0; ic < ns; ic++) {
411 auto mi = make<Module_s>(
"s" + std::to_string(is), T_ENV,
true,
false, ns, 1, 1);
413 mi->setSUs(CinM, checkCells,
true);
414 mi->setRcontact(Rc3);
415 MinS[is] = std::move(mi);
419 auto module =
Module_p(
"LargePackLong", T_ENV,
true,
false, ns * np, 1, 1);
420 module.setSUs(MinS,
false);
421 module.setRcontact(Rc2);
424 auto cyc =
Cycler(&module, ID);
427 for (
size_t i_repeat{}; i_repeat < 3; i_repeat++) {
428 cyc.CC(-64, 2.7, 20 * 60, 1, 10, th);
429 cyc.rest(15 * 60, 1, 10, th);
430 cyc.CC(64, 2.7, 20 * 60, 1, 10, th);
431 cyc.rest(30 * 60, 1, 10, th);
434 std::cout <<
"Finished " << ID <<
" in " << clk <<
".\n";
Definition: Cell_ECM.hpp:29
Definition: Cycler.hpp:19
Definition: Deep_ptr.hpp:23
Definition: Module_p.hpp:19
Definition: Module_s.hpp:23
Definition: benchmark_Cell_ECM.hpp:16
void run_Cell_ECM_parallel_3_withRcontact_CCCV()
Definition: benchmark_Cell_ECM.hpp:183
void run_Cell_ECM_2_RC_single_default_CCCV()
Definition: benchmark_Cell_ECM.hpp:84
void run_Cell_ECM_single_default_pulse()
Definition: benchmark_Cell_ECM.hpp:18
void run_Cell_ECM_LargePackLong()
Definition: benchmark_Cell_ECM.hpp:385
void run_Cell_ECM_parallel_3_default_CCCV()
Definition: benchmark_Cell_ECM.hpp:145
void run_Cell_ECM_parallel_3_default_pulse()
Definition: benchmark_Cell_ECM.hpp:108
void run_Cell_ECM_LargePack()
Definition: benchmark_Cell_ECM.hpp:338
void run_Cell_ECM_2_RC_single_default_pulse()
Definition: benchmark_Cell_ECM.hpp:63
void run_Cell_ECM_SmallPack()
Definition: benchmark_Cell_ECM.hpp:267
void run_Cell_ECM_series_3_withRcontact_CCCV()
Definition: benchmark_Cell_ECM.hpp:224
void run_Cell_ECM_MediumPack()
Definition: benchmark_Cell_ECM.hpp:291
void run_Cell_ECM_single_default_CCCV()
Definition: benchmark_Cell_ECM.hpp:39
Deep_ptr< T > make(Args &&...args)
Makes storage units.
Definition: Deep_ptr.hpp:120
Definition: timing.hpp:21