Commit 0b3de87d authored by Elias Barbers's avatar Elias Barbers
Browse files

public release v2.21.1

parent 31e7b31a
Pipeline #303056 passed with stages
in 37 minutes and 17 seconds
Version 2.21.1
===========
- Move RC.xml from scenarios to the unittests folder
- Changes to the readme
Version 2.21.0
===========
- Fix a bug that would break the thermal model for high rho discretizations
- An additinal input for initial temperatures can be added to the model generated by the simulink converter using the new matlab function AddTemperatureInput()
- Integrate the electrical::state namespace into ::state
- Move all libraries to /libraries
Version 2.20.0
===========
- The formulas for calendric and cyclic aging can use the cell SoC as an additional parameter
Version 2.19.0
===========
- An additinal input for initial SOCs can be added to the model generated by the simulink converter using the new matlab function AddSocInput()
- Removed a bug in the simulink converter that occured with Rmphn elements
- The aging simulation supports profiles that are longer that the aging step time.
Version 2.18.0
===========
- Standalone tests are applied to all XML files in the scenarios folder
......
......@@ -5,9 +5,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
cmake_policy(SET CMP0009 NEW)
set(ISEAFrameVERSION_MAJOR 2)
set(ISEAFrameVERSION_MINOR 18)
set(ISEAFramePATCH_LEVEL 0)
set(ISEAFrameNAME "Scenariotest")
set(ISEAFrameVERSION_MINOR 21)
set(ISEAFramePATCH_LEVEL 1)
set(ISEAFrameNAME "Refactor")
set(ARCH_TYPE
"64"
CACHE STRING "")
......@@ -155,21 +155,11 @@ endif()
# the following variables are used by cmake files in subdirectories to specify
# which dependencies are needed
set(NEED_SIMULINK OFF)
# the boost headers are always needed, but some components also require
# precompiled binaries
set(NEEDED_BOOST_COMPONENTS "")
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost REQUIRED COMPONENTS ${USED_BOOST_COMPONENTS})
# find_boost creates targets with Boost:: as a prefix. Add that prefix to each
# required component to get the target names. these targets are only added to
# the standalones because mex files cannot be linked to boost
set(BOOST_TARGETS Boost::boost)
foreach(component ${USED_BOOST_COMPONENTS})
set(BOOST_TARGETS ${BOOST_TARGETS} Boost::${component})
endforeach()
find_package(Boost REQUIRED)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} Boost::boost)
find_package(MATIO REQUIRED)
......@@ -178,6 +168,8 @@ set(COMMON_LIBRARIES ${COMMON_LIBRARIES} ${MATIO_LIBRARIES})
find_package(Threads REQUIRED)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} Threads::Threads)
set(COMMON_LIBRARIES ${COMMON_LIBRARIES} tinyxml2)
if(USE_SIMULINK)
set(MATLAB_INCLUDE_DIR
/usr/local/MATLAB/R2019b/extern/include
......@@ -229,6 +221,7 @@ function(add_release_files target files_to_copy)
endif()
endfunction(add_release_files)
add_subdirectory(libraries/tinyxml2)
add_subdirectory(src/version)
add_subdirectory(src/exceptions)
add_subdirectory(src)
......@@ -244,11 +237,4 @@ if(NEED_SIMULINK)
CACHE BOOL "link to simulink libraries" FORCE)
endif()
set(NEEDED_BOOST_COMPONENTS ${USED_BOOST_COMPONENTS} ${NEEDED_BOOST_COMPONENTS})
if(NEEDED_BOOST_COMPONENTS)
list(REMOVE_DUPLICATES NEEDED_BOOST_COMPONENTS)
endif()
set(USED_BOOST_COMPONENTS
${NEEDED_BOOST_COMPONENTS}
CACHE STRING "boost components to link against" FORCE)
mark_as_advanced(USE_SIMULINK USED_BOOST_COMPONENTS)
mark_as_advanced(USE_SIMULINK)
......@@ -668,6 +668,7 @@ WARN_LOGFILE =
INPUT = "@CMAKE_SOURCE_DIR@/doxygen/" \
"@CMAKE_SOURCE_DIR@/src/" \
"@CMAKE_SOURCE_DIR@/benchmark/" \
"@CMAKE_SOURCE_DIR@/standalone/standalone/" \
"@CMAKE_SOURCE_DIR@/examples/"
# This tag can be used to specify the character encoding of the source files
......
......@@ -7,6 +7,8 @@ The aging simulation uses discrete aging steps. At first, the thermal-electrical
Because the time scale of the aging simulation is much larger than that of the electrical simulation, the aging is scaled up to a larger time step. The XML file used for the simulation specifies a number of calculation cycles and an aging step time. The number of calculation cycles determines how often the given current or power profile is simulated before each aging step. The aging simulation assumes that the thermal-electrical behavior is the same for the rest of the aging step time.
Starting in version 2.19.0, the aging simulation supports current or power profiles that are longer than the aging step time. In this case, the number of aging steps, calculation cycles and steady state cycles given in the XML file are ignored. Instead the entire profile is simulated once and an aging step occurs every time the aging step time has passed. Since the entire steptime was simulated, no scaling factor is applied to the aging calculation.
Example
=======
......@@ -103,9 +105,9 @@ These options for the aging simulation must be added in <Configuration><Options>
XML Tag | Type | Unit | Explanation
----------------------------------------|---------------|-----------|----------------------------------------------------------------------------------------
CalculationCycles | int > 0 | | Number of times the current or power profile is simulated before each aging step
SteadyStateCycles | int >= 0 | | Number of cycles that are simulated without collecting data for aging before the cycles specified in CalculationCycles are simulated
AgingSteps | int > 0 | | Number of aging steps
CalculationCycles | int > 0 | | Number of times the current or power profile is simulated before each aging step. Optional, default = 1.
SteadyStateCycles | int >= 0 | | Number of cycles that are simulated without collecting data for aging before the cycles specified in CalculationCycles are simulated. Optional, default = 0.
AgingSteps | int > 0 | | Number of aging steps. Optional, default = 1.
AgingStepTime | double > 0 | day | Duration of each aging step
Observer
......@@ -143,8 +145,8 @@ FormulaCapacity | string | | Formula us
FormulaResistance | string | | Formula used to calculate the value of alpha. The symbols V and T can be used for the cell's voltage and temperature
MinAlphaCapacity | double | | Minimum value for the stress factor. If a lower value is calculated, this value is used instead.
MinAlphaResistance | double | | Minimum value for the stress factor. If a lower value is calculated, this value is used instead.
InitialCapacityFactor | double | 0 - 1 | Initial value for the capacity factor. Optional.
InitialResistanceFactor | double | 0 - 1 | Initial value for the capacity factor. Optional.
InitialCapacityFactor | double | 0 - 1 | Initial value for the capacity factor. Optional, default = 1.
InitialResistanceFactor | double | 0 - 1 | Initial value for the capacity factor. Optional, default = 1.
Cyclic Aging
---------------
......@@ -159,8 +161,8 @@ FormulaCapacity | string | | Formula us
FormulaResistance | string | | Formula used to calculate the value of beta. The symbols meanV and deltaDOD can be used for the cell's average voltage and depth of discharge
MinBetaCapacity | double | | Minimum value for the stress factor. If a lower value is calculated, this value is used instead.
MinBetaResistance | double | | Minimum value for the stress factor. If a lower value is calculated, this value is used instead.
InitialCapacityFactor | double | 0 - 1 | Initial value for the capacity factor. Optional.
InitialResistanceFactor | double | 0 - 1 | Initial value for the capacity factor. Optional.
InitialCapacityFactor | double | 0 - 1 | Initial value for the capacity factor. Optional, default = 1.
InitialResistanceFactor | double | 0 - 1 | Initial value for the capacity factor. Optional, default = 1.
Anode Overhang
---------------
......
......@@ -36,18 +36,6 @@ TimeBetweenFramesInSec = -1, jeden Zeitschritt <br/>
TimeBetweenFramesInSec > x, Output immer nachdem mindestens x Sekunden verstrichen sind<br/>
MaxNumberOfFrames = 0 und TimeBetweenFramesInSec > 0, schreibt nur Anfangs- und Endzustand der Simulation<br/>
Simulink
===============
Falls Simulink benutzt wird, gibt es drei optionale Knoten, die kompilierte Mindestgrößen für die folgenden Datenfelder festlegen:
- <**MaxStateSize**>: Maximale Anzahl der Zustände, die dem Gleichungslöser übergeben werden. Wird benötigt bei rein elektrischer, rein thermischer und gekoppelt elektrisch/thermischer Simulation (default 2000).
- <**MaxOutputSize**>: Maximale Anzahl der elektrischen Größen, die sichtbar (observable-Attribut) sind. Wird benötigt bei rein elektrischer und gekoppelt elektrisch/thermischer Simulation (default 500).
- <**MaxNumberOfCells**>: Maximale Anzahl der Zellen. Wird benötigt bei rein thermischer und elektrisch/thermischer Simulation (default 100).
Die kompilierte Größe ist das Maximum aus diesen Werten und den Werten, die für die erste initialisierte xml-Datei benötigt werden:
Wenn ein benötigter Knoten nicht existiert, nimmt die Software einen Default-Wert an.
\~English
Global options can be set within the <**Options**>-node. According to the simulation type, following options can be set:
......@@ -82,4 +70,4 @@ Thermal model
TimeBetweenFramesInSec = 0, no csv-output<br/>
TimeBetweenFramesInSec = -1, every time step <br/>
TimeBetweenFramesInSec > x, output after a minimum of x seconds passed<br/>
MaxNumberOfFrames = 0 and TimeBetweenFramesInSec > 0, only writes start and endpoint<br/>
MaxNumberOfFrames = 0 and TimeBetweenFramesInSec > 0, only writes start and endpoint<br/>
\ No newline at end of file
Thermal blocks {mxmlthermalblock}
Thermal blocks {#xmlthermalblock}
===================
\~German
......
add_library(tinyxml2 STATIC tinyxml2.cpp)
......@@ -5,10 +5,6 @@ import sys, os
def testStandalone(standalone, xmlFiles):
if len(sys.argv) < 3:
print("Usage: ./testStandalone.py <standalone> <xml>")
return 0
success = True
for xml in xmlFiles:
......@@ -55,8 +51,8 @@ def testStandalone(standalone, xmlFiles):
def main():
if (len(sys.argv) < 3):
print("Usage: testStandalone <standalone> <xml>")
return
print("Usage: ./testStandalone.py <standalone> <xml>")
return 0
testStandalone(sys.argv[1], sys.argv[2:])
......
function [] = AddSocInput(modelLocation)
if nargin == 0
modelLocation = 'BuildMatrixModel';
end
initialSoC_block = [modelLocation '/Battery_MultiCell/Battery/InitialSoC_Vector'];
constBlocks = find_system(initialSoC_block, 'BlockType', 'Constant');
numCells = size(constBlocks, 1);
add_block('simulink/Signal Routing/Demux', [initialSoC_block '/Demux'], 'Outputs', num2str(numCells));
for i = 1:numCells;
delete_line(initialSoC_block, ['InitialSoC_Elem' num2str(i) '/1'], ['Goto_Elem' num2str(i) '/1']);
delete_block([initialSoC_block '/InitialSoC_Elem' num2str(i)]);
add_line(initialSoC_block, ['Demux/' num2str(i)], ['Goto_Elem' num2str(i) '/1'], 'autorouting', 'on');
end
add_block('simulink/Ports & Subsystems/In1', [initialSoC_block '/InitialSoC']);
add_line(initialSoC_block, 'InitialSoC/1', 'Demux/1', 'autorouting', 'on');
add_block('simulink/Ports & Subsystems/In1', [modelLocation '/Battery_MultiCell/Battery/InitialSoC'], 'Position', [0, 838, 30, 852]);
add_line([modelLocation '/Battery_MultiCell/Battery'], 'InitialSoC/1', 'InitialSoC_Vector/1', 'autorouting', 'on');
add_block('simulink/Ports & Subsystems/In1', [modelLocation '/Battery_MultiCell/Initial SoC [%]'], 'Position', [160 460 190 475]);
ports = get_param([modelLocation '/Battery_MultiCell/Battery'], 'PortHandles');
lastInputPort = num2str(length(ports.Inport));
add_line([modelLocation '/Battery_MultiCell'], 'Initial SoC [%]/1', ['Battery/' lastInputPort], 'autorouting', 'on');
end
\ No newline at end of file
function [] = AddTemperatureInput(modelLocation)
if nargin == 0
modelLocation = 'BuildMatrixModel';
end
batteryLocation = [modelLocation '/Battery_MultiCell/Battery'];
vectorBlock = [batteryLocation '/Thermal/InitialTemperatures_Vector'];
initialTempString = get_param([vectorBlock '/InitialTemperatures_Const'], 'Value');
initialTempVector = split(strtrim(erase(initialTempString, ["[", "]"])));
numCells = size(find_system([batteryLocation '/Thermal/CellToFV'], 'BlockType', 'From'), 1);
delete_line(vectorBlock, 'InitialTemperatures_Const/1', 'InitialTemperatures/1');
delete_block([vectorBlock '/InitialTemperatures_Const']);
add_block('simulink/Signal Routing/Demux', [vectorBlock '/Demux'], 'Outputs', num2str(numCells));
add_block('simulink/Signal Routing/Mux', [vectorBlock '/Mux'], 'Inputs', num2str(length(initialTempVector)));
add_line(vectorBlock, 'Mux/1', 'InitialTemperatures/1', 'autorouting', 'on');
numConstants = 0;
for i = 1:length(initialTempVector)
tempString = initialTempVector{i};
if isnan(str2double(tempString))
numCell = extractBefore(extractAfter(tempString, 'CellElement_'), '.temperature');
add_line(vectorBlock, ['Demux/' num2str(numCell)], ['Mux/' num2str(i)]);
else
numConstants = numConstants + 1;
blockName = ['Const' num2str(numConstants)];
add_block('built-in/Constant', [vectorBlock '/' blockName], 'Value', tempString);
add_line(vectorBlock, [blockName '/1'], ['Mux/' num2str(i)]);
end
end
add_block('simulink/Ports & Subsystems/In1', [vectorBlock '/InitialCellTemperatures']);
add_line(vectorBlock, 'InitialCellTemperatures/1', 'Demux/1', 'autorouting', 'on');
add_block('simulink/Ports & Subsystems/In1', [batteryLocation '/Thermal/InitialCellTemperatures'], 'Position', [0, 838, 30, 852]);
add_line([batteryLocation '/Thermal'], 'InitialCellTemperatures/1', 'InitialTemperatures_Vector/1', 'autorouting', 'on');
add_block('simulink/Ports & Subsystems/In1', [batteryLocation '/InitialCellTemperatures'], 'Position', [160 460 190 475]);
add_line(batteryLocation, 'InitialCellTemperatures/1', 'Thermal/1', 'autorouting', 'on');
add_block('simulink/Ports & Subsystems/In1', [modelLocation '/Battery_MultiCell/Initial Cell Temperatures [C]'], 'Position', [160 460 190 475]);
ports = get_param([modelLocation '/Battery_MultiCell/Battery'], 'PortHandles');
lastInputPort = num2str(length(ports.Inport));
add_line([modelLocation '/Battery_MultiCell'], 'Initial Cell Temperatures [C]/1', ['Battery/' lastInputPort], 'autorouting', 'on');
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment