#3944 closed defect (fixed)
Check of models with partial Medium packages fails
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 1.19.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | buchner@… |
Description (last modified by )
Consider this simple model:
model check inner Modelica.Fluid.System system; replaceable package gas = Modelica.Media.Interfaces.PartialMedium; Modelica.Fluid.Vessels.ClosedVolume free_volume( V = 0.01, use_portsData = false, redeclare package Medium = gas); end check;
Moving the issue to 2.1.0, as it is less critical than coverage issues.
The model is perfectly legitimate for a library. It cannot be simulated directly, because it lacks an actual medium implementation, but is othewise locally balanced and well defined.
Checking in OMC produces the following error:
[1] 10:08:59 Translation Warning [Modelica.Media: 4475:17-4600:23]: Forcing full instantiation of partial class BaseProperties$free_volume$medium during checkModel. [2] 10:08:59 Translation Error Internal error - InstUtil.moveBindings: Mismatched number of equations and variables. [3] 10:08:59 Translation Error Error occurred while flattening model check
A better implementation should recognize that partial classes are involved and only perform local balancedness tests, possibly warning that Medium must be redeclared in order to actually use the model.
Change History (4)
comment:1 by , 9 years ago
Cc: | added |
---|
comment:2 by , 6 years ago
Component: | Frontend → New Instantiation |
---|---|
Description: | modified (diff) |
Milestone: | 2.0.0 → 2.1.0 |
Owner: | changed from | to
comment:3 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 3 years ago
Milestone: | 2.1.0 → 1.19.0 |
---|
Note:
See TracTickets
for help on using tickets.
The issue is still valid, with the NF one gets: