[TOC]
This changelog contains a non-exhaustive list of new features and notable bug-fixes (not all bug-fixes will be listed).
- SLIDE is merged with slide-pack. Now, SLIDE is now now capable of simulation large battery packs.
- Different battery cell types: Cell_Bucket, Cell_ECM and Cell_PbA are added.
- CHANGELOG.md is added.
*.CMakefiles are added for a better build.- CPack support for unit tests are added.
slide::Clockclass is created.<chrono>for timing is adapted for correct timing on Mac.Cell_KokamNMC.cppis deleted and it became an header.- DEG_ID improved, zero is not counted anymore.
- Free functions to simplify other classes are added:
free::check_Cell_states - Catch outside
LiPlatingis removed since it is not needed to be handled since it only throws when id is wrong. slide.hppfor including the library is added.NULL->nullptrshared_ptrclasses are turned tounique_ptr. Copyingshared_ptris eliminated.- print arguments for some functions are removed (e.g.,
V(bool print), getOCV(bool print))
std::spanfor state assignments.XYdata_ssfor span.
if(abs(Ii < 0.1))in Cycler.- Typo
bockDegAndThermis fixed.
- Most functions now use smart pointers.
- Template / auto parameter deduction is used.
- We require at least CMake 3.17.
- Now a compiler with C++20 support is required.
Modern version of slide. (#8) Deprecated but you can find a copy of Slide V2 in this branch.
- Most of the functions, especially
estimateOCVparameters()should be faster now. Unnecessary file reading inside classes is removed.fitAMnAndStartingPointswas calling readOCVinput all the time. It is fixed. - SLIDE should be able to run on different platfroms/compilers through CMake.
- Name capitalisation bugs are fixed.
- Documentation is updated. Creating wiki page from
*.pdfs. - False position method for current finding is implemented for SLIDE.
- For formatting code
clang-formatis adopted. std::endlare replaced by"\n".- Auxillary functions and data types are added (such as
fixed_data,XYdata,linspace,logspace,linstep, etc.). - Parallelisation is wrapped into
slide::runfunction and<thread>library is started being used. - File structure is changed,
data,results, anddocsfolders are created. loadCSV_1colcan takestd::arrayorstd::vectoras argument now. It also reusesloadCSV_mat- Binary search (with
std::lower_bound) forlinIntis implemented. Detecting if the data is fixed step. Remove linear search from interpolation! O(n) -> O(log(n)) or O(1) for fixed-step data. Nan initialization for interpolation is removed. - Used linspace, logspace when searching for parameters!
- Remove empty destructors etc. Rule of zero.
- changed pow to scientific notation
7*pow(10,-10)->7e-10. - Try-catch block based program flow is mostly removed due to performance penalty.
- Model Cp, Cn, Vn, Vp, Q are 2D std::arrays, and shorter code.
- OCVcurves is being moved to a struct.
- State default constructor is removed since it sets all states to zero, thanks to uniform initialiser.
State() = default - State
setStates(State& s),State::setIniStatesare removed. - name inputs are deleted from
fitAMnAndStartingPoints. - ValidOCV, calculateError, readOCVinput, discharge, fitAMnAndStartingPoints size input removed.
linInt_noexcept,discharge_noexcept,writeCharacterisationParam,linstep_fix and,logstep_fix,calcSurfaceConcentration,calcDiffConstant,calcMolarFlux,calcOverPotentialare added.findCVcurrent_bin(false position method) is added.log(x + sqrt(1+x^2))is changed withasinh(x)slide::Statenow inherits fromstd::array- Interpolation is in OCVcurves now. Simplified.
- New cost function for
determine_OCV, it is now much faster. - RK4 is implemented and FWEuler is seperated.
- Unit test to control results is written in MATLAB. But only folders, so make also for files.
- overwriteCharacterisationStates, overwriteGeometricStates are moved to cell, use cell versions.
- validState is moved to Cell.
- void
checkModelparam();is created to check MATLAB param. - void
initialise(slide::State &s_ini)is removed. linInt_matrixis removed.oneLevelCharacterisationFitis removed. Its contents moved tohierarchicalCharacterisationFit.- A struct created for stress parameters.
- Modern C++ features are now incorporated into the code.
- Ahpi_vec and Ahni_vec (100k double heap vectors) are removed.
slide::fixed_datatype is used. - Reading into double and converting whole vector in integer -> reading into integer.
- Header guards use
#pragma oncenow. - Change pointers to references whereever possible.
- printlevels are converted to enum
- Removed many magical numbers: 273 ->
PhyConst::Kelvin - Same parameters are defined multiple places are cleaned. For example Kokam parameters.
- paths are moved to settings.
- Data recording system is converted to push_back.
- Instead of increasing stack memory to hold large arrays, now we use
std::vector. - Most of the raw arrays are changed with
std::array; hence, the need for passing number of array elements is eliminated. #definedirectives are changed withconstexprvalues.<filesystem>library is used for handing file/directory operations (mkdirand other C-style functions are removed).- TDM-GCC/compiler specific features are eliminated (e.g., dynamic array on stack).
- Release mode is added to CMake.
- C-based header files are replaced by C++ versions (e.g.,
<stdio.h>to<cstdio>) - Range-based for loops adopted whereever possible.
- Instead of increasing stack memory to hold large arrays, now we use
- Using
#define nsfor number of states was causing problems with<chrono>library literalns; therefore, it was not possible to compile SLIDE other than TDM-GCC with C++1 standard. Bug was fixed by removing preprocessor directives. - Now heap allocation is used instead of stack area expansion. \
using namespace std;from global scope is removed.std::is added all necessary functions.- warning: variables
jandtimeCheckused in loop condition not modified in loop body.cycler.cpp mode==1, for (int j = 0; j < timeCheck; i++)They are changed accordingly. - Important bug on linux, only use
std::absotherwise it may call intabs(int). - Object slicing due to copying cells is removed.
abs(Icell - I) < pow(10, -10)-> herepow(10,-10)may be ZERO. Sopow(10.0, -10.0)is better. And1e-10is even better.- Remove used-defined classes from std namespace (such as state). A namespace called "slide" is created.
StateandCell_userare moved fromstdtoslide. - Others:
- Typo
CalendarAgeig->CalendarAgeingfixed.
- Typo
- Fixed time step
*.csvfiles were tried but no measurable effect in -O0.
- Required C++ standard is upgraded from C++11 to C++17.
This is the initial release of SLIDE. Deprecated but you can find a copy in this branch.
- A compiler with C++11 support.