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) | :: | MSHeatPumpNum |
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 SizeMSHeatPump(MSHeatPumpNum)
! SUBROUTINE INFORMATION:
! AUTHOR: Lixing Gu, FSEC
! DATE WRITTEN: June 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine is for sizing multispeed heat pump airflow rates and flow fraction.
! METHODOLOGY EMPLOYED:
!
! REFERENCES: na
! USE STATEMENTS:
USE DataSizing
USE InputProcessor
USE DataZoneEquipment, ONLY: ZoneEquipConfig
USE General, ONLY: TrimSigDigits
USE ReportSizingManager, ONLY: ReportSizingOutput
USE PlantUtilities, ONLY: RegisterPlantCompDesignFlow
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER , INTENT (IN) :: MSHeatPumpNum ! Engine driven heat pump number
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ControlledZoneNum = 0 ! Index of Controllerd zone number
INTEGER :: ThisCtrlZoneNum = 0 ! Controllerd zone number
REAL(r64) :: ControlZoneVolFlow = 0.0d0 ! Controlled zone volumetric flow
INTEGER :: NumOfSpeedCooling ! Number of speeds for cooling
INTEGER :: NumOfSpeedHeating ! Number of speeds for heating
INTEGER :: i ! Index to speed
! FLOW
NumOfSpeedCooling = MSHeatPump(MSHeatPumpNum)%NumOfSpeedCooling
NumOfSpeedHeating = MSHeatPump(MSHeatPumpNum)%NumOfSpeedHeating
Do I=NumOfSpeedCooling,1,-1
IF (MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) == AutoSize) THEN
IF (CurSysNum > 0) THEN
If (i == NumOfSpeedCooling) Then
CALL CheckSysSizing(CurrentModuleObject, MSHeatPump(MSHeatPumpNum)%Name)
MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) = FinalSysSizing(CurSysNum)%DesMainVolFlow
IF (MSHeatPump(MSHeatPumpNum)%FanVolFlow .LT. MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) .AND. &
MSHeatPump(MSHeatPumpNum)%FanVolFlow .NE. AutoSize)THEN
MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum)%FanVolFlow
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(MSHeatPump(MSHeatPumpNum)%Name)//'"')
CALL ShowContinueError('The supply air flow rate at high speed is less than the ' &
//'autosized value for the supply air flow rate in cooling mode. Consider autosizing the fan for' &
//' this simulation.')
CALL ShowContinueError('The air flow rate at high speed in cooling mode ' &
//'is reset to the supply air flow rate and the simulation continues.')
END IF
Else
MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(NumOfSpeedCooling)* &
i/NumOfSpeedCooling
End If
IF (MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) < SmallAirVolFlow) THEN
MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate = 0.0d0
END IF
! Ensure the flow rate at lower speed has to be less or equal to the flow rate at higher speed
If (i /= NumOfSpeedCooling) Then
If (MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) > MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i+1)) Then
MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i+1)
End If
End If
CALL ReportSizingOutput(TRIM(CurrentModuleObject), MSHeatPump(MSHeatPumpNum)%Name, &
'Speed '//Trim(TrimSigDigits(i))//' Supply Air Flow Rate During Cooling Operation [m3/s]', &
MSHeatPump(MSHeatPumpNum)%CoolVolumeFlowRate(i))
END IF
END IF
End Do
Do I=NumOfSpeedHeating,1,-1
IF (MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) == AutoSize) THEN
IF (CurSysNum > 0) THEN
If (i == NumOfSpeedHeating) Then
CALL CheckSysSizing(CurrentModuleObject, MSHeatPump(MSHeatPumpNum)%Name)
MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) = FinalSysSizing(CurSysNum)%DesMainVolFlow
IF (MSHeatPump(MSHeatPumpNum)%FanVolFlow .LT. MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) .AND. &
MSHeatPump(MSHeatPumpNum)%FanVolFlow .NE. AutoSize) THEN
MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum)%FanVolFlow
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(MSHeatPump(MSHeatPumpNum)%Name)//'"')
CALL ShowContinueError('The supply air flow rate at high speed is less than the ' &
//'autosized value for the maximum air flow rate in heating mode. Consider autosizing the fan for' &
//' this simulation.')
CALL ShowContinueError('The maximum air flow rate at high speed in heating mode ' &
//'is reset to the supply air flow rate and the simulation continues.')
END IF
Else
MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(NumOfSpeedHeating)* &
i/NumOfSpeedHeating
End If
IF (MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) < SmallAirVolFlow) THEN
MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) = 0.0d0
END IF
! Ensure the flow rate at lower speed has to be less or equal to the flow rate at higher speed
If (i /= NumOfSpeedHeating) Then
If (MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) > MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i+1)) Then
MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i) = MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i+1)
End If
End If
CALL ReportSizingOutput(TRIM(CurrentModuleObject), MSHeatPump(MSHeatPumpNum)%Name, &
'Speed'//Trim(TrimSigDigits(i))//'Supply Air Flow Rate During Heating Operation [m3/s]', &
MSHeatPump(MSHeatPumpNum)%HeatVolumeFlowRate(i))
END IF
END IF
End Do
IF (MSHeatPump(MSHeatPumpNum)%IdleVolumeAirRate == AutoSize) THEN
IF (CurSysNum > 0) THEN
CALL CheckSysSizing(TRIM(CurrentModuleObject), MSHeatPump(MSHeatPumpNum)%Name)
MSHeatPump(MSHeatPumpNum)%IdleVolumeAirRate = FinalSysSizing(CurSysNum)%DesMainVolFlow
IF (MSHeatPump(MSHeatPumpNum)%FanVolFlow .LT. MSHeatPump(MSHeatPumpNum)%IdleVolumeAirRate .AND. &
MSHeatPump(MSHeatPumpNum)%FanVolFlow .NE. AutoSize)THEN
MSHeatPump(MSHeatPumpNum)%IdleVolumeAirRate = MSHeatPump(MSHeatPumpNum)%FanVolFlow
CALL ShowWarningError(TRIM(CurrentModuleObject)//' "'//TRIM(MSHeatPump(MSHeatPumpNum)%Name)//'"')
CALL ShowContinueError('The supply air flow rate is less than the autosized value' &
//' for the maximum air flow rate when no heating or cooling is needed. Consider' &
//' autosizing the fan for this simulation.')
CALL ShowContinueError('The maximum air flow rate when no heating or cooling is needed ' &
//'is reset to the supply air flow rate and the simulation continues.')
END IF
IF (MSHeatPump(MSHeatPumpNum)%IdleVolumeAirRate < SmallAirVolFlow) THEN
MSHeatPump(MSHeatPumpNum)%IdleVolumeAirRate = 0.0d0
END IF
CALL ReportSizingOutput(TRIM(CurrentModuleObject), MSHeatPump(MSHeatPumpNum)%Name, &
'Supply Air Flow Rate When No Cooling or Heating is Needed [m3/s]', &
MSHeatPump(MSHeatPumpNum)%IdleVolumeAirRate)
END IF
END IF
IF (MSHeatPump(MSHeatPumpNum)%SuppMaxAirTemp == AutoSize) THEN
IF (CurSysNum > 0) THEN
If (MSHeatPump(MSHeatPumpNum)%SuppHeatCoilType == 1) Then ! Gas
CALL CheckZoneSizing('Coil:Heating:Gas', MSHeatPump(MSHeatPumpNum)%Name)
Else
CALL CheckZoneSizing('Coil:Heating:Electric', MSHeatPump(MSHeatPumpNum)%Name)
End If
MSHeatPump(MSHeatPumpNum)%SuppMaxAirTemp = FinalSysSizing(CurSysNum)%HeatSupTemp
CALL ReportSizingOutput(TRIM(CurrentModuleObject), MSHeatPump(MSHeatPumpNum)%Name, &
'Maximum Supply Air Temperature from Supplemental Heater [C]', &
MSHeatPump(MSHeatPumpNum)%SuppMaxAirTemp)
END IF
END IF
IF (MSHeatPump(MSHeatPumpNum)%DesignSuppHeatingCapacity == AutoSize) THEN
IF (CurSysNum > 0) THEN
If (MSHeatPump(MSHeatPumpNum)%SuppHeatCoilType == 1) Then ! Gas
CALL CheckSysSizing('Coil:Heating:Gas', MSHeatPump(MSHeatPumpNum)%Name)
Else
CALL CheckSysSizing('Coil:Heating:Electric', MSHeatPump(MSHeatPumpNum)%Name)
End If
MSHeatPump(MSHeatPumpNum)%DesignSuppHeatingCapacity = FinalSysSizing(CurSysNum)%HeatCap
ELSE
MSHeatPump(MSHeatPumpNum)%DesignSuppHeatingCapacity = 0.0d0
END IF
CALL ReportSizingOutput(TRIM(CurrentModuleObject), MSHeatPump(MSHeatPumpNum)%Name, &
'Supplemental Heating Coil Nominal Capacity [W]', &
MSHeatPump(MSHeatPumpNum)%DesignSuppHeatingCapacity)
END IF
SuppHeatCap = MSHeatPump(MSHeatPumpNum)%DesignSuppHeatingCapacity
IF (MSHeatPump(MSHeatPumpNum)%HeatRecActive) THEN
CALL RegisterPlantCompDesignFlow(MSHeatPump(MSHeatPumpNum)%HeatRecInletNodeNum, &
MSHeatPump(MSHeatPumpNum)%DesignHeatRecFlowRate )
ENDIF
RETURN
END SUBROUTINE SizeMSHeatPump