Code covered by the MathWorks Limited License

### Highlights from Engine Cooling Model in Simscape

3.5
3.5 | 2 ratings Rate this file 48 Downloads (last 30 days) File Size: 275 KB File ID: #38339 Version: 1.7

# Engine Cooling Model in Simscape

### Steve Miller (view profile)

27 Sep 2012 (Updated )

Thermal fluid system in Simscape language using full-flux modeling method

File Information
Description

This file contains a model of an engine cooling system built using the Simscape language. A radiator, thermostat, hoses, coolant, and a pump are included in the model. Heat is transferred from the engine to the fluid, and the thermostat opens the fluid path through the radiator when the activation temperature is reached. The fluid properties change based on pressure and temperature using lookup tables implemented in the Simscape language. The table lookup data was generated using REFPROP supplied by NIST. This example uses the full-flux modeling technique. Consult the model description as well as the Simscape language source code and comments for more information on this approach.

For an explanation of this model and the full-flux modeling method, watch this video (3 min):
http://www.mathworks.com/videos/modeling-an-engine-cooling-system-71894.html

To view a webinar (35 minutes) about the Simscape language, go to: http://www.mathworks.com/videos/physical-modeling-with-the-simscape-language-81733.html

To find other Simscape examples, search for posts with the keyword "physical modeling"
http://www.mathworks.com/matlabcentral/fileexchange/?term=%22physical+modeling%22

http://www.mathworks.com/physical-modeling/

Acknowledgements

This file inspired Refrigeration Cycle In Simscape.

Required Products Simscape
MATLAB
MATLAB release MATLAB 9.0 (R2016a)
MATLAB Search Path
`/`
26 Jan 2016 Ted Mitrou

### Ted Mitrou (view profile)

hey!great job!my question is can it work with refpropmini?

Comment only
11 Jan 2016 Andreas Welschof

### Andreas Welschof (view profile)

I have the exact same Problem described by Jon only I am using R2015b... What am I supposed to do? Thanks a lot!

Comment only
11 Mar 2014 Jon

### Jon (view profile)

Steve, I have downloaded and unzipped this model and followed the directions in the readme. However the model is full of "bad link" blocks and fails to run, with the error "failed to load library 'EngineCoolingComponents_lib'".
Am I missing something? I am running 2012b.
Many thanks.

Comment only
18 Dec 2013 Steve Miller

### Steve Miller (view profile)

The media data from REFPROP was imported to MATLAB using their provided MATLAB interface. Visit the FAQ section for REFPROP to get the latest files for interfacing MATLAB and REFPROP

Comment only
10 Dec 2013 Andreas

### Andreas (view profile)

I forgot something:
How did you create the media data with refprop?

Comment only
10 Dec 2013 Andreas

### Andreas (view profile)

Great model, could you provide more examples using the thermal liquid library?
Regards
Andreas

10 Dec 2013 Steve Miller

### Steve Miller (view profile)

Luca and Michael -- I think this example was created in a MATLAB release that is later than the one you're using. This submission contains a version compatible with R2012b and beyond, and a separate version compatible with R2013b and beyond. If you are using a MATLAB release *before* R2012b, neither will work ("Bad link" error). Please check your release and use the version compatible with your release.

The release that is compatible with this submission is indicated in the "File Information" field above.

--Steve

Comment only
10 Dec 2013 Michael

### Michael (view profile)

It also doesn't work for me. I am using R2012, and when I run the code it generates an error. I run the startup file, and then the mdl file. The model loads, however the pump, hose, radiator, fluid properties, thermostat, and bypass hose all display "Bad link". Any suggestions?

Comment only
09 Dec 2013 Steve Miller

### Steve Miller (view profile)

Hi Luca -- which release are you using, and what message did you receive?

Comment only
09 Dec 2013 Luca

### Luca (view profile)

The file does not work

23 Jul 2013 Rajeev

### Rajeev (view profile)

Hi there,

I was going over the video and the file. In the video, you have one temp sensor and two mass flow sensors. The file has only the temperature sensor. I am trying to add some temperature sensors and flow sensors using the methods described in the videos but not links do not get connected. I am a newbie in Simscape so probably missing something.

How can I add temperature and flow sensors in the example given? Any help would be highly appreciated.

Thank you.

Comment only
22 Oct 2012 Steve Miller

### Steve Miller (view profile)

Hello there,
Since table look-up functions have been introduced in Simscape during the 12a release, this example cannot be run in its current state. The underlying reason is that fluid properties, as defined in the main classes ('TwoportsIncompressible.ssc' and 'TwoportsCompressible.ssc'), are described using table look-up functions.
To work around this, you may consider defining your own analytical description of the properties as functions of pressure and temperature.
Thank you,

Comment only
19 Oct 2012 leclercq

### leclercq (view profile)

hello
it looks very complete when i read the code. that's a very good job.
but i can't launch it because i have a matlab 2010 version. when i launch startup, it tell me that there is unexpected matlab operator in TwoportsIncompressible.ssc line 42 column 82. if i try to put == instead of =, it tell me that there is a unknow variable 'interpolation'.
is there something to do to launch it on matlab 2010 or can't we?

Comment only
08 Oct 2012 1.1

14 Nov 2013 1.3

Submission compatible with Simscape Thermal Liquid Library added in R2013b.

31 Jan 2014 1.4

Added MATLAB code for extracting fluid property data from REFPROP from NIST. See README.txt file for instructions.

17 Mar 2014 1.5

Adding MATLAB code showing how to get data from REFPROP into MATLAB. See README.txt for details. --Steve

17 Apr 2014 1.6