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) | :: | OAControllerNum |
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 SizeOAController(OAControllerNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing OAController Components for which flow rates have not been
! specified in the input.
! METHODOLOGY EMPLOYED:
! Obtains flow rates from the zone or system sizing arrays.
! REFERENCES:
! na
! USE STATEMENTS:
USE General, ONLY: TrimSigDigits
USE ReportSizingManager, ONLY: ReportSizingOutput
USE InputProcessor, ONLY: SameString
USE HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName, GetHXCoilType
USE WaterCoils, ONLY: SetCoilDesFlow
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: OAControllerNum
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: CurrentModuleObject=CurrentModuleObjects(CMO_OAController)
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: OAFlowRatio ! Used for error checking
CHARACTER(LEN=MaxNameLength) :: CompType ! Component type
CHARACTER(LEN=MaxNameLength) :: CompName ! Component name
CHARACTER(len=MaxNameLength) :: CoilName
CHARACTER(len=MaxNameLength) :: CoilType
INTEGER :: CompNum
LOGICAL :: ErrorsFound
ErrorsFound = .FALSE.
IF (OAController(OAControllerNum)%MaxOA == AutoSize) THEN
IF (CurSysNum > 0) THEN
SELECT CASE(OAController(OAControllerNum)%ControllerType_Num)
CASE(ControllerOutsideAir)
CALL CheckSysSizing(CurrentModuleObject,OAController(OAControllerNum)%Name)
SELECT CASE(CurDuctType)
CASE(Main)
OAController(OAControllerNum)%MaxOA = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE(Cooling)
OAController(OAControllerNum)%MaxOA = FinalSysSizing(CurSysNum)%DesCoolVolFlow
CASE(Heating)
OAController(OAControllerNum)%MaxOA = FinalSysSizing(CurSysNum)%DesHeatVolFlow
CASE(Other)
OAController(OAControllerNum)%MaxOA = FinalSysSizing(CurSysNum)%DesMainVolFlow
CASE DEFAULT
OAController(OAControllerNum)%MaxOA = FinalSysSizing(CurSysNum)%DesMainVolFlow
END SELECT
CASE(ControllerSimple)
CASE(ControllerStandAloneERV)
CASE DEFAULT
END SELECT
ELSE IF (CurZoneEqNum > 0) THEN
SELECT CASE(OAController(OAControllerNum)%ControllerType_Num)
CASE(ControllerOutsideAir)
CALL CheckZoneSizing(CurrentModuleObject,OAController(OAControllerNum)%Name)
OAController(OAControllerNum)%MaxOA = MAX(FinalZoneSizing(CurZoneEqNum)%DesCoolVolFlow, &
FinalZoneSizing(CurZoneEqNum)%DesHeatVolFlow)
CASE(ControllerSimple)
CASE(ControllerStandAloneERV)
CASE DEFAULT
END SELECT
END IF
IF (OAController(OAControllerNum)%MaxOA < SmallAirVolFlow) THEN
OAController(OAControllerNum)%MaxOA = 0.0d0
END IF
CALL ReportSizingOutput(CurrentModuleObject,OAController(OAControllerNum)%Name,&
'Maximum Outdoor Air Flow Rate [m3/s]',OAController(OAControllerNum)%MaxOA)
END IF
IF (OAController(OAControllerNum)%MinOA == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(CurrentModuleObject,OAController(OAControllerNum)%Name)
IF (FinalSysSizing(CurSysNum)%DesOutAirVolFlow >= SmallAirVolFlow) THEN
OAController(OAControllerNum)%MinOA = MIN(FinalSysSizing(CurSysNum)%DesOutAirVolFlow,OAController(OAControllerNum)%MaxOA)
ELSE
OAController(OAControllerNum)%MinOA = 0.0d0
END IF
END IF
CALL ReportSizingOutput(CurrentModuleObject,OAController(OAControllerNum)%Name,&
'Minimum Outdoor Air Flow Rate [m3/s]',OAController(OAControllerNum)%MinOA)
IF(OAController(OAControllerNum)%HumidistatZoneNum .GT. 0 .AND. OAController(OAControllerNum)%FixedMin)THEN
IF(OAController(OAControllerNum)%MaxOA .GT. 0.0d0)THEN
OAFlowRatio = OAController(OAControllerNum)%MinOA/OAController(OAControllerNum)%MaxOA
IF(OAController(OAControllerNum)%HighRHOAFlowRatio .LT. OAFlowRatio)THEN
CALL ShowWarningError(CurrentModuleObject//' "'//TRIM(OAController(OAControllerNum)%Name)//'"')
CALL ShowContinueError('... A fixed minimum outdoor air flow rate and high humidity control have been specified.')
CALL ShowContinueError('... The High Humidity Outdoor Air Flow Ratio is less than the ratio of'// &
' the outdoor air controllers minimum to maximum outside air flow rate.')
CALL ShowContinueError('... Controller minimum flow rate = ' &
//TRIM(TrimSigDigits(OAController(OAControllerNum)%MinOA,4))//' m3/s.')
CALL ShowContinueError('... Controller maximum flow rate = ' &
//TRIM(TrimSigDigits(OAController(OAControllerNum)%MaxOA,4))//' m3/s.')
CALL ShowContinueError('... Controller minimum to maximum flow ratio = ' &
//TRIM(TrimSigDigits(OAFlowRatio,4))//'.')
CALL ShowContinueError('... High humidity control flow ratio = ' &
//TRIM(TrimSigDigits(OAController(OAControllerNum)%HighRHOAFlowRatio,4))//'.')
END IF
END IF
END If
END IF
! If there is an outside air system, loop over components in the OA system; pass the design air flow rate
! to the coil components that don't have design air flow as an input.
IF (CurOASysNum > 0) THEN
DO CompNum=1,OutsideAirSys(CurOASysNum)%NumComponents
CompType = OutsideAirSys(CurOASysNum)%ComponentType(CompNum)
CompName = OutsideAirSys(CurOASysNum)%ComponentName(CompNum)
IF (SameString(CompType,'COIL:COOLING:WATER:DETAILEDGEOMETRY') .OR. SameString(CompType,'COIL:HEATING:WATER') .OR. &
SameString(CompType,'COILSYSTEM:COOLING:WATER:HEATEXCHANGERASSISTED')) THEN
IF (SameString(CompType,'COILSYSTEM:COOLING:WATER:HEATEXCHANGERASSISTED')) THEN
CoilName = GetHXDXCoilName(CompType,CompName,ErrorsFound)
CoilType = GetHXCoilType(CompType,CompName,ErrorsFound)
ELSE
CoilName = CompName
CoilType = CompType
END IF
CALL SetCoilDesFlow(CoilType,CoilName,OAController(OAControllerNum)%MinOA,&
ErrorsFound)
END IF
END DO ! End of component loop
END IF
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeOAController