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(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 SimTranspiredCollector(CompName, CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR B.T. Griffith
! DATE WRITTEN November 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manage simulation of Transpired Collectors
! METHODOLOGY EMPLOYED:
! Setup to avoid string comparisons after first call
! REFERENCES:
! none
! USE STATEMENTS:
USE InputProcessor , ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
USE DataLoopNode , ONLY: Node
USE ScheduleManager, ONLY: GetCurrentScheduleValue
USE DataHVACGlobals, ONLY: TempControlTol
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName !component name
INTEGER, INTENT(INOUT) :: CompIndex !component index (to reduce string compares during simulation)
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: UTSCNum = 0 ! local number index for UTSC
IF (GetInputFlag) THEN
CALL GetTranspiredCollectorInput
GetInputFlag=.false.
ENDIF
! Find the correct transpired collector with the Component name and/or index
IF (CompIndex == 0) THEN
UTSCNum = FindItemInList(CompName,UTSC%Name,NumUTSC)
IF (UTSCNum == 0) THEN
CALL ShowFatalError('Transpired Collector not found='//TRIM(CompName))
ENDIF
CompIndex=UTSCNum
ELSE
UTSCNum=CompIndex
IF (UTSCNum > NumUTSC .or. UTSCNum < 1) THEN
CALL ShowFatalError('SimTranspiredCollector: Invalid CompIndex passed='//TRIM(TrimSigDigits(UTSCNum))// &
', Number of Transpired Collectors='//TRIM(TrimSigDigits(NumUTSC))//', UTSC name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(UTSCNum)) THEN
IF (CompName /= UTSC(UTSCNum)%Name) THEN
CALL ShowFatalError('SimTranspiredCollector: Invalid CompIndex passed='//TRIM(TrimSigDigits(UTSCNum))// &
', Transpired Collector name='//TRIM(CompName)//', stored Transpired Collector Name for that index='// &
TRIM(UTSC(UTSCNum)%Name))
ENDIF
CheckEquipName(UTSCNum)=.false.
ENDIF
ENDIF
CALL InitTranspiredCollector(CompIndex)
! Control point of deciding if transpired collector is active or not.
IF ( ( ANY((Node(UTSC(CompIndex)%InletNode)%Temp + TempControlTol) &
< Node(UTSC(CompIndex)%ControlNode)%TempSetPoint) .OR. & ! heating required
( ANY((Node(UTSC(CompIndex)%InletNode)%Temp + TempControlTol) & ! free heating helpful
< GetCurrentScheduleValue(UTSC(CompIndex)%FreeHeatSetpointSchedPtr)).and. &
ANY((Node(UTSC(CompIndex)%ZoneNode)%Temp+ TempControlTol) & ! free heating helpful
< GetCurrentScheduleValue(UTSC(CompIndex)%FreeHeatSetpointSchedPtr)) ) ) .AND. &
(GetCurrentScheduleValue(UTSC(CompIndex)%SchedPtr) > 0.0d0) .AND. & !availability Schedule
(UTSC(CompIndex)%InletMdot > 0.0d0) ) THEN ! OA system is setting mass flow
UTSC(CompIndex)%isOn = .TRUE.
ELSE
UTSC(CompIndex)%isOn = .FALSE.
ENDIF
If (UTSC(UTSCNum)%isOn) then
CALL CalcActiveTranspiredCollector(UTSCNum)
ELSE
CALL CalcPassiveTranspiredCollector(UTSCNum)
ENDIF
CALL UpdateTranspiredCollector(UTSCNum)
RETURN
END SUBROUTINE SimTranspiredCollector