User Expression for DHW heater type

2 posts / 0 new
Last post

Hello,
I am trying to set up a user expression for the type of DHW heater in a
project. When I use the symbolic index control shown below and add it
directly into the equest interface, the model runs fine and the graphical
interface shows the correct heater type.

However, when I save the model, the INP file does not get written with the
#SI notation and when I reload the model, it crashes while loading the BDL
right when it gets to the DW-heater. Does anyone know how to get around
this?

Snippet:
TYPE =
{IF(#PA("DHW_Type")==1) THEN
#SI("GAS","DW-HEATER","TYPE")
ELSE IF (#PA("DHW_Type")==2) THEN
#SI("ELEC","DW-HEATER","TYPE")
ELSE IF(#PA("DHW_Type")==3) THEN
#SI("HEAT-PUMP","DW-HEATER","TYPE")
ELSE
#SI("GAS","DW-HEATER","TYPE")
ENDIF
ENDIF
ENDIF}

DHW_Type is a global parameter of type numeric.

I also tried putting this code into the default for the DW-heater with a
user expression and this also crashes when trying to load the BDL.

Thank you in advance.

Sam

*Sam Mason* P.E., LEED AP BD+C, BEMP
Principal
*Encompass Energy, LLC*
P: 443-410-1534
E: sam.mason at encompassenergyLLC.com
W: www.encompassenergyLLC.com

This e-mail and all contents are CONFIDENTIAL and intended only for the
recipient(s) to whom it is addressed. Any use of the information by anyone
other than the intended recipient is prohibited

samuel mason2's picture
Offline
Joined: 2015-07-24
Reputation: 0

Hi Sam,
I?m not sure but I don?t think you can apply a default expression to any TYPE keyword ? whether it?s for a DW-heater, a SYSTEM, a SCHEDULE etc.
One alternative is to create multiple DHW heaters, and modify the default expression for CAPACITY to vary with the value of #PA(?DHW_Type?), so that the types you don?t want to use have a .001 capacity.
Regards,
~Bill

William Bishop, PE, BEMP, BEAP, CEM, LEED AP
Senior Energy Engineer
[Pathfinder-EA-logo-2][Logo Description automatically generated]
T: (585) 698-1956 F: (585) 325-6005
bbishop at pathfinder-ea.com www.pathfinder-ea.com
134 South Fitzhugh Street
Rochester, NY 14608 [cid:image005.png at 01D6A77D.57714540] Ask me why Carbon Fee & Dividend may be right for you.

Bill Bishop's picture
Offline
Joined: 2012-02-25
Reputation: 7