Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out) | :: | LowTempRadSysOn |
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 UpdateRadSysSourceValAvg(LowTempRadSysOn)
! SUBROUTINE INFORMATION:
! AUTHOR Rick Strand
! DATE WRITTEN November 2000
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! To transfer the average value of the heat source/sink over the entire
! zone time step back to the heat balance routines so that the heat
! balance algorithms can simulate one last time with the average source
! to maintain some reasonable amount of continuity and energy balance
! in the temperature and flux histories.
! METHODOLOGY EMPLOYED:
! All of the record keeping for the average term is done in the Update
! routine so the only other thing that this subroutine does is check to
! see if the system was even on. If any average term is non-zero, then
! one or more of the radiant systems was running.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(OUT) :: LowTempRadSysOn ! .TRUE. if the radiant system has run this zone time step
! SUBROUTINE PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: CloseEnough = 0.01d0 ! Some arbitrarily small value to avoid zeros and numbers that are almost the same
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: SurfNum ! DO loop counter for surface index
! FLOW:
LowTempRadSysOn = .FALSE.
! If this was never allocated, then there are no radiant systems in this input file (just RETURN)
IF (.NOT.ALLOCATED(QRadSysSrcAvg)) RETURN
! If it was allocated, then we have to check to see if this was running at all...
DO SurfNum = 1, TotSurfaces
IF (QRadSysSrcAvg(SurfNum) /= 0.0D0) THEN
LowTempRadSysOn = .TRUE.
EXIT !DO loop
END IF
END DO
QRadSysSource = QRadSysSrcAvg
! For interzone surfaces, QRadSysSrcAvg was only updated for the "active" side. The active side
! would have a non-zero value at this point. If the numbers differ, then we have to manually update.
DO SurfNum = 1, TotSurfaces
IF (Surface(SurfNum)%ExtBoundCond > 0 .AND. Surface(SurfNum)%ExtBoundCond /= SurfNum) THEN
IF ( ABS(QRadSysSource(SurfNum)-QRadSysSource(Surface(SurfNum)%ExtBoundCond)) > CloseEnough ) THEN ! numbers differ
IF ( ABS(QRadSysSource(SurfNum)) > ABS(QRadSysSource(Surface(SurfNum)%ExtBoundCond)) ) THEN
QRadSysSource(Surface(SurfNum)%ExtBoundCond) = QRadSysSource(SurfNum)
ELSE
QRadSysSource(SurfNum) = QRadSysSource(Surface(SurfNum)%ExtBoundCond)
END IF
END IF
END IF
END DO
RETURN
END SUBROUTINE UpdateRadSysSourceValAvg