![]() |
SLIDE
3.0.0
A simulator for lithium-ion battery pack degradation
|
#include "slide.hpp"
#include "../benchmark/benchmarks.hpp"
#include "../examples/examples.hpp"
#include <ctime>
#include <thread>
#include <array>
#include <tuple>
#include <random>
#include <cmath>
#include <iomanip>
Functions | |
int | main () |
< Include header files More... | |
int main | ( | ) |
< Include header files
< print that you start simulations slide::tests::unit::test_all();
< Make a clock to measure how long the simulation takes
< Read the values for the matrices for the spatial discretisation of the solid diffusion PDE. these values are calculated by the MATLAB-script 'modelSetup.m', which writes them to csv files. Here, we only need to read these csv files
< slide::Model_SPM M; //!<Initialised at constructor. Look for extra settings at Constants.hpp (such as verbosity)
< Choose the prefix, a string with which the names of all subfolders with the outputfiles will start (the folders will be called prefix_xxxx). This is typically a number, and the reason why we use it is that results of previous simulations are not overwritten. i.e. for one simulation, use pref "0", then the next simulation could have pref "1". this ensures the results of the second simulation are written in different files and folders, rather than overwriting the files from the first simulation
< todo will be used to name a folder with the results, so must comply with the naming convention on your operating system letters, numbers, underscores and dots are fine don't use spaces don't use forbidden characters, e.g. for Windows the following are not allowed < > : " \ | / ? * https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file
< Choose which cell should be used for the simulations const int cellType = slide::cellType::KokamNMC; which cell to use for the simulation. 0 high power Kokam NMC cell (18650) 1 high energy LG Chem NMC cell (18650) 2 user cell (template class provided for where the user can define his own parameters)
< Choose which degradation models to use for the simulations The models are identified by a number, see DEG_ID in DEG_ID.hpp and below
< For now, assume we want to include 'Pinson&Bazant'-SEI growth, 'Delacourt'-LAM, 'Kindermann'-LAM and 'Yang'-lithium plating
< Then the user has to choose what is simulated. In the code below, uncomment the line which calls the function you want to execute (uncommenting means removing the //!<in front of the line) and comment all the other lines (commenting means putting //!<in front of the line)
<
< Examples:
< Benchmarks:
<*********************************************** END ******************************************************** Now all the simulations have finished. Print this message, as well as how long it took to do the simulations