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 | |||
integer, | intent(in) | :: | ZoneNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
real(kind=r64), | intent(out) | :: | PowerMet | |||
real(kind=r64), | intent(out) | :: | LatOutputProvided | |||
integer, | intent(inout) | :: | CompIndex |
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 SimUnitHeater(CompName,ZoneNum,FirstHVACIteration,PowerMet,LatOutputProvided,CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN May 2000
! MODIFIED Don Shirey, Aug 2009 (LatOutputProvided)
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This is the main driver subroutine for the Unit Heater simulation.
! METHODOLOGY EMPLOYED:
! Standard EnergyPlus methodology.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE DataSizing, ONLY: ZoneHeatingOnlyFan
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompName ! name of the fan coil unit
INTEGER, INTENT(IN) :: ZoneNum ! number of zone being served
LOGICAL, INTENT(IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system timestep
REAL(r64), INTENT(OUT) :: PowerMet ! Sensible power supplied (W)
REAL(r64), INTENT (OUT) :: LatOutputProvided ! Latent add/removal supplied by window AC (kg/s), dehumid = negative
INTEGER, INTENT(INOUT) :: CompIndex
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: UnitHeatNum ! index of unit heater being simulated
LOGICAL,SAVE :: GetInputFlag = .true. ! First time, input is "gotten"
! FLOW:
IF (GetInputFlag) THEN
CALL GetUnitHeaterInput
GetInputFlag=.false.
ENDIF
! Find the correct Unit Heater Equipment
IF (CompIndex == 0) THEN
UnitHeatNum = FindItemInList(CompName,UnitHeat%Name,NumOfUnitHeats)
IF (UnitHeatNum == 0) THEN
CALL ShowFatalError('SimUnitHeater: Unit not found='//TRIM(CompName))
ENDIF
CompIndex=UnitHeatNum
ELSE
UnitHeatNum=CompIndex
IF (UnitHeatNum > NumOfUnitHeats .or. UnitHeatNum < 1) THEN
CALL ShowFatalError('SimUnitHeater: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(UnitHeatNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumOfUnitHeats))// &
', Entered Unit name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(UnitHeatNum)) THEN
IF (CompName /= UnitHeat(UnitHeatNum)%Name) THEN
CALL ShowFatalError('SimUnitHeater: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(UnitHeatNum))// &
', Unit name='//TRIM(CompName)//', stored Unit Name for that index='// &
TRIM(UnitHeat(UnitHeatNum)%Name))
ENDIF
CheckEquipName(UnitHeatNum)=.false.
ENDIF
ENDIF
CALL InitUnitHeater(UnitHeatNum, ZoneNum)
ZoneHeatingOnlyFan = .TRUE.
CALL CalcUnitHeater(UnitHeatNum,ZoneNum,FirstHVACIteration,PowerMet,LatOutputProvided)
ZoneHeatingOnlyFan = .FALSE.
! CALL UpdateUnitHeater
CALL ReportUnitHeater(UnitHeatNum)
RETURN
END SUBROUTINE SimUnitHeater