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.
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 GetDXHeatPumpSystemInput
! SUBROUTINE INFORMATION:
! AUTHOR Brent Griffith (derived from HVACDXSystem.f90 by R.Liesen)
! DATE WRITTEN May 2011
! Feb 2013, Bo Shen, Oak Ridge National Lab
! Add Coil:Heating:DX:VariableSpeed
!
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Obtains input data for system and stores it in System data structures
! METHODOLOGY EMPLOYED:
! Uses "Get" routines to read in data.
! REFERENCES:
! USE STATEMENTS:
USE InputProcessor
USE NodeInputManager, ONLY: GetOnlySingleNode
USE DataHeatBalance, ONLY: Zone
USE BranchNodeConnections, ONLY: SetUpCompSets, TestCompSet
USE HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName
USE DataIPShortCuts
USE DXCoils, ONLY: GetCoilInletNode, GetCoilOutletNode, SetCoilSystemHeatingDXFlag
USE VariableSpeedCoils, ONLY: GetCoilInletNodeVariableSpeed, GetCoilOutletNodeVariableSpeed
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: DXSystemNum ! The DXHeatingSystem that you are currently loading input into
INTEGER :: NumAlphas
INTEGER :: NumNums
INTEGER :: IOSTAT
CHARACTER(len=*), PARAMETER :: RoutineName='GetDXHeatPumpSystemInput: ' ! include trailing blank space
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
Integer :: DXHeatSysNum
LOGICAL :: FanErrorsFound ! flag returned on fan operating mode check
LOGICAL :: DXErrorsFound ! flag returned on DX coil name check
CHARACTER(len=MaxNameLength) :: CurrentModuleObject ! for ease in getting objects
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: Alphas ! Alpha input items for object
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
REAL(r64), ALLOCATABLE, DIMENSION(:) :: Numbers ! Numeric input items for object
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
INTEGER :: TotalArgs=0 ! Total number of alpha and numeric arguments (max) for a
! certain object in the input file
! Flow
CurrentModuleObject='CoilSystem:Heating:DX'
NumDXHeatPumpSystems = GetNumObjectsFound(CurrentModuleObject)
ALLOCATE(DXHeatPumpSystem(NumDXHeatPumpSystems))
ALLOCATE(CheckEquipName(NumDXHeatPumpSystems))
CheckEquipName=.true.
CALL GetObjectDefMaxArgs('CoilSystem:Heating:DX',TotalArgs,NumAlphas,NumNums)
ALLOCATE(Alphas(NumAlphas))
Alphas=' '
ALLOCATE(cAlphaFields(NumAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(NumNums))
cNumericFields=' '
ALLOCATE(Numbers(NumNums))
Numbers=0.0d0
ALLOCATE(lAlphaBlanks(NumAlphas))
lAlphaBlanks=.TRUE.
ALLOCATE(lNumericBlanks(NumNums))
lNumericBlanks=.TRUE.
! Get the data for the DX Cooling System
DO DXHeatSysNum = 1, NumDXHeatPumpSystems
CALL GetObjectItem(CurrentModuleObject,DXHeatSysNum,Alphas,NumAlphas, &
Numbers,NumNums,IOSTAT,NumBlank=lNumericBlanks,AlphaBlank=lAlphaBlanks, &
AlphaFieldNames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(Alphas(1),DXHeatPumpSystem%Name,DXHeatSysNum-1,IsNotOK,IsBlank,TRIM(CurrentModuleObject)//' Name')
IF (IsNotOK) THEN
ErrorsFound=.true.
IF (IsBlank) Alphas(1) ='xxxxx'
ENDIF
DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpSystemType = CurrentModuleObject ! push Object Name into data array
DXHeatPumpSystem(DXHeatSysNum)%Name = Alphas(1)
IF (lAlphaBlanks(2)) THEN
DXHeatPumpSystem(DXHeatSysNum)%SchedPtr = ScheduleAlwaysOn
ELSE
DXHeatPumpSystem(DXHeatSysNum)%SchedPtr = GetScheduleIndex(Alphas(2))
IF (DXHeatPumpSystem(DXHeatSysNum)%SchedPtr == 0) THEN
CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//': invalid '//TRIM(cAlphaFields(2))// &
' entered ='//TRIM(Alphas(2))// &
' for '//TRIM(cAlphaFields(1))//'='//TRIM(Alphas(1)))
ErrorsFound=.true.
END IF
END IF
IF (SameString(Alphas(3),'Coil:Heating:DX:SingleSpeed')) THEN
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType = Alphas(3)
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType_Num=CoilDX_HeatingEmpirical
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName = Alphas(4)
ELSE IF (SameString(Alphas(3),'Coil:Heating:DX:VariableSpeed')) THEN
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType = Alphas(3)
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType_Num=Coil_HeatingAirToAirVariableSpeed
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName = Alphas(4)
ELSE
CALL ShowSevereError('Invalid entry for '//TRIM(cAlphaFields(3))//' :'//TRIM(Alphas(3)))
CALL ShowContinueError('In '//TRIM(CurrentModuleObject)//'="'//TRIM(DXHeatPumpSystem(DXHeatSysNum)%Name)//'".')
ErrorsFound=.true.
END IF
IF(DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType_Num == Coil_HeatingAirToAirVariableSpeed) THEN
DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilInletNodeNum = GetCoilInletNodeVariableSpeed(&
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType, &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName, &
ErrorsFound )
DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilOutletNodeNum = GetCoilOutletNodeVariableSpeed(&
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType, &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName, &
ErrorsFound )
ELSE
DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilInletNodeNum = GetCoilInletNode( &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType, &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName, &
ErrorsFound )
DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilOutletNodeNum = GetCoilOutletNode( &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType, &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName, &
ErrorsFound )
END IF
DXHeatPumpSystem(DXHeatSysNum)%DXSystemControlNodeNum = DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilOutletNodeNum
CALL TestCompSet(TRIM(CurrentModuleObject),DXHeatPumpSystem(DXHeatSysNum)%Name, &
NodeID(DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilInletNodeNum), &
NodeID(DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilOutletNodeNum) ,&
'Air Nodes')
CALL ValidateComponent(DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType,DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName, &
IsNotOK,TRIM(CurrentModuleObject))
IF (IsNotOK) THEN
CALL ShowContinueError('In '//TRIM(CurrentModuleObject)//' = "'//TRIM(DXHeatPumpSystem(DXHeatSysNum)%Name)//'".')
ErrorsFound=.true.
ENDIF
CALL SetUpCompSets(DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpSystemType, &
DXHeatPumpSystem(DXHeatSysNum)%Name, &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType, &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName, &
NodeID(DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilInletNodeNum), &
NodeID(DXHeatPumpSystem(DXHeatSysNum)%DXHeatPumpCoilOutletNodeNum) )
! Supply air fan operating mode defaulted to constant fan cycling coil/compressor
DXHeatPumpSystem(DXHeatSysNum)%FanOpMode = ContFanCycCoil
IF(DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType_Num /= Coil_HeatingAirToAirVariableSpeed) THEN
CALL SetCoilSystemHeatingDXFlag(DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilType, &
DXHeatPumpSystem(DXHeatSysNum)%HeatPumpCoilName)
END IF
END DO !End of the DX System Loop
IF (ErrorsFound) THEN
CALL ShowFatalError(RoutineName//'Errors found in input. Program terminates.')
ENDIF
DO DXHeatSysNum=1,NumDXHeatPumpSystems
! Setup Report variables for the DXHeatingSystem that is not reported in the components themselves
CALL SetupOutputVariable('Coil System Part Load Ratio []',DXHeatPumpSystem(DXHeatSysNum)%PartLoadFrac, &
'System','Average',DXHeatPumpSystem(DXHeatSysNum)%Name)
END DO
DEALLOCATE(Alphas)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(Numbers)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
RETURN
END SUBROUTINE GetDXHeatPumpSystemInput