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 | |||
integer, | intent(in) | :: | GSHPTypeNum | |||
character(len=*), | intent(in) | :: | GSHPName | |||
integer, | intent(inout) | :: | GSHPNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
logical, | intent(inout) | :: | InitLoopEquip | |||
real(kind=r64), | intent(in) | :: | MyLoad | |||
real(kind=r64), | intent(out) | :: | MaxCap | |||
real(kind=r64), | intent(out) | :: | MinCap | |||
real(kind=r64), | intent(out) | :: | 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 SimHPWatertoWaterSimple(GSHPType, GSHPTypeNum, GSHPName, GSHPNum, FirstHVACIteration, &
InitLoopEquip, MyLoad, MaxCap, MinCap, OptCap, LoopNum)
! SUBROUTINE INFORMATION:
! AUTHOR Kenneth Tang
! DATE WRITTEN March 2005
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages Water-to-Water Heat Pump Simple (Equation-Fit Model)
! METHODOLOGY EMPLOYED:
! REFERENCES:
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE PlantUtilities, ONLY:UpdateChillerComponentCondenserSide
USE DataEnvironment
USE General, ONLY: TrimSigDigits
USE DataPlant, ONLY: TypeOf_HPWaterEFCooling, TypeOf_HPWaterEFHeating
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: GSHPType ! Type of GSHP
INTEGER , INTENT(IN) :: GSHPTypeNum ! Type of GSHP in Plant equipment
INTEGER , INTENT(IN) :: LoopNum ! The calling loop number
CHARACTER(len=*), INTENT(IN) :: GSHPName ! User Specified Name of GSHP
INTEGER, INTENT(INOUT) :: GSHPNum ! Index of Equipment
LOGICAL, INTENT(IN) :: FirstHVACIteration
LOGICAL, INTENT(INOUT) :: InitLoopEquip ! If not zero, calculate the max load for operating conditions
REAL(r64), INTENT(IN) :: MyLoad ! Loop demand component will meet
REAL(r64), INTENT(OUT) :: MinCap ! Minimum operating capacity of GSHP [W]
REAL(r64), INTENT(OUT) :: MaxCap ! Maximum operating capacity of GSHP [W]
REAL(r64), INTENT(OUT) :: OptCap ! Optimal operating capacity of GSHP [W]
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: GetInputFlag = .TRUE. ! then TRUE, calls subroutine to read input file.
!Get input from IDF
IF (GetInputFlag) THEN
CALL GetWatertoWaterHPInput
GetInputFlag = .FALSE.
END IF
IF (InitLoopEquip) THEN
GSHPNum = FindItemInList( GSHPName, GSHP%Name, NumGSHPs )
IF (GSHPNum /= 0) THEN ! if 0, fall through to next
SELECT CASE (GSHPTypeNum)
CASE (TypeOf_HPWaterEFCooling)
MinCap = 0.0d0
MaxCap = GSHP(GSHPNum)%RatedCapCool
OptCap = GSHP(GSHPNum)%RatedCapCool
CASE (TypeOf_HPWaterEFHeating)
MinCap = 0.0d0
MaxCap = GSHP(GSHPNum)%RatedCapHeat
OptCap = GSHP(GSHPNum)%RatedCapHeat
CASE DEFAULT
CALL ShowFatalError('SimHPWatertoWaterSimple: Module called with incorrect GSHPType='//TRIM(GSHPTYpe))
END SELECT
Return
ENDIF
END IF
! Calculate Demand on heat pump
TypeOfEquip: SELECT CASE (GSHPTypeNum)
CASE (TypeOf_HPWaterEFCooling)
IF (GSHPNum /= 0) THEN
IF (LoopNum == GSHP(GSHPNum)%LoadLoopNum) THEN ! chilled water loop
CALL InitWatertoWaterHP(GSHPTypeNum, GSHPName, GSHPNum, FirstHVACIteration, MyLoad)
CALL CalcWatertoWaterHPCooling(GSHPNum, MyLoad)
CALL UpdateGshpRecords(GSHPNum)
ELSEIF (LoopNum == GSHP(GSHPNum)%SourceLoopNum) THEN ! condenser loop
CALL UpdateChillerComponentCondenserSide(GSHP(GSHPNum)%SourceLoopNum, &
GSHP(GSHPNum)%SourceLoopSideNum, &
TypeOf_HPWaterEFCooling, &
GSHP(GSHPNum)%SourceSideInletNodeNum, &
GSHP(GSHPNum)%SourceSideOutletNodeNum, &
GSHPReport(GSHPNum)%QSource, &
GSHPReport(GSHPNum)%SourceSideInletTemp, &
GSHPReport(GSHPNum)%SourceSideOutletTemp, &
GSHPReport(GSHPNum)%SourceSideMassFlowRate, &
FirstHVACIteration)
ELSE
CALL ShowFatalError ('SimHPWatertoWaterSimple:: Invalid loop connection '// &
HPEqFitCooling//', Requested Unit='//TRIM(GSHPName))
ENDIF
ELSE
CALL ShowFatalError ('SimHPWatertoWaterSimple:: Invalid '//HPEqFitCooling// &
', Requested Unit='//TRIM(GSHPName))
ENDIF
CASE (TypeOf_HPWaterEFHeating)
IF (GSHPNum /= 0) THEN
IF (LoopNum == GSHP(GSHPNum)%LoadLoopNum) THEN ! chilled water loop
CALL InitWatertoWaterHP(GSHPTypeNum, GSHPName, GSHPNum, FirstHVACIteration, MyLoad)
CALL CalcWatertoWaterHPHeating(GSHPNum, MyLoad)
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)%SourceSideInletTemp, &
GSHPReport(GSHPNum)%SourceSideOutletTemp, &
GSHPReport(GSHPNum)%SourceSideMassFlowRate, &
FirstHVACIteration)
ELSE
CALL ShowFatalError ('SimHPWatertoWaterSimple:: Invalid loop connection '// &
HPEqFitCooling//', Requested Unit='//TRIM(GSHPName))
ENDIF
ELSE
CALL ShowFatalError ('SimHPWatertoWaterSimple:: Invalid '//HPEqFitHeating// &
', Requested Unit='//TRIM(GSHPName))
ENDIF
CASE DEFAULT
CALL ShowFatalError('SimHPWatertoWaterSimple: Module called with incorrect GSHPType='//TRIM(GSHPTYpe))
END SELECT TypeOfEquip
RETURN
END SUBROUTINE SimHPWatertoWaterSimple