Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | SetPtMgrNum | ||||
integer, | intent(in), | optional | :: | NodeNum | ||
logical, | intent(in), | optional | :: | InitFlag |
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 CalcOutsideAirSetPoint(SetPtMgrNum, NodeNum, InitFlag)
! SUBROUTINE ARGUMENTS:
INTEGER :: SetPtMgrNum
INTEGER, INTENT(IN), OPTIONAL :: NodeNum !When Init Calls this routine, it passes the cur node number
LOGICAL, INTENT(IN), OPTIONAL :: InitFlag !When Init Calls this routine, it passes True
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: SchedVal
REAL(r64) :: OutLowTemp
REAL(r64) :: OutHighTemp
REAL(r64) :: SetTempAtOutLow
REAL(r64) :: SetTempAtOutHigh
INTEGER :: SchedPtr
REAL(r64) :: SetPt
SchedPtr = OutAirSetPtMgr(SetPtMgrNum)%SchedPtr
IF (SchedPtr.GT.0) THEN
SchedVal = GetCurrentScheduleValue(SchedPtr)
ELSE
SchedVal = 0.0d0
END IF
IF (SchedVal.EQ.2.d0) THEN
OutLowTemp = OutAirSetPtMgr(SetPtMgrNum)%OutLow2
OutHighTemp = OutAirSetPtMgr(SetPtMgrNum)%OutHigh2
SetTempAtOutLow = OutAirSetPtMgr(SetPtMgrNum)%OutLowSetPt2
SetTempAtOutHigh = OutAirSetPtMgr(SetPtMgrNum)%OutHighSetPt2
ELSE
OutLowTemp = OutAirSetPtMgr(SetPtMgrNum)%OutLow1
OutHighTemp = OutAirSetPtMgr(SetPtMgrNum)%OutHigh1
SetTempAtOutLow = OutAirSetPtMgr(SetPtMgrNum)%OutLowSetPt1
SetTempAtOutHigh = OutAirSetPtMgr(SetPtMgrNum)%OutHighSetPt1
END IF
IF (OutLowTemp.LT.OutHighTemp .AND. SetTempAtOutLow.GT.SetTempAtOutHigh) THEN
IF (OutDryBulbTemp.LE.OutLowTemp) THEN
SetPt = SetTempAtOutLow
ELSE IF (OutDryBulbTemp.GE.OutHighTemp) THEN
SetPt = SetTempAtOutHigh
ELSE
SetPt = SetTempAtOutLow - ((OutDryBulbTemp - OutLowTemp)/(OutHighTemp-OutLowTemp))*(SetTempAtOutLow - SetTempAtOutHigh)
END IF
ELSE
SetPt = 0.5d0*(SetTempAtOutLow + SetTempAtOutHigh)
END IF
IF(PRESENT(InitFlag))THEN
Node(NodeNum)%TempSetPoint = SetPt !Setpoint for Initial Routine
ELSE
OutAirSetPtMgr(SetPtMgrNum)%SetPt = SetPt !Setpoint for Calc Routine
ENDIF
RETURN
END SUBROUTINE CalcOutsideAirSetPoint