Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect transition of RoomAir:Node:AirflowNetwork:HVACEquipment from v9.2 to v9.3 #8372

Closed
2 of 3 tasks
hongyuanjia opened this issue Nov 8, 2020 · 4 comments · Fixed by #8415
Closed
2 of 3 tasks
Assignees
Labels
AuxiliaryTool Related to an auxiliary tool, not EnergyPlus itself (readvars, preprocessor, ep-launch, etc.) Defect Includes code to repair a defect in EnergyPlus

Comments

@hongyuanjia
Copy link

hongyuanjia commented Nov 8, 2020

In EnergyPlus v9.3, class AirTerminal:SingleDuct:Uncontrolled has been converted to new class AirTerminal:SingleDuct:ConstantVolume:NoReheat. Looking through the corresponding transition code, I found that class RoomAir:Node:AirflowNetwork:HVACEquipment may not be treated correctly:

CASE('ROOMAIR:NODE:AIRFLOWNETWORK:HVACEQUIPMENT')
IF(TotATSDUObjs > 0) THEN
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
OutArgs(1) = InArgs(1)
! Loop through fields looking for AirTerminal:SingleDuct:Uncontrolled node name
DO nodeCount=2, CurArgs
IF (SameString(TRIM(InArgs(nodeCount)), TRIM(ATSDUNodeNames(atCount)))) THEN
OutArgs(nodeCount) = TRIM(InArgs(nodeCount)) // ' ATInlet'
ELSE
OutArgs(nodeCount) = InArgs(nodeCount)
END IF
ENDDO
NoDiff = .false.
ELSE
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
OutArgs(1:CurArgs)=InArgs(1:CurArgs)
NoDiff=.true.
ENDIF

The code above basically tries to append the original AirTerminal:SingleDuct:Uncontrolled node with suffix ATInlet starting from 2nd field. However, according to IDD v9.2, the 2nd field is a choice field which can be AirTerminal:SingleDuct:Uncontrolled, and there is no way that any fields can be a node. The code above will do nothing if an AirTerminal:SingleDuct:Uncontrolled is referenced in Field 2 and Field 3.

#   1: Name
#   2: ZoneHVAC or Air Terminal Equipment Object Type 1
#   3: ZoneHVAC or Air Terminal Equipment Object Name 1
#   4: Fraction of Output or Supply Air from HVAC Equipment 1
#   5: Fraction of Input or Return Air to HVAC Equipment 1
#    ......

The proper way to transition this class is to follow the same logic as in the ZoneHVAC:EquipmentList:

CASE('ZONEHVAC:EQUIPMENTLIST')
nodiff = .false.
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
DO CurField = 1, CurArgs
! Add air terminal unit object type and name change here (see AirTerminal:SingleDuct:Uncontrolled above)
IF (CurField > 2) THEN
IF (SameString(TRIM(InArgs(CurField)),'AirTerminal:SingleDuct:Uncontrolled')) THEN
OutArgs(CurField) = 'ZoneHVAC:AirDistributionUnit'
ELSE IF (SameString(TRIM(InArgs(CurField-1)),'AirTerminal:SingleDuct:Uncontrolled')) THEN
OutArgs(CurField) = TRIM(InArgs(CurField)) // ' ADU'
ELSE
OutArgs(CurField) = InArgs(CurField)
END IF
ELSE
OutArgs(CurField) = InArgs(CurField)
END IF
END DO

Hope above helps.

Details

Some additional details for this issue (if relevant):

  • Version of EnergyPlus 9.2.0 to 9.3.0

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

@mjwitte
Copy link
Contributor

mjwitte commented Nov 9, 2020

@hongyuanjia If you have a file with this combination of objects that can be used for testing, that would be appreciated.

@jmarrec
Copy link
Contributor

jmarrec commented Dec 4, 2020

@hongyuanjia Do you have a file please.?

@hongyuanjia
Copy link
Author

@jmarrec, I modified the example file RoomAirflowNetwork.idf to include the case I mentioned.

RoomAirflowNetwork.idf.txt

@jmarrec
Copy link
Contributor

jmarrec commented Dec 8, 2020

@hongyuanjia Thank you!

I added the details and checklist from the issue template to your original post.

@jmarrec jmarrec self-assigned this Dec 8, 2020
@jmarrec jmarrec added AuxiliaryTool Related to an auxiliary tool, not EnergyPlus itself (readvars, preprocessor, ep-launch, etc.) Defect Includes code to repair a defect in EnergyPlus labels Dec 8, 2020
mjwitte added a commit that referenced this issue Dec 11, 2020
…_v920_v930

Fixes #8372 - Incorrect transition of RoomAir:Node:AirflowNetwork:HVACEquipment from v9.2 to v9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AuxiliaryTool Related to an auxiliary tool, not EnergyPlus itself (readvars, preprocessor, ep-launch, etc.) Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
3 participants