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 | ||
---|---|---|---|---|---|---|
integer | :: | EquipType | ||||
character(len=*), | intent(in) | :: | EquipName | |||
integer, | intent(inout) | :: | EqNum | |||
logical, | intent(in) | :: | InitLoopEquip | |||
logical, | intent(in) | :: | FirstHVACIteration |
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 SimPipesHeatTransfer(EquipType,EquipName,EqNum,InitLoopEquip,FirstHVACIteration)
! SUBROUTINE INFORMATION:
! AUTHOR Simon Rees
! DATE WRITTEN July 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is the public interface to this component.
! Other calcs are made by calling private routines.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY : FindItemInList
USE General, ONLY: TrimSigDigits
USE DataLoopNode, ONLY : Node
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER :: EquipType
CHARACTER(len=*), INTENT(IN) :: EquipName ! name of the Pipe Heat Transfer.
INTEGER, INTENT(INOUT) :: EqNum ! index in local derived types for external calling
LOGICAL, INTENT(IN) :: FirstHVACIteration ! component number
LOGICAL, INTENT(IN) :: InitLoopEquip
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: InnerTimeStepCtr
! check for input
IF (GetPipeInputFlag) THEN
CALL GetPipesHeatTransfer
GetPipeInputFlag=.FALSE.
ENDIF
IF (EqNum == 0) THEN
PipeHTNum=FindItemInList(EquipName,PipeHT%Name,NumOfPipeHT)
IF (PipeHTNum == 0) THEN
CALL ShowFatalError('SimPipeHeatTransfer: Pipe:heat transfer requested not found=' &
//TRIM(EquipName)) ! Catch any bad names before crashing
ENDIF
EqNum=PipeHTNum
ELSE
PipeHTNum=EqNum
IF (PipeHTNum > NumOfPipeHT .or. PipeHTNum < 1) THEN
CALL ShowFatalError('SimPipeHeatTransfer: Invalid component index passed='// &
TRIM(TrimSigDigits(PipeHTNum))// &
', Number of Units='//TRIM(TrimSigDigits(NumOfPipeHT))// &
', Entered Unit name='//TRIM(EquipName))
ENDIF
IF (PipeHT(PipeHTNum)%CheckEquipName) THEN
IF (EquipName /= PipeHT(PipeHTNum)%Name) THEN
CALL ShowFatalError('SimPipeHeatTransfer: Invalid component name passed='// &
TRIM(TrimSigDigits(PipeHTNum))// &
', Unit name='//TRIM(EquipName)//', stored Unit Name for that index='// &
TRIM(PipeHT(PipeHTNum)%Name))
ENDIF
PipeHT(PipeHTNum)%CheckEquipName=.false.
ENDIF
ENDIF
IF(InitLoopEquip) RETURN
! initialize
CALL InitPipesHeatTransfer(EquipType,PipeHTNum,FirstHVACIteration)
! make the calculations
DO InnerTimeStepCtr = 1, NumInnerTimeSteps
SELECT CASE (PipeHT(PipeHTNum)%EnvironmentPtr)
CASE(GroundEnv)
CALL CalcBuriedPipeSoil(PipeHTNum)
CASE DEFAULT
CALL CalcPipesHeatTransfer(PipeHTNum)
END SELECT
CALL PushInnerTimeStepArrays(PipeHTNum)
END DO
! update vaiables
CALL UpdatePipesHeatTransfer
! update report variables
CALL ReportPipesHeatTransfer(PipeHTNum)
RETURN
END SUBROUTINE SimPipesHeatTransfer