Custom Simscape Component Dropdown

2 visualizzazioni (ultimi 30 giorni)
Chris McNamara
Chris McNamara il 7 Set 2018
Hello,
I am creating a custom Simscape component that is attempting to model natural convective heat transfer between a solid and a gas.
I am trying to understand how to implement a variant of this block based on a drop down menu. I understand how to create a drop down menu by using an enumeration file and calling it in the Simscape block. This works fine for simple variations, for example if I had a rectangular plate which is vertical or horizontal I could use this input to drive a different set of equations.
However I want to use this to drive more complex variants of the block. My goal is to create a block that will let me model natural convection for either a rectangular surface, cylindrical surface, spherical surface, or irregular surface all in different orientations. These choices will not only change the equations needed but the parameters needed. For example the rectangular surface would require length and width while the cylindrical would require diameter, length and angular span. I'd like to do this by using a drop down to select the configuration which then changes the parameter inputs in the dialog box. So for example, if I select in my drop down "Cylindrical Surface" I'd like the block to change the display of parameters requested by the user to show "Diameter", "Length", "Angular Span". Or conversely I'd switch it to "Rectangular Surface" and it would change these to "Height" and "Width".
I think this must be possible because you can see this behavior working in blocks like "Reservoir (TL)" where when you select "Specified Pressure" the dialog box is modified to request the pressure from the user or "Thermal Liquid Settings (TL)" when you select the table dimensions it modifies what fluid property information is requested from the user. I just don't understand how to replicate this behavior in my blocks -- even if I try recompiling these base library blocks.
Does anyone know how to do this?

Risposte (0)

Categorie

Scopri di più su Foundation and Custom Domains in Help Center e File Exchange

Tag

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by