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 | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
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 SimDesiccantDehumidifier(CompName,FirstHVACIteration,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Michael J. Witte, GARD Analytics, Inc.
! for Gas Research Institute
! DATE WRITTEN March 2001
! MODIFIED June 2007, R. Raustad, Added new dehumidifier type -- DESICCANT DEHUMIDIFIER
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manage the simulation of an air dehumidifier
! METHODOLOGY EMPLOYED:
! NA
! REFERENCES:
! NA
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT (IN) :: CompName ! name of the dehumidifier unit
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
INTEGER, INTENT(INOUT):: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: DesicDehumNum ! index of solid desiccant unit being simulated
LOGICAL,SAVE :: GetInputFlag = .true. ! First time, input is "gotten"
REAL(r64) :: HumRatNeeded ! process air leaving humidity ratio set by controller [kg water/kg air]
IF (GetInputFlag) THEN
CALL GetDesiccantDehumidifierInput
GetInputFlag=.false.
ENDIF
! Get the desiccant dehumidifier unit index
IF (CompIndex == 0) THEN
DesicDehumNum = FindItemInList(CompName,DesicDehum%Name,NumDesicDehums)
IF (DesicDehumNum == 0) THEN
CALL ShowFatalError('SimDesiccantDehumidifier: Unit not found='//TRIM(CompName))
ENDIF
CompIndex=DesicDehumNum
ELSE
DesicDehumNum=CompIndex
IF (DesicDehumNum > NumDesicDehums .or. DesicDehumNum < 1) THEN
CALL ShowFatalError('SimDesiccantDehumidifier: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(DesicDehumNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumDesicDehums))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CompName /= DesicDehum(DesicDehumNum)%Name) THEN
CALL ShowFatalError('SimDesiccantDehumidifier: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(DesicDehumNum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(DesicDehum(DesicDehumNum)%Name))
ENDIF
ENDIF
CALL InitDesiccantDehumidifier(DesicDehumNum,FirstHVACIteration)
CALL ControlDesiccantDehumidifier(DesicDehumNum,HumRatNeeded,FirstHVACIteration)
! call the correct dehumidifier calculation routine
SELECT CASE(DesicDehum(DesicDehumNum)%DehumTypeCode)
CASE (Solid)
CALL CalcSolidDesiccantDehumidifier(DesicDehumNum,HumRatNeeded,FirstHVACIteration)
CASE (Generic)
CALL CalcGenericDesiccantDehumidifier(DesicDehumNum,HumRatNeeded,FirstHVACIteration)
CASE DEFAULT
CALL ShowFatalError('Invalid type, Desiccant Dehumidifer='//TRIM(DesicDehum(DesicDehumNum)%DehumType))
END SELECT
CALL UpdateDesiccantDehumidifier(DesicDehumNum)
CALL ReportDesiccantDehumidifier(DesicDehumNum)
RETURN
END SUBROUTINE SimDesiccantDehumidifier