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) | :: | LoopNum | |||
integer, | intent(in) | :: | LoopSideNum | |||
character(len=*), | intent(in) | :: | EquipType | |||
character(len=*), | intent(in) | :: | EquipName | |||
integer, | intent(inout) | :: | CompIndex | |||
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 |
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 SimFluidHeatExchanger(LoopNum, LoopSideNum, EquipType,EquipName, &
CompIndex,InitLoopEquip,MyLoad,MaxCap,MinCap,OptCap)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN November 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Main entry point and simulation manager for heat exchanger
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: LoopNum ! plant loop sim call originated from
INTEGER, INTENT(IN) :: LoopSideNum ! plant loop side sim call originated from
CHARACTER(len=*), INTENT(IN) :: EquipType ! type of equipment, 'PlantComponent:UserDefined'
CHARACTER(len=*), INTENT(IN) :: EquipName ! user name for component
INTEGER, INTENT(INOUT) :: CompIndex
LOGICAL, INTENT(INOUT) :: InitLoopEquip
REAL(r64), INTENT(IN) :: MyLoad
REAL(r64), INTENT(OUT) :: MinCap
REAL(r64), INTENT(OUT) :: MaxCap
REAL(r64), INTENT(OUT) :: OptCap
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: CompNum
IF (GetInput) THEN
CALL GetFluidHeatExchangerInput
GetInput=.FALSE.
END IF
! Find the correct Equipment
IF (CompIndex == 0) THEN
CompNum = FindItemInList(EquipName, FluidHX%Name, NumberOfPlantFluidHXs)
IF (CompNum == 0) THEN
CALL ShowFatalError('SimFluidHeatExchanger: HeatExchanger:FluidToFluid not found')
ENDIF
CompIndex = CompNum
ELSE
CompNum = CompIndex
IF (CompNum < 1 .OR. CompNum > NumberOfPlantFluidHXs) THEN
CALL ShowFatalError('SimFluidHeatExchanger: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(CompNum))// &
', Number of heat exchangers ='//TRIM(TrimSigDigits(NumberOfPlantFluidHXs))// &
', Entered heat exchanger name = '//TRIM(EquipName) )
ENDIF
IF(CheckFluidHXs(CompNum)) THEN
IF (EquipName /= FluidHX(CompNum)%Name) THEN
CALL ShowFatalError('SimFluidHeatExchanger: Invalid CompIndex passed='// &
TRIM(TrimSigDigits(CompNum))// &
', heat exchanger name='//TRIM(EquipName)//', stored name for that index='// &
TRIM(FluidHX(CompNum)%Name) )
ENDIF
CheckFluidHXs(CompNum) = .FALSE.
ENDIF
ENDIF
IF (InitLoopEquip) THEN
CALL InitFluidHeatExchanger(CompNum, LoopNum)
CALL SizeFluidHeatExchanger(CompNum)
IF (LoopNum == FluidHX(CompNum)%DemandSideLoop%LoopNum) THEN
MinCap = 0.d0
MaxCap = FluidHX(CompNum)%DemandSideLoop%MaxLoad
OptCap = FluidHX(CompNum)%DemandSideLoop%MaxLoad * 0.9d0
ELSEIF(LoopNum == FluidHX(CompNum)%SupplySideLoop%LoopNum) THEN
MinCap = 0.d0
MaxCap = FluidHX(CompNum)%SupplySideLoop%MaxLoad
OptCap = FluidHX(CompNum)%SupplySideLoop%MaxLoad * 0.9d0
ENDIF
ENDIF
CALL InitFluidHeatExchanger(CompNum, LoopNum)
! for op scheme led HXs, only call controls if called from Loop Supply Side
IF ((FluidHX(CompNum)%ControlMode == OperationSchemeModulated) .OR. &
(FluidHX(CompNum)%ControlMode == OperationSchemeOnOff ) ) THEN
IF (LoopNum == FluidHX(CompNum)%SupplySideLoop%LoopNum) THEN
CALL ControlFluidHeatExchanger(CompNum, LoopNum, MyLoad)
ENDIF
ELSE
CALL ControlFluidHeatExchanger(CompNum, LoopNum, MyLoad)
ENDIF
CALL CalcFluidHeatExchanger(CompNum, &
Node(FluidHX(CompNum)%SupplySideLoop%InletNodeNum)%MassFlowRate, &
Node(FluidHX(CompNum)%DemandSideLoop%InletNodeNum)%MassFlowRate)
CALL UpdateFluidHeatExchanger(CompNum)
CALL ReportFluidHeatExchanger(CompNum)
RETURN
END SUBROUTINE SimFluidHeatExchanger