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) | :: | HXAssistedCoilName | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
integer, | intent(in) | :: | CompOp | |||
real(kind=r64), | intent(in) | :: | PartLoadRatio | |||
integer, | intent(inout) | :: | CompIndex | |||
integer, | intent(in) | :: | FanOpMode | |||
logical, | intent(in), | optional | :: | HXUnitEnable | ||
real(kind=r64), | intent(in), | optional | :: | OnOffAFR | ||
logical, | intent(in), | optional | :: | EconomizerFlag | ||
real(kind=r64), | intent(inout), | optional | :: | QTotOut |
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 SimHXAssistedCoolingCoil(HXAssistedCoilName,FirstHVACIteration,CompOp,PartLoadRatio,CompIndex, &
FanOpMode, HXUnitEnable, OnOffAFR, EconomizerFlag,QTotOut)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Raustad, FSEC
! DATE WRITTEN Sept 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages the simulation of the
! cooling coil/heat exchanger combination.
! METHODOLOGY EMPLOYED:
! na
! 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:
LOGICAL, INTENT(IN) :: FirstHVACIteration ! FirstHVACIteration flag
CHARACTER(len=*), INTENT(IN) :: HXAssistedCoilName ! Name of HXAssistedCoolingCoil
INTEGER, INTENT(IN) :: CompOp ! compressor operation; 1=on, 0=off
REAL(r64), INTENT(IN) :: PartLoadRatio ! Part load ratio of Coil:DX:CoolingBypassFactorEmpirical
! (not used for Coil:Water:DetailedFlatCooling)
INTEGER, INTENT(INOUT) :: CompIndex
INTEGER, INTENT(IN) :: FanOpMode ! Allows the parent object to control fan operation
LOGICAL, OPTIONAL, INTENT(IN) :: HXUnitEnable ! flag to enable heat exchanger heat recovery
REAL(r64), OPTIONAL, INTENT(IN) :: OnOffAFR ! Ratio of compressor ON air mass flow rate to AVERAGE over time step
LOGICAL, OPTIONAL, INTENT(IN) :: EconomizerFlag ! OA sys or air loop economizer status
REAL(r64), OPTIONAL, INTENT(INOut) :: QTotOut ! the total cooling output of unit
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: Blank = ' '
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: HXAssistedCoilNum ! Index for HXAssistedCoolingCoil
REAL(r64) :: AirFlowRatio ! Ratio of compressor ON air mass flow rate to AVEARAGE over time step
LOGICAL :: HXUnitOn ! flag to enable heat exchanger
REAL(r64) :: AirMassFlow ! HX System air mass flow rate
INTEGER :: InletNodeNum ! HX System inlet node number
INTEGER :: OutletNodeNum ! HX System outlet node number
! Obtains and allocates HXAssistedCoolingCoil related parameters from input file
IF (GetCoilsInputFlag) THEN ! First time subroutine has been called, get input data
! Get the HXAssistedCoolingCoil input
CALL GetHXAssistedCoolingCoilInput
GetCoilsInputFlag=.false. ! Set logic flag to disallow getting the input data on future calls to this subroutine
End If
! Find the correct HXAssistedCoolingCoil number
IF (CompIndex == 0) THEN
HXAssistedCoilNum = FindItemInList(HXAssistedCoilName,HXAssistedCoil%Name,TotalNumHXAssistedCoils)
IF (HXAssistedCoilNum == 0) THEN
CALL ShowFatalError('HX Assisted Coil not found='//TRIM(HXAssistedCoilName))
ENDIF
CompIndex=HXAssistedCoilNum
ELSE
HXAssistedCoilNum=CompIndex
IF (HXAssistedCoilNum > TotalNumHXAssistedCoils .or. HXAssistedCoilNum < 1) THEN
CALL ShowFatalError('SimHXAssistedCoolingCoil: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(HXAssistedCoilNum))// &
', Number of HX Assisted Cooling Coils='//TRIM(TrimSigDigits(TotalNumHXAssistedCoils))// &
', Coil name='//TRIM(HXAssistedCoilName))
ENDIF
IF (CheckEquipName(HXAssistedCoilNum)) THEN
IF (HXAssistedCoilName /= Blank .AND. HXAssistedCoilName /= HXAssistedCoil(HXAssistedCoilNum)%Name) THEN
CALL ShowFatalError('SimHXAssistedCoolingCoil: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(HXAssistedCoilNum))// &
', Coil name='//TRIM(HXAssistedCoilName)//', stored Coil Name for that index='// &
TRIM(HXAssistedCoil(HXAssistedCoilNum)%Name))
ENDIF
CheckEquipName(HXAssistedCoilNum)=.false.
ENDIF
ENDIF
! Initialize HXAssistedCoolingCoil Flows
Call InitHXAssistedCoolingCoil(HXAssistedCoilNum)
IF(PRESENT(HXUnitEnable))THEN
HXUnitOn = HXUnitEnable
ELSE
HXUnitOn = .TRUE.
END IF
IF(CompOp .EQ. Off)THEN
HXUnitOn = .FALSE.
END IF
! Calculate the HXAssistedCoolingCoil performance and the coil outlet conditions
IF (PRESENT(OnOffAFR)) THEN
AirFlowRatio = OnOffAFR
Call CalcHXAssistedCoolingCoil(HXAssistedCoilNum,FirstHVACIteration,CompOp,PartLoadRatio, HXUnitOn, FanOpMode, &
OnOffAirFlow = AirFlowRatio, EconomizerFlag=EconomizerFlag)
ELSE
AirFlowRatio = 1.0d0
Call CalcHXAssistedCoolingCoil(HXAssistedCoilNum,FirstHVACIteration,CompOp,PartLoadRatio, HXUnitOn, FanOpMode, &
OnOffAirFlow = AirFlowRatio, EconomizerFlag=EconomizerFlag)
END IF
! Update the current HXAssistedCoil output
! Call UpdateHXAssistedCoolingCoil(HXAssistedCoilNum), not required. Updates done by the HX and cooling coil components.
! Report the current HXAssistedCoil output
! Call ReportHXAssistedCoolingCoil(HXAssistedCoilNum), not required. No reporting variables for this compound component.
IF(PRESENT(QTotOut))THEN
InletNodeNum = HXAssistedCoil(HXAssistedCoilNum)%HXAssistedCoilInletNodeNum
OutletNodeNum = HXAssistedCoil(HXAssistedCoilNum)%HXAssistedCoilOutletNodeNum
AirMassFlow = Node(OutletNodeNum)%MassFlowRate
QTotOut = AirMassFlow * (Node(InletNodeNum)%Enthalpy - Node(OutletNodeNum)%Enthalpy)
END IF
RETURN
END SUBROUTINE SimHXAssistedCoolingCoil