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 SimHumidifier(CompName,FirstHVACIteration,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manage the simulation of an air humidifier
! METHODOLOGY EMPLOYED:
! NA
! REFERENCES:
! NA
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList,MakeUPPERCase
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT (IN) :: CompName ! name of the humidifier unit
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
INTEGER, INTENT (INOUT) :: CompIndex ! Pointer to Humidifier Unit
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: HumNum ! index of humidifier unit being simulated
LOGICAL,SAVE :: GetInputFlag = .TRUE. ! First time, input is "gotten"
REAL(r64) :: WaterAddNeeded ! output in kg/s needed from humidifier to meet humidity setpoint
IF (GetInputFlag) THEN
CALL GetHumidifierInput
GetInputFlag=.FALSE.
ENDIF
! Get the humidifier unit index
IF (CompIndex == 0) THEN
HumNum = FindItemInList(CompName,Humidifier%Name,NumHumidifiers)
IF (HumNum == 0) THEN
CALL ShowFatalError('SimHumidifier: Unit not found='//TRIM(CompName))
ENDIF
CompIndex=HumNum
ELSE
HumNum=CompIndex
IF (HumNum > NumHumidifiers .or. HumNum < 1) THEN
CALL ShowFatalError('SimHumidifier: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(HumNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumHumidifiers))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(HumNum)) THEN
IF (CompName /= Humidifier(HumNum)%Name) THEN
CALL ShowFatalError('SimHumidifier: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(HumNum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(Humidifier(HumNum)%Name))
ENDIF
CheckEquipName(HumNum)=.false.
ENDIF
ENDIF
IF (HumNum <= 0) THEN
CALL ShowFatalError('SimHumidifier: Unit not found='//TRIM(CompName))
ENDIF
CALL InitHumidifier(HumNum)
CALL ControlHumidifier(HumNum,WaterAddNeeded)
! call the correct humidifier calculation routine
SELECT CASE(Humidifier(HumNum)%HumType_Code)
CASE (Humidifier_Steam_Electric) ! 'HUMIDIFIER:STEAM:ELECTRIC'
CALL CalcElecSteamHumidifier(HumNum,WaterAddNeeded)
CASE DEFAULT
CALL ShowSevereError('SimHumidifier: Invalid Humidifier Type Code='//trim(TrimSigDigits(Humidifier(HumNum)%HumType_Code)))
CALL ShowContinueError('...Component Name=['//trim(CompName)//'].')
CALL ShowFatalError('Preceding Condition causes termination.')
END SELECT
CALL UpdateReportWaterSystem(HumNum)
CALL UpdateHumidifier(HumNum)
CALL ReportHumidifier(HumNum)
RETURN
END SUBROUTINE SimHumidifier