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) | :: | GshpType | |||
character(len=*), | intent(in) | :: | GshpName | |||
integer, | intent(inout) | :: | CompIndex | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
logical, | intent(inout) | :: | InitLoopEquip | |||
real(kind=r64), | intent(inout) | :: | MyLoad | |||
real(kind=r64) | :: | MaxCap | ||||
real(kind=r64) | :: | MinCap | ||||
real(kind=r64) | :: | OptCap | ||||
integer, | intent(in) | :: | LoopNum |
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 SimHPWatertoWaterHEATING(GSHPType, GSHPName, CompIndex,FirstHVACIteration, &
InitLoopEquip, MyLoad, MaxCap, MinCap, OptCap, LoopNum)
! SUBROUTINE INFORMATION:
! AUTHOR Arun
! DATE WRITTEN Feb 2000
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE: This is the water to water Heat Pump driver.
! It gets the input for the models, initializes simulation variables, calls
! the appropriate model and sets up reporting variables.
! METHODOLOGY EMPLOYED:
! REFERENCES:
! USE STATEMENTS:
USE PlantUtilities, ONLY: UpdateChillerComponentCondenserSide
USE DataPlant, ONLY: TypeOf_HPWaterEFHeating
USE InputProcessor, ONLY: FindItemInList
USE DataEnvironment
USE General, ONLY: TrimSigDigits
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: GshpType ! type ofGSHP
CHARACTER(len=*), INTENT(IN) :: GshpName ! user specified name ofGSHP
LOGICAL, INTENT(IN) :: FirstHVACIteration
INTEGER, INTENT(IN) :: LoopNum
INTEGER, INTENT(INOUT) :: CompIndex
LOGICAL, INTENT(INOUT) :: InitLoopEquip ! If not zero, calculate the max load for operating conditions
REAL(r64), INTENT(INOUT) :: MyLoad ! loop demand component will meet
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: GetInput = .TRUE. ! then TRUE, calls subroutine to read input file.
REAL(r64) :: MinCap ! W - minimum operating capacity of GSHP
REAL(r64) :: MaxCap ! W - maximum operating capacity of GSHP
REAL(r64) :: OptCap ! W - optimal operating capacity of GSHP
INTEGER :: GSHPNum
!Get input from IDF
IF (GetInput) THEN
CALL GetGshpInput
GetInput = .FALSE.
END IF
! Find the correct Equipment
IF (CompIndex == 0) THEN
GSHPNum = FindItemInList( GSHPName, GSHP%Name, NumGSHPs )
IF (GSHPNum == 0) THEN
CALL ShowFatalError('SimHPWatertoWaterHEATING: Unit not found='//TRIM(GSHPName))
ENDIF
CompIndex=GSHPNum
ELSE
GSHPNum=CompIndex
IF (GSHPNum > NumGSHPs .or. GSHPNum < 1) THEN
CALL ShowFatalError('SimHPWatertoWaterHEATING: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(GSHPNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumGSHPs))// &
', Entered Unit name='//TRIM(GSHPName))
ENDIF
IF (CheckEquipName(GSHPNum)) THEN
IF (GSHPName /= GSHP(GSHPNum)%Name) THEN
CALL ShowFatalError('SimHPWatertoWaterHEATING: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(GSHPNum))// &
', Unit name='//TRIM(GSHPName)//', stored Unit Name for that index='// &
TRIM(GSHP(GSHPNum)%Name))
ENDIF
CheckEquipName(GSHPNum)=.false.
ENDIF
ENDIF
! Calculate Demand on heat pump
IF (InitLoopEquip) THEN
MinCap = GSHP(GSHPNum)%NomCap*GSHP(GSHPNum)%MinPartLoadRat
MaxCap = GSHP(GSHPNum)%NomCap*GSHP(GSHPNum)%MaxPartLoadRat
OptCap = GSHP(GSHPNum)%NomCap*GSHP(GSHPNum)%OptPartLoadRat
Return
END IF
! Simulate the model for the Demand "MyLoad"
IF (LoopNum == GSHP(GSHPNum)%LoadLoopNum) THEN ! chilled water loop
CALL InitGshp(GSHPNum)
CALL CalcGshpModel( GSHPType, GSHPName, GSHPNum, MyLoad,FirstHVACIteration)
CALL UpdateGshpRecords(GSHPNum)
ELSEIF (LoopNum == GSHP(GSHPNum)%SourceLoopNum) THEN ! condenser loop
CALL UpdateChillerComponentCondenserSide(GSHP(GSHPNum)%SourceLoopNum, &
GSHP(GSHPNum)%SourceLoopSideNum, &
TypeOf_HPWaterEFHeating, &
GSHP(GSHPNum)%SourceSideInletNodeNum, &
GSHP(GSHPNum)%SourceSideOutletNodeNum, &
- GSHPReport(GSHPNum)%QSource, &
GSHPReport(GSHPNum)%SourceSideWaterInletTemp, &
GSHPReport(GSHPNum)%SourceSideWaterOutletTemp, &
GSHPReport(GSHPNum)%SourceSidemdot, &
FirstHVACIteration)
ELSE
CALL ShowFatalError ('SimHPWatertoWaterHEATING:: Invalid loop connection '//ModuleCompName//', Requested Unit='//TRIM(GSHPName))
ENDIF
RETURN
END SUBROUTINE SimHPWatertoWaterHEATING