17#include "../cells/Cell.hpp"
25 double Cdis,
double Ccutdis,
double Ti,
int nrCycles,
int nrCap);
31 bool vmax =
V > c.
Vmax();
33 std::cerr <<
"Error in Cycler::CalendarAgeing. The voltage " <<
V <<
" is too high. The maximum value is " << c.
Vmax() <<
".\n";
35 bool vmin =
V < c.
Vmin();
37 std::cerr <<
"Error in Cycler::CalendarAgeing. The voltage " <<
V <<
" is too low. The minimum value is " << c.
Vmin() <<
".\n";
39 bool Temin = Ti < settings::Tmin_K;
41 std::cerr <<
"Error in Cycler::CalendarAgeing. The temperature " << Ti <<
"K is too low. The minimum value is 273.\n";
43 bool Temax = Ti > settings::Tmax_K;
45 std::cerr <<
"Error in Cycler::CalendarAgeing. The temperature " << Ti <<
" is too high. The maximum value is (273+60).\n";
47 bool mod = (mode < 0 || mode > 2);
49 std::cerr <<
"Error in Cycler::CalendarAgeing. The resting mode " << mode <<
" is illegal. Only values of 0, 1 or 2 are allowed.\n";
51 bool cycles = (std::fmod(Time, timeCheck) > 1);
53 std::cerr <<
"Error in Cycler::CalendarAgeing. The total resting time " << Time
54 <<
" is not a multiple of the time between two check ups " << timeCheck <<
".\n";
56 if (vmax || vmin || Temin || Temax || mod || cycles)
61 std::cout <<
"Warning in Cycler::CalendarAgeing. You have chosen to float the cell at a constant voltage for a long period. "
62 "It will take long to simulate this.\n";
69 bool vmax = Vset > c.
Vmax();
71 std::cerr <<
"Error in BasicCycler::CC_V_CV_I. The voltage " << Vset <<
" is too high. The maximum value is " << c.
Vmax() <<
".\n";
73 bool vmin = Vset < c.
Vmin();
75 std::cerr <<
"Error in BasicCycler::CC_V_CV_I. The voltage " << Vset <<
" is too low. The minimum value is " << c.
Vmin() <<
".\n";
81 bool currCV = Ccut < 0;
83 std::cerr <<
"Error in BasicCycler::CC_V_CV_I. The cutoff C rate " << Ccut <<
" is negative. It must be positive.\n";
89 bool currCC = Crate < 0;
91 std::cerr <<
"Error in BasicCycler::CC_V_CV_I. The Crate " << Crate <<
" is negative. It must be positive.\n";
97 double Cdis,
double Ccutdis,
double Ti,
int nrCycles,
int nrCap)
100 bool vmax = Vma > c.
Vmax();
102 std::cerr <<
"Error in Cycler::cycleAgeing. The maximum voltage " << Vma <<
" is too high. The maximum value is " << c.
Vmax() <<
".\n";
104 bool vmin = Vmi < c.
Vmin();
106 std::cerr <<
"Error in Cycler::cycleAgeing. The minimum voltage " << Vmi <<
" is too low. The minimum value is " << c.
Vmin() <<
".\n";
110 std::cerr <<
"Error in Cycler::cycleAgeing. The temperature " << Ti <<
"K is too low. The minimum value is 273.\n";
114 std::cerr <<
"Error in Cycler::cycleAgeing. The temperature " << Ti <<
" is too high. The maximum value is (273+60).\n";
116 bool cchar = Ccha <= 0;
118 std::cerr <<
"Error in Cycler::cycleAgeing. The charging Crate " << Ccha <<
" is negative. It must be positive.\n";
120 bool cdis = Cdis <= 0;
122 std::cerr <<
"Error in Cycler::cycleAgeing. The discharging Crate " << Cdis <<
" is negative. It must be positive.\n";
124 bool ccvchar = Ccutcha <= 0;
126 std::cerr <<
"Error in Cycler::cycleAgeing. The Crate of the cutoff current for the CV charge " << Ccutcha <<
" is negative. It must be positive.\n";
128 bool ccvdis = Ccutdis <= 0;
130 std::cerr <<
"Error in Cycler::cycleAgeing. The Crate of the cutoff current for the CV discharge " << Ccutdis <<
" is negative. It must be positive.\n";
132 bool cycles = nrCycles <= nrCap;
134 std::cerr <<
"Error in Cycler::cycleAgeing. The number of cycles between two check ups " << nrCap <<
" is higher than the total number of cycles " << nrCycles <<
".\n";
136 if (vmax || vmin || Temin || Temax || cchar || cdis || ccvchar || ccvdis || cycles)
Abstract Class representing a single battery cell.
Definition: Cell.hpp:33
constexpr double Vmax() const override
upper voltage limit of the cell
Definition: Cell.hpp:53
constexpr double Vmin() const override
lower voltage limit of the cell
Definition: Cell.hpp:50
constexpr double Tmax_Cell_K
the maximum temperature allowed in the simulation [K]
Definition: settings.hpp:44
constexpr double Tmin_Cell_K
the minimum temperature allowed in the simulation [K]
Definition: settings.hpp:43
Definition: util_error.hpp:21
void checkInputParam_CycAge(Cell &c, double Vma, double Vmi, double Ccha, double Ccutcha, double Cdis, double Ccutdis, double Ti, int nrCycles, int nrCap)
Definition: util_error.hpp:96
void checkInputParam_CC_V_CV_I(Cell &c, double Crate, double Vset, double Ccut)
Definition: util_error.hpp:65
void checkInputParam_CalAge(Cell &c, double V, double Ti, int Time, int timeCheck, int mode)
Definition: util_error.hpp:27
out V
Definition: squeeze_variables.m:16