File Exchange

image thumbnail

Engine Cooling Model in Simscape

version 1.7 (275 KB) by

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

37 Downloads

Updated

View License

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.
Please read the README.txt file to get started.

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

To learn more about MathWorks Simscape Products, go to:
http://www.mathworks.com/physical-modeling/

Comments and Ratings (13)

Ted Mitrou

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

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

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.

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

http://www.boulder.nist.gov/div838/theory/refprop/Frequently_asked_questions.htm#MatLabApplications

Andreas

Andreas (view profile)

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

Andreas

Andreas (view profile)

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

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

Michael

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?

Steve Miller

Steve Miller (view profile)

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

Luca

Luca (view profile)

The file does not work

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.

Steve Miller

Steve Miller (view profile)

Hello there,
Thank you for your comments.
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,

leclercq

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?
thanks for answer

Updates

1.7

This example ships with Simscape in release R2014a and beyond. Added script to open shipping example.

1.6

Fixed webinar link.

1.5

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

1.4

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

1.3

Submission compatible with Simscape Thermal Liquid Library added in R2013b.

1.1

Updated description to add link to video. No change to files.

MATLAB Release
MATLAB 9.0 (R2016a)
Acknowledgements

Inspired: Refrigeration Cycle in Simscape

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Engine_Cooling_R12b/+EngineCoolingComponents/

Engine_Cooling_R12b/

Engine_Cooling_R13b/Fluid_Properties/REFPROP/

Engine_Cooling_R13b/Libraries/+MyThermalFluidComponents/

Engine_Cooling_R13b/Scripts_Data/

Engine_Cooling_R13b/

Engine_Cooling_R14a_and_beyond/