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) | :: | CompType | |||
character(len=*), | intent(in) | :: | CompName | |||
integer, | intent(in) | :: | NodeNumIn | |||
integer, | intent(in) | :: | NodeNumOut | |||
logical, | intent(inout) | :: | ErrorsFound | |||
logical, | intent(in), | optional | :: | SupressErrors |
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.
FUNCTION MyPlantSizingIndex(CompType,CompName,NodeNumIn,NodeNumOut,ErrorsFound,SupressErrors) RESULT(MyPltSizNum)
! FUNCTION INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN July 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Identify the correct Plant Sizing object for demand-side components such as heating and
! cooling coils.
! METHODOLOGY EMPLOYED:
! This function searches all plant loops for a component whose input and
! output nodes match the desired input & output nodes. This plant loop index is then used
! to search the Plant Sizing array for the matching Plant Sizing object.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE DataSizing, ONLY: NumPltSizInput, PlantSizData
USE DataInterfaces, ONLY: ShowWarningError, ShowSevereError, ShowContinueError
! USE DataPlant, ONLY: PlantLoop, ScanPlantLoopsForNodeNum
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: CompType ! component description
CHARACTER(len=*), INTENT(IN) :: CompName ! user name of component
INTEGER, INTENT(IN) :: NodeNumIn ! component water inlet node
INTEGER, INTENT(IN) :: NodeNumOut ! component water outlet node
LOGICAL, INTENT(INOUT) :: ErrorsFound ! set to true if there's an error
LOGICAL, OPTIONAL, INTENT(IN):: SupressErrors ! used for WSHP's where condenser loop may not be on a plant loop
INTEGER :: MyPltSizNum ! returned plant sizing index
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: MyPltLoopNum
INTEGER :: PlantLoopNum
INTEGER :: DummyLoopSideNum
INTEGER :: DummyBranchNum
LOGICAL :: PrintErrorFlag
MyPltLoopNum = 0
MyPltSizNum = 0
ErrorsFound = .false.
IF(PRESENT(SupressErrors))THEN
PrintErrorFlag = SupressErrors
ELSE
PrintErrorFlag = .TRUE.
END IF
CALL ScanPlantLoopsForNodeNum('MyPlantSizingIndex', NodeNumIn, PlantLoopNum, DummyLoopSideNum, DummyBranchNum )
IF (PlantLoopNum > 0) THEN
MyPltLoopNum = PlantLoopNum
ELSE
MyPltLoopNum = 0
END IF
IF (MyPltLoopNum > 0) THEN
IF (NumPltSizInput > 0) THEN
MyPltSizNum = FindItemInList(PlantLoop(MyPltLoopNum)%Name,PlantSizData%PlantLoopName,NumPltSizInput)
ENDIF
IF (MyPltSizNum == 0) THEN
IF (PrintErrorFlag) THEN
Call ShowSevereError('MyPlantSizingIndex: Could not find ' //TRIM(PlantLoop(MyPltLoopNum)%Name) &
//' in Sizing:Plant objects.')
Call ShowContinueError('...reference Component Type="'//trim(CompType)//'", Name="'//trim(CompName)//'".')
ENDIF
ErrorsFound=.true.
ENDIF
ELSE
IF(PrintErrorFlag)THEN
Call ShowWarningError('MyPlantSizingIndex: Could not find ' //TRIM(CompType)// &
' with name '//TRIM(CompName)//' on any plant loop')
END IF
ErrorsFound=.true.
END IF
RETURN
END FUNCTION MyPlantSizingIndex