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) | :: | EvapFluidCoolerType | |||
character(len=*), | intent(in) | :: | EvapFluidCoolerName | |||
integer, | intent(inout) | :: | CompIndex | |||
logical, | intent(inout) | :: | RunFlag | |||
logical, | intent(in) | :: | InitLoopEquip | |||
real(kind=r64), | intent(inout) | :: | MaxCap | |||
real(kind=r64), | intent(inout) | :: | MinCap | |||
real(kind=r64), | intent(inout) | :: | OptCap | |||
logical, | intent(in) | :: | GetSizingFactor | |||
real(kind=r64), | intent(inout) | :: | SizingFactor |
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 SimEvapFluidCoolers(EvapFluidCoolerType,EvapFluidCoolerName, CompIndex, &
RunFlag,InitLoopEquip, MaxCap,MinCap,OptCap,GetSizingFactor,SizingFactor)
! SUBROUTINE INFORMATION:
! AUTHOR Chandan Sharma
! DATE WRITTEN May 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Main evaporative fluid cooler driver subroutine. Gets called from
! PlantCondLoopSupplySideManager.
! METHODOLOGY EMPLOYED:
! After being called by PlantCondLoopSupplySideManager, this subroutine
! calls GetEvapFluidCoolerInput to get all evaporative fluid cooler input info (one time only),
! then calls the appropriate subroutine to calculate evaporative fluid cooler performance,
! update records (node info) and writes output report info.
! REFERENCES:
! Based on SimTowers subroutine by Fred Buhl, May 2002
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*),INTENT(IN) :: EvapFluidCoolerType
CHARACTER(len=*),INTENT(IN) :: EvapFluidCoolerName
INTEGER,INTENT(INOUT) :: CompIndex
LOGICAL,INTENT(INOUT) :: RunFlag
LOGICAL, INTENT(IN) :: InitLoopEquip
REAL(r64),INTENT(INOUT) :: OptCap
REAL(r64),INTENT(INOUT) :: MaxCap
REAL(r64),INTENT(INOUT) :: MinCap
LOGICAL, INTENT(IN) :: GetSizingFactor ! TRUE when just the sizing factor is requested
REAL(r64),INTENT(INOUT) :: SizingFactor ! sizing factor
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: GetInput = .TRUE.
INTEGER :: EvapFluidCoolerNum !Pointer to EvapFluidCooler
!GET INPUT
IF (GetInput) THEN
CALL GetEvapFluidCoolerInput
GetInput = .FALSE.
END IF
! Find the correct EvapCooler
IF (CompIndex == 0) THEN
EvapFluidCoolerNum = FindItemInList(EvapFluidCoolerName,SimpleEvapFluidCooler%Name,NumSimpleEvapFluidCoolers)
IF (EvapFluidCoolerNum == 0) THEN
CALL ShowFatalError('SimEvapFluidCoolers: Unit not found = '//TRIM(EvapFluidCoolerName))
ENDIF
CompIndex=EvapFluidCoolerNum
ELSE
EvapFluidCoolerNum=CompIndex
IF (EvapFluidCoolerNum > NumSimpleEvapFluidCoolers .or. EvapFluidCoolerNum < 1) THEN
CALL ShowFatalError('SimEvapFluidCoolers: Invalid CompIndex passed = '// &
TRIM(TrimSigDigits(EvapFluidCoolerNum))// &
', Number of Units = '//TRIM(TrimSigDigits(NumSimpleEvapFluidCoolers))// &
', Entered Unit name = '//TRIM(EvapFluidCoolerName))
ENDIF
IF (CheckEquipName(EvapFluidCoolerNum)) THEN
IF (EvapFluidCoolerName /= SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name) THEN
CALL ShowFatalError('SimEvapFluidCoolers: Invalid CompIndex passed = '// &
TRIM(TrimSigDigits(EvapFluidCoolerNum))// &
', Unit name = '//TRIM(EvapFluidCoolerName)//', stored Unit Name for that index = '// &
TRIM(SimpleEvapFluidCooler(EvapFluidCoolerNum)%Name))
ENDIF
CheckEquipName(EvapFluidCoolerNum)=.false.
ENDIF
ENDIF
!INITIALIZE
CALL InitSimVars
!CALCULATE
TypeOfEquip: &
SELECT CASE (SimpleEvapFluidCooler(EvapFluidCoolerNum)%EvapFluidCoolerType_Num)
CASE (EvapFluidCooler_SingleSpeed)
IF (InitLoopEquip) THEN
CALL InitEvapFluidCooler(EvapFluidCoolerNum, RunFlag)
CALL SizeEvapFluidCooler(EvapFluidCoolerNum)
MinCap = 0.0d0 ! signifies non-load based model (i.e. forward
MaxCap = SimpleEvapFluidCooler(EvapFluidCoolerNum)%HighSpeedStandardDesignCapacity &
* SimpleEvapFluidCooler(EvapFluidCoolerNum)%HeatRejectCapNomCapSizingRatio
OptCap = SimpleEvapFluidCooler(EvapFluidCoolerNum)%HighSpeedStandardDesignCapacity
IF (GetSizingFactor) THEN
SizingFactor = SimpleEvapFluidCooler(EvapFluidCoolerNum)%SizFac
END IF
RETURN
END IF
CALL InitEvapFluidCooler(EvapFluidCoolerNum, RunFlag)
CALL CalcSingleSpeedEvapFluidCooler(EvapFluidCoolerNum)
CALL CalculateWaterUseage(EvapFluidCoolerNum)
CALL UpdateEvapFluidCooler(EvapFluidCoolerNum)
CALL ReportEvapFluidCooler(RunFlag,EvapFluidCoolerNum)
CASE (EvapFluidCooler_TwoSpeed)
IF (GetSizingFactor) THEN
SizingFactor = SimpleEvapFluidCooler(EvapFluidCoolerNum)%SizFac
RETURN
END IF
IF (InitLoopEquip) THEN
CALL InitEvapFluidCooler(EvapFluidCoolerNum, RunFlag)
CALL SizeEvapFluidCooler(EvapFluidCoolerNum)
MinCap = 0.0d0 ! signifies non-load based model (i.e. forward
MaxCap = 0.0d0 ! heat exhanger model)
OptCap = 0.0d0
RETURN
END IF
CALL InitEvapFluidCooler(EvapFluidCoolerNum, RunFlag)
CALL CalcTwoSpeedEvapFluidCooler(EvapFluidCoolerNum)
CALL CalculateWaterUseage(EvapFluidCoolerNum)
CALL UpdateEvapFluidCooler(EvapFluidCoolerNum)
CALL ReportEvapFluidCooler(RunFlag,EvapFluidCoolerNum)
CASE DEFAULT
CALL ShowFatalError('SimEvapFluidCoolers: Invalid evaporative fluid cooler Type Requested = '&
//TRIM(EvapFluidCoolerType))
END SELECT TypeOfEquip
RETURN
END SUBROUTINE SimEvapFluidCoolers