How is InterCellThermalPath property working?

I have created two Parallel Assemblies, one with hexagonal topology (left) and one with square topology (right), and I have noticed that their InterCellThermalPath is different. This makes sense, but I do not understand how this property works when the topology is square. My question is the following: are the yellow connections well drawn? I mean, each cell transfers heat by convection to a common thermal node?
In any case, two months ago I asked MathWorks technical support about this property and they replied that each InterCell resistance has, by default, a value of 1.2 K/W. So: how is all this possible? According to Simscape Battery, the Ambient-Cell thermal resistance is 25 K/W, so I do not quite understand how this thermal path works.

4 Comments

Hello José,
Thanks for reaching out. Enabling "InterCellThermalPath" for cylindrical cells will add a single thermal resistor between the thermal node of each cell and the node of each neighboring adjacent cell. For your example, the thermal circuits would look similar to the following figure:
For "Square" topologies, all of the cell neighbors will be connected, while for the "Hexagonal" topology, cells 1-4 would not be directly connected thermally because they would be considered to be too far away geometrically. This is the only difference.
The default thermal resistance value assigned to each resistor is 1.2 K/W, however, this value depends on many things, like cell format/geometry/size, and the material (if any) which is present between the cells. The thermal resistance value needs to be parameterized for each application and cell format/geometry/size. This parameterization could be done with direct calculations or using more detailed 3D CFD models.
It should be possible to include better default values for these thermal resistances depending on cell geometry in Simscape Battery and we would definitely take that feedback onboard for our future development.
A thermal resistance value of 1.2 K/W might seem more reasonable to use for a larger pouch or prismatic battery cell (capacities higher than 30 Ah), however, might be too permissive for cylindrical cells.
Hope this answer helps!
Hello, Sebastian.
Firstly, thank you very much for your response.
Despite having read your answer, I still have two questions:
  1. How are the connections 1-4 and 2-3 working in the square topology? I mean, how can there be heat transfer by conduction when they are not physically joined? Was I right with my picture?
  2. Is there any way to change the value of this property?
Thank you very much.
Regards,
José Luis Martín García de la Vega
Hello José,
  1. In modules made up of cylindrical cells, it is common for all the inter-cell space to be filled with a potting compound or a thermal interface material which would stablish a conduction heat path between all cells. This conduction heat path can be very isolating or it can be very high depending on the design goal and safety considerations. For the square topology, 1-4 and 2-3 might have a solid material between them, because the distance is larger, then maybe you might want to set this thermal resistance to be higher than say the 1-2 or 1-3 connections, which should be possible in Simscape Battery. In cases were the connection 1-4 only has an air gap between them, then the thermal resistance would just represent some linear heat exchange or a lumped version of your 2 thermal resistances (from your yellow thermal diagram from the right hand image). We haven't added any features to specifically model convection and the air volume between the cells (like its shown with the yellow thermal circuit from your picture). Adding these extra functions might be desirable but they impact simulation speed a bit, so its better to try and recreate or capture those effects on the aggregate by properly parameterizing the lumped thermal resistances and thermal masses within your system. Its common to also see module designs with only a 1mm air gap (or thereabouts) between the cells, so modeling air and convection to a higher level of detail might be something to consider in the future.
  2. Yes for sure. After you generate the library with the module .ssc block, you can double click on the mask and edit the value of the thermal resistance. This should be available from the thermal parameter section. You can input a scalar or a vector to define specific values for different cells connections.
Hope this helps,
Kind regards,
Sebastian Arias
Hello Sebastian,
Thank you very much for your response. I can finally state that I understand how this property works.
Regards,
José Luis Martín García de la Vega

Sign in to comment.

 Accepted Answer

Moving the comment to an answer:
Hello José,
Thanks for reaching out. Enabling "InterCellThermalPath" for cylindrical cells will add a single thermal resistor between the thermal node of each cell and the node of each neighboring adjacent cell. For your example, the thermal circuits would look similar to the following figure:
For "Square" topologies, all of the cell neighbors will be connected, while for the "Hexagonal" topology, cells 1-4 would not be directly connected thermally because they would be considered to be too far away geometrically. This is the only difference.
The default thermal resistance value assigned to each resistor is 1.2 K/W, however, this value depends on many things, like cell format/geometry/size, and the material (if any) which is present between the cells. The thermal resistance value needs to be parameterized for each application and cell format/geometry/size. This parameterization could be done with direct calculations or using more detailed 3D CFD models.
It should be possible to include better default values for these thermal resistances depending on cell geometry in Simscape Battery and we would definitely take that feedback onboard for our future development.
A thermal resistance value of 1.2 K/W might seem more reasonable to use for a larger pouch or prismatic battery cell (capacities higher than 30 Ah), however, might be too permissive for cylindrical cells.
1.How are the connections 1-4 and 2-3 working in the square topology? I mean, how can there be heat transfer by conduction when they are not physically joined? Was I right with my picture?
In modules made up of cylindrical cells, it is common for all the inter-cell space to be filled with a potting compound or a thermal interface material which would stablish a conduction heat path between all cells. This conduction heat path can be very isolating or it can be very high depending on the design goal and safety considerations. For the square topology, 1-4 and 2-3 might have a solid material between them, because the distance is larger, then maybe you might want to set this thermal resistance to be higher than say the 1-2 or 1-3 connections, which should be possible in Simscape Battery. In cases were the connection 1-4 only has an air gap between them, then the thermal resistance would just represent some linear heat exchange or a lumped version of your 2 thermal resistances (from your yellow thermal diagram from the right hand image). We haven't added any features to specifically model convection and the air volume between the cells (like its shown with the yellow thermal circuit from your picture). Adding these extra functions might be desirable but they impact simulation speed a bit, so its better to try and recreate or capture those effects on the aggregate by properly parameterizing the lumped thermal resistances and thermal masses within your system. Its common to also see module designs with only a 1mm air gap (or thereabouts) between the cells, so modeling air and convection to a higher level of detail might be something to consider in the future.
2. Is there any way to change the value of this property?
Yes for sure. After you generate the library with the module .ssc block, you can double click on the mask and edit the value of the thermal resistance. This should be available from the thermal parameter section. You can input a scalar or a vector to define specific values for different cells connections.
Hope this helps,
Kind regards,
Sebastian Arias

6 Comments

Hey Sebastian,
I did not understand how to modify these default values for the thermal resistance of the cells, I am trying to model with pouch cells, I have enabled both the InterCellThermalPath and the AmbientThermalPath and I don't see a the thermal resistance paramether. Is it not showing because I am using pouch cells or am I missing something here. I am using 2023b matlab
batterycell = Cell();
batterycell.CellModelOptions.BlockParameters.thermal_port="model";
batterycell.CellModelOptions.BlockParameters.T_dependence="yes";
batterycell.CellModelOptions.BlockParameters.prm_dyn="off";
cellgeometry.Length = simscape.Value(0.11,"m");
cellgeometry.Height = simscape.Value(0.13,"m");
cellgeometry.Thickness = simscape.Value(9.5,"mm");
cellgeometry.TabWidth = simscape.Value(0.035,"m");
cellgeometry.TabHeight = simscape.Value(0.0255,"m");
cellgeometry = PouchGeometry();
cellgeometry.TabLocation = "Standard";
batterycell.Geometry = cellgeometry;
batterycell.Mass = simscape.Value(0.269,"kg");
%
parallelassembly = ParallelAssembly(NumParallelCells=1, Cell=batterycell,Topology="SingleStack" ,InterCellGap=simscape.Value(0.001,"m"),ModelResolution="Detailed");
%
module = Module(ParallelAssembly=parallelassembly, NumSeriesAssemblies=6, InterParallelAssemblyGap=simscape.Value(0.002,"m"), ModelResolution="Detailed", InterCellThermalPath=1,AmbientThermalPath = "CellBasedThermalResistance");
%
batteryModuleAssembly = ModuleAssembly(Module=repmat(module,6,1),StackingAxis="X",InterModuleGap=simscape.Value(0.01,"m"), CircuitConnection="Series");
%
batterypack = Pack(ModuleAssembly=repmat(batteryModuleAssembly,1,4), StackingAxis="Y",InterModuleAssemblyGap=simscape.Value(0.01,"m"), CircuitConnection="Series",Name="PACK");
Hello Ivan,
To view and modify the inter-cell thermal resistance parameter, you must first generate the library or build the battery model by calling the buildBattery function. By design, this parameter can only be modified in the generated battery block. Once this library has been generated, the InterCellThermalResistance parameter will appear in the Module block mask for you to modify. When calling the buildBattery function, you can optionally add the "MaskParameter" argument to generate a script where you can modify the default values of this (and other) parameters (Build custom library blocks from battery objects - MATLAB buildBattery (mathworks.com)). This example might give you additional information: Build Model of Battery Module with Inter-Cell Heat Exchange - MATLAB & Simulink (mathworks.com). The InterCellThermalResistance can be a scalar or a vector (if you want to change individual values). Hope this helps!
Dear Sebastian,
Maybe I was not extensive enough with my initial description of the problem, apologies for that! I of course build the battery, I just did not put the whole code because I thought that only the settings that I use to build the library are relevant for my question. I am attaching the whole code now. I have designed it such that when I run it the old library would get deleted and the new one created because I want to have the ability to tryout with different conditions for heat exchange quickly and possibly automate them. Anyways that is the whole code of the script for updating the library:
%% importing clearing closing
clear all
close all hidden
import simscape.battery.builder.*;
%% figuring out the battery cell parameters
batterycell = Cell();
Cell requires Simscape Battery.
batterycell.CellModelOptions.BlockParameters.thermal_port="model";
batterycell.CellModelOptions.BlockParameters.T_dependence="yes";
batterycell.CellModelOptions.BlockParameters.prm_dyn="off";
cellgeometry = PouchGeometry();
cellgeometry.Length = simscape.Value(0.11,"m");
cellgeometry.Height = simscape.Value(0.13,"m");
cellgeometry.Thickness = simscape.Value(9.5,"mm");
cellgeometry.TabWidth = simscape.Value(0.035,"m");
cellgeometry.TabHeight = simscape.Value(0.0255,"m");
cellgeometry.TabLocation = "Standard";
batterycell.Geometry = cellgeometry;
batterycell.Mass = simscape.Value(0.269,"kg");
%
parallelassembly = ParallelAssembly(NumParallelCells=1, Cell=batterycell,Topology="SingleStack" ,InterCellGap=simscape.Value(0.001,"m"),ModelResolution="Detailed");
%
module = Module(ParallelAssembly=parallelassembly, NumSeriesAssemblies=6, InterParallelAssemblyGap=simscape.Value(0.002,"m"), ModelResolution="Detailed", InterCellThermalPath=1,AmbientThermalPath = "CellBasedThermalResistance");
batteryModuleAssembly = ModuleAssembly(Module=repmat(module,6,1),StackingAxis="X",InterModuleGap=simscape.Value(0.01,"m"), CircuitConnection="Series");
batterypack2 = Pack(ModuleAssembly=repmat(batteryModuleAssembly,1,4), StackingAxis="Y",InterModuleAssemblyGap=simscape.Value(0.01,"m"), CircuitConnection="Series",Name="PACK");
%f = uifigure("Color","white");
%packchart = BatteryChart(Parent=f,Battery=batterypack2);
%title(packchart,"Pack Chart")
%% building of the library
% first delete the old model
if exist("created_library\myBatteries.slx", 'file')
delete("created_library\myBatteries.slx");
delete("created_library\myBatteries_lib.slx");
rmdir("created_library\+myBatteries","s");
%rmdir("created_library\+myBatteriesLumpingAdapters","s");
end
%close system(if needed)
close_system("myBatteries");
close_system("myBatteries_lib");
buildBattery(batterypack2,LibraryName="myBatteries",Directory="created_library\",MaskParameters="VariableNamesByType",MaskInitialTargets="VariableNames");
%% deleting the file with autogenerated parameters and creating a new one with mine
%overwriting_the_parameter_file;
%% making sure the library appears in the library browser
load_system("created_library\myBatteries.slx");
set_param(gcs,'Lock','off')
set_param(gcs,'EnableLBRepository','on');
set_param(gcs,'Lock','on')
close_system("created_library\myBatteries.slx",1);
addpath("created_library\");
Moreover I am familiar with the content of both of these articles. I have used the first one for writing the code to update the library. The second one was also helpful for making my model. There it is stated exactly the same that you are saying, that you need to open the mask and you can change the InterCellThermalResistance parameters and you can change them individualy. In the article it is not shown exactly how to do it as an image or a code snippet for example.
It is a simple thing to do but it just does not exist for me as a field when I open the block mask. Moreover in the script that gets created for parametrizing the different parameters of the cells there is no parameter called InterCellThermalResistance or something similar. This is a screenshot of the block when I open the mask, it is taken exactly after I create the library and from the myBatteries.slx file:
And this is the code that is related to the parameters in the parametrization script that gets created automaticaly, before me overwriting it with my own parameters:
%% Battery parameters
%% ModuleType1
ModuleType1.SOC_vecCell = [0, .1, .25, .5, .75, .9, 1]; % Vector of state-of-charge values, SOC
ModuleType1.T_vecCell = [278, 293, 313]; % Vector of temperatures, T, K
ModuleType1.V0_matCell = [3.49, 3.5, 3.51; 3.55, 3.57, 3.56; 3.62, 3.63, 3.64; 3.71, 3.71, 3.72; 3.91, 3.93, 3.94; 4.07, 4.08, 4.08; 4.19, 4.19, 4.19]; % Open-circuit voltage, V0(SOC,T), V
ModuleType1.V_rangeCell = [0, inf]; % Terminal voltage operating range [Min Max], V
ModuleType1.R0_matCell = [.0117, .0085, .009; .011, .0085, .009; .0114, .0087, .0092; .0107, .0082, .0088; .0107, .0083, .0091; .0113, .0085, .0089; .0116, .0085, .0089]; % Terminal resistance, R0(SOC,T), Ohm
ModuleType1.AHCell = 27; % Cell capacity, AH, A*hr
ModuleType1.thermal_massCell = 100; % Thermal mass, J/K
%% ParallelAssemblyType1
ParallelAssemblyType1.SOC_vecCell = [0, .1, .25, .5, .75, .9, 1]; % Vector of state-of-charge values, SOC
ParallelAssemblyType1.T_vecCell = [278, 293, 313]; % Vector of temperatures, T, K
ParallelAssemblyType1.V0_matCell = [3.49, 3.5, 3.51; 3.55, 3.57, 3.56; 3.62, 3.63, 3.64; 3.71, 3.71, 3.72; 3.91, 3.93, 3.94; 4.07, 4.08, 4.08; 4.19, 4.19, 4.19]; % Open-circuit voltage, V0(SOC,T), V
ParallelAssemblyType1.V_rangeCell = [0, inf]; % Terminal voltage operating range [Min Max], V
ParallelAssemblyType1.R0_matCell = [.0117, .0085, .009; .011, .0085, .009; .0114, .0087, .0092; .0107, .0082, .0088; .0107, .0083, .0091; .0113, .0085, .0089; .0116, .0085, .0089]; % Terminal resistance, R0(SOC,T), Ohm
ParallelAssemblyType1.AHCell = 27; % Cell capacity, AH, A*hr
ParallelAssemblyType1.thermal_massCell = 100; % Thermal mass, J/K
%% Battery initial targets
The rest of the script is about assigning initial values so not really relevant to parameters.
So after the extensive explanation, Can you point me to the place I am doing something wrong and the reason for not being able to modify the thermal resistances between the cells of the battery pack?
Thanks in advance!
Ivan
@Sebastian Arias Alfaro do you have an answer to the question? I changed to matlab 2024a but still the situation is the same.
Oh I see what is happening now. You really only need to define the InterCellThermalPath flag in one place. So just add "InterCellThermalPath=1" to the batterypack2 line definition and that will fix things. No need to define it at the module level. What is happening is that the module is "losing" the InterCellThermalPath=1 flag once it gets added to the module assembly and then the pack. For these thermal properties like interCell, coolingPath, ambientPath we recommend to only define them at the "top" level or at the level were you intend to call buildBattery. Hope this helps.
Kind regards,
Sebastian Arias
Dear Sebastian,
Thank a lot for the reply, indeed it worked now!
Kind Regards
Ivan Kosev

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!