SLIDE  3.0.0
A simulator for lithium-ion battery pack degradation
Loading...
Searching...
No Matches
running_Cell_Bucket.hpp
Go to the documentation of this file.
1/*
2 * running_Cell_Bucket.hpp
3 *
4 * Benchmark file for Cell_Bucket
5 *
6 * Created on: 07 Aug 2022
7 * Author(s): Volkan Kumtepeli
8 */
9
10#pragma once
11
12#include "../src/slide.hpp"
13
14#include <string>
15
16namespace slide::benchmarks {
17
19{
20 // Benchmark with default parameters:
21 std::string ID = "Cell_Bucket_single_default_pulse"; // + std::to_string(Crate) + '_'
22 auto c = Cell_Bucket();
23 c.setBlockDegAndTherm(true);
24
25 ThroughputData th{};
26 auto cyc = Cycler(&c, ID);
27
28 Clock clk;
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);
33 }
34
35 std::cout << "Finished " << ID << " in " << clk << ".\n";
36 cyc.writeData();
37}
38
40{
41 // Benchmark with default parameters:
42 std::string ID = "Cell_Bucket_single_default_CCCV"; // + std::to_string(Crate) + '_'
43 auto c = Cell_Bucket();
44 c.setBlockDegAndTherm(true);
45
46 ThroughputData th{};
47 auto cyc = Cycler(&c, ID);
48
49 Clock clk;
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);
56 }
57
58 std::cout << "Finished " << ID << " in " << clk << ".\n";
59 cyc.writeData();
60}
61
62
63inline void run_Cell_Bucket()
64{
65 std::string ID = "temp";
66 Clock clk;
67
68 constexpr size_t N = 2;
69
70 auto c = Cell_Bucket();
71 auto cyc = Cycler(&c, ID);
72
73 for (size_t i{ 0 }; i < N; i++) {
75
76 cyc.CCCV(1, 4, 0.1, 1, 1, th);
77 cyc.CCCV(1, 3, 0.1, 1, 1, th);
78 }
79
80 c.writeData("test");
81 std::cout << "V: " << c.V() << "\n";
82
83 std::cout << "Finished run_Cell_Bucket in " << clk << ".\n";
84}
85
86inline void run_Cell_ECM()
87{
88 std::string ID = "temp";
89 Clock clk;
90
91 constexpr size_t N = 2;
92
93 auto c = Cell_ECM();
94 auto cyc = Cycler(&c, ID);
95
96 for (size_t i{ 0 }; i < N; i++) {
98 cyc.CCCV(1, 4, 0.1, 1, 1, th);
99 cyc.CCCV(1, 3, 0.1, 1, 1, th);
100 }
101
102 c.writeData("test");
103 std::cout << "V: " << c.V() << "\n";
104
105 std::cout << "Finished run_Cell_ECM in " << clk << ".\n";
106}
107
108inline void run_Cell_SPM()
109{
110
111 std::string ID = "temp";
112 Clock clk;
113
114 constexpr size_t N = 15;
115
116 auto c = Cell_SPM();
117 std::cout << "V: " << c.V() << '\n';
118 // auto cyc = Cycler(&c, ID);
119
120 // double Ah, Wh, dtime;
121 // for (size_t i{ 0 }; i < N; i++) {
122
123
124 // cyc.CCCV(1, 4, 0.1, 1, 10, Ah, Wh, dtime);
125 // cyc.CCCV(1, 3, 0.1, 1, 10, Ah, Wh, dtime);
126 // }
127
128 // c.writeData("test");
129 // std::cout << "V: " << c.V() << '\n';
130 // std::cout << "Wh: " << Wh << '\n';
131 // std::cout << "Finished run_Cell_SPM in " << clk << ".\n";
132}
133
134} // namespace slide::benchmarks
Definition: Cell_ECM.hpp:29
Definition: Cell_SPM.hpp:39
Definition: Cycler.hpp:19
Definition: benchmark_Cell_ECM.hpp:16
void run_Cell_Bucket_single_default_CCCV()
Definition: running_Cell_Bucket.hpp:39
void run_Cell_Bucket_single_default_pulse()
Definition: running_Cell_Bucket.hpp:18
void run_Cell_SPM()
Definition: running_Cell_Bucket.hpp:108
void run_Cell_Bucket()
Definition: running_Cell_Bucket.hpp:63
void run_Cell_ECM()
Definition: running_Cell_Bucket.hpp:86
Cell_ECM< 0 > Cell_Bucket
Definition: Cell_ECM.hpp:365
Definition: timing.hpp:21
Definition: State.hpp:24