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 ManageSurfaceHeatBalance
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN January 1998
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages the heat surface balance method of calculating
! building thermal loads. It is called from the HeatBalanceManager
! at the time step level. This driver manages the calls to all of
! the other drivers and simulation algorithms.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE HeatBalanceAirManager, ONLY : ManageAirHeatBalance
USE ThermalComfort, ONLY : ManageThermalComfort
USE HeatBalFiniteDiffManager, ONLY : UpdateMoistureBalanceFD
USE OutputReportTabular, ONLY : GatherComponentLoadsSurface !for writing tabular compoonent loads output reports
USE DataSystemVariables, ONLY: DeveloperFlag
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
logical, save :: firsttime=.true.
INTEGER :: SurfNum
INTEGER :: ConstrNum
! FLOW:
if (firsttime) CALL DisplayString('Initializing Surfaces')
CALL InitSurfaceHeatBalance ! Initialize all heat balance related parameters
! Solve the zone heat balance 'Detailed' solution
! Call the outside and inside surface heat balances
if (firsttime) CALL DisplayString('Calculate Outside Surface Heat Balance')
CALL CalcHeatBalanceOutsideSurf
if (firsttime) CALL DisplayString('Calculate Inside Surface Heat Balance')
CALL CalcHeatBalanceInsideSurf
! The air heat balance must be called before the temperature history
! updates because there may be a radiant system in the building
if (firsttime) CALL DisplayString('Calculate Air Heat Balance')
CALL ManageAirHeatBalance
! IF NECESSARY, do one final "average" heat balance pass. This is only
! necessary if a radiant system is present and it was actually on for
! part or all of the time step.
CALL UpdateFinalSurfaceHeatBalance
! Before we leave the Surface Manager the thermal histories need to be updated
IF((ANY(HeatTransferAlgosUsed == UseCTF)) .or. (ANY(HeatTransferAlgosUsed == UseEMPD))) THEN
CALL UpdateThermalHistories !Update the thermal histories
END IF
IF ( ANY(HeatTransferAlgosUsed == UseCondFD) ) THEN
DO SurfNum =1, TotSurfaces
IF(Surface(SurfNum)%Construction <= 0) CYCLE ! Shading surface, not really a heat transfer surface
ConstrNum=Surface(SurfNum)%Construction
IF(Construct(ConstrNum)%TypeIsWindow) CYCLE ! Windows simulated in Window module
IF (Surface(SurfNum)%HeatTransferAlgorithm /= HeatTransferModel_CondFD) CYCLE
CALL UpdateMoistureBalanceFD(SurfNum)
ENDDO
ENDIF
CALL ManageThermalComfort(InitializeOnly=.false.) ! "Record keeping" for the zone
CALL ReportSurfaceHeatBalance
IF (ZoneSizingCalc) CALL GatherComponentLoadsSurface
firsttime=.false.
RETURN
END SUBROUTINE ManageSurfaceHeatBalance