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 | |||
real(kind=r64), | intent(inout) | :: | LoadMet | |||
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 SimLowTempRadiantSystem(CompName,FirstHVACIteration,LoadMet,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN November 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine needs a description.
! METHODOLOGY EMPLOYED:
! Needs description, as appropriate.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
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 low temperature radiant system
LOGICAL, INTENT(IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
REAL(r64), INTENT(INOUT) :: LoadMet ! load met by the radiant system, in Watts
INTEGER, INTENT(INOUT) :: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: GetInputFlag = .TRUE. ! First time, input is "gotten"
INTEGER :: RadSysNum ! Radiant system number/index in local derived types
INTEGER :: SystemType ! Type of radiant system: hydronic, constant flow, or electric
! FLOW:
IF (GetInputFlag) THEN
CALL GetLowTempRadiantSystem
GetInputFlag=.FALSE.
ENDIF
! ! Get the radiant system index and type
! RadSysNum = FindItemInList(CompName,HydrRadSys%Name,NumOfHydrLowTempRadSys)
! IF (RadSysNum > 0) THEN ! Found it and it is a hydronic system
! SystemType = HydronicSystem
! ELSE ! RadSysNum <= 0 so this CompName was not found among the hydronic systems-->check out electric systems
! RadSysNum = FindItemInList(CompName,ElecRadSys%Name,NumOfElecLowTempRadSys)
! IF (RadSysNum > 0) THEN ! Found it and it is an electric system
! SystemType = ElectricSystem
! ELSE ! RadSysNum <= 0 so this CompName was not found among the hydronic systems-->check out constant flow systems
! RadSysNum = FindItemInList(CompName,CFloRadSys%Name,NumOfCFloLowTempRadSys)
! IF (RadSysNum > 0) THEN ! Found it and it is an electric system
! SystemType = ConstantFlowSystem
! ELSE ! RadSysNum is still <= 0 so this CompName was not found among either radiant system type-->error
! CALL ShowFatalError('SimLowTempRadiantSystem: Radiant System not found = '//TRIM(CompName))
! END IF
! END IF
! END IF
! Find the correct High Temp Radiant System
IF (CompIndex == 0) THEN
RadSysNum = FindItemInList(CompName,RadSysTypes%Name,TotalNumOfRadSystems)
IF (RadSysNum == 0) THEN
CALL ShowFatalError('SimLowTempRadiantSystem: Unit not found='//TRIM(CompName))
ENDIF
CompIndex=RadSysNum
SystemType=RadSysTypes(RadSysNum)%SystemType
SELECT CASE (SystemType)
CASE (HydronicSystem)
RadSysTypes(RadSysNum)%CompIndex=FindItemInList(CompName,HydrRadSys%Name,NumOfHydrLowTempRadSys)
CASE (ConstantFlowSystem)
RadSysTypes(RadSysNum)%CompIndex=FindItemInList(CompName,CFloRadSys%Name,NumOfCFloLowTempRadSys)
CASE (ElectricSystem)
RadSysTypes(RadSysNum)%CompIndex=FindItemInList(CompName,ElecRadSys%Name,NumOfElecLowTempRadSys)
END SELECT
ELSE
RadSysNum=CompIndex
SystemType=RadSysTypes(RadSysNum)%SystemType
IF (RadSysNum > TotalNumOfRadSystems .or. RadSysNum < 1) THEN
CALL ShowFatalError('SimLowTempRadiantSystem: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(RadSysNum))// &
', Number of Units='//TRIM(TrimSigDigits(TotalNumOfRadSystems))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(RadSysNum)) THEN
IF (CompName /= RadSysTypes(RadSysNum)%Name) THEN
CALL ShowFatalError('SimLowTempRadiantSystem: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(RadSysNum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(RadSysTypes(RadSysNum)%Name))
ENDIF
CheckEquipName(RadSysNum)=.false.
ENDIF
ENDIF
CALL InitLowTempRadiantSystem(FirstHVACIteration,RadSysTypes(RadSysNum)%CompIndex,SystemType)
SELECT CASE (SystemType)
CASE (HydronicSystem)
CALL CalcLowTempHydrRadiantSystem(RadSysTypes(RadSysNum)%CompIndex,LoadMet)
CASE (ConstantFlowSystem)
CALL CalcLowTempCFloRadiantSystem(RadSysTypes(RadSysNum)%CompIndex,LoadMet)
CASE (ElectricSystem)
CALL CalcLowTempElecRadiantSystem(RadSysTypes(RadSysNum)%CompIndex,LoadMet)
CASE DEFAULT
CALL ShowFatalError('SimLowTempRadiantSystem: Illegal system type for system '//TRIM(CompName))
END SELECT
CALL UpdateLowTempRadiantSystem(FirstHVACIteration,RadSysTypes(RadSysNum)%CompIndex,SystemType)
CALL ReportLowTempRadiantSystem(RadSysTypes(RadSysNum)%CompIndex,SystemType)
RETURN
END SUBROUTINE SimLowTempRadiantSystem