Search code examples
simulationmodelicadymola

Share the same parameter from model in the toplevel with all components in dymola


i tried to use something like this:

Toplevel with Model1 and the Model with the Parameter in it.

Parametermodel: Parameter heat_coeffi = 50;

Model1: outer [Path:Parametermodel] name; Parameter heat_coeffi = name.heatcoeffi;

The Error message is : "Found non-inner parametermodel for inner model Failed to find matching inner ....

I tried to use it just like they use System from the original Modelica Lib.


Solution

  • If I understand your question correctly, you instantiate the Parametermodel (similar to the Modelica.Fluid.System) in the top-level model. When you do so you must instantiate it as an inner model. In that way the other instantiated models (model1 etc.) know where to find the global parameters.

    In Modelica.Fluid.System there is an annotation defaultComponentPrefixes="inner" that ensures that it is automatically instantiated as an inner model.