Redeclaring non-replaceable element in ConductionElementHEX_twoPhase
Closed this issue · 0 comments
maltelenz commented
In the class ThermofluidStream.HeatExchangers.Internal.ConductionElementHEX_twoPhase
Medium
is redeclared in the extends
, but without making it replaceable
.
In the ConductionElementB
declaration in ThermofluidStream.HeatExchangers.DiscretizedCounterFlowHEX
there is later an attempt to redeclare it anyway, which seems wrong.
When validating ThermofluidStream.Examples.HeatPump
System Modeler claims:
Error: ThermofluidStream.HeatExchangers.DiscretizedCounterFlowHEX [6:181-6:181] Invalid redeclare of a non replaceable element. condenser.MediumB and .ThermofluidStream.Media.myMedia.Interfaces.PartialTwoPhaseMedium should have the same type or differ only with regards to their dimensions. Making the element replaceable will make the current redeclare valid.
And if you do add a replaceable
in ThermofluidStream.HeatExchangers.Internal.ConductionElementHEX_twoPhase
as follows the error disappears:
extends PartialConductionElementHEX(redeclare replaceable package Medium = Media.myMedia.Interfaces.PartialTwoPhaseMedium);