Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | CompName | |||
integer, | intent(in) | :: | ZoneNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
real(kind=r64), | intent(out) | :: | QSensOut | |||
real(kind=r64), | intent(out) | :: | QLatOut | |||
integer, | intent(inout) | :: | CompIndex |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE SimZoneDehumidifier(CompName,ZoneNum,FirstHVACIteration,QSensOut,QLatOut,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Don Shirey, FSEC
! DATE WRITTEN July/Aug 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Simulate a zone dehumidifier.
! METHODOLOGY EMPLOYED:
! Call appropriate subroutines to get input values, initialize variables, model performanc
! update node information, report model outputs.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE DataZoneEnergyDemands, ONLY: ZoneSysMoistureDemand
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT (IN) :: CompName ! Name of the zone dehumidifier
INTEGER, INTENT (IN) :: ZoneNum ! Number of zone being served
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
REAL(r64), INTENT (OUT) :: QSensOut ! Sensible capacity delivered to zone (W)
REAL(r64), INTENT (OUT) :: QLatOut ! Latent capacity delivered to zone (kg/s), dehumidify = negative
INTEGER, INTENT (INOUT) :: CompIndex ! Index to the zone dehumidifier
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ZoneDehumidNum ! Index of zone dehumidifier being simulated
REAL(r64) :: QZnDehumidReq ! Zone dehumidification load required (kg moisture/sec)
IF (GetInputFlag) THEN
CALL GetZoneDehumidifierInput
GetInputFlag=.FALSE.
ENDIF
! Find the correct zone dehumidifier
IF (CompIndex == 0) THEN
ZoneDehumidNum = FindItemInList(CompName,ZoneDehumid%Name,NumDehumidifiers)
IF (ZoneDehumidNum == 0) THEN
CALL ShowFatalError('SimZoneDehumidifier: Unit not found= '//TRIM(CompName))
END IF
CompIndex=ZoneDehumidNum
ELSE
ZoneDehumidNum=CompIndex
IF (ZoneDehumidNum > NumDehumidifiers .or. ZoneDehumidNum < 1) THEN
CALL ShowFatalError('SimZoneDehumidifier: Invalid CompIndex passed= '// &
TRIM(TrimSigDigits(ZoneDehumidNum))// &
', Number of Units= '//TRIM(TrimSigDigits(NumDehumidifiers))// &
', Entered Unit name= '//TRIM(CompName))
END IF
IF (CheckEquipName(ZoneDehumidNum)) THEN
IF (CompName /= ZoneDehumid(ZoneDehumidNum)%Name) THEN
CALL ShowFatalError('SimZoneDehumidifier: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(ZoneDehumidNum))// &
', Unit name= '//TRIM(CompName)//', stored Unit Name for that index= '// &
TRIM(ZoneDehumid(ZoneDehumidNum)%Name))
END IF
CheckEquipName(ZoneDehumidNum)=.false.
ENDIF
END IF
QZnDehumidReq = ZoneSysMoistureDemand(ZoneNum)%RemainingOutputReqToDehumidSP ! Negative means dehumidify
CALL InitZoneDehumidifier(ZoneDehumidNum)
CALL CalcZoneDehumidifier(ZoneDehumidNum,QZnDehumidReq,QSensOut,QLatOut)
CALL UpdateZoneDehumidifier(ZoneDehumidNum)
CALL ReportZoneDehumidifier(ZoneDehumidNum)
RETURN
END SUBROUTINE SimZoneDehumidifier