- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Read values from submodels without...
Read values from submodels without connector
Read values from submodels without connector
Hey, it is my first time in this forum and I hope someone can help me.
I have built a ship simulation model in dymola with a lot submodels. At the main diagram I have models like "Atmosphere" and "Ship".
The atmosphere model contains all necessary parameters for the air (air density, air temperature, ...). The ship model contains further submodels like "propulsor" and "rudder".
The problem is the atmosphere parameters are needed for all other submodels and it is not usefull to connect all these submodels with connectors.
My idea is to save the parameters in a "store" and all submodels just need to read the necessary parameters out of the store.
My first idea was a function but it does not work. Have someone any ideas?
Thanks for the help!
Re: Read values from submodels without connector
See inner/outer or expandable connectors:
https://www.modelica.org/documents/Mode … ision1.pdf
- adrpo
- 885 Posts
Re: Read values from submodels without connector
Thanks for the fast answer!
the inner/outer way was new and I have tried it. So, if am I right the inner variable must be in the main model and you can "read" this variable from the submodels. But I need to read variables between two submodels.
Here is a simplified example:
model A
Submodel2 submodel2_1
Submodel1 submodel1_1
end A;
I am using expandable connectors (the signal bus from the standard library) but you need to connect the submodels. Or is there a way without a connector?
to specifiy what I need: I would like to have a model like the system model from the standard library (path: modelica.fluid.system)
Thanks a lot
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Read values from submodels without...