- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » redeclare Medium acting strange - bug?
redeclare Medium acting strange - bug?
redeclare Medium acting strange - bug?
I have been having trouble with the redeclare Medium statement.
I can take the ThreeTanks example, run it successfully, then change the height of Tank1, at which time the error
[2] 21:21:10 Translation Error
[MyThreeTanks: 12:3-21:20]: component tank1 contains the definition of a partial class Medium.
Please redeclare it to any package compatible with Modelica.Media.Interfaces.PartialMedium.
If I edit back in the appropriate statement:
redeclare package Medium = Medium,
The problem will again run.
This does not seem like the "correct" way for things to work, that each time I change an input in the widget I need to re-edit the input file to add back the redeclare. It loses this definition each time I make a change in the widget. This seems strange.
Am I missing something, is there an easier way to do this, or it this a bug?
Re: redeclare Medium acting strange - bug?
This was a bug and was fixed:
https://trac.openmodelica.org/OpenModelica/ticket/3783
You can use one of the nightly builds:
https://build.openmodelica.org/omc/buil … ly-builds/
I suggest the 64 bit version as the 32 bit has some instability issues.
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » redeclare Medium acting strange - bug?