Opened 7 years ago
Closed 6 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 , 7 years ago
| Cc: | added |
|---|
comment:2 by , 7 years ago
| Priority: | high → blocker |
|---|
follow-up: 4 comment:3 by , 6 years ago
comment:4 by , 6 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 , 6 years ago
Possibly fixed in #607. The model still fails due to expandable connector issues though.
comment:6 by , 6 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Closing since the reported issue is fixed. The remaining expandable connector issue is probably covered by one of the existing tickets on that subject.

@perost, any idea why this happens?