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) | :: | AirLoopNum | |||
integer, | intent(in) | :: | BranchNum |
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 SizeAirLoopBranches(AirLoopNum,BranchNum)
! SUBROUTINE INFORMATION:
! AUTHOR Fred Buhl
! DATE WRITTEN September 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing air loop branches 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 DataSizing
USE HVACHXAssistedCoolingCoil, ONLY: GetHXDXCoilName, GetHXCoilType
USE WaterCoils, ONLY: SetCoilDesFlow
USE ReportSizingManager, ONLY: ReportSizingOutput
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
Integer, Intent(IN) :: AirLoopNum
Integer, Intent(IN) :: BranchNum
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
CHARACTER(LEN=MaxNameLength) :: CompType ! Component type
CHARACTER(LEN=MaxNameLength) :: CompName ! Component name
CHARACTER(len=MaxNameLength) :: CoilName
CHARACTER(len=MaxNameLength) :: CoilType
INTEGER :: CompType_Num ! Numeric equivalent for CompType
INTEGER :: CompNum
LOGICAL :: ErrorsFound
ErrorsFound = .FALSE.
IF (PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate == AutoSize) THEN
CALL CheckSysSizing('Branch',PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Name)
SELECT CASE(PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%DuctType)
CASE(Main)
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate = FinalSysSizing(AirLoopNum)%DesMainVolFlow
CASE(Cooling)
! PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate = FinalSysSizing(AirLoopNum)%DesCoolVolFlow
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate = FinalSysSizing(AirLoopNum)%DesMainVolFlow
CASE(Heating)
! PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate = FinalSysSizing(AirLoopNum)%DesHeatVolFlow
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate = FinalSysSizing(AirLoopNum)%DesMainVolFlow
CASE(Other)
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate = FinalSysSizing(AirLoopNum)%DesMainVolFlow
CASE DEFAULT
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate = FinalSysSizing(AirLoopNum)%DesMainVolFlow
END SELECT
CALL ReportSizingOutput('Branch',PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Name,&
'Maximum Flow Rate [m3/s]', &
PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate)
END IF
IF (BranchNum == 1) THEN
IF (PrimaryAirSystem(AirLoopNum)%DesignVolFlowRate == AutoSize) THEN
CALL CheckSysSizing('AirLoopHVAC',PrimaryAirSystem(AirLoopNum)%Name)
PrimaryAirSystem(AirLoopNum)%DesignVolFlowRate = FinalSysSizing(AirLoopNum)%DesMainVolFlow
CALL ReportSizingOutput('AirLoopHVAC',PrimaryAirSystem(AirLoopNum)%Name, &
'Design Supply Air Flow Rate [m3/s]', &
PrimaryAirSystem(AirLoopNum)%DesignVolFlowRate)
END IF
IF (PrimaryAirSystem(AirLoopNum)%DesignVolFlowRate < SmallAirVolFlow) THEN
CALL ShowSevereError('AirLoopHVAC ' // TRIM(PrimaryAirSystem(AirLoopNum)%Name) // &
' has no air flow')
CALL ShowContinueError('Check flow rate inputs for components in this air loop and,')
CALL ShowContinueError('if autosized, check Sizing:Zone and Sizing:System objects and related inputs.')
CALL ShowFatalError('Previous condition causes termination.')
END IF
END IF
! Loop over components in branch; pass the design air flow rate to the coil components that don't have
! design air flow as an input
DO CompNum = 1,PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%TotalComponents
CompType = PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%TypeOf
CompName = PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%Name
CompType_Num = PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%Comp(CompNum)%CompType_Num
IF (CompType_Num == WaterCoil_DetailedCool .OR. CompType_Num == WaterCoil_SimpleHeat .OR. &
CompType_Num == WaterCoil_CoolingHXAsst) THEN
IF (CompType_Num == WaterCoil_CoolingHXAsst) THEN
CoilName = GetHXDXCoilName(CompType,CompName,ErrorsFound)
CoilType = GetHXCoilType(CompType,CompName,ErrorsFound)
ELSE
CoilName = CompName
CoilType = CompType
END IF
CALL SetCoilDesFlow(CoilType,CoilName,PrimaryAirSystem(AirLoopNum)%Branch(BranchNum)%MaxVolFlowRate,&
ErrorsFound)
END IF
END DO ! End of component loop
IF (ErrorsFound) THEN
CALL ShowFatalError('Preceding sizing errors cause program termination')
END IF
RETURN
END SUBROUTINE SizeAirLoopBranches