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(in) | :: | AirLoopNum | |||
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 SimMSHeatPump(CompName, FirstHVACIteration, AirLoopNum, CompIndex)
! SUBROUTINE INFORMATION:
! AUTHOR Lixing Gu, Florida Solar Energy Center
! DATE WRITTEN June. 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Manages the simulation of multispeed heat pump.
! 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 ! Name of the unitary engine driven heat pump system
LOGICAL, INTENT (IN) :: FirstHVACIteration ! TRUE if 1st HVAC simulation of system time step
INTEGER, INTENT (IN) :: AirLoopNum ! air loop index
INTEGER, INTENT (INOUT) :: CompIndex ! Index to changeover-bypass VAV system
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: MSHeatPumpNum ! index of fan coil unit being simulated
LOGICAL, SAVE :: GetInputFlag = .TRUE. ! Get input flag
REAL(r64) :: OnOffAirFlowRatio ! Ratio of compressor ON airflow to average airflow over timestep
REAL(r64) :: QZnLoad ! Zone load required by all zones served by this air loop system
REAL(r64) :: QSensUnitOut ! MSHP sensible capacity output [W]
! FLOW
! First time SimMSHeatPump is called, get the input
IF (GetInputFlag) THEN
CALL GetMSHeatPumpInput
GetInputFlag = .FALSE. ! Set GetInputFlag false so you don't get coil inputs again
END IF
IF (CompIndex == 0) THEN
MSHeatPumpNum = FindItemInList(CompName,MSHeatPump%Name,NumMSheatPumps)
IF (MSHeatPumpNum == 0) THEN
CALL ShowFatalError('MultiSpeed Heat Pump is not found='//TRIM(CompName))
ENDIF
CompIndex=MSHeatPumpNum
ELSE
MSHeatPumpNum=CompIndex
IF (MSHeatPumpNum > NumMSHeatPumps .or. MSHeatPumpNum < 1) THEN
CALL ShowFatalError('SimMSHeatPump: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(MSHeatPumpNum))// &
', Number of MultiSpeed Heat Pumps='//TRIM(TrimSigDigits(NumMSHeatPumps))// &
', Heat Pump name='//TRIM(CompName))
ENDIF
IF (CheckEquipName(MSHeatPumpNum)) THEN
IF (CompName /= MSHeatPump(MSHeatPumpNum)%Name) THEN
CALL ShowFatalError('SimMSHeatPump: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(MSHeatPumpNum))// &
', Heat Pump name='//TRIM(CompName)// &
TRIM(MSHeatPump(MSHeatPumpNum)%Name))
ENDIF
CheckEquipName(MSHeatPumpNum)=.false.
ENDIF
ENDIF
OnOffAirFlowRatio = 0.0d0
! Initialize the engine driven heat pump
CALL InitMSHeatPump(MSHeatPumpNum, FirstHVACIteration, AirLoopNum, QZnLoad, OnOffAirFlowRatio)
CALL SimMSHP(MSHeatPumpNum,FirstHVACIteration, QSensUnitOut, QZnLoad, OnOffAirFlowRatio)
! Update the unit outlet nodes
CALL UpdateMSHeatPump(MSHeatPumpNum)
! Report the result of the simulation
CALL ReportMSHeatPump(MSHeatPumpNum)
RETURN
END SUBROUTINE SimMSHeatPump