How can I integrate PDE tools [for 2D heat transfer] into a Simulink model?

4 次查看(过去 30 天)
I am currently attempting to integrate a Simulink battery model, with a heat transfer model generated in the pdetool, to understand the heat profile of a battery cell with varying input current.
My approach was to combine the code into Simulink using a 'Matlab function' block, however this results in the Matlab code [from pdetool] attempting to create a new mesh being at each time step, which ultimately leads to model failure.
Does a more suitable approach exist to this problem?
Many Thanks

回答(1 个)

Deepak Ramaswamy
Deepak Ramaswamy 2013-10-28
编辑:Deepak Ramaswamy 2013-10-28
Wasim,
Assuming that your heat transfer model is LTI, I would recommend extracting system matrices from your PDE model and converting them into ABCD matrices i.e. a state-space form. The question then becomes how to take this state-space representation into Simulink. If you own the Control Systems toolbox you can use the "ss" function in it to convert into a state-space block. I find this approach easy but there are other approaches as well such as using the ABCD block from Simulink or wrapping the SS model using a level-2 S-function.
The advantage of the approach is that it is efficient since the mesh is same and you avoid matrix assembly time. However as a first pass, you might just try creating your mesh once and saving it and perform the rest of operations as you are currently doing.
I find it curious that the mesh is different at each step since the only thing that you're changing is the input. The floating point arithmetic should exactly reproduce the mesh each time. Are you sure you are not changing any geometry parameters?
If you need more info on any of the above steps let me know
Deepak

类别

Help CenterFile Exchange 中查找有关 Geometry and Mesh 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by