Opened 6 years ago

Closed 5 years ago

#5279 closed defect (fixed)

NF lookup error in redeclared package

Reported by: Francesco Casella Owned by: Per Östlund
Priority: blocker Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc: Michael Wetter

Description

Please check Buildings.Applications.DataCenters.ChillerCooled.Examples.NonIntegratedPrimarySecondaryEconomizer. The following error is reported:

[OMCompiler/build/lib/omlibrary/Buildings latest/Fluid/Humidifiers/SprayAirWasher_X.mo:45:3-46:45:writable]
Error: Function Medium.enthalpyOfLiquid not found in scope 
SprayAirWasher_X.

Medium is redeclared in SprayAirWasher_X.mo as a subclass of Modelica.Media.Interfaces.PartialCondensingGases (see the source code) which indeed contains such a function.

Change History (6)

comment:1 by Francesco Casella, 6 years ago

Cc: Michael Wetter added

comment:2 by Francesco Casella, 6 years ago

Priority: highblocker

comment:3 by Francesco Casella, 5 years ago

@perost, any idea why this happens?

in reply to:  3 comment:4 by Per Östlund, 5 years ago

Replying to casella:

@perost, any idea why this happens?

It seems to be because the model CoolingCoilHumidifyingHeating indirectly inherits from the record PartialCoolingCoilHumidifyingHeating, which apparently is legal but not something I've thought about. The result is that the NF becomes confused and thinks that CoolingCoilHumidifyingHeating is also a record and tries to instantiate its constructor, which is where the reported error occurs. That shouldn't be the case, a model that inherits from a record is still a model.

comment:5 by Per Östlund, 5 years ago

Possibly fixed in #607. The model still fails due to expandable connector issues though.

comment:6 by Per Östlund, 5 years ago

Resolution: fixed
Status: newclosed

Closing since the reported issue is fixed. The remaining expandable connector issue is probably covered by one of the existing tickets on that subject.

Note: See TracTickets for help on using tickets.