If you had simulated the current profile, run the matlab script ReadFollowCurrent.m
. It produces a plot of the simulated current, voltage and temperature as well as the original current from the profile.
Two real-life cells are implemented in this code, with different OCV curves and different parameters. To switch between different types, change the value of cellType
to the other value. The two real life cells have values of 0 and 1. On top of this, there is a third template
cell type called Cell_user
where users can implement their own values (in the released code, the parameters of this type are the same as the ones from the Kokam high power cell).
Alternatively, the user can change the parameters of the cell which is being used. The parameters of a cell are defined in its cpp-files: cell_KokamNMC.cpp
, cell_LGChemNMC.cpp
, and cell_user.cpp
. There, the user can directly change the values of all cell parameters and things like the initial lithium concentrations.
Finally, the user can change the OCV curves being used. OCV curves must be supplied by csv files with two columns. The first column must give the lithium fraction in a strictly increasing order, the second column must give the corresponding electrode potential (versus Li/Li+). In the *.cpp
files of the cell types, these *.csv
files are read. E.g. for the LGChemNMC cell the line loadCSV_2col("LGChem_OCV_C.csv",OCV_neg_n,OCV_neg_x, OCV_neg_y);
means the file called LGChem_OCV_C.csv gives the anode potential. If the user wants to use a different OCV curve, the csv file should be put in the folder of the project, and the name in the C++ code should be replaced.
The cycling regimes are defined in cycling.cpp
, where they can be changed.
CCCV: it should be straightforward on how to change the cycling regime by simply changing the value of the parameters (e.g. changing the value of the variable Crate
will use a different current for the CC phase). If the user only wants to do a CC instead of a CCCV cycle, the value of Ccut
should be set to a value higher than Crate (this means the threshold current for the CV phase is larger than the current used for the CC phase, so you immediately stop with the CV phase).
followCurrent: this function is more complex because the user can change different things.
*.csv
file with two columns. The first column must give the value of the current in Amperes with a positive value meaning a discharge and a negative value meaning a charge. The second column must give the time in seconds the current should be maintained for. A number of example files are supplied (all called Current profile xxxxx.csv
). The user can make his/her own profile and put this file in the project folder. Then, in cycling.cpp in the function FollowCurrent
, the user has to define which *.csv
file contains the profile. This is done by the variable called profile
. If the user changes the string to the name of a different profile, then a different file will be used. If you change the profile, you have to change the value of the variable length defined on the line below profile. This variable indicates the length of the profile (i.e. the number of rows in the *.csv
file) and it is very important this value is correct. The C++ code will read exactly length rows, so if the value is wrong then a wrong current profile will be read.FollowCurrent
, in the *.cpp
file cycling.cpp
) indicates which option should be used in the simulation. A value of 0 indicates the cell will skip the rest of the step, while a value of 1 indicates the cell will do a CV for the rest of the step.Change the voltage limit:
The voltage window in which the cell should operate can be defined by the user by changing the values of Vmax
, the upper voltage limit, and Vmin
, the lower voltage limit (in the function FollowCurrent
, in the *.cpp
file cycling.cpp
). These values should always be realistic cell voltages (e.g. if you set Vmin to 0, the code will crash at some point because this is not a feasible cell voltage).When you make a Cycler
object, you have to specify how often you want to store the data. In both cycling functions, this is done by the variable timeCycleData
. That variable indicates the time interval (in seconds) at which you want to store data. Only integer values are allowed, and if it is set to 0, no data is stored. There is one exception: when you are following a current profile and you are storing data (i.e. timeCycleData
is not 0), you will always store at least one data point per step in the profile. So if you set timeCycleData
to 2, but a given current should only be maintained for 1 second, you will still store that data point).
The maximum length of data files is 100,000 lines (which is the size of the memory buffer in the BasicCycler
). This means that if you have more than 100,000 data points (e.g. because the current profile is very long), the resulting data will be spread out over multiple *.csv
files. The MATLAB script reads all files and ‘stacks' the data after each other (i.e. the data from the 2nd file is appended behind the data from the first file).