- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Translation Error of standard example...
Translation Error of standard example from MSL Modelica.Media.Examples
Translation Error of standard example from MSL Modelica.Media.Examples
Good mornig
I setup OpenModelica 1.9.4~dev-675-gb524b08 and I try to execute example Modelica.Media.Examples.Tests.Components.PortVolume
and get the next error:
Code:
[1] 06:58:44 Translation Error
[Modelica.Media: 3269:9-3271:35]: Medium is partial, name lookup is not allowed in partial classes.
[2] 06:58:44 Translation Error
[Modelica.Media: 3272:9-3274:30]: Medium is partial, name lookup is not allowed in partial classes.
[3] 06:58:44 Translation Error
[Modelica.Media: 3278:9-3282:30]: Medium is partial, name lookup is not allowed in partial classes.
[4] 06:58:44 Translation Error
[Modelica.Media: 3283:9-3286:30]: Medium is partial, name lookup is not allowed in partial classes.
[5] 06:58:44 Translation Error
[Modelica.Media: 3293:9-3293:65]: Medium is partial, name lookup is not allowed in partial classes.
[6] 06:58:44 Translation Error
[Modelica.Media: 4478:17-4603:23]: Illegal to instantiate partial class BaseProperties$medium.
[7] 06:58:44 Translation Error
Error occurred while flattening model Modelica.Media.Examples.Tests.Components.PortVolume
Please give me please some advice about it?
Re: Translation Error of standard example from MSL Modelica.Media.Examples
Hi,
You cannot use those models directly as they have a partial medium defined inside. You need to redeclare the Medium model when you use these models.
Cheers,
Adrian Pop/
- adrpo
- 885 Posts
Re: Translation Error of standard example from MSL Modelica.Media.Examples
Yes, most of them should work but some of therm are there as partial components of the bigger examples.
Even if you use Dymola you cannot compile those models. For example this is what you get when you try to simulate Modelica.Media.Examples.Tests.Components.PortVolume:
Code:
Translation of Modelica.Media.Examples.Tests.Components.PortVolume:
Component type specifier BaseProperties is a partial type.
File: F:/bin/Dymola2015FD01/Modelica/Library/Modelica 3.2.1/Media/package.mo, line 3195
Component context: medium
Component declared as Medium.BaseProperties medium in Modelica.Media.Interfaces.PartialMedium
ERROR: 1 error was found
- adrpo
- 885 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Translation Error of standard example...