SLIDE  3.0.0
A simulator for lithium-ion battery pack degradation
Loading...
Searching...
No Matches
slide::settings Namespace Reference

< Non-user related settings, please do not change! More...

Namespaces

namespace  cool
 < Cooling System Settings.
 
namespace  data
 
namespace  path
 
namespace  printBool
 

Enumerations

enum  printLevel {
  printCrit = 1 , printNonCrit , printCyclerFunctions , printCyclerHighLevel ,
  printCyclerDetail , printfindCVcurrentDetail
}
 
enum class  cellDataStorageLevel { noStorage = 0 , storeCumulativeData , storeHistogramData , storeTimeData }
 
enum class  moduleDataStorageLevel { noStorage = 0 , storeCumulativeData , storeTimeData }
 
enum  CVcurrentAlgorithm { linearSearch = 0 , falsePosition = 1 }
 < Current finding method; More...
 

Variables

constexpr size_t CELL_NDATA_MAX = DATASTORE_CELL <= cellDataStorageLevel::storeHistogramData ? CELL_NDATA_HIST_MAX : CELL_NDATA_INST_MAX
 length of arrays in which we store cycling data at every time step More...
 
constexpr bool isParallel { true }
 Parallelises the code if possible. More...
 
constexpr unsigned int numMaxParallelWorkers = 32
 Maximum number of threads to use if isParallel true. More...
 
constexpr size_t nch { 5 }
 
constexpr double Tmin_Cell_K { 0.0_degC }
 the minimum temperature allowed in the simulation [K] More...
 
constexpr double Tmax_Cell_K { 60.0_degC }
 the maximum temperature allowed in the simulation [K] More...
 
constexpr bool overwrite_data = true
 if this is false then folder overwriting is forbidden so you need to delete folders in results. More...
 
constexpr int DATASTORE_NHIST = 100
 length of the arrays with the histograms (if 1) More...
 
constexpr auto DATASTORE_CELL = cellDataStorageLevel::storeTimeData
 
constexpr auto DATASTORE_MODULE = moduleDataStorageLevel::noStorage
 See moduleDataStorageLevel for different options. More...
 
constexpr int DATASTORE_COOL = 0
 
constexpr int MODULE_NSUs_MAX = 100
 
constexpr double T_ENV = 15.0_degC
 environmental temperature More...
 
constexpr size_t CYCLER_NDATA_MAX { 10000 }
 
constexpr size_t CELL_NDATA_HIST_MAX = 10'000'000
 If histogram then write data every 10 millionth data. More...
 
constexpr size_t CELL_NDATA_INST_MAX = 100'000
 If it is storing every data then we should have much less storage. More...
 
constexpr size_t MODULE_NDATA_MAX { CYCLER_NDATA_MAX }
 if we store cell-level data, make the array as long as the one in Cycler More...
 
constexpr size_t CELL_NSTATE_MAX { 30 }
 maximum number of states of all types of cells //!< used to prepare arrays which are long enough for getStates() More...
 
constexpr int T_MODEL { 0 }
 Choose how much messages should be printed to the terminal. More...
 
constexpr int verbose { printLevel::printCrit }
 
constexpr bool printNumIterations { false }
 Prints number of iterations for improvement. Default is false. More...
 
constexpr auto CVcurrentFindingMethod = CVcurrentAlgorithm::falsePosition
 
constexpr double MODULE_P_V_ABSTOL = 0.01
 
constexpr double MODULE_P_V_RELTOL = 0.001
 tolerance on the relative difference between parallel-connected cells More...
 
constexpr double MODULE_P_I_ABSTOL = 0.005
 
constexpr double MODULE_P_I_RELTOL = 0.0005
 

Detailed Description

< Non-user related settings, please do not change!

< #TODO if it is in slide::settings it gives 600+ errors. Why?

Enumeration Type Documentation

◆ cellDataStorageLevel

Enumerator
noStorage 
storeCumulativeData 
storeHistogramData 
storeTimeData 

◆ CVcurrentAlgorithm

< Current finding method;

Enumerator
linearSearch 
falsePosition 

◆ moduleDataStorageLevel

Enumerator
noStorage 
storeCumulativeData 
storeTimeData 

◆ printLevel

Enumerator
printCrit 

threshold of verbose of when to print error messages for critical errors

printNonCrit 

threshold of verbose of when to print error messages for noncritical errors

printCyclerFunctions 

threshold of verbose of when to print the start and end of functions of the BasicCycler

printCyclerHighLevel 

threshold of verbose of when to print the high-level flow of the program in the BasicCycler

printCyclerDetail 

threshold of verbose of when to print the low-level detailed flow of the program in the BasicCycler

printfindCVcurrentDetail 

threshold of verbose of when to print the details of how the current for the CV phase is found

Variable Documentation

◆ CELL_NDATA_HIST_MAX

constexpr size_t slide::settings::CELL_NDATA_HIST_MAX = 10'000'000
constexpr

If histogram then write data every 10 millionth data.

◆ CELL_NDATA_INST_MAX

constexpr size_t slide::settings::CELL_NDATA_INST_MAX = 100'000
constexpr

If it is storing every data then we should have much less storage.

◆ CELL_NDATA_MAX

constexpr size_t slide::settings::CELL_NDATA_MAX = DATASTORE_CELL <= cellDataStorageLevel::storeHistogramData ? CELL_NDATA_HIST_MAX : CELL_NDATA_INST_MAX
constexpr

length of arrays in which we store cycling data at every time step

◆ CELL_NSTATE_MAX

constexpr size_t slide::settings::CELL_NSTATE_MAX { 30 }
constexpr

maximum number of states of all types of cells //!< used to prepare arrays which are long enough for getStates()

Data storage

◆ CVcurrentFindingMethod

constexpr auto slide::settings::CVcurrentFindingMethod = CVcurrentAlgorithm::falsePosition
constexpr

◆ CYCLER_NDATA_MAX

constexpr size_t slide::settings::CYCLER_NDATA_MAX { 10000 }
constexpr

length of the arrays which hold the cycling data (if 2) Large battery ~ 3000 SPM cells * (7+4) arrays * 8 Byte per double * N doubles = 3000 * 88 * 10,000 = 2.64 GB 1 CC cycle ~ 2 hours. So if you store data every 20s, 1 cycle gives 360 data points -> 10k is about 30 cycles

◆ DATASTORE_CELL

constexpr auto slide::settings::DATASTORE_CELL = cellDataStorageLevel::storeTimeData
constexpr

if 0, no cell-level data is stored if 1, statistics about I, V and T are stored, as well as overall utilisation (throughput) if 2, current, voltage, temperature, soc is stored at every time step, as well as overall utilisation (throughput)

◆ DATASTORE_COOL

constexpr int slide::settings::DATASTORE_COOL = 0
constexpr

if 0, no data is stored if 1, statistics about the cooling system is stored if 2, operating power etc is stored every time step

◆ DATASTORE_MODULE

constexpr auto slide::settings::DATASTORE_MODULE = moduleDataStorageLevel::noStorage
constexpr

See moduleDataStorageLevel for different options.

constexpr int DATASTORE_MODULE = 0; //!< if 0, no module-level data is stored if 2, current, voltage, temperature, soc is stored at every time step, as well as overall utilisation (throughput) constexpr int DATASTORE_BATT = 0; //!< if 0, no module-level data is stored if 2, current, voltage, temperature, soc is stored at every time step, as well as overall utilisation (throughput)

◆ DATASTORE_NHIST

constexpr int slide::settings::DATASTORE_NHIST = 100
constexpr

length of the arrays with the histograms (if 1)

◆ isParallel

constexpr bool slide::settings::isParallel { true }
constexpr

Parallelises the code if possible.

◆ MODULE_NDATA_MAX

constexpr size_t slide::settings::MODULE_NDATA_MAX { CYCLER_NDATA_MAX }
constexpr

if we store cell-level data, make the array as long as the one in Cycler

◆ MODULE_NSUs_MAX

constexpr int slide::settings::MODULE_NSUs_MAX = 100
constexpr

#TODO eliminate but recursive static does not solve the situation since it is recursive. maximum number of cells in a base module note: CELL_NSTATE_MAX * MODULE_NCELL_MAX <= StorageUnit_NSTATES_MAX

◆ MODULE_P_I_ABSTOL

constexpr double slide::settings::MODULE_P_I_ABSTOL = 0.005
constexpr

absolute tolerance on the difference between the set current and real current in a parallel modules i.e. in Module_p::setCurrent(), Inew - I < Itol

◆ MODULE_P_I_RELTOL

constexpr double slide::settings::MODULE_P_I_RELTOL = 0.0005
constexpr

relative tolerance on the difference between the set current and real current in a parallel modules i.e. in Module_p::setCurrent(), abs(Inew - I) < Itol*Inew

◆ MODULE_P_V_ABSTOL

constexpr double slide::settings::MODULE_P_V_ABSTOL = 0.01
constexpr

tolerance on the difference between parallel-connected cells i.e. the difference in voltage between two parallel connected cell has to be below this value

◆ MODULE_P_V_RELTOL

constexpr double slide::settings::MODULE_P_V_RELTOL = 0.001
constexpr

tolerance on the relative difference between parallel-connected cells

◆ nch

constexpr size_t slide::settings::nch { 5 }
constexpr

◆ numMaxParallelWorkers

constexpr unsigned int slide::settings::numMaxParallelWorkers = 32
constexpr

Maximum number of threads to use if isParallel true.

if this assertion fails, the user has changed something in the code at some point, without accounting for this change somewhere else. e.g. if you add an extra state-variable, you have to increase the value of 'ns' (defined in Constants.hpp), and add it in all functions in State.

◆ overwrite_data

constexpr bool slide::settings::overwrite_data = true
constexpr

if this is false then folder overwriting is forbidden so you need to delete folders in results.

Data storage //!< from slidepack

◆ printNumIterations

constexpr bool slide::settings::printNumIterations { false }
constexpr

Prints number of iterations for improvement. Default is false.

◆ T_ENV

constexpr double slide::settings::T_ENV = 15.0_degC
constexpr

environmental temperature

◆ T_MODEL

constexpr int slide::settings::T_MODEL { 0 }
constexpr

Choose how much messages should be printed to the terminal.

which thermal model to use 0 no thermal model 1 individual cell bulk thermal model 2 coupled cell thermal model with cooling from modules if 1, statistics about the cooling system is stored if 2, operating power etc is stored every time step

◆ Tmax_Cell_K

constexpr double slide::settings::Tmax_Cell_K { 60.0_degC }
constexpr

the maximum temperature allowed in the simulation [K]

◆ Tmin_Cell_K

constexpr double slide::settings::Tmin_Cell_K { 0.0_degC }
constexpr

the minimum temperature allowed in the simulation [K]

!< number of points in the spatial discretisation of the solid diffusion equation < number of points in the spatial discretisation of the solid diffusion equation *** DON'T CHANGE THE VALUE *** this is the number of positive inner Chebyshev nodes the full Chebyshev interval is from x = -1 to x = 1 the positive points go from x = 0 to x = 1 the inner positive points are the positive points excluding the point at x=0 and at x=1 so nch is the number of Chebyshev points with 0 < x < 1 do NOT CHANGE this value, if you do change it, you have to recalculate the spatial discretisation with the supplied MATLAB scripts. See the word document '2 overview of the code', section 'MATLAB setup before running the C++ code'

◆ verbose

constexpr int slide::settings::verbose { printLevel::printCrit }
constexpr

integer deciding how verbose the simulation should be The higher the number, the more output there is. Recommended value is 1, only use higher value for debugging From 4 (and above) there will be too much info printed to follow what is going on, but this might be useful for debugging to find where the error is and why it is happening 0 almost no messages are printed, only in case of critical errors related to illegal parameters 1 error messages are printed in case of critical errors which might crash the simulation 2 all error messages are printed, whether the simulation can recover from the errors or not 3 on top of the output from 2, a message is printed every time a function in the Cycler and BasicCycler is started and terminated 4 on top of the output from 3, the high-level flow of the program in the Cycler is printed (e.g. 'we are going to discharge the cell') 5 on top of the output from 4, the low-level flow of the program in the BasicCycler is printed (e.g. 'in time step 101, the voltage is 3.65V') 6 on top of the output from 5, we also print details of the nonlinear search for the current needed to do a CV phase 7 on top of the output from 6, a message is printed every time a function in the Cell is started and terminated