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.
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 ReportInternalHeatGains
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN June 1997
! MODIFIED July 1997 RKS
! RE-ENGINEERED December 1998 LKL
! PURPOSE OF THIS SUBROUTINE:
! This subroutine currently creates the values for standard "zone loads" reporting
! from the heat balance module.
! METHODOLOGY EMPLOYED:
! The reporting methodology is described in the OutputDataStructure.doc
! as the "modified modular" format.
! REFERENCES:
! OutputDataStructure.doc (EnergyPlus documentation)
! USE STATEMENTS:
USE DataGlobals, ONLY: SecInHour
USE OutputReportTabular, ONLY: WriteTabularFiles
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: Loop
INTEGER :: ZoneLoop ! Counter for the # of zones (nz)
INTEGER, DIMENSION(7) :: TradIntGainTypes = (/IntGainTypeOf_People , &
IntGainTypeOf_Lights ,&
IntGainTypeOf_ElectricEquipment , &
IntGainTypeOf_GasEquipment , &
IntGainTypeOf_HotWaterEquipment , &
IntGainTypeOf_SteamEquipment , &
IntGainTypeOf_OtherEquipment /)
! FLOW:
DO Loop = 1, TotPeople
People(Loop)%RadGainEnergy = People(Loop)%RadGainRate * TimeStepZone * SecInHour
People(Loop)%ConGainEnergy = People(Loop)%ConGainRate * TimeStepZone * SecInHour
People(Loop)%SenGainEnergy = People(Loop)%SenGainRate * TimeStepZone * SecInHour
People(Loop)%LatGainEnergy = People(Loop)%LatGainRate * TimeStepZone * SecInHour
People(Loop)%TotGainEnergy = People(Loop)%TotGainRate * TimeStepZone * SecInHour
END DO
DO Loop = 1, TotLights
Lights(Loop)%Consumption = Lights(Loop)%Power * TimeStepZone * SecInHour
Lights(Loop)%RadGainEnergy = Lights(Loop)%RadGainRate * TimeStepZone * SecInHour
Lights(Loop)%VisGainEnergy = Lights(Loop)%VisGainRate * TimeStepZone * SecInHour
Lights(Loop)%ConGainEnergy = Lights(Loop)%ConGainRate * TimeStepZone * SecInHour
Lights(Loop)%RetAirGainEnergy = Lights(Loop)%RetAirGainRate * TimeStepZone * SecInHour
Lights(Loop)%TotGainEnergy = Lights(Loop)%TotGainRate * TimeStepZone * SecInHour
IF (.NOT. WarmUpFlag) THEN
IF (DoOutputReporting .AND. WriteTabularFiles .and. (KindOfSim == ksRunPeriodWeather)) THEN !for weather simulations only
!for tabular report, accumlate the total electricity used for each Light object
Lights(Loop)%SumConsumption = Lights(Loop)%SumConsumption + Lights(Loop)%Consumption
!for tabular report, accumulate the time when each Light has consumption (using a very small threshold instead of zero)
IF (Lights(Loop)%Power > 0.01d0 * Lights(Loop)%DesignLevel) THEN
Lights(Loop)%SumTimeNotZeroCons = Lights(Loop)%SumTimeNotZeroCons + TimeStepZone
END IF
ENDIF
END IF
END DO
DO Loop = 1, TotElecEquip
ZoneElectric(Loop)%Consumption = ZoneElectric(Loop)%Power * TimeStepZone * SecInHour
ZoneElectric(Loop)%RadGainEnergy = ZoneElectric(Loop)%RadGainRate * TimeStepZone * SecInHour
ZoneElectric(Loop)%ConGainEnergy = ZoneElectric(Loop)%ConGainRate * TimeStepZone * SecInHour
ZoneElectric(Loop)%LatGainEnergy = ZoneElectric(Loop)%LatGainRate * TimeStepZone * SecInHour
ZoneElectric(Loop)%LostEnergy = ZoneElectric(Loop)%LostRate * TimeStepZone * SecInHour
ZoneElectric(Loop)%TotGainEnergy = ZoneElectric(Loop)%TotGainRate * TimeStepZone * SecInHour
END DO
DO Loop = 1, TotGasEquip
ZoneGas(Loop)%Consumption = ZoneGas(Loop)%Power * TimeStepZone * SecInHour
ZoneGas(Loop)%RadGainEnergy = ZoneGas(Loop)%RadGainRate * TimeStepZone * SecInHour
ZoneGas(Loop)%ConGainEnergy = ZoneGas(Loop)%ConGainRate * TimeStepZone * SecInHour
ZoneGas(Loop)%LatGainEnergy = ZoneGas(Loop)%LatGainRate * TimeStepZone * SecInHour
ZoneGas(Loop)%LostEnergy = ZoneGas(Loop)%LostRate * TimeStepZone * SecInHour
ZoneGas(Loop)%TotGainEnergy = ZoneGas(Loop)%TotGainRate * TimeStepZone * SecInHour
END DO
DO Loop = 1, TotOthEquip
ZoneOtherEq(Loop)%Consumption = ZoneOtherEq(Loop)%Power * TimeStepZone * SecInHour
ZoneOtherEq(Loop)%RadGainEnergy = ZoneOtherEq(Loop)%RadGainRate * TimeStepZone * SecInHour
ZoneOtherEq(Loop)%ConGainEnergy = ZoneOtherEq(Loop)%ConGainRate * TimeStepZone * SecInHour
ZoneOtherEq(Loop)%LatGainEnergy = ZoneOtherEq(Loop)%LatGainRate * TimeStepZone * SecInHour
ZoneOtherEq(Loop)%LostEnergy = ZoneOtherEq(Loop)%LostRate * TimeStepZone * SecInHour
ZoneOtherEq(Loop)%TotGainEnergy = ZoneOtherEq(Loop)%TotGainRate * TimeStepZone * SecInHour
END DO
DO Loop = 1, TotHWEquip
ZoneHWEq(Loop)%Consumption = ZoneHWEq(Loop)%Power * TimeStepZone * SecInHour
ZoneHWEq(Loop)%RadGainEnergy = ZoneHWEq(Loop)%RadGainRate * TimeStepZone * SecInHour
ZoneHWEq(Loop)%ConGainEnergy = ZoneHWEq(Loop)%ConGainRate * TimeStepZone * SecInHour
ZoneHWEq(Loop)%LatGainEnergy = ZoneHWEq(Loop)%LatGainRate * TimeStepZone * SecInHour
ZoneHWEq(Loop)%LostEnergy = ZoneHWEq(Loop)%LostRate * TimeStepZone * SecInHour
ZoneHWEq(Loop)%TotGainEnergy = ZoneHWEq(Loop)%TotGainRate * TimeStepZone * SecInHour
END DO
DO Loop = 1, TotStmEquip
ZoneSteamEq(Loop)%Consumption = ZoneSteamEq(Loop)%Power * TimeStepZone * SecInHour
ZoneSteamEq(Loop)%RadGainEnergy = ZoneSteamEq(Loop)%RadGainRate * TimeStepZone * SecInHour
ZoneSteamEq(Loop)%ConGainEnergy = ZoneSteamEq(Loop)%ConGainRate * TimeStepZone * SecInHour
ZoneSteamEq(Loop)%LatGainEnergy = ZoneSteamEq(Loop)%LatGainRate * TimeStepZone * SecInHour
ZoneSteamEq(Loop)%LostEnergy = ZoneSteamEq(Loop)%LostRate * TimeStepZone * SecInHour
ZoneSteamEq(Loop)%TotGainEnergy = ZoneSteamEq(Loop)%TotGainRate * TimeStepZone * SecInHour
END DO
DO Loop = 1, TotBBHeat
ZoneBBHeat(Loop)%Consumption = ZoneBBHeat(Loop)%Power * TimeStepZone * SecInHour
ZoneBBHeat(Loop)%RadGainEnergy = ZoneBBHeat(Loop)%RadGainRate * TimeStepZone * SecInHour
ZoneBBHeat(Loop)%ConGainEnergy = ZoneBBHeat(Loop)%ConGainRate * TimeStepZone * SecInHour
ZoneBBHeat(Loop)%TotGainEnergy = ZoneBBHeat(Loop)%TotGainRate * TimeStepZone * SecInHour
END DO
DO ZoneLoop = 1, NumOfZones
! People
ZnRpt(ZoneLoop)%PeopleNumOcc = ZoneIntGain(ZoneLoop)%NOFOCC
ZnRpt(ZoneLoop)%PeopleRadGain = ZoneIntGain(ZoneLoop)%QOCRAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%PeopleConGain = ZoneIntGain(ZoneLoop)%QOCCON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%PeopleSenGain = ZoneIntGain(ZoneLoop)%QOCSEN*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%PeopleLatGain = ZoneIntGain(ZoneLoop)%QOCLAT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%PeopleTotGain = ZoneIntGain(ZoneLoop)%QOCTOT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%PeopleRadGainRate = ZoneIntGain(ZoneLoop)%QOCRAD
ZnRpt(ZoneLoop)%PeopleConGainRate = ZoneIntGain(ZoneLoop)%QOCCON
ZnRpt(ZoneLoop)%PeopleSenGainRate = ZoneIntGain(ZoneLoop)%QOCSEN
ZnRpt(ZoneLoop)%PeopleLatGainRate = ZoneIntGain(ZoneLoop)%QOCLAT
ZnRpt(ZoneLoop)%PeopleTotGainRate = ZoneIntGain(ZoneLoop)%QOCTOT
! General Lights
ZnRpt(ZoneLoop)%LtsRetAirGain = ZoneIntGain(ZoneLoop)%QLTCRA*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%LtsRadGain = ZoneIntGain(ZoneLoop)%QLTRAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%LtsTotGain = ZoneIntGain(ZoneLoop)%QLTTOT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%LtsConGain = ZoneIntGain(ZoneLoop)%QLTCON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%LtsVisGain = ZoneIntGain(ZoneLoop)%QLTSW*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%LtsRetAirGainRate = ZoneIntGain(ZoneLoop)%QLTCRA
ZnRpt(ZoneLoop)%LtsRadGainRate= ZoneIntGain(ZoneLoop)%QLTRAD
ZnRpt(ZoneLoop)%LtsTotGainRate= ZoneIntGain(ZoneLoop)%QLTTOT
ZnRpt(ZoneLoop)%LtsConGainRate= ZoneIntGain(ZoneLoop)%QLTCON
ZnRpt(ZoneLoop)%LtsVisGainRate= ZoneIntGain(ZoneLoop)%QLTSW
ZnRpt(ZoneLoop)%LtsElecConsump= ZnRpt(ZoneLoop)%LtsTotGain
! Electric Equipment
ZnRpt(ZoneLoop)%ElecConGain = ZoneIntGain(ZoneLoop)%QEECON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%ElecRadGain = ZoneIntGain(ZoneLoop)%QEERAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%ElecLatGain = ZoneIntGain(ZoneLoop)%QEELAT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%ElecLost = ZoneIntGain(ZoneLoop)%QEELost*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%ElecConGainRate= ZoneIntGain(ZoneLoop)%QEECON
ZnRpt(ZoneLoop)%ElecRadGainRate= ZoneIntGain(ZoneLoop)%QEERAD
ZnRpt(ZoneLoop)%ElecLatGainRate= ZoneIntGain(ZoneLoop)%QEELAT
ZnRpt(ZoneLoop)%ElecLostRate = ZoneIntGain(ZoneLoop)%QEELost
ZnRpt(ZoneLoop)%ElecConsump = ZnRpt(ZoneLoop)%ElecConGain+ZnRpt(ZoneLoop)%ElecRadGain+ &
ZnRpt(ZoneLoop)%ElecLatGain+ZnRpt(ZoneLoop)%ElecLost
ZnRpt(ZoneLoop)%ElecTotGain = ZnRpt(ZoneLoop)%ElecConGain+ZnRpt(ZoneLoop)%ElecRadGain+ZnRpt(ZoneLoop)%ElecLatGain
ZnRpt(ZoneLoop)%ElecTotGainRate = ZnRpt(ZoneLoop)%ElecConGainRate+ZnRpt(ZoneLoop)%ElecRadGainRate+ &
ZnRpt(ZoneLoop)%ElecLatGainRate
! Gas Equipment
ZnRpt(ZoneLoop)%GasConGain = ZoneIntGain(ZoneLoop)%QGECON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%GasRadGain = ZoneIntGain(ZoneLoop)%QGERAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%GasLatGain = ZoneIntGain(ZoneLoop)%QGELAT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%GasLost = ZoneIntGain(ZoneLoop)%QGELost*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%GasConGainRate= ZoneIntGain(ZoneLoop)%QGECON
ZnRpt(ZoneLoop)%GasRadGainRate= ZoneIntGain(ZoneLoop)%QGERAD
ZnRpt(ZoneLoop)%GasLatGainRate= ZoneIntGain(ZoneLoop)%QGELAT
ZnRpt(ZoneLoop)%GasLostRate = ZoneIntGain(ZoneLoop)%QGELost
ZnRpt(ZoneLoop)%GasConsump = ZnRpt(ZoneLoop)%GasConGain+ZnRpt(ZoneLoop)%GasRadGain+ &
ZnRpt(ZoneLoop)%GasLatGain+ZnRpt(ZoneLoop)%GasLost
ZnRpt(ZoneLoop)%GasTotGain = ZnRpt(ZoneLoop)%GasConGain+ZnRpt(ZoneLoop)%GasRadGain+ZnRpt(ZoneLoop)%GasLatGain
ZnRpt(ZoneLoop)%GasTotGainRate = ZnRpt(ZoneLoop)%GasConGainRate+ZnRpt(ZoneLoop)%GasRadGainRate+ &
ZnRpt(ZoneLoop)%GasLatGainRate
! Hot Water Equipment
ZnRpt(ZoneLoop)%HWConGain = ZoneIntGain(ZoneLoop)%QHWCON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%HWRadGain = ZoneIntGain(ZoneLoop)%QHWRAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%HWLatGain = ZoneIntGain(ZoneLoop)%QHWLAT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%HWLost = ZoneIntGain(ZoneLoop)%QHWLost*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%HWConGainRate= ZoneIntGain(ZoneLoop)%QHWCON
ZnRpt(ZoneLoop)%HWRadGainRate= ZoneIntGain(ZoneLoop)%QHWRAD
ZnRpt(ZoneLoop)%HWLatGainRate= ZoneIntGain(ZoneLoop)%QHWLAT
ZnRpt(ZoneLoop)%HWLostRate = ZoneIntGain(ZoneLoop)%QHWLost
ZnRpt(ZoneLoop)%HWConsump = ZnRpt(ZoneLoop)%HWConGain+ZnRpt(ZoneLoop)%HWRadGain+ &
ZnRpt(ZoneLoop)%HWLatGain+ZnRpt(ZoneLoop)%HWLost
ZnRpt(ZoneLoop)%HWTotGain = ZnRpt(ZoneLoop)%HWConGain+ZnRpt(ZoneLoop)%HWRadGain+ZnRpt(ZoneLoop)%HWLatGain
ZnRpt(ZoneLoop)%HWTotGainRate = ZnRpt(ZoneLoop)%HWConGainRate+ZnRpt(ZoneLoop)%HWRadGainRate+ &
ZnRpt(ZoneLoop)%HWLatGainRate
! Steam Equipment
ZnRpt(ZoneLoop)%SteamConGain = ZoneIntGain(ZoneLoop)%QSECON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%SteamRadGain = ZoneIntGain(ZoneLoop)%QSERAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%SteamLatGain = ZoneIntGain(ZoneLoop)%QSELAT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%SteamLost = ZoneIntGain(ZoneLoop)%QSELost*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%SteamConGainRate= ZoneIntGain(ZoneLoop)%QSECON
ZnRpt(ZoneLoop)%SteamRadGainRate= ZoneIntGain(ZoneLoop)%QSERAD
ZnRpt(ZoneLoop)%SteamLatGainRate= ZoneIntGain(ZoneLoop)%QSELAT
ZnRpt(ZoneLoop)%SteamLostRate = ZoneIntGain(ZoneLoop)%QSELost
ZnRpt(ZoneLoop)%SteamConsump = ZnRpt(ZoneLoop)%SteamConGain+ZnRpt(ZoneLoop)%SteamRadGain+ &
ZnRpt(ZoneLoop)%SteamLatGain+ZnRpt(ZoneLoop)%SteamLost
ZnRpt(ZoneLoop)%SteamTotGain = ZnRpt(ZoneLoop)%SteamConGain+ZnRpt(ZoneLoop)%SteamRadGain+ZnRpt(ZoneLoop)%SteamLatGain
ZnRpt(ZoneLoop)%SteamTotGainRate = ZnRpt(ZoneLoop)%SteamConGainRate+ZnRpt(ZoneLoop)%SteamRadGainRate+ &
ZnRpt(ZoneLoop)%SteamLatGainRate
! Other Equipment
ZnRpt(ZoneLoop)%OtherConGain = ZoneIntGain(ZoneLoop)%QOECON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%OtherRadGain = ZoneIntGain(ZoneLoop)%QOERAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%OtherLatGain = ZoneIntGain(ZoneLoop)%QOELAT*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%OtherLost = ZoneIntGain(ZoneLoop)%QOELost*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%OtherConGainRate= ZoneIntGain(ZoneLoop)%QOECON
ZnRpt(ZoneLoop)%OtherRadGainRate= ZoneIntGain(ZoneLoop)%QOERAD
ZnRpt(ZoneLoop)%OtherLatGainRate= ZoneIntGain(ZoneLoop)%QOELAT
ZnRpt(ZoneLoop)%OtherLostRate = ZoneIntGain(ZoneLoop)%QOELost
ZnRpt(ZoneLoop)%OtherTotGain = ZnRpt(ZoneLoop)%OtherConGain+ZnRpt(ZoneLoop)%OtherRadGain+ZnRpt(ZoneLoop)%OtherLatGain
ZnRpt(ZoneLoop)%OtherTotGainRate = ZnRpt(ZoneLoop)%OtherConGainRate+ZnRpt(ZoneLoop)%OtherRadGainRate+ &
ZnRpt(ZoneLoop)%OtherLatGainRate
! Baseboard Heat
ZnRpt(ZoneLoop)%BaseHeatConGain = ZoneIntGain(ZoneLoop)%QBBCON*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%BaseHeatRadGain = ZoneIntGain(ZoneLoop)%QBBRAD*TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%BaseHeatConGainRate = ZoneIntGain(ZoneLoop)%QBBCON
ZnRpt(ZoneLoop)%BaseHeatRadGainRate = ZoneIntGain(ZoneLoop)%QBBRAD
ZnRpt(ZoneLoop)%BaseHeatTotGain = ZnRpt(ZoneLoop)%BaseHeatConGain + ZnRpt(ZoneLoop)%BaseHeatRadGain
ZnRpt(ZoneLoop)%BaseHeatTotGainRate = ZnRpt(ZoneLoop)%BaseHeatConGainRate + ZnRpt(ZoneLoop)%BaseHeatRadGainRate
ZnRpt(ZoneLoop)%BaseHeatElecCons = ZnRpt(ZoneLoop)%BaseHeatTotGain
! Overall Zone Variables
! these overalls include component gains from devices like water heater, water use, and generators
! working vars QFCConv QGenConv QFCRad QGenRad WaterUseLatentGain WaterThermalTankGain WaterUseSensibleGain
ZnRpt(ZoneLoop)%TotVisHeatGain = ZnRpt(ZoneLoop)%LtsVisGain
ZnRpt(ZoneLoop)%TotVisHeatGainRate = ZnRpt(ZoneLoop)%LtsVisGainRate
CALL SumInternalRadiationGainsByTypes(ZoneLoop, TradIntGainTypes, ZnRpt(ZoneLoop)%TotRadiantGainRate)
ZnRpt(ZoneLoop)%TotRadiantGain = ZnRpt(ZoneLoop)%TotRadiantGainRate*TimeStepZone*SecInHour
CALL SumInternalConvectionGainsByTypes(ZoneLoop, TradIntGainTypes, ZnRpt(ZoneLoop)%TotConvectiveGainRate)
ZnRpt(ZoneLoop)%TotConvectiveGain = ZnRpt(ZoneLoop)%TotConvectiveGainRate *TimeStepZone*SecInHour
CALL SumInternalLatentGainsByTypes( ZoneLoop, TradIntGainTypes, ZnRpt(ZoneLoop)%TotLatentGainRate)
ZnRpt(ZoneLoop)%TotLatentGain = ZnRpt(ZoneLoop)%TotLatentGainRate *TimeStepZone*SecInHour
ZnRpt(ZoneLoop)%TotTotalHeatGainRate = ZnRpt(ZoneLoop)%TotLatentGainRate + ZnRpt(ZoneLoop)%TotRadiantGainRate &
+ ZnRpt(ZoneLoop)%TotConvectiveGainRate + ZnRpt(ZoneLoop)%TotVisHeatGainRate
ZnRpt(ZoneLoop)%TotTotalHeatGain = ZnRpt(ZoneLoop)%TotTotalHeatGainRate * TimeStepZone * SecInHour
END DO
RETURN
END SUBROUTINE ReportInternalHeatGains