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, | intent(in) | :: | GSHPNum | 
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 InitGshp(GSHPNum)
            ! SUBROUTINE INFORMATION:
            !       AUTHOR:          Dan Fisher
            !       DATE WRITTEN:    July 2007
            ! PURPOSE OF THIS SUBROUTINE:
            ! initialization
            ! METHODOLOGY EMPLOYED: na
            ! REFERENCES: na
            ! USE STATEMENTS:
  USE DataPlant,       ONLY: PlantLoop
  USE FluidProperties, ONLY: GetDensityGlycol
  USE PlantUtilities,  ONLY: InitComponentNodes
  IMPLICIT NONE
          ! SUBROUTINE ARGUMENT DEFINITIONS:
  INTEGER, INTENT(IN)      :: GSHPNum       ! GSHP number
          ! SUBROUTINE PARAMETER DEFINITIONS:
          ! na
          ! DERIVED TYPE DEFINITIONS
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
  LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:)  :: MyEnvrnFlag
  LOGICAL,  ALLOCATABLE, SAVE, DIMENSION(:)  :: MyPlanScanFlag
  LOGICAL, SAVE    :: MyOneTimeFlag = .TRUE.
  REAL(r64)        :: rho  ! local fluid density
  IF (MyOneTimeFlag) THEN
    ALLOCATE(MyPlanScanFlag(NumGSHPs))
    ALLOCATE(MyEnvrnFlag(NumGSHPs))
    MyOneTimeFlag = .false.
    MyEnvrnFlag  = .TRUE.
    MyPlanScanFlag = .TRUE.
  END IF
  !For each new environment
  IF(BeginEnvrnFlag .AND. MyEnvrnFlag(GSHPNum))Then
    GshpReport(GSHPNum)%QLoad = 0.0d0
    GshpReport(GSHPNum)%QSource = 0.0d0
    GshpReport(GSHPNum)%Power = 0.0d0
    GshpReport(GSHPNum)%QLoadEnergy = 0.0d0
    GshpReport(GSHPNum)%QSourceEnergy = 0.0d0
    GshpReport(GSHPNum)%Energy = 0.0d0
    GshpReport(GSHPNum)%LoadSideWaterInletTemp = 0.0d0
    GshpReport(GSHPNum)%SourceSideWaterInletTemp = 0.0d0
    GshpReport(GSHPNum)%LoadSideWaterOutletTemp = 0.0d0
    GshpReport(GSHPNum)%SourceSideWaterOutletTemp = 0.0d0
    GshpReport(GSHPNum)%SourceSidemdot=0.0d0
    GshpReport(GSHPNum)%LoadSidemdot=0.0d0
    GSHP(GSHPNum)%isOn = .FALSE.
    GSHP(GSHPNum)%MustRun = .TRUE.
    MyEnvrnFlag(GSHPNum) = .FALSE.
    rho = GetDensityGlycol(PlantLoop(GSHP(GSHPNum)%LoadLoopNum)%FluidName, &
                         InitconvTemp, &
                         PlantLoop(GSHP(GSHPNum)%LoadLoopNum)%FluidIndex, &
                         'InitGshp')
    GSHP(GSHPNum)%LoadSideDesignMassFlow   = GSHP(GSHPNum)%LoadSideVolFlowRate * rho
    CALL InitComponentNodes( 0.d0, GSHP(GSHPNum)%LoadSideDesignMassFlow, &
                                    GSHP(GSHPNum)%LoadSideInletNodeNum, &
                                    GSHP(GSHPNum)%LoadSideOutletNodeNum, &
                                    GSHP(GSHPNum)%LoadLoopNum, &
                                    GSHP(GSHPNum)%LoadLoopSideNum, &
                                    GSHP(GSHPNum)%LoadBranchNum, &
                                    GSHP(GSHPNum)%LoadCompNum)
    rho = GetDensityGlycol(PlantLoop(GSHP(GSHPNum)%SourceLoopNum)%FluidName, &
                         InitconvTemp, &
                         PlantLoop(GSHP(GSHPNum)%SourceLoopNum)%FluidIndex, &
                         'InitGshp')
    GSHP(GSHPNum)%SourceSideDesignMassFlow = GSHP(GSHPNum)%SourceSideVolFlowRate * rho
    CALL InitComponentNodes( 0.d0,GSHP(GSHPNum)%SourceSideDesignMassFlow, &
                                 GSHP(GSHPNum)%SourceSideInletNodeNum, &
                                 GSHP(GSHPNum)%SourceSideOutletNodeNum, &
                                 GSHP(GSHPNum)%SourceLoopNum, &
                                 GSHP(GSHPNum)%SourceLoopSideNum, &
                                 GSHP(GSHPNum)%SourceBranchNum, &
                                 GSHP(GSHPNum)%SourceCompNum)
    IF (Node(GSHP(GSHPNum)%SourceSideOutletNodeNum)%TempSetPoint == SensedNodeFlagValue) &
                       Node(GSHP(GSHPNum)%SourceSideOutletNodeNum)%TempSetPoint=0.0d0
    Node(GSHP(GSHPNum)%SourceSideInletNodeNum)%Temp = Node(GSHP(GSHPNum)%SourceSideOutletNodeNum)%TempSetPoint+30
  END IF
  IF (.NOT. BeginEnvrnFlag) MyEnvrnFlag(GSHPNum)= .TRUE.
  !On every call
  GSHPReport(GSHPNum)%Running = 0
  GSHP(GSHPNum)%MustRun = .TRUE.        ! Reset MustRun Flag to TRUE
  LoadSideWaterMassFlowRate   = 0.0d0     ! Load Side mass flow rate, water side
  SourceSideWaterMassFlowRate = 0.0d0     ! Source Side mass flow rate, water side
  Power   = 0.0d0                         ! power consumption
  QLoad   = 0.0d0                         ! heat rejection from Load Side coil
  QSource = 0.0d0
RETURN
END SUBROUTINE InitGshp