2
votes

I'm trying very hard with little success to model a Rankine Power Cycle on OpenModelica. This is being done by replicating the diagram view of the ThermoPower Library "RankineCycle" Example. Simplifications have been made in hopes of making this process easier.

I keep getting "Translation Warnings" from OM Message Browser telling me that all of these components being used have no 'inner declarations' associated with the 'outer declarations' that are already embedded within the library's code for each component respectively.

I've tried to manually go into the code associated with each components translation warning and add said 'inner declarations' however this is unsuccessful at solving the issue.

I've also tried adding "//" to the outer code declarations in hopes to omit these commands with no success as well.

Here is the code:

[1] 11:52:20 Translation Warning
[ThermoPower.Water: 5482:7-5482:63]: No corresponding 'inner' declaration found for component .ThermoPower.System Superheater.fluidFlow.system declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: ThermoPower.Water.Flow1DFV$Superheater$fluidFlow.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

[2] 11:52:20 Translation Warning
[ThermoPower.Thermal: 374:5-374:61]: No corresponding 'inner' declaration found for component .ThermoPower.System Superheater.metalTube.system declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: ThermoPower.Thermal.MetalTubeFV$Superheater$metalTube.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

[3] 11:52:20 Translation Warning
[ThermoPower.Gas: 2791:7-2791:63]: No corresponding 'inner' declaration found for component .ThermoPower.System Superheater.gasFlow.system declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: ThermoPower.Gas.Flow1DFV$Superheater$gasFlow.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

[4] 11:52:20 Translation Warning
[ThermoPower.Water: 5482:7-5482:63]: No corresponding 'inner' declaration found for component .ThermoPower.System Economizer.fluidFlow.system declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: ThermoPower.Water.Flow1DFV$Economizer$fluidFlow.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

[5] 11:52:20 Translation Warning
[ThermoPower.Thermal: 374:5-374:61]: No corresponding 'inner' declaration found for component .ThermoPower.System Economizer.metalTube.system declared as 'outer '.
  The existing 'inner' components are:
    There are no 'inner' components defined in the model in any of the parent scopes of 'outer' component's scope: ThermoPower.Thermal.MetalTubeFV$Economizer$metalTube.
  Check if you have not misspelled the 'outer' component name.
  Please declare an 'inner' component with the same name in the top scope.
  Continuing flattening by only considering the 'outer' component declaration.

Etc ... Etc ... for another 10 lines

None of the solutions attempted above have actually worked. Luckily these are only warnings and do not completely break the code but there does seem to be an issue here to be addressed.

Every time I want to trouble shoot the code, it launches me into the library code that extends that component. I think this is where the real editing might occur but whatever changes I make do not effect my model.

2

2 Answers

5
votes

Some Modelica tools add the inner declaration automatically, some do not. OpenModelica does not add it automatically yet but that will change in the future with the new front-end.

Just drag and drop ThermoPower.System in your top model and it should be enough. You don't need to add it to every level, just the top level. The inner declaration is like a global variable that is read by the outer declaration.

1
votes

In addition to what Adrian wrote (since it popped up as active):

The Modelica Language Specification have changed regarding missing inner:

In 3.0 the missingInnerMessage-annotation was only for diagnostics, but that naturally leads to the auto-correcting with warning idea, which was then standardized in 3.1-3.2 where the annotation allowed a tool to add the corresponding inner - but didn't require it; which lead to the situation that models worked in some tools and not others.

And finally in 3.3r1 and 3.4 a tool shall temporarily add the corresponding inner - regardless of missingInnerMessage (if unambiguous and non-partial).

Thus going forward it shall just work.