Thread Subject: SIMSCAPE: Combined thermal - hydraulics modelling

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Walter Driesen

Date: 8 Jun, 2010 14:10:22

Message: 1 of 8

Hi,

I am trying to model the thermal AND hydraulic behavior of a heat exchanger in SIMSCAPE. Moreover, I would like to take into account the time delays of the fluid temperature between inlet and outlet of the heat exchanger.

As far as I understood there are no standard building blocks that do this combination, right?
Does anybody know about a solution for a similar problem posted in the past?
Any example about how taking into account time delays in Simscape?

Thanks in advance,

Walter

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Jose Gonzalez

Date: 23 Jun, 2010 05:04:05

Message: 2 of 8

Hi Walter,
I am trying to do something similar to your's. I thing we can get some ideas from Modelica Fluids package but it seems very hard (for me).
Regards,
Jose

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Walter Driesen

Date: 23 Jun, 2010 08:11:08

Message: 3 of 8

Hi Jose,

In meantime I managed to advance a bit.

Concerning the time delay, you can use the "variable transport delay" block from the continuous section in the simulink library. You have to provide it with the inverse of the volumetric flow scaled by the volume in the tube. The block calculates the time delay and applies it on the input signal (in my case the input temperature). To do so, it integrates the volumetric flow backwards until the integral equals 1. Unfortunately, the block does not output the value of the time delay, which would be usefull for debugging.

Initially I was creating subsystems around every hydraulics block with input and output ports for the temperature. It worked, although I got some issues with algebraic loops. But the multiplication of ports increases the complexity of the model, so it ain't that easy to use.

Currently I am writing a new domain based on the hydraulics domain in order to include the temperature as an extra across variable. As discussed in other threads
( http://www.mathworks.com/matlabcentral/newsreader/view_thread/278798 )
it is generally recommended to have the same number of across and through variables. Some people recommend to use an extra heat flow trough variable. However, I don't agree. In the case of hydraulics the heat flow does not follow the volumetric flow, but it is a way to exchange energy with the environment.

So I defined my domain as follows (attention: Simscape V3.0 (R2008b) syntax):
------------------------------------------------------------
domain hydraulicTemp
% Hydraulic Domain

  parameters
    rho = { 1000, 'kg/m^3' }; % Fluid density
    cp = { 4181, 'J/(kg*K)' }; % Fluid heat capacity
  end
  variables
    p = { 1 , 'Pa' };
    T = { 0 , 'K' };
  end
  throughs
    q = { 1 , 'm^3/s' };
  end
end
------------------------------------------------------------
For the moment this is working fine for me. However, it is still work in progress.

I will keep you updated.

Regs,
Walter

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Jose Gonzalez

Date: 23 Jun, 2010 17:17:21

Message: 4 of 8

Hi Walter,

Many thanks for your ideas.

Delays is perhaps one of the worst issues to ODE solvers. Matlab has dde23, a delay differential equation solver, but I think it don't works with Simscape. The Simulink transport-delay solution that you said can be an option.

I was tempted to try to "translate" some of Modelica packages such as Modelica.Fluid and Modelica.Buildings but it would be a huge task. However, watching into his models could be interesting.

At present I'm only seeing the possibilities we have for a project, but probably we will choose Simscape because I think the Matlab system cab be easiest for students than Modelica one.

We will be in touch, best wishes,

Jose

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Andreas

Date: 4 May, 2011 11:58:05

Message: 5 of 8

I'm trying to model that kind of heat exchanger too, but currently without simscape.
Any experiences regarding dde23, simscape and time delays?

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Kevin

Date: 24 Feb, 2012 15:23:33

Message: 6 of 8

Jose,
As a user of Modelica, I'm wondering if you could be more specific about why you find Simscape to be easiest for students. What ages are the students? I realize that Modelica can be daunting at first, but it very naturally addresses the problem discussed on this thread, as I understand it.
Thanks,

Kevin

"Jose Gonzalez" wrote in message <hvtfj1$8d0$1@fred.mathworks.com>...
> At present I'm only seeing the possibilities we have for a project, but probably we will choose Simscape because I think the Matlab system cab be easiest for students than Modelica one.

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Walter Driesen

Date: 24 Feb, 2012 16:31:18

Message: 7 of 8

Hi Kevin,

I have never worked with Modelica.
Could you explain how Modelica naturally addresses this problem.

Thanks,
Walter


"Kevin" wrote in message <ji8a1l$djo$1@newscl01ah.mathworks.com>...
> Jose,
> As a user of Modelica, I'm wondering if you could be more specific about why you find Simscape to be easiest for students. What ages are the students? I realize that Modelica can be daunting at first, but it very naturally addresses the problem discussed on this thread, as I understand it.
> Thanks,
>
> Kevin
>
> "Jose Gonzalez" wrote in message <hvtfj1$8d0$1@fred.mathworks.com>...
> > At present I'm only seeing the possibilities we have for a project, but probably we will choose Simscape because I think the Matlab system cab be easiest for students than Modelica one.

Subject: SIMSCAPE: Combined thermal - hydraulics modelling

From: Kevin

Date: 25 Feb, 2012 18:29:35

Message: 8 of 8

Hi Walter,

I can't make a direct comparison between Modelica and Simscape because I have not used Simscape besides a short trial. Also, I do not know the details of the heat exchanger you are modeling.

However, a component such as Modelica.Fluid.Pipes.DynamicPipe includes hydraulic and thermal effects and Modelica.Fluid.Examples.HeatExchanger includes an example of its usage in a heat exchanger model. The dynamic pipe model includes options for laminar and/or turbulent flow. The media may be chosen to be one of over a thousand fluids including ideal gases, compressible and incompressible liquids, or mixtures (e.g., humidified air). Also, maybe more important to your original question is the fact that it includes energy and mass storage. Therefore, it naturally captures the dynamics of the varying inlet and outlet temperatures.

That heat exchanger model (Modelica.Fluid.Examples.HeatExchanger) is simple; it is in essence two instantiations of the dynamic pipe and a thermal conduction model as a wall. However, any and all of the model can be copied and modified as necessary. In fact, to the extent of my knowledge, *all* of the components of the Modelica Standard Library and many other libraries are shared open-source and free, which means that there is full access to the lowest levels of the connectors, sub-models, and functions. That includes electrical (analog, digital, multiphase, and machines), magnetic, mechanical (rotational, tranlational, and 3D), fluids, and thermal.

I realize that this post is stretching the limits of what may be allowed in this forum, and I obviously have a biased view. However, I hope that it helps.

Kevin

"Walter Driesen" wrote in message <ji8e0m$rqd$1@newscl01ah.mathworks.com>...
> Could you explain how Modelica naturally addresses this problem.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
hydraulics temp... Walter Driesen 23 Jun, 2010 04:14:12
simscape modeli... Jose Gonzalez 23 Jun, 2010 01:09:07
hydraulic Walter Driesen 8 Jun, 2010 10:14:08
thermal Walter Driesen 8 Jun, 2010 10:14:08
simscape Walter Driesen 8 Jun, 2010 10:14:08
rssFeed for this Thread

Contact us at files@mathworks.com