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) | :: | SurfNum | |||
integer, | intent(in) | :: | ZoneNum | |||
integer, | intent(in) | :: | ConstrNum | |||
real(kind=r64), | intent(in) | :: | HMovInsul | |||
real(kind=r64), | intent(in) | :: | TempExt |
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 CalcOutsideSurfTemp(SurfNum,ZoneNum,ConstrNum,HMovInsul,TempExt)
! SUBROUTINE INFORMATION:
! AUTHOR George Walton
! DATE WRITTEN December 1979
! MODIFIED Jun 1990 (RDT for new CTF arrays)
! Jul 2000 (RJL for Moisture algorithms)
! Sep 2000 (RKS for new radiant exchange algorithm)
! Dec 2000 (RKS for radiant system model addition)
! Aug 2010 (BG added radiant heat flow rate reporting)
! RE-ENGINEERED Mar 1998 (RKS)
! PURPOSE OF THIS SUBROUTINE:
! This subroutine performs a heat balance on the outside face of each
! surface in the building. NOTE that this also sets some coefficients
! that are needed for radiant system modeling. Thus, it is extremely
! important that if someone makes changes to the heat balance equations
! at a later date that they must also make changes to the coefficient
! setting portion of this subroutine as well.
! METHODOLOGY EMPLOYED:
! Various boundary conditions are set and additional parameters are set-
! up. Then, the proper heat balance equation is selected based on the
! presence of movable insulation, thermal mass of the surface construction,
! and convection model being used.
! REFERENCES:
! (I)BLAST legacy routine HBOUT
! 1989 ASHRAE Handbook of Fundamentals (Figure 1 on p. 22.4, convection correlations)
! USE STATEMENTS:
USE DataPrecisionGlobals
USE DataGlobals
USE DataInterfaces
USE DataEnvironment
USE DataHeatBalFanSys
USE DataHeatBalance
USE DataHeatBalSurface
USE DataSurfaces
USE DataMoistureBalance, ONLY: TempOutsideAirFD,RhoVaporAirOut,RhoVaporAirIn,HConvExtFD,HMassConvExtFD, &
HConvInFD,HMassConvInFD,RhoVaporSurfIn, &
HSkyFD,HGrndFD,HAirFD
!unused0909 USE DataMoistureBalanceEMPD, ONLY: MoistEMPDNew, MoistEMPDFlux
USE DataDaylightingDevices
USE DaylightingDevices, ONLY: FindTDDPipe
USE Psychrometrics
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE PARAMETER DEFINITIONS:
! INTERFACE BLOCK SPECIFICATIONS
INTEGER, INTENT(IN) :: SurfNum ! Surface number DO loop counter
INTEGER, INTENT(IN) :: ZoneNum ! Zone number the current surface is attached to
INTEGER, INTENT(IN) :: ConstrNum ! Construction index for the current surface
REAL(r64), INTENT(IN) :: HMovInsul ! "Convection" coefficient of movable insulation
REAL(r64), INTENT(IN) :: TempExt ! Exterior temperature boundary condition
! FUNCTION DEFINITIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: F1 ! Intermediate calculation variable
REAL(r64) :: F2 ! Intermediate calculation variable
LOGICAL :: MovInsulPresent ! .true. if movable insulation is currently present for surface
LOGICAL :: QuickConductionSurf ! .true. if the cross CTF term is relatively large
INTEGER :: PipeNum ! TDD pipe object number
INTEGER :: SurfNum2 ! TDD:DIFFUSER object number
INTEGER :: ZoneNum2 ! TDD:DIFFUSER zone number
REAL(r64) :: Ueff ! 1 / effective R value between TDD:DOME and TDD:DIFFUSER
REAL(r64) :: RadTemp ! local value for Effective radiation temperature for OtherSideConditions model
REAL(r64) :: HRad ! local value for effective (linearized) radiation coefficient
! FLOW:
! Determine whether or not movable insulation is present
IF (HMovInsul > 0.0d0) THEN
MovInsulPresent = .TRUE.
ELSE
MovInsulPresent = .FALSE.
END IF
! Determine whether this surface is a "slow conductive" or "quick conductive"
! surface. Designates are inherited from BLAST. Basically, a "quick" surface
! requires the inside heat balance to be accounted for in the heat balance
! while a "slow" surface can used the last time step's value for inside
! surface temperature.
IF (Construct(ConstrNum)%CTFCross(0) > 0.01d0) THEN
QuickConductionSurf = .TRUE.
F1 = Construct(ConstrNum)%CTFCross(0)/( Construct(ConstrNum)%CTFInside(0)+HConvIn(SurfNum) )
ELSE
QuickConductionSurf = .FALSE.
END IF
! Now, calculate the outside surface temperature using the proper heat balance equation.
! Each case has been separated out into its own IF-THEN block for clarity. Additional
! cases can simply be added anywhere in the following section. This is the last step
! in the main loop. Once the proper heat balance is done, the simulation goes on to
! the next SurfNum.
! Outside heat balance case: Tubular daylighting device
IF ( Surface(SurfNum)%Class == SurfaceClass_TDD_Dome ) THEN
! Lookup up the TDD:DIFFUSER object
PipeNum = FindTDDPipe(SurfNum)
SurfNum2 = TDDPipe(PipeNum)%Diffuser
ZoneNum2 = Surface(SurfNum2)%Zone
Ueff = 1.0d0 / TDDPipe(PipeNum)%Reff
F1 = Ueff / (Ueff + HConvIn(SurfNum2))
! Similar to opaque surface but inside conditions of TDD:DIFFUSER are used, and no embedded sources/sinks.
! Absorbed shortwave radiation is treated similar to a regular window, but only 1 glass layer is allowed.
! QRadSWOutAbs(SurfNum) does not apply for TDD:DOME, must use QRadSWwinAbs(SurfNum,1)/2.0 instead.
TH(SurfNum,1,1) = ( QRadSWwinAbs(SurfNum,1)/2.0d0 & ! Instead of QRadSWOutAbs(SurfNum)
+(HcExtSurf(SurfNum)+HAirExtSurf(SurfNum))*TempExt &
+HSkyExtSurf(SurfNum)*SkyTemp &
+HGrdExtSurf(SurfNum)*OutDryBulbTemp & ! ODB used to approx ground surface temp
!+Construct(ConstrNum)%CTFSourceOut(0) & TDDs cannot be radiant systems
! *QsrcHist(SurfNum,1) &
+F1*( QRadSWwinAbs(SurfNum2,1)/2.0d0 & ! Use TDD:DIFFUSER surface
+QRadThermInAbs(SurfNum2) & ! Use TDD:DIFFUSER surface
!+Construct(ConstrNum)%CTFSourceIn(0) & TDDs cannot be radiant systems
! *QsrcHist(SurfNum,1) &
+HConvIn(SurfNum2)*MAT(ZoneNum2) & ! Use TDD:DIFFUSER surface and zone
+NetLWRadToSurf(SurfNum2) ) ) & ! Use TDD:DIFFUSER surface
/( Ueff+HcExtSurf(SurfNum)+HAirExtSurf(SurfNum)+ &
HSkyExtSurf(SurfNum)+HGrdExtSurf(SurfNum)-F1*Ueff )
! Outside heat balance case: No movable insulation, slow conduction
ELSE IF ( (.NOT. MovInsulPresent) .AND. (.NOT. QuickConductionSurf) ) THEN
If ( Surface(SurfNum)%OSCMPtr == 0 ) THEN
TH(SurfNum,1,1) = (-CTFConstOutPart(SurfNum) &
+QRadSWOutAbs(SurfNum) &
+(HcExtSurf(SurfNum)+HAirExtSurf(SurfNum))*TempExt &
+HSkyExtSurf(SurfNum)*SkyTemp &
+HGrdExtSurf(SurfNum)*OutDryBulbTemp & ! ODB used to approx ground surface temp
+Construct(ConstrNum)%CTFCross(0)*TempSurfIn(SurfNum) &
+Construct(ConstrNum)%CTFSourceOut(0)*QsrcHist(SurfNum,1) ) &
/( Construct(ConstrNum)%CTFOutside(0) &
+HcExtSurf(SurfNum)+HAirExtSurf(SurfNum)+ &
HSkyExtSurf(SurfNum)+HGrdExtSurf(SurfNum) )
! Outside Heat Balance case: Other Side Conditions Model
Else !( Surface(SurfNum)%OSCMPtr > 0 ) THEN
! local copies of variables for clarity in radiation terms
RadTemp = OSCM(Surface(SurfNum)%OSCMPtr)%TRad
HRad = OSCM(Surface(SurfNum)%OSCMPtr)%Hrad
! patterned after "No movable insulation, slow conduction," but with new radiation terms and no sun,
TH(SurfNum,1,1) = ( -CTFConstOutPart(SurfNum) &
+HcExtSurf(SurfNum)*TempExt &
+HRad*RadTemp &
+Construct(ConstrNum)%CTFCross(0)*TempSurfIn(SurfNum) &
+Construct(ConstrNum)%CTFSourceOut(0)*QsrcHist(SurfNum,1) ) &
/( Construct(ConstrNum)%CTFOutside(0) &
+HcExtSurf(SurfNum) + HRad )
ENDIF
! Outside heat balance case: No movable insulation, quick conduction
ELSE IF ( (.NOT. MovInsulPresent) .AND. (QuickConductionSurf) ) THEN
If ( Surface(SurfNum)%OSCMPtr == 0 ) THEN
TH(SurfNum,1,1) = (-CTFConstOutPart(SurfNum) &
+QRadSWOutAbs(SurfNum) &
+(HcExtSurf(SurfNum)+HAirExtSurf(SurfNum))*TempExt &
+HSkyExtSurf(SurfNum)*SkyTemp &
+HGrdExtSurf(SurfNum)*OutDryBulbTemp & ! ODB used to approx ground surface temp
+Construct(ConstrNum)%CTFSourceOut(0) &
*QsrcHist(SurfNum,1) &
+F1*( CTFConstInPart(SurfNum) &
+QRadSWInAbs(SurfNum) &
+QRadThermInAbs(SurfNum) &
+Construct(ConstrNum)%CTFSourceIn(0) &
*QsrcHist(SurfNum,1) &
+HConvIn(SurfNum)*MAT(ZoneNum) & ! MAT use here is problem for room air models
+NetLWRadToSurf(SurfNum) ) ) &
/( Construct(ConstrNum)%CTFOutside(0)+ &
HcExtSurf(SurfNum)+HAirExtSurf(SurfNum)+ &
HSkyExtSurf(SurfNum)+HGrdExtSurf(SurfNum) &
-F1*Construct(ConstrNum)%CTFCross(0) )
! Outside Heat Balance case: Other Side Conditions Model
Else !( Surface(SurfNum)%OSCMPtr > 0 ) THEN
! local copies of variables for clarity in radiation terms
RadTemp = OSCM(Surface(SurfNum)%OSCMPtr)%TRad
HRad = OSCM(Surface(SurfNum)%OSCMPtr)%Hrad
! patterned after "No movable insulation, quick conduction," but with new radiation terms and no sun,
TH(SurfNum,1,1) = (-CTFConstOutPart(SurfNum) &
+HcExtSurf(SurfNum)*TempExt &
+HRad*RadTemp &
+Construct(ConstrNum)%CTFSourceOut(0) &
*QsrcHist(SurfNum,1) &
+F1*( CTFConstInPart(SurfNum) &
+QRadSWInAbs(SurfNum) &
+QRadThermInAbs(SurfNum) &
+Construct(ConstrNum)%CTFSourceIn(0) &
*QsrcHist(SurfNum,1) &
+HConvIn(SurfNum)*MAT(ZoneNum) & ! MAT use here is problem for room air models
+NetLWRadToSurf(SurfNum) ) ) &
/( Construct(ConstrNum)%CTFOutside(0) &
+HcExtSurf(SurfNum) + HRad &
-F1*Construct(ConstrNum)%CTFCross(0) )
ENDIF
! Outside heat balance case: Movable insulation, slow conduction
ELSE IF ( (MovInsulPresent) .AND. (.NOT. QuickConductionSurf) ) THEN
F2 = HMovInsul/( HMovInsul + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) &
+ HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum) )
TH(SurfNum,1,1) = (-CTFConstOutPart(SurfNum) &
+QRadSWOutAbs(SurfNum) &
+Construct(ConstrNum)%CTFCross(0) &
*TempSurfIn(SurfNum) &
+F2*( QRadSWOutMvIns(SurfNum) &
+(HcExtSurf(SurfNum)+HAirExtSurf(SurfNum))*TempExt &
+HSkyExtSurf(SurfNum)*SkyTemp &
+HGrdExtSurf(SurfNum)*OutDryBulbTemp ) ) & ! ODB used to approx ground surface temp
/( Construct(ConstrNum)%CTFOutside(0) &
+HMovInsul - F2*HMovInsul )
! Outside heat balance case: Movable insulation, quick conduction
ELSE IF ( (MovInsulPresent) .AND. (QuickConductionSurf) ) THEN
F2 = HMovInsul/( HMovInsul + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) &
+ HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum) )
TH(SurfNum,1,1) = (-CTFConstOutPart(SurfNum) &
+QRadSWOutAbs(SurfNum) &
+F1*( CTFConstInPart(SurfNum) &
+QRadSWInAbs(SurfNum) &
+QRadThermInAbs(SurfNum) &
+HConvIn(SurfNum)*MAT(ZoneNum) &
+NetLWRadToSurf(SurfNum) ) &
+F2*( QRadSWOutMvIns(SurfNum) &
+(HcExtSurf(SurfNum)+HAirExtSurf(SurfNum))*TempExt &
+HSkyExtSurf(SurfNum)*SkyTemp &
+HGrdExtSurf(SurfNum)*OutDryBulbTemp ) ) & ! ODB used to approx ground surface temp
/( Construct(ConstrNum)%CTFOutside(0) &
+HMovInsul - F2*HMovInsul &
-F1*Construct(ConstrNum)%CTFCross(0) )
END IF ! ...end of outside heat balance cases IF-THEN block
! multiply out linearized radiation coeffs for reporting
QdotRadOutRep(SurfNum) = - Surface(SurfNum)%Area &
* ( HSkyExtSurf(SurfNum)*(TH(SurfNum,1,1) - SkyTemp ) &
+ (HAirExtSurf(SurfNum))*(TH(SurfNum,1,1) - TempExt) &
+ HGrdExtSurf(SurfNum)*(TH(SurfNum,1,1) - OutDryBulbTemp) )
QdotRadOutRepPerArea(SurfNum) = - (HSkyExtSurf(SurfNum)*(TH(SurfNum,1,1)- SkyTemp ) &
+ (HAirExtSurf(SurfNum))*(TH(SurfNum,1,1) - TempExt) &
+ HGrdExtSurf(SurfNum)*(TH(SurfNum,1,1)- OutDryBulbTemp))
QRadOutReport(SurfNum) = QdotRadOutRep(SurfNum) * SecInHour * TimeStepZone
! Set the radiant system heat balance coefficients if this surface is also a radiant system
IF (Construct(ConstrNum)%SourceSinkPresent) THEN
IF (MovInsulPresent) THEN
! Note: if movable insulation is ever added back in correctly, the heat balance equations above must be fixed
CALL ShowFatalError('Movable insulation is not allowed on a radiant system surface at this time')
ELSE
RadSysToHBConstCoef(SurfNum) = (-CTFConstOutPart(SurfNum) &
+QRadSWOutAbs(SurfNum) &
+(HcExtSurf(SurfNum)+HAirExtSurf(SurfNum))*TempExt &
+HSkyExtSurf(SurfNum)*SkyTemp &
+HGrdExtSurf(SurfNum)*OutDryBulbTemp ) & ! ODB used to approx ground surface temp
/(Construct(ConstrNum)%CTFOutside(0)+HcExtSurf(SurfNum)+HAirExtSurf(SurfNum)+ &
HSkyExtSurf(SurfNum)+HGrdExtSurf(SurfNum))
RadSysToHBTinCoef(SurfNum) = Construct(ConstrNum)%CTFCross(0) &
/(Construct(ConstrNum)%CTFOutside(0)+HcExtSurf(SurfNum)+HAirExtSurf(SurfNum)+ &
HSkyExtSurf(SurfNum)+HGrdExtSurf(SurfNum))
RadSysToHBQsrcCoef(SurfNum) = Construct(ConstrNum)%CTFSourceOut(0) &
/(Construct(ConstrNum)%CTFOutside(0)+HcExtSurf(SurfNum)+HAirExtSurf(SurfNum)+ &
HSkyExtSurf(SurfNum)+HGrdExtSurf(SurfNum))
END IF
END IF
RETURN
END SUBROUTINE CalcOutsideSurfTemp