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 | |||
integer, | intent(inout) | :: | CompIndex | |||
real(kind=r64), | intent(inout), | optional | :: | QActual | ||
integer, | intent(in), | optional | :: | FanOpMode | ||
real(kind=r64), | intent(in), | optional | :: | PartLoadRatio |
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 SimulateWaterCoilComponents(CompName,FirstHVACIteration,CompIndex, QActual, FanOpMode, PartLoadRatio)
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN February 1998
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages WaterCoil component simulation.
! 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:
CHARACTER(len=*), INTENT(IN) :: CompName
LOGICAL, INTENT (IN):: FirstHVACIteration
INTEGER, INTENT(INOUT) :: CompIndex
REAL(r64), OPTIONAL, INTENT(INOUT) :: QActual
INTEGER, OPTIONAL, INTENT(IN) :: FanOpMode
REAL(r64), OPTIONAL, INTENT(IN) :: PartLoadRatio
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CoilNum ! The WaterCoil that you are currently loading input into
INTEGER :: OpMode ! fan operating mode
REAL(r64) :: PartLoadFrac ! part-load fraction of heating coil
! FLOW:
! Obtains and Allocates WaterCoil related parameters from input file
IF (GetWaterCoilsInputFlag) THEN !First time subroutine has been entered
CALL GetWaterCoilInput
GetWaterCoilsInputFlag=.false.
End If
! Find the correct WaterCoilNumber with the Coil Name
IF (CompIndex == 0) THEN
CoilNum = FindItemInList(CompName,WaterCoil%Name,NumWaterCoils)
IF (CoilNum == 0) THEN
CALL ShowFatalError('SimulateWaterCoilComponents: Coil not found='//TRIM(CompName))
ENDIF
CompIndex=CoilNum
ELSE
CoilNum=CompIndex
IF (CoilNum > NumWaterCoils .or. CoilNum < 1) THEN
CALL ShowFatalError('SimulateWaterCoilComponents: Invalid CompIndex passed='//TRIM(TrimSigDigits(CoilNum))// &
', Number of Water Coils='//TRIM(TrimSigDigits(NumWaterCoils))//', Coil name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(CoilNum)) THEN
IF (CompName /= WaterCoil(CoilNum)%Name) THEN
CALL ShowFatalError('SimulateWaterCoilComponents: Invalid CompIndex passed='//TRIM(TrimSigDigits(CoilNum))// &
', Coil name='//TRIM(CompName)//', stored Coil Name for that index='//TRIM(WaterCoil(CoilNum)%Name))
ENDIF
CheckEquipName(CoilNum)=.false.
ENDIF
ENDIF
! With the correct CoilNum Initialize
CALL InitWaterCoil(CoilNum,FirstHVACIteration) ! Initialize all WaterCoil related parameters
IF(PRESENT(FanOpMode))THEN
OpMode = FanOpMode
ELSE
OpMode = ContFanCycCoil
END IF
IF(PRESENT(PartLoadRatio))THEN
PartLoadFrac = PartLoadRatio
ELSE
PartLoadFrac = 1.0d0
END IF
! Calculate the Correct WaterCoil Model with the current CoilNum
If(WaterCoil(CoilNum)%WaterCoilType_Num == WaterCoil_DetFlatFinCooling) Then
Call CalcDetailFlatFinCoolingCoil(CoilNum, SimCalc,OpMode,PartLoadFrac)
IF(PRESENT(QActual))QActual = WaterCoil(CoilNum)%SenWaterCoolingCoilRate
ElseIf(WaterCoil(CoilNum)%WaterCoilType_Num == WaterCoil_Cooling) Then
Call CoolingCoil(CoilNum, FirstHVACIteration, SimCalc,OpMode,PartLoadFrac)
IF(PRESENT(QActual))QActual = WaterCoil(CoilNum)%SenWaterCoolingCoilRate
End If
If(WaterCoil(CoilNum)%WaterCoilType_Num == WaterCoil_SimpleHeating) Then
Call CalcSimpleHeatingCoil(CoilNum, OpMode, PartLoadFrac, SimCalc)
IF(PRESENT(QActual))QActual = WaterCoil(CoilNum)%TotWaterHeatingCoilRate
End If
! Update the current WaterCoil to the outlet nodes
Call UpdateWaterCoil(CoilNum)
! Report the current WaterCoil
Call ReportWaterCoil(CoilNum)
RETURN
END SUBROUTINE SimulateWaterCoilComponents