Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.7K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Extracting information from a Modelica model with Mathematica.

Posted 2 years ago

Hello all,

I have a Modelica model that I have imported into Mathematica from SystemModeler, and I was able to get the list of its components and their types using

SystemModel[mdl]["Components"]

where mdl is the name of the model. The output is shown in this screenshot:

enter image description here

Is there a way to find out the names of the components of a particular type, and then be able to access the names and values of their variables? For example, I'd like to know the name of all the components of the type Modelica.Mechanics.MultiBody.Forces.Spring (e. g. spring1), and then access the value of its variables, like spring1.c for example.

I assume the Select command would do this, but more information on how use it would be highly appreciated.

Cheers,

Fabián

POSTED BY: Fabián Peña
2 Replies
Posted 2 years ago
POSTED BY: Fabián Peña

POSTED BY: Sergio Vargas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard