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 GetPondGroundHeatExchanger
! SUBROUTINE INFORMATION:
! AUTHOR Simon Rees
! DATE WRITTEN August 2002
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine reads the input for hydronic Pond Ground Heat Exchangers
! from the user input file. This will contain all of the information
! needed to define and simulate the pond.
! METHODOLOGY EMPLOYED:
! Standard EnergyPlus methodology.
! REFERENCES:
! na
! USE STATEMENTS:
USE DataGlobals, ONLY : MaxNameLength
USE InputProcessor, ONLY : GetNumObjectsFound, GetObjectItem, FindItemInList
USE DataIPShortCuts ! Data for field names, blank numerics
USE NodeInputManager, ONLY : GetOnlySingleNode
USE BranchNodeConnections, ONLY : TestCompSet
USE FluidProperties, ONLY : CheckFluidPropertyName, FindGlycol
USE DataEnvironment, ONLY : GroundTemp_Deep,GroundTemp_DeepObjInput
USE General, ONLY : RoundSigDigits
USE DataLoopNode
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: Blank = ' '
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: ErrorsFound=.false. ! Set to true if errors in input,
! fatal at end of routine
INTEGER :: IOStatus ! Used in GetObjectItem
INTEGER :: Item ! Item to be "gotten"
INTEGER :: NumAlphas ! Number of Alphas for each GetObjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetObjectItem call
INTEGER :: NumFluids ! number of fluids in sim.
! Initializations and allocations
cCurrentModuleObject = 'GroundHeatExchanger:Pond'
NumOfPondGHEs = GetNumObjectsFound(cCurrentModuleObject)
! allocate data structures
IF(ALLOCATED(PondGHE)) DEALLOCATE(PondGHE)
IF(ALLOCATED(PondGHEReport)) DEALLOCATE(PondGHEReport)
ALLOCATE(PondGHE(NumOfPondGHEs))
ALLOCATE(PondGHEReport(NumOfPondGHEs))
ALLOCATE(CheckEquipName(NumOfPondGHEs))
CheckEquipName=.true.
! record fluid prop index for water
WaterIndex=FindGlycol('WATER')
! Obtain all of the user data related to the ponds...
DO Item = 1, NumOfPondGHEs
! get the input data
CALL GetObjectItem(cCurrentModuleObject,Item,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStatus, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
! General user input data
PondGHE(Item)%Name = cAlphaArgs(1)
!get inlet node data
PondGHE(Item)%InletNode = cAlphaArgs(2)
PondGHE(Item)%InletNodeNum = GetOnlySingleNode(cAlphaArgs(2),ErrorsFound,TRIM(cCurrentModuleObject),cAlphaArgs(1), &
NodeType_Water,NodeConnectionType_Inlet, 1, ObjectIsNotParent)
IF (PondGHE(Item)%InletNodeNum == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(2))//'='//TRIM(cAlphaArgs(2)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound=.true.
END IF
! get outlet node data
PondGHE(Item)%OutletNode = cAlphaArgs(3)
PondGHE(Item)%OutletNodeNum = GetOnlySingleNode(cAlphaArgs(3),ErrorsFound,TRIM(cCurrentModuleObject),cAlphaArgs(1), &
NodeType_Water,NodeConnectionType_Outlet, 1, ObjectIsNotParent)
IF (PondGHE(Item)%OutletNodeNum == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(3))//'='//TRIM(cAlphaArgs(3)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
ErrorsFound=.true.
END IF
CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1),cAlphaArgs(2),cAlphaArgs(3),'Condenser Water Nodes')
! pond geometry data
PondGHE(Item)%Depth = rNumericArgs(1)
PondGHE(Item)%Area = rNumericArgs(2)
IF (rNumericArgs(1) <= 0.0d0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(1))//'='//TRIM(RoundSigDigits(rNumericArgs(1),2)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
IF (rNumericArgs(2) <= 0.0d0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(2))//'='//TRIM(RoundSigDigits(rNumericArgs(2),2)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
! tube data
PondGHE(Item)%TubeInDiameter = rNumericArgs(3)
PondGHE(Item)%TubeOutDiameter = rNumericArgs(4)
IF (rNumericArgs(3) <= 0.0d0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(3))//'='//TRIM(RoundSigDigits(rNumericArgs(3),2)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
IF (rNumericArgs(4) <= 0.0d0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(4))//'='//TRIM(RoundSigDigits(rNumericArgs(4),2)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
IF (rNumericArgs(3) > rNumericArgs(4)) THEN ! error
CALL ShowSevereError('For '//TRIM(cCurrentModuleObject)//': '//TRIM(cAlphaArgs(1)))
CALL ShowContinueError(TRIM(cNumericFieldNames(3))//' ['//TRIM(RoundSigDigits(rNumericArgs(3),2))//'] > '// &
TRIM(cNumericFieldNames(4))//' ['//TRIM(RoundSigDigits(rNumericArgs(4),2))//']')
ErrorsFound=.true.
ENDIF
! thermal conductivity data
PondGHE(Item)%TubeConductivity = rNumericArgs(5)
PondGHE(Item)%GrndConductivity = rNumericArgs(6)
IF (rNumericArgs(5) <= 0.0d0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(5))//'='//TRIM(RoundSigDigits(rNumericArgs(5),4)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
IF (rNumericArgs(6) <= 0.0d0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(6))//'='//TRIM(RoundSigDigits(rNumericArgs(6),4)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
! circuits
PondGHE(Item)%NumCircuits = rNumericArgs(7)
IF (rNumericArgs(7) <= 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(7))//'='//TRIM(RoundSigDigits(rNumericArgs(7),2)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
PondGHE(Item)%CircuitLength = rNumericArgs(8)
IF (rNumericArgs(8) <= 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cNumericFieldNames(8))//'='//TRIM(RoundSigDigits(rNumericArgs(8),2)))
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//'='//TRIM(cAlphaArgs(1)))
CALL ShowContinueError('Value must be greater than 0.0')
ErrorsFound=.true.
END IF
END DO ! end of input loop
! final error check
IF (ErrorsFound) THEN
CALL ShowFatalError('Errors found in processing input for '//TRIM(cCurrentModuleObject) )
END IF
! Set up the output variables
DO Item = 1, NumOfPondGHEs
CALL SetupOutputVariable('Pond Heat Exchanger Heat Transfer Rate [W]', &
PondGHEReport(Item)%HeatTransferRate,'Plant','Average', &
PondGHE(Item)%Name)
CALL SetupOutputVariable('Pond Heat Exchanger Heat Transfer Energy [J]', &
PondGHEReport(Item)%Energy,'Plant','Sum',PondGHE(Item)%Name)
CALL SetupOutputVariable('Pond Heat Exchanger Mass Flow Rate [kg/s]', &
PondGHEReport(Item)%MassFlowRate,'Plant','Average', &
PondGHE(Item)%Name)
CALL SetupOutputVariable('Pond Heat Exchanger Inlet Temperature [C]', &
PondGHEReport(Item)%InletTemp,'Plant','Average', &
PondGHE(Item)%Name)
CALL SetupOutputVariable('Pond Heat Exchanger Outlet Temperature [C]', &
PondGHEReport(Item)%OutletTemp,'Plant','Average', &
PondGHE(Item)%Name)
CALL SetupOutputVariable('Pond Heat Exchanger Bulk Temperature [C]', &
PondGHEReport(Item)%PondTemp,'Plant','Average', &
PondGHE(Item)%Name)
END DO
IF (NoDeepGroundTempObjWarning) THEN
IF (.not. GroundTemp_DeepObjInput) THEN
CALL ShowWarningError('GetPondGroundHeatExchanger: No "Site:GroundTemperature:Deep" were input.')
CALL ShowContinueError('Defaults, constant throughout the year of ('//TRIM(RoundSigDigits(GroundTemp_Deep,1))// &
') will be used.')
ENDIF
NoDeepGroundTempObjWarning=.false.
ENDIF
RETURN
END SUBROUTINE GetPondGroundHeatExchanger