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 | :: | ZoneNum | ||||
integer | :: | IntWinSurfNum | ||||
real(kind=r64) | :: | IntWinDifSolarTransW |
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 CalcInteriorWinTransDifSolInitialDistribution(ZoneNum, IntWinSurfNum, IntWinDifSolarTransW)
! SUBROUTINE INFORMATION:
! AUTHOR Rob Hitchcock
! DATE WRITTEN August 2007
! MODIFIED N/A
! RE-ENGINEERED N/A
! PURPOSE OF THIS SUBROUTINE:
! This subroutine calculates the initial distribution
! of diffuse solar transmitted through the given interior window
! to individual heat transfer surfaces in the given zone.
! Diffuse solar transmitted through interior windows in this zone
! to adjacent zones, is added to the InitialZoneDifSolReflW
! of the adjacent zone for subsequent interreflection calcs
! METHODOLOGY EMPLOYED:
! Similar to method used in CalcWinTransDifSolInitialDistribution.
! Apportions diffuse solar transmitted through an interior window
! that is then absorbed, reflected, and/or transmitted
! by other heat transfer surfaces in the given zone.
! Calculations use:
! 1. DifSolarTransW calculated in SUBROUTINE CalcWinTransDifSolInitialDistribution,
! 2. view factors between the interior window and
! other heat transfer surfaces in the given zone
! calculated in SUBROUTINE CalcApproximateViewFactors, and
! 3. surface absorptances, reflectances, and transmittances
! determined here using revised code from SUBROUTINE InitIntSolarDistribution
! REFERENCES:
! USE STATEMENTS:
USE General, ONLY: InterpSw, InterpSlatAng
USE ScheduleManager, ONLY: GetCurrentScheduleValue
USE DataViewFactorInformation
USE DataHeatBalSurface, ONLY: InitialDifSolInAbs, InitialDifSolInTrans
USE DataHeatBalance, ONLY: InitialDifSolwinAbs, InitialZoneDifSolReflW
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER :: ZoneNum ! Zone index number
INTEGER :: IntWinSurfNum ! Interior Window Surface number in Zone ZoneNum
REAL(r64) :: IntWinDifSolarTransW ! Diffuse Solar transmitted through Interior Window IntWinSurfNum from adjacent zone [W]
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: AdjZoneNum ! Index for adjacent zones
INTEGER :: AdjSurfNum ! Index for adjacent surfaces
INTEGER :: HeatTransSurfNum ! Heat Transfer Surface number
INTEGER :: ConstrNum ! Construction number
! INTEGER :: AdjConstrNum ! Construction number of other side surface
INTEGER :: ConstrNumSh ! Shaded construction number
INTEGER :: IGlass ! Glass layer counter
INTEGER :: TotGlassLayers ! Number of glass layers in a window construction
INTEGER :: ShadeFlag ! Shading flag
REAL(r64) :: AbsInt ! Tmp var for Inside surface short-wave absorptance
REAL(r64) :: MovInsulSchedVal ! Value of the movable insulation schedule for current time
REAL(r64) :: HMovInsul ! Conductance of movable insulation
REAL(r64) :: InsideDifAbsorptance ! Inside diffuse solar absorptance of a surface
REAL(r64) :: InsideDifReflectance ! Inside diffuse solar reflectance of a surface
INTEGER :: BlNum ! Blind number
REAL(r64) :: BlAbsDiffBk ! Glass layer back diffuse solar absorptance when blind in place
REAL(r64) :: AbsDiffBkBl ! Blind diffuse back solar absorptance as part of glazing system
! REAL(r64) :: DividerSolAbs ! Window divider solar absorptance
! REAL(r64) :: DividerSolRefl ! Window divider solar reflectance
! INTEGER :: MatNumGl ! Glass layer material number
! INTEGER :: MatNumSh ! Shade layer material number
! REAL(r64) :: TransGl,ReflGl,AbsGl ! Glass layer solar transmittance, reflectance, absorptance
REAL(r64) :: ViewFactor ! temp var for view factor
REAL(r64) :: ViewFactorTotal ! debug var for view factor total
REAL(r64) :: WinDifSolarTrans ! debug var for WinDifSolar() [W]
REAL(r64) :: WinDifSolarDistTotl ! debug var for window total distributed diffuse solar [W]
REAL(r64) :: WinDifSolarDistAbsorbedTotl ! debug var for individual exterior window total distributed
! diffuse solar absorbed [W]
REAL(r64) :: WinDifSolarDistReflectedTotl ! debug var for individual exterior window total distributed
! diffuse solar reflected [W]
REAL(r64) :: WinDifSolarDistTransmittedTotl ! debug var for individual exterior window total distributed
! diffuse solar transmitted [W]
REAL(r64) :: WinDifSolLayAbsW ! temp var for diffuse solar absorbed by individual glass layer [W]
REAL(r64) :: ZoneDifSolarTrans ! debug var for WinDifSolar() [W]
! REAL(r64) :: ZoneDifSolarDistTotl ! debug var for zone total distributed diffuse solar [W]
REAL(r64) :: ZoneDifSolarDistAbsorbedTotl ! debug var for zone total distributed diffuse solar absorbed [W]
REAL(r64) :: ZoneDifSolarDistReflectedTotl ! debug var for zone total distributed diffuse solar reflected [W]
REAL(r64) :: ZoneDifSolarDistTransmittedTotl ! debug var for zone total distributed diffuse solar transmitted [W]
REAL(r64) :: DifSolarAbsW ! temp var for diffuse solar absorbed by surface [W]
REAL(r64) :: DifSolarAbs ! temp var for diffuse solar absorbed by surface [W/m2]
REAL(r64) :: DifSolarReflW ! temp var for diffuse solar reflected by surface [W]
REAL(r64) :: DifSolarTransW ! temp var for diffuse solar transmitted through interior window surface [W]
REAL(r64) :: ShBlDifSolarAbsW ! temp var for diffuse solar absorbed by shade/blind [W]
INTEGER :: FirstZoneSurf ! conversion index for ViewFactor
INTEGER :: LastZoneSurf ! debug
!-------------------------------------------------------------------------------------------------
! DISTRIBUTE TRANSMITTED DIFFUSE SOLAR THROUGH INTERIOR WINDOW TO INTERIOR HEAT TRANSFER SURFACES
!-------------------------------------------------------------------------------------------------
! Init debug vars
ViewFactorTotal = 0.0d0
WinDifSolarTrans = IntWinDifSolarTransW
! Init Interior Window accumulators for debugging
WinDifSolarDistAbsorbedTotl = 0.0d0
WinDifSolarDistReflectedTotl = 0.0d0
WinDifSolarDistTransmittedTotl = 0.0d0
! Init first and last surfnums for this zone
FirstZoneSurf = Zone(ZoneNum)%SurfaceFirst
LastZoneSurf = Zone(ZoneNum)%SurfaceLast
ZoneDifSolarTrans = 0.0d0
ZoneDifSolarDistAbsorbedTotl = 0.0d0
ZoneDifSolarDistReflectedTotl = 0.0d0
ZoneDifSolarDistTransmittedTotl = 0.0d0
! Loop over all heat transfer surfaces in the current zone that might receive diffuse solar
DO HeatTransSurfNum = Zone(ZoneNum)%SurfaceFirst, Zone(ZoneNum)%SurfaceLast
! Skip surfaces that are not heat transfer surfaces
IF (.NOT.Surface(HeatTransSurfNum)%HeatTransSurf) CYCLE
! Skip tubular daylighting device domes
IF (Surface(HeatTransSurfNum)%Class == SurfaceClass_TDD_Dome) CYCLE
! View factor from current (sending) window IntWinSurfNum to current (receiving) surface HeatTransSurfNum
ViewFactor = ZoneInfo(ZoneNum)%F(IntWinSurfNum-FirstZoneSurf+1, HeatTransSurfNum-FirstZoneSurf+1)
! debug ViewFactorTotal
ViewFactorTotal = ViewFactorTotal + ViewFactor ! debug
! Skip receiving surfaces with 0.0 view factor
IF (ViewFactor <= 0.0d0) CYCLE
! Calculate diffuse solar from current interior window absorbed and reflected by current heat transfer surface
! And calculate transmitted diffuse solar to adjacent zones through interior windows
ConstrNum=Surface(HeatTransSurfNum)%Construction
IF (Construct(ConstrNum)%TransDiff <= 0.0d0) THEN ! Interior Opaque Surface
! Determine the inside (back) diffuse solar absorptance
! and reflectance of the current heat transfer surface
InsideDifAbsorptance = Construct(ConstrNum)%InsideAbsorpSolar
! Check for movable insulation; reproduce code from subr. EvalInsideMovableInsulation;
! Can't call that routine here since cycle prevents SolarShadingGeometry from USEing
! HeatBalanceSurfaceManager, which contains EvalInsideMovableInsulation
HMovInsul = 0.0d0
IF (Surface(HeatTransSurfNum)%MaterialMovInsulInt.GT.0) THEN
MovInsulSchedVal = GetCurrentScheduleValue(Surface(HeatTransSurfNum)%SchedMovInsulExt)
IF (MovInsulSchedVal.LE.0.0d0) THEN ! Movable insulation not present at current time
HMovInsul = 0.0d0
ELSE ! Movable insulation present
HMovInsul = 1.0d0/(MovInsulSchedVal*Material(Surface(HeatTransSurfNum)%MaterialMovInsulInt)%Resistance)
AbsInt = Material(Surface(HeatTransSurfNum)%MaterialMovInsulInt)%AbsorpSolar
END IF
END IF
IF (HMovInsul > 0.0d0) InsideDifAbsorptance = AbsInt ! Movable inside insulation present
! Inside (back) diffuse solar reflectance is assumed to be 1 - absorptance
InsideDifReflectance = 1.0d0 - InsideDifAbsorptance
! Absorbed diffuse solar [W] = current window transmitted diffuse solar [W]
! * view factor from current (sending) window IntWinSurfNum to current (receiving) surface HeatTransSurfNum
! * current surface inside solar absorptance
DifSolarAbsW = IntWinDifSolarTransW & ! [W]
* ViewFactor &
* InsideDifAbsorptance
! Absorbed diffuse solar [W/m2] = Absorbed diffuse solar [W]
! / current surface net area
DifSolarAbs = DifSolarAbsW &
/ Surface(HeatTransSurfNum)%Area
! Accumulate absorbed diffuse solar [W/m2] on this surface for heat balance calcs
InitialDifSolInAbs(HeatTransSurfNum) = InitialDifSolInAbs(HeatTransSurfNum) &
+ DifSolarAbs
! Reflected diffuse solar [W] = current window transmitted diffuse solar
! * view factor from current (sending) window IntWinSurfNum to current (receiving) surface HeatTransSurfNum
! * current window inside solar reflectance
DifSolarReflW = IntWinDifSolarTransW &
* ViewFactor &
* InsideDifReflectance
! Accumulate total reflected distributed diffuse solar for each zone for subsequent interreflection calcs
InitialZoneDifSolReflW(ZoneNum) = InitialZoneDifSolReflW(ZoneNum) &
+ DifSolarReflW ! [W]
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
! For opaque surfaces all incident diffuse is either absorbed or reflected
WinDifSolarDistAbsorbedTotl = WinDifSolarDistAbsorbedTotl + DifSolarAbsW ! debug [W]
WinDifSolarDistReflectedTotl = WinDifSolarDistReflectedTotl + DifSolarReflW ! debug [W]
ZoneDifSolarDistAbsorbedTotl = ZoneDifSolarDistAbsorbedTotl + DifSolarAbsW ! debug [W]
ZoneDifSolarDistReflectedTotl = ZoneDifSolarDistReflectedTotl + DifSolarReflW ! debug [W]
ELSE ! Exterior or Interior Window
ConstrNumSh = Surface(HeatTransSurfNum)%ShadedConstruction
IF(SurfaceWindow(HeatTransSurfNum)%StormWinFlag==1) THEN
ConstrNum = Surface(HeatTransSurfNum)%StormWinConstruction
ConstrNumSh = Surface(HeatTransSurfNum)%StormWinShadedConstruction
END IF
TotGlassLayers = Construct(ConstrNum)%TotGlassLayers
ShadeFlag = SurfaceWindow(HeatTransSurfNum)%ShadingFlag
IF(ShadeFlag <= 0) THEN ! No window shading
! Init accumulator for transmittance calc below
DifSolarAbsW = 0.0d0
! Calc diffuse solar absorbed by all window glass layers
! Note: I am assuming here that individual glass layer absorptances have been corrected
! to account for layer by layer transmittance and reflection effects.
DO IGlass = 1, TotGlassLayers
! Calc diffuse solar absorbed from the inside by each window glass layer [W]
AbsInt = Construct(ConstrNum)%AbsDiffBack(IGlass)
WinDifSolLayAbsW = IntWinDifSolarTransW* ViewFactor * Construct(ConstrNum)%AbsDiffBack(IGlass)
! Accumulate distributed diffuse solar absorbed [W] by overall window for transmittance calc below
DifSolarAbsW = DifSolarAbsW + WinDifSolLayAbsW
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistAbsorbedTotl = WinDifSolarDistAbsorbedTotl + WinDifSolLayAbsW ! debug
ZoneDifSolarDistAbsorbedTotl = ZoneDifSolarDistAbsorbedTotl + WinDifSolLayAbsW ! debug
! Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs
InitialDifSolwinAbs(HeatTransSurfNum,IGlass) = InitialDifSolwinAbs(HeatTransSurfNum,IGlass) &
+ (WinDifSolLayAbsW &
/ Surface(HeatTransSurfNum)%Area)
END DO
! Calc diffuse solar reflected back to zone
! I don't really care if this is a window or opaque surface since I am just
! accumulating all reflected diffuse solar in a zone bucket for "interreflected" distribution
! Reflected diffuse solar [W] = current window transmitted diffuse solar
! * view factor from current (sending) window IntWinSurfNum to current (receiving) surface HeatTransSurfNum
! * current window inside solar reflectance
DifSolarReflW = IntWinDifSolarTransW &
* ViewFactor &
* Construct(ConstrNum)%ReflectSolDiffBack
! Accumulate total reflected distributed diffuse solar for each zone for subsequent interreflection calcs
InitialZoneDifSolReflW(ZoneNum) = InitialZoneDifSolReflW(ZoneNum) &
+ DifSolarReflW ! [W]
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistReflectedTotl = WinDifSolarDistReflectedTotl + DifSolarReflW ! debug
ZoneDifSolarDistReflectedTotl = ZoneDifSolarDistReflectedTotl + DifSolarReflW ! debug
! Calc transmitted Window and Zone total distributed diffuse solar to check for conservation of energy
! This is not very effective since it assigns whatever distributed diffuse solar has not been
! absorbed or reflected to transmitted.
DifSolarTransW = IntWinDifSolarTransW &
* ViewFactor &
- DifSolarAbsW &
- DifSolarReflW
! Accumulate transmitted Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistTransmittedTotl = WinDifSolarDistTransmittedTotl + DifSolarTransW ! debug [W]
ZoneDifSolarDistTransmittedTotl = ZoneDifSolarDistTransmittedTotl + DifSolarTransW ! debug [W]
! Accumulate transmitted diffuse solar for reporting
InitialDifSolInTrans(HeatTransSurfNum) = InitialDifSolInTrans(HeatTransSurfNum) &
+ (DifSolarTransW &
/ Surface(HeatTransSurfNum)%Area)
!-----------------------------------------------------------------------------------
! ADD TRANSMITTED DIFFUSE SOLAR THROUGH INTERIOR WINDOW TO ADJACENT ZONE
! TOTAL REFLECTED DIFFUSE SOLAR FOR SUBSEQUENT INTERREFLECTION CALCS
!-----------------------------------------------------------------------------------
! If this receiving window surface (HeatTransSurfNum) is an interior window,
! add transmitted diffuse solar to adjacent zone total reflected distributed
! diffuse solar for subsequent interreflection calcs
! NOTE: This calc is here because interior windows are currently assumed to have no shading
! Get the adjacent surface number for this receiving window surface
AdjSurfNum = Surface(HeatTransSurfNum)%ExtBoundCond
! If the adjacent surface number is > 0, this is an interior window
IF(AdjSurfNum > 0) THEN ! this is an interior window surface
! Get the adjacent zone index
AdjZoneNum = Surface(AdjSurfNum)%Zone
! Add transmitted diffuse solar to total reflected distributed diffuse solar for each zone
! for subsequent interreflection calcs
InitialZoneDifSolReflW(AdjZoneNum) = InitialZoneDifSolReflW(AdjZoneNum) &
+ DifSolarTransW ! [W]
END IF
ELSE IF(ShadeFlag == IntShadeOn .OR. ShadeFlag >= 3) THEN
! Interior, exterior or between-glass shade, screen or blind in place
! Init accumulator for transmittance calc below
DifSolarAbsW = 0.0d0
WinDifSolLayAbsW = 0.0d0
! First calc diffuse solar absorbed by each glass layer in this window with shade/blind in place
DO IGlass = 1,Construct(ConstrNumSh)%TotGlassLayers
IF(ShadeFlag==IntShadeOn .OR. ShadeFlag==ExtShadeOn .OR. ShadeFlag==BGShadeOn .OR. ShadeFlag==ExtScreenOn) THEN
! Calc diffuse solar absorbed in each window glass layer and shade
WinDifSolLayAbsW = IntWinDifSolarTransW * ViewFactor * Construct(ConstrNumSh)%AbsDiffBack(IGlass)
END IF
IF(ShadeFlag == IntBlindOn .OR. ShadeFlag == ExtBlindOn .or. ShadeFlag == BGBlindOn) THEN
BlAbsDiffBk = InterpSlatAng(SurfaceWindow(HeatTransSurfNum)%SlatAngThisTS, &
SurfaceWindow(HeatTransSurfNum)%MovableSlats, &
Construct(ConstrNumSh)%BlAbsDiffBack(IGlass,1:MaxSlatAngs))
! Calc diffuse solar absorbed in each window glass layer and shade
WinDifSolLayAbsW = IntWinDifSolarTransW * ViewFactor * BlAbsDiffBk
END IF
! Accumulate distributed diffuse solar absorbed [W] by overall window for transmittance calc below
DifSolarAbsW = DifSolarAbsW + WinDifSolLayAbsW
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistAbsorbedTotl = WinDifSolarDistAbsorbedTotl + WinDifSolLayAbsW ! debug
ZoneDifSolarDistAbsorbedTotl = ZoneDifSolarDistAbsorbedTotl + WinDifSolLayAbsW ! debug
! Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs
InitialDifSolwinAbs(HeatTransSurfNum,IGlass) = InitialDifSolwinAbs(HeatTransSurfNum,IGlass) &
+ (WinDifSolLayAbsW &
/ Surface(HeatTransSurfNum)%Area)
END DO
! Next calc diffuse solar reflected back to zone from window with shade or blind on
! Diffuse back solar reflectance, bare glass or shade on
InsideDifReflectance = Construct(ConstrNum)%ReflectSolDiffBack
IF(ShadeFlag == IntBlindOn .OR. ShadeFlag == ExtBlindOn) THEN
! Diffuse back solar reflectance, blind present, vs. slat angle
InsideDifReflectance = InterpSlatAng(SurfaceWindow(HeatTransSurfNum)%SlatAngThisTS, &
SurfaceWindow(HeatTransSurfNum)%MovableSlats, &
Construct(ConstrNum)%BlReflectSolDiffBack)
END IF
DifSolarReflW = IntWinDifSolarTransW &
* ViewFactor &
* InsideDifReflectance
! Accumulate total reflected distributed diffuse solar for each zone for subsequent interreflection calcs
InitialZoneDifSolReflW(ZoneNum) = InitialZoneDifSolReflW(ZoneNum) &
+ DifSolarReflW ! [W]
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistReflectedTotl = WinDifSolarDistReflectedTotl + DifSolarReflW ! debug
ZoneDifSolarDistReflectedTotl = ZoneDifSolarDistReflectedTotl + DifSolarReflW ! debug
! Now calc diffuse solar absorbed by shade/blind itself
BlNum = SurfaceWindow(HeatTransSurfNum)%BlindNumber
IF(ShadeFlag==IntShadeOn .OR. ShadeFlag==ExtShadeOn .OR. ShadeFlag==BGShadeOn .OR. ShadeFlag==ExtScreenOn) THEN
! Calc diffuse solar absorbed by shade or screen [W]
ShBlDifSolarAbsW = IntWinDifSolarTransW * ViewFactor * Construct(ConstrNumSh)%AbsDiffBackShade
END IF
IF(ShadeFlag==IntBlindOn .OR. ShadeFlag==ExtBlindOn .OR. ShadeFlag==BGBlindOn) THEN
! Calc diffuse solar absorbed by blind [W]
AbsDiffBkBl = InterpSlatAng(SurfaceWindow(HeatTransSurfNum)%SlatAngThisTS,SurfaceWindow(HeatTransSurfNum)%MovableSlats, &
Construct(ConstrNumSh)%AbsDiffBackBlind)
ShBlDifSolarAbsW = IntWinDifSolarTransW * ViewFactor * AbsDiffBkBl
END IF
! Correct for divider shadowing
IF(ShadeFlag == ExtShadeOn.OR.ShadeFlag == ExtBlindOn.OR.ShadeFlag == ExtScreenOn) &
ShBlDifSolarAbsW = ShBlDifSolarAbsW * SurfaceWindow(HeatTransSurfNum)%GlazedFrac
! Accumulate diffuse solar absorbed by shade or screen [W/m2] for heat balance calcs
SurfaceWindow(HeatTransSurfNum)%InitialDifSolAbsByShade = SurfaceWindow(HeatTransSurfNum)%InitialDifSolAbsByShade &
+ (ShBlDifSolarAbsW / Surface(HeatTransSurfNum)%Area)
! Accumulate distributed diffuse solar absorbed [W] by overall window for transmittance calc below
DifSolarAbsW = DifSolarAbsW + ShBlDifSolarAbsW
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistAbsorbedTotl = WinDifSolarDistAbsorbedTotl + ShBlDifSolarAbsW ! debug
ZoneDifSolarDistAbsorbedTotl = ZoneDifSolarDistAbsorbedTotl + ShBlDifSolarAbsW ! debug
! Accumulate transmitted Window and Zone total distributed diffuse solar to check for conservation of energy
! This is not very effective since it assigns whatever distributed diffuse solar has not been
! absorbed or reflected to transmitted.
DifSolarTransW = IntWinDifSolarTransW &
* ViewFactor &
- DifSolarAbsW &
- DifSolarReflW
WinDifSolarDistTransmittedTotl = WinDifSolarDistTransmittedTotl + DifSolarTransW ! debug [W]
ZoneDifSolarDistTransmittedTotl = ZoneDifSolarDistTransmittedTotl + DifSolarTransW ! debug [W]
! Accumulate transmitted diffuse solar for reporting
InitialDifSolInTrans(HeatTransSurfNum) = InitialDifSolInTrans(HeatTransSurfNum) &
+ (DifSolarTransW &
/ Surface(HeatTransSurfNum)%Area)
ELSE IF(ShadeFlag == SwitchableGlazing) THEN ! Switchable glazing
! Init accumulator for transmittance calc below
DifSolarAbsW = 0.0d0
DO IGlass = 1,TotGlassLayers
! Calc diffuse solar absorbed in each window glass layer
WinDifSolLayAbsW = IntWinDifSolarTransW * ViewFactor &
* InterpSw(SurfaceWindow(HeatTransSurfNum)%SwitchingFactor, &
Construct(ConstrNum)%AbsDiffBack(IGlass), &
Construct(ConstrNumSh)%AbsDiffBack(IGlass))
! Accumulate distributed diffuse solar absorbed [W] by overall window for transmittance calc below
DifSolarAbsW = DifSolarAbsW + WinDifSolLayAbsW
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistAbsorbedTotl = WinDifSolarDistAbsorbedTotl + WinDifSolLayAbsW ! debug
ZoneDifSolarDistAbsorbedTotl = ZoneDifSolarDistAbsorbedTotl + WinDifSolLayAbsW ! debug
! Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs
InitialDifSolwinAbs(HeatTransSurfNum,IGlass) = InitialDifSolwinAbs(HeatTransSurfNum,IGlass) &
+ (WinDifSolLayAbsW &
/ Surface(HeatTransSurfNum)%Area)
END DO
! Calc diffuse solar reflected back to zone
DifSolarReflW = IntWinDifSolarTransW &
* ViewFactor &
* InterpSw(SurfaceWindow(HeatTransSurfNum)%SwitchingFactor, &
Construct(ConstrNum)%ReflectSolDiffBack, &
Construct(ConstrNumSh)%ReflectSolDiffBack)
! Accumulate total reflected distributed diffuse solar for each zone for subsequent interreflection calcs
InitialZoneDifSolReflW(ZoneNum) = InitialZoneDifSolReflW(ZoneNum) &
+ DifSolarReflW ! [W]
! Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy
WinDifSolarDistReflectedTotl = WinDifSolarDistReflectedTotl + DifSolarReflW ! debug
ZoneDifSolarDistReflectedTotl = ZoneDifSolarDistReflectedTotl + DifSolarReflW ! debug
! Accumulate transmitted Window and Zone total distributed diffuse solar to check for conservation of energy
! This is not very effective since it assigns whatever distributed diffuse solar has not been
! absorbed or reflected to transmitted.
DifSolarTransW = IntWinDifSolarTransW &
* ViewFactor &
- DifSolarAbsW &
- DifSolarReflW
WinDifSolarDistTransmittedTotl = WinDifSolarDistTransmittedTotl + DifSolarTransW ! debug [W]
ZoneDifSolarDistTransmittedTotl = ZoneDifSolarDistTransmittedTotl + DifSolarTransW ! debug [W]
! Accumulate transmitted diffuse solar for reporting
InitialDifSolInTrans(HeatTransSurfNum) = InitialDifSolInTrans(HeatTransSurfNum) &
+ (DifSolarTransW &
/ Surface(HeatTransSurfNum)%Area)
END IF ! End of shading flag check
! HERE 8/14/07 Ignore absorptance and reflectance of Frames and Dividers for now.
! I would need revised view factors that included these surface types.
! By ignoring them here, the diffuse solar is accounted for on the other surfaces
! IF(SurfaceWindow(HeatTransSurfNum)%FrameArea > 0.0) THEN ! Window has a frame
! Note that FrameQRadInAbs is initially calculated in InitSolarHeatGains
! END IF
! IF(SurfaceWindow(HeatTransSurfNum)%DividerArea > 0.0) THEN ! Window has dividers
! DividerSolAbs = SurfaceWindow(HeatTransSurfNum)%DividerSolAbsorp
! IF(SurfaceWindow(HeatTransSurfNum)%DividerType == Suspended) THEN ! Suspended divider; account for inside glass
! MatNumGl = Construct(ConstrNum)%LayerPoint(Construct(ConstrNum)%TotLayers)
! TransGl = Material(MatNumGl)%Trans
! ReflGl = Material(MatNumGl)%ReflectSolDiffBack
! AbsGl = 1.-TransGl-ReflGl
! DividerSolRefl = 1.-DividerSolAbs
! DividerSolAbs = AbsGl + TransGl*(DividerSolAbs + DividerSolRefl*AbsGl)/(1.-DividerSolRefl*ReflGl)
! END IF
! Correct for interior shade transmittance
! IF(ShadeFlag == IntShadeOn) THEN
! MatNumSh = Construct(ConstrNumSh)%LayerPoint(Construct(ConstrNumSh)%TotLayers)
! DividerSolAbs = DividerSolAbs * Material(MatNumSh)%Trans
! ELSE IF(ShadeFlag == IntBlindOn) THEN
! DividerSolAbs = DividerSolAbs * InterpSlatAng(SurfaceWindow(HeatTransSurfNum)%SlatAngThisTS, &
! SurfaceWindow(HeatTransSurfNum)%MovableSlats,Blind(BlNum)%SolBackDiffDiffTrans)
! END IF
! Note that DividerQRadInAbs is initially calculated in InitSolarHeatGains
! END IF ! Window has dividers
END IF ! opaque or window heat transfer surface
END DO ! HeatTransSurfNum = Zone(ZoneNum)%SurfaceFirst, Zone(ZoneNum)%SurfaceLast
! Check debug var for view factors here
! ViewFactorTotal
! Check debug vars for individual transmitting surfaces here
WinDifSolarDistTotl = WinDifSolarDistAbsorbedTotl + WinDifSolarDistReflectedTotl + WinDifSolarDistTransmittedTotl
! WinDifSolarTrans
RETURN
END SUBROUTINE CalcInteriorWinTransDifSolInitialDistribution