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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | UTSCNum |
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.
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 InitTranspiredCollector(UTSCNum)
! SUBROUTINE INFORMATION:
! AUTHOR B.T. Griffith
! DATE WRITTEN November 2004
! MODIFIED B. Griffith, May 2009, added EMS setpoint check
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataGlobals
USE DataHVACGlobals, ONLY:DoSetPointTest, SetPointErrorFlag
USE DataLoopNode
USE EMSManager, ONLY: iTemperatureSetpoint, CheckIfNodeSetpointManagedByEMS
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: UTSCNum ! compindex already checked in calling routine
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL,SAVE :: MyOneTimeFlag = .true.
INTEGER :: UTSCUnitNum
LOGICAL,SAVE :: MySetPointCheckFlag = .TRUE.
LOGICAL, ALLOCATABLE,Save, DIMENSION(:) :: MyEnvrnFlag
INTEGER :: ControlNode
!unused INTEGER :: InletNode
INTEGER :: SplitBranch
INTEGER :: thisUTSC
IF (MyOneTimeFlag) THEN
! do various one time setups and pitch adjustments across all UTSC
DO thisUTSC=1, NumUTSC
IF (UTSC(thisUTSC)%layout == Layout_Triangle) THEN
SELECT CASE (UTSC(thisUTSC)%Correlation)
CASE(Correlation_Kutscher1994) ! Kutscher1994
UTSC(thisUTSC)%Pitch = UTSC(thisUTSC)%Pitch
CASE(Correlation_VanDeckerHollandsBrunger2001) ! VanDeckerHollandsBrunger2001
UTSC(thisUTSC)%Pitch = UTSC(thisUTSC)%Pitch/1.6d0
END SELECT
ENDIF
IF (UTSC(thisUTSC)%layout == Layout_Square) THEN
SELECT CASE (UTSC(thisUTSC)%Correlation)
CASE(Correlation_Kutscher1994) ! Kutscher1994
UTSC(thisUTSC)%Pitch = UTSC(thisUTSC)%Pitch * 1.6d0
CASE(Correlation_VanDeckerHollandsBrunger2001) ! VanDeckerHollandsBrunger2001
UTSC(thisUTSC)%Pitch = UTSC(thisUTSC)%Pitch
END SELECT
ENDIF
ENDDO
ALLOCATE(MyEnvrnFlag(NumUTSC))
MyEnvrnFlag = .true.
MyOneTimeFlag = .false.
ENDIF !first time
!Check that setpoint is active (from test by RJL in HVACEvapComponent)
IF ( .NOT. SysSizingCalc .AND. MySetPointCheckFlag .AND. DoSetPointTest) THEN
DO UTSCUnitNum = 1, NumUTSC
DO SplitBranch = 1, UTSC(UTSCUnitNum)%NumOASysAttached
ControlNode = UTSC(UTSCUnitNum)%ControlNode(SplitBranch)
IF (ControlNode > 0) THEN
IF (Node(ControlNode)%TempSetPoint == SensedNodeFlagValue) THEN
IF (.NOT. AnyEnergyManagementSystemInModel) THEN
CALL ShowSevereError('Missing temperature setpoint for UTSC ' // &
TRIM(UTSC(UTSCUnitNum)%Name))
CALL ShowContinueError(' use a Setpoint Manager to establish a setpoint at the unit control node.')
SetpointErrorFlag = .TRUE.
ELSE
! need call to EMS to check node
CALL CheckIfNodeSetpointManagedByEMS(ControlNode,iTemperatureSetpoint, SetpointErrorFlag)
IF (SetpointErrorFlag) THEN
CALL ShowSevereError('Missing temperature setpoint for UTSC ' // &
TRIM(UTSC(UTSCUnitNum)%Name))
CALL ShowContinueError(' use a Setpoint Manager to establish a setpoint at the unit control node.')
CALL ShowContinueError('Or add EMS Actuator to provide temperature setpoint at this node')
ENDIF
ENDIF
END IF
END IF
END DO
END DO
MySetPointCheckFlag = .FALSE.
END IF
IF (BeginEnvrnFlag .AND. MyEnvrnFlag(UTSCNum)) THEN
UTSC(UTSCNum)%TplenLast = 22.5d0
UTSC(UTSCNum)%TcollLast = 22.0d0
MyEnvrnFlag(UTSCNum) = .FALSE.
ENDIF
IF (.NOT. BeginEnvrnFlag) THEN
MyEnvrnFlag(UTSCNum) = .TRUE.
END IF
!inits for each iteration
UTSC(UTSCNum)%InletMdot = Sum(Node(UTSC(UTSCNum)%InletNode)%MassFlowRate)
UTSC(UTSCNum)%isOn = .false. ! intialize then turn on if appropriate
UTSC(UTSCNum)%Tplen = 0.0d0
UTSC(UTSCNum)%Tcoll = 0.0d0
UTSC(UTSCNum)%MdotVent = 0.0d0
UTSC(UTSCNum)%TairHX = 0.0d0
UTSC(UTSCNum)%HXeff = 0.0d0
UTSC(UTSCNum)%Isc = 0.0d0
UTSC(UTSCNum)%UTSCEfficiency = 0.0d0
UTSC(UTSCNum)%UTSCCollEff = 0.0d0
RETURN
END SUBROUTINE InitTranspiredCollector