필터 지우기
필터 지우기

How to create a conditionally executed subsystem in SimScape?

조회 수: 5 (최근 30일)
Wilfred
Wilfred 2017년 4월 7일
댓글: Wilfred 2017년 4월 7일
To get insight into the effect of door openings on the performance of a fridge, I've been trying to modify the ssc_refrigeration model that is provided with Matlab/Simulink as a demo. My idea was to have two different enabled subsystems in the Refrigerator Compartment block between which the simulation can switch, like this:
However, it turns out that an enabled subsystem is considered to be "nonvirtual", which means that it cannot be used to contain Simscape blocks, unless the whole Simscape model is contained by it (but that wouldn't help me).
Any ideas how this can be resolved? Some kind of adjustable heat transfer block that is controlled by a Simulink signal might also be an option, but the only thermal elements in Simscape that accept signals as input are the Ideal Heat Flow and Temperature sources and I have no idea how these could help.

채택된 답변

Sebastian Castro
Sebastian Castro 2017년 4월 7일
You can do this with by creating custom components with the Simscape language.
For a simple door open/door closed relationship, I would likely implement this component in a way similar to the regular electrical switch block, but in thermal version. What I would do is:
  • Create a local copy of the built-in conduction/convection blocks (as needed), so you can start from there and make modifications.
  • Add an input signal to your custom block.
  • Then, add the following logic to the equations section: If the door is open, use a high conductivity/convectivity value; else, if closed, use a much smaller conductivity/convectivity.
Of course, you can get as complicated as you need with the dynamics/modes of this door open/close relationship.
- Sebastian
  댓글 수: 1
Wilfred
Wilfred 2017년 4월 7일
Thanks! I wasn't aware of the possibility to create custom components. Sounds good. We'll look into it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Discrete Events and Mode Charts에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by