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 | |||
| real(kind=r64), | intent(in), | optional | :: | QCoilReq | ||
| integer, | optional | :: | CompIndex | |||
| real(kind=r64), | intent(out), | optional | :: | QCoilActual | ||
| logical, | intent(in), | optional | :: | SuppHeat | ||
| integer, | intent(in), | optional | :: | FanOpMode | ||
| real(kind=r64), | intent(in), | optional | :: | PartLoadRatio | ||
| integer, | optional | :: | StageNum | |||
| real(kind=r64), | intent(in), | optional | :: | SpeedRatio | 
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 SimulateHeatingCoilComponents(CompName,FirstHVACIteration,QCoilReq,CompIndex,QCoilActual,SuppHeat, &
                                         FanOpMode, PartLoadRatio, StageNum, SpeedRatio)
          ! SUBROUTINE INFORMATION:
          !       AUTHOR         Richard Liesen
          !       DATE WRITTEN   May 2000
          !       MODIFIED       na
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          ! This subroutine manages HeatingCoil 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:
  LOGICAL, INTENT (IN)                 :: FirstHVACIteration
  CHARACTER(len=*), INTENT(IN)         :: CompName
  REAL(r64),    INTENT (IN), OPTIONAL  :: QCoilReq       ! coil load to be met
  INTEGER, OPTIONAL                    :: CompIndex
  INTEGER, OPTIONAL                    :: StageNum
  REAL(r64),    INTENT (OUT), OPTIONAL :: QCoilActual    ! coil load actually delivered returned to calling component
  LOGICAL, INTENT(IN), OPTIONAL        :: SuppHeat       ! True if current heating coil is a supplemental heating coil
                                                         ! in a unitary system
  INTEGER, OPTIONAL, INTENT(IN)        :: FanOpMode      ! fan operating mode, CycFanCycCoil or ContFanCycCoil
  REAL(r64), OPTIONAL, INTENT(IN)      :: PartLoadRatio  ! part-load ratio of heating coil
  REAL(r64), OPTIONAL, INTENT(IN)      :: SpeedRatio     ! Speed ratio of MultiStage heating coil
          ! SUBROUTINE PARAMETER DEFINITIONS:
  CHARACTER(len=*), PARAMETER :: Blank = ' '
          ! INTERFACE BLOCK SPECIFICATIONS
          ! na
          ! DERIVED TYPE DEFINITIONS
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  INTEGER   :: CoilNum               ! The HeatingCoil that you are currently loading input into
  REAL(r64) :: QCoilActual2          ! coil load actually delivered returned from specific coil
  INTEGER   :: OpMode                ! fan operating mode
  REAL(r64) :: PartLoadFrac          ! part-load fraction of heating coil
  REAL(r64) :: QCoilRequired         ! local variable for optional argument
          ! FLOW:
  ! Obtains and Allocates HeatingCoil related parameters from input file
  IF (GetCoilsInputFlag) THEN  !First time subroutine has been entered
    CALL GetHeatingCoilInput
    GetCoilsInputFlag=.false.
  End If
  ! Find the correct HeatingCoilNumber with the Coil Name
  IF (PRESENT(CompIndex)) THEN
    IF (CompIndex == 0) THEN
      CoilNum = FindItemInList(CompName,HeatingCoil%Name,NumHeatingCoils)
      IF (CoilNum == 0) THEN
        CALL ShowFatalError('SimulateHeatingCoilComponents: Coil not found='//TRIM(CompName))
      ENDIF
  !    CompIndex=CoilNum
    ELSE
      CoilNum=CompIndex
      IF (CoilNum > NumHeatingCoils .or. CoilNum < 1) THEN
        CALL ShowFatalError('SimulateHeatingCoilComponents: Invalid CompIndex passed='//  &
                            TRIM(TrimSigDigits(CoilNum))// &
                            ', Number of Heating Coils='//TRIM(TrimSigDigits(NumHeatingCoils))//  &
                            ', Coil name='//TRIM(CompName))
      ENDIF
      IF (CheckEquipName(CoilNum)) THEN
        IF (CompName /= Blank .AND. CompName /= HeatingCoil(CoilNum)%Name) THEN
          CALL ShowFatalError('SimulateHeatingCoilComponents: Invalid CompIndex passed='//  &
                              TRIM(TrimSigDigits(CoilNum))// &
                              ', Coil name='//TRIM(CompName)//', stored Coil Name for that index='//  &
                              TRIM(HeatingCoil(CoilNum)%Name))
        ENDIF
        CheckEquipName(CoilNum)=.false.
      ENDIF
    ENDIF
  ELSE
    CALL ShowSevereError('SimulateHeatingCoilComponents: CompIndex argument not used.')
    CALL ShowContinueError('..CompName = '//TRIM(CompName))
    CALL ShowFatalError('Preceding conditions cause termination.')
  ENDIF
  IF (PRESENT(SuppHeat)) THEN
    CoilIsSuppHeater = SuppHeat
  ELSE
    CoilIsSuppHeater = .FALSE.
  END IF
  IF(PRESENT(FanOpMode))THEN
    OpMode = FanOpMode
  ELSE
    OpMode = ContFanCycCoil
  END IF
  IF(PRESENT(PartLoadRatio))THEN
    PartLoadFrac = PartLoadRatio
  ELSE
    PartLoadFrac = 1.0d0
  END IF
  IF(PRESENT(QCoilReq))THEN
    QCoilRequired = QCoilReq
  ELSE
    QCoilRequired = SensedLoadFlagValue
  END IF
  ! With the correct CoilNum Initialize
  CALL InitHeatingCoil(CoilNum,FirstHVACIteration,QCoilRequired) ! Initialize all HeatingCoil related parameters
  ! Calculate the Correct HeatingCoil Model with the current CoilNum
  If(HeatingCoil(CoilNum)%HCoilType_Num == Coil_HeatingElectric) Then
       Call CalcElectricHeatingCoil(CoilNum,QCoilRequired,QCoilActual2,OpMode,PartLoadFrac)
  ElseIf(HeatingCoil(CoilNum)%HCoilType_Num == Coil_HeatingElectric_MultiStage) Then
       Call CalcMultiStageElectricHeatingCoil(CoilNum,SpeedRatio, PartLoadRatio, StageNum, OpMode) !Objexx:OPTIONAL SpeedRatio, PartLoadRatio, StageNum used without PRESENT check
  ElseIf(HeatingCoil(CoilNum)%HCoilType_Num == Coil_HeatingGas) Then
       Call CalcGasHeatingCoil(CoilNum,QCoilRequired,QCoilActual2,OpMode,PartLoadFrac)
  ElseIf(HeatingCoil(CoilNum)%HCoilType_Num == Coil_HeatingGas_MultiStage) Then
       Call CalcMultiStageGasHeatingCoil(CoilNum,SpeedRatio, PartLoadRatio, StageNum, OpMode) !Objexx:OPTIONAL SpeedRatio, PartLoadRatio, StageNum used without PRESENT check
  ElseIf(HeatingCoil(CoilNum)%HCoilType_Num == Coil_HeatingDesuperheater) Then
       Call CalcDesuperheaterHeatingCoil(CoilNum,QCoilRequired,QCoilActual2)
  Else
       QCoilActual2 = 0.0d0
  End If
  ! Update the current HeatingCoil to the outlet nodes
  Call UpdateHeatingCoil(CoilNum)
  ! Report the current HeatingCoil
  Call ReportHeatingCoil(CoilNum)
  IF (PRESENT(QCoilActual)) THEN
       QCoilActual = QCoilActual2
  ENDIF
  RETURN
END SUBROUTINE SimulateHeatingCoilComponents