diff --git a/src/EnergyPlus/DataGlobals.hh b/src/EnergyPlus/DataGlobals.hh index 2708ee106bd..d1830c69af6 100644 --- a/src/EnergyPlus/DataGlobals.hh +++ b/src/EnergyPlus/DataGlobals.hh @@ -241,7 +241,6 @@ namespace DataGlobals { extern std::function messageCallback; extern std::function errorCallback; extern bool eplusRunningViaAPI; // a flag for capturing whether we are running via API - if so we can't do python plugins - // Clears the global data in DataGlobals. // Needed for unit tests, should not be normally called. void clear_state(EnergyPlus::IOFiles &ioFiles); diff --git a/src/EnergyPlus/DataHeatBalSurface.cc b/src/EnergyPlus/DataHeatBalSurface.cc index 07f8ea599ce..0a0f66a32b3 100644 --- a/src/EnergyPlus/DataHeatBalSurface.cc +++ b/src/EnergyPlus/DataHeatBalSurface.cc @@ -159,88 +159,84 @@ namespace DataHeatBalSurface { Array1D QAirExtReport; // Surface Outside Face Thermal Radiation to Air Heat Transfer Rate [W] Array1D QHeatEmiReport; // Surface Outside Face Heat Emission to Air Rate [W] - Array1D OpaqSurfInsFaceCondGainRep; // Equals Opaq Surf Ins Face Cond + Array1D SurfOpaqInsFaceCondGainRep; // Equals Opaq Surf Ins Face Cond // when Opaq Surf Ins Face Cond >= 0 - Array1D OpaqSurfInsFaceCondLossRep; // Equals -Opaq Surf Ins Face Cond + Array1D SurfOpaqInsFaceCondLossRep; // Equals -Opaq Surf Ins Face Cond // when Opaq Surf Ins Face Cond < 0 - Array1D OpaqSurfInsFaceConduction; // Opaque surface inside face heat conduction flow (W) + Array1D SurfOpaqInsFaceConduction; // Opaque surface inside face heat conduction flow (W) // from inside of opaque surfaces, for reporting (W) - Array1D OpaqSurfInsFaceConductionFlux; // Opaque surface inside face heat conduction flux (W/m2) + Array1D SurfOpaqInsFaceConductionFlux; // Opaque surface inside face heat conduction flux (W/m2) // from inside of opaque surfaces, for reporting (W/m2) - Array1D OpaqSurfInsFaceConductionEnergy; // Opaque surface inside face heat conduction flow (J) + Array1D SurfOpaqInsFaceConductionEnergy; // Opaque surface inside face heat conduction flow (J) // from inside of opaque surfaces, for reporting (J) - Array1D OpaqSurfExtFaceCondGainRep; // Equals Opaq Surf Ext Face Cond + Array1D SurfOpaqExtFaceCondGainRep; // Equals Opaq Surf Ext Face Cond // when Opaq Surf Ext Face Cond >= 0 - Array1D OpaqSurfExtFaceCondLossRep; // Equals -Opaq Surf Ext Face Cond + Array1D SurfOpaqExtFaceCondLossRep; // Equals -Opaq Surf Ext Face Cond // when Opaq Surf Ext Face Cond < 0 - Array1D OpaqSurfOutsideFaceConduction; // Opaque surface outside face heat conduction flow (W) + Array1D SurfOpaqOutsideFaceConduction; // Opaque surface outside face heat conduction flow (W) // from inside of opaque surfaces, for reporting (W) - Array1D OpaqSurfOutsideFaceConductionFlux; // Opaque surface outside face heat conduct flux (W/m2) + Array1D SurfOpaqOutsideFaceConductionFlux; // Opaque surface outside face heat conduct flux (W/m2) // from outside of opaque surfaces, for reporting (W/m2) - Array1D OpaqSurfOutsideFaceConductionEnergy; // Opaque surface outside face heat conduction flow (J) + Array1D SurfOpaqOutsideFaceConductionEnergy; // Opaque surface outside face heat conduction flow (J) // from inside of opaque surfaces, for reporting (J) - Array1D OpaqSurfAvgFaceCondGainRep; // Equals Opaq Surf average Face Cond + Array1D SurfOpaqAvgFaceCondGainRep; // Equals Opaq Surf average Face Cond // when Opaq Surf average Face Cond >= 0 - Array1D OpaqSurfAvgFaceCondLossRep; // Equals -Opaq Surf average Face Cond + Array1D SurfOpaqAvgFaceCondLossRep; // Equals -Opaq Surf average Face Cond // when Opaq Surf average Face Cond < 0 - Array1D OpaqSurfAvgFaceConduction; // Opaque surface average heat conduction flow (W) + Array1D SurfOpaqAvgFaceConduction; // Opaque surface average heat conduction flow (W) // net conduction from outside environ toward inside zone // from inside of opaque surfaces, for reporting (W) - Array1D OpaqSurfAvgFaceConductionFlux; // Opaque surface average face heat conduction flux (W/m2) + Array1D SurfOpaqAvgFaceConductionFlux; // Opaque surface average face heat conduction flux (W/m2) // net conduction from outside environ to inside zone // from inside of opaque surfaces, for reporting (W/m2) - Array1D OpaqSurfAvgFaceConductionEnergy; // Opaque surface average heat conduction flow (J) + Array1D SurfOpaqAvgFaceConductionEnergy; // Opaque surface average heat conduction flow (J) // net conduction from outside environ toward inside zone // from inside of opaque surfaces, for reporting (J) - Array1D OpaqSurfStorageGainRep; // Equals Opaque surface stored heat conduction flow + Array1D SurfOpaqStorageGainRep; // Equals Opaque surface stored heat conduction flow // when Opaque surface stored heat conduction flow >= 0 - Array1D OpaqSurfStorageCondLossRep; // Equals -Opaque surface stored heat conduction flow + Array1D SurfOpaqStorageCondLossRep; // Equals -Opaque surface stored heat conduction flow // when Opaque surface stored heat conduction flow < 0 - Array1D OpaqSurfStorageConduction; // Opaque surface stored heat conduction flow (W) + Array1D SurfOpaqStorageConduction; // Opaque surface stored heat conduction flow (W) // storage of heat inside surface, positive is increasing in surf - Array1D OpaqSurfStorageConductionFlux; // Opaque surface stored heat conduction flux (W/m2) + Array1D SurfOpaqStorageConductionFlux; // Opaque surface stored heat conduction flux (W/m2) // storage of heat inside surface, positive is increasing in surf - Array1D OpaqSurfStorageConductionEnergy; // Opaque surface stored heat conduction flow (J) + Array1D SurfOpaqStorageConductionEnergy; // Opaque surface stored heat conduction flow (J) // storage of heat inside surface, positive is increasing in surf - Array1D OpaqSurfInsFaceBeamSolAbsorbed; // Opaque surface inside face absorbed beam solar, + Array1D SurfOpaqInsFaceBeamSolAbsorbed; // Opaque surface inside face absorbed beam solar, // for reporting (W) - Array1D TempSurfOut; // Temperature of the Outside Surface for each heat transfer surface + Array1D SurfTempOut; // Temperature of the Outside Surface for each heat transfer surface // used for reporting purposes only. Ref: TH(x,1,1) - Array1D QRadSWOutMvIns; // Short wave radiation absorbed on outside of movable insulation + Array1D SurfQRadSWOutMvIns; // Short wave radiation absorbed on outside of movable insulation // unusedREAL(r64), ALLOCATABLE, DIMENSION(:) :: QBV !Beam solar absorbed by interior shades in a zone, plus // diffuse from beam not absorbed in zone, plus // beam absorbed at inside surfaces - Array1D QC; // Short-Wave Radiation Converted Direct To Convection - Array1D QD; // Diffuse solar radiation in a zone from sky and ground diffuse entering + Array1D EnclSolQD; // Diffuse solar radiation in a zone from sky and ground diffuse entering // through exterior windows and reflecting from interior surfaces, // beam from exterior windows reflecting from interior surfaces, // and beam entering through interior windows (considered diffuse) - Array1D QDforDaylight; // Diffuse solar radiation in a zone from sky and ground diffuse entering + Array1D EnclSolQDforDaylight; // Diffuse solar radiation in a zone from sky and ground diffuse entering // through exterior windows, beam from exterior windows reflecting // from interior surfaces, and beam entering through interior windows - //(considered diffuse) + // (considered diffuse) // Originally QD, now used only for QSDifSol calc for daylighting - Array1D QDV; // Diffuse solar radiation in a zone from sky and ground diffuse entering - // through exterior windows - Array1D VMULT; // 1/(Sum Of A Zone's Inside Surfaces Area*Absorptance) - Array1D VCONV; // Fraction Of Short-Wave Radiation From Lights Converted To Convection - Array1D NetLWRadToSurf; // Net interior long wavelength radiation to a surface from other surfaces + Array1D EnclSolVMULT; // 1/(Sum Of A Zone's Inside Surfaces Area*Absorptance) + Array1D SurfNetLWRadToSurf; // Net interior long wavelength radiation to a surface from other surfaces Array1D ZoneMRT; // Zone Mean Radiant Temperature - Array1D QRadSWLightsInAbs; // Short wave from Lights radiation absorbed on inside of opaque surface + Array1D SurfOpaqQRadSWLightsInAbs; // Short wave from Lights radiation absorbed on inside of opaque surface // Variables that are used in both the Surface Heat Balance and the Moisture Balance - Array1D QRadSWOutAbs; // Short wave radiation absorbed on outside of opaque surface - Array1D QRadSWInAbs; // Short wave radiation absorbed on inside of opaque surface - Array1D QRadLWOutSrdSurfs; // Long wave radiation absorbed on outside of exterior surface + Array1D SurfOpaqQRadSWOutAbs; // Short wave radiation absorbed on outside of opaque surface + Array1D SurfOpaqQRadSWInAbs; // Short wave radiation absorbed on inside of opaque surface + Array1D SurfQRadLWOutSrdSurfs; // Long wave radiation absorbed on outside of exterior surface - Array1D QAdditionalHeatSourceOutside; // Additional heat source term on boundary conditions at outside surface - Array1D QAdditionalHeatSourceInside; // Additional heat source term on boundary conditions at inside surface + Array1D SurfQAdditionalHeatSourceOutside; // Additional heat source term on boundary conditions at outside surface + Array1D SurfQAdditionalHeatSourceInside; // Additional heat source term on boundary conditions at inside surface - Array1D InitialDifSolInAbs; // Initial diffuse solar absorbed on inside of opaque surface [W/m2] - Array1D InitialDifSolInTrans; // Initial diffuse solar transmitted out through window surface [W/m2] + Array1D SurfOpaqInitialDifSolInAbs; // Initial diffuse solar absorbed on inside of opaque surface [W/m2] + Array1D SurfWinInitialDifSolInTrans; // Initial diffuse solar transmitted out through window surface [W/m2] // REAL(r64) variables from BLDCTF.inc and only used in the Heat Balance Array3D TH; // Temperature History (SurfNum,Hist Term,In/Out) where: @@ -324,45 +320,42 @@ namespace DataHeatBalSurface { QRadOutReport.deallocate(); QdotRadOutRep.deallocate(); QdotRadOutRepPerArea.deallocate(); - OpaqSurfInsFaceCondGainRep.deallocate(); - OpaqSurfInsFaceCondLossRep.deallocate(); - OpaqSurfInsFaceConduction.deallocate(); - OpaqSurfInsFaceConductionFlux.deallocate(); - OpaqSurfInsFaceConductionEnergy.deallocate(); - OpaqSurfExtFaceCondGainRep.deallocate(); - OpaqSurfExtFaceCondLossRep.deallocate(); - OpaqSurfOutsideFaceConduction.deallocate(); - OpaqSurfOutsideFaceConductionFlux.deallocate(); - OpaqSurfOutsideFaceConductionEnergy.deallocate(); - OpaqSurfAvgFaceCondGainRep.deallocate(); - OpaqSurfAvgFaceCondLossRep.deallocate(); - OpaqSurfAvgFaceConduction.deallocate(); - OpaqSurfAvgFaceConductionFlux.deallocate(); - OpaqSurfAvgFaceConductionEnergy.deallocate(); - OpaqSurfStorageGainRep.deallocate(); - OpaqSurfStorageCondLossRep.deallocate(); - OpaqSurfStorageConduction.deallocate(); - OpaqSurfStorageConductionFlux.deallocate(); - OpaqSurfStorageConductionEnergy.deallocate(); - OpaqSurfInsFaceBeamSolAbsorbed.deallocate(); - TempSurfOut.deallocate(); - QRadSWOutMvIns.deallocate(); - QC.deallocate(); - QD.deallocate(); - QDforDaylight.deallocate(); - QDV.deallocate(); - VMULT.deallocate(); - VCONV.deallocate(); - NetLWRadToSurf.deallocate(); + SurfOpaqInsFaceCondGainRep.deallocate(); + SurfOpaqInsFaceCondLossRep.deallocate(); + SurfOpaqInsFaceConduction.deallocate(); + SurfOpaqInsFaceConductionFlux.deallocate(); + SurfOpaqInsFaceConductionEnergy.deallocate(); + SurfOpaqExtFaceCondGainRep.deallocate(); + SurfOpaqExtFaceCondLossRep.deallocate(); + SurfOpaqOutsideFaceConduction.deallocate(); + SurfOpaqOutsideFaceConductionFlux.deallocate(); + SurfOpaqOutsideFaceConductionEnergy.deallocate(); + SurfOpaqAvgFaceCondGainRep.deallocate(); + SurfOpaqAvgFaceCondLossRep.deallocate(); + SurfOpaqAvgFaceConduction.deallocate(); + SurfOpaqAvgFaceConductionFlux.deallocate(); + SurfOpaqAvgFaceConductionEnergy.deallocate(); + SurfOpaqStorageGainRep.deallocate(); + SurfOpaqStorageCondLossRep.deallocate(); + SurfOpaqStorageConduction.deallocate(); + SurfOpaqStorageConductionFlux.deallocate(); + SurfOpaqStorageConductionEnergy.deallocate(); + SurfOpaqInsFaceBeamSolAbsorbed.deallocate(); + SurfTempOut.deallocate(); + SurfQRadSWOutMvIns.deallocate(); + EnclSolQD.deallocate(); + EnclSolQDforDaylight.deallocate(); + EnclSolVMULT.deallocate(); + SurfNetLWRadToSurf.deallocate(); ZoneMRT.deallocate(); - QRadSWLightsInAbs.deallocate(); - QRadSWOutAbs.deallocate(); - QRadSWInAbs.deallocate(); - QRadLWOutSrdSurfs.deallocate(); - QAdditionalHeatSourceOutside.deallocate(); - QAdditionalHeatSourceInside.deallocate(); - InitialDifSolInAbs.deallocate(); - InitialDifSolInTrans.deallocate(); + SurfOpaqQRadSWLightsInAbs.deallocate(); + SurfOpaqQRadSWOutAbs.deallocate(); + SurfOpaqQRadSWInAbs.deallocate(); + SurfQRadLWOutSrdSurfs.deallocate(); + SurfQAdditionalHeatSourceOutside.deallocate(); + SurfQAdditionalHeatSourceInside.deallocate(); + SurfOpaqInitialDifSolInAbs.deallocate(); + SurfWinInitialDifSolInTrans.deallocate(); TH.deallocate(); QH.deallocate(); THM.deallocate(); diff --git a/src/EnergyPlus/DataHeatBalSurface.hh b/src/EnergyPlus/DataHeatBalSurface.hh index d426055533c..36095f69040 100644 --- a/src/EnergyPlus/DataHeatBalSurface.hh +++ b/src/EnergyPlus/DataHeatBalSurface.hh @@ -156,88 +156,84 @@ namespace DataHeatBalSurface { extern Array1D QHeatEmiReport; // Surface Outside Face Heat Emission to Air Rate [W] // Outside face surf - extern Array1D OpaqSurfInsFaceCondGainRep; // Equals Opaq Surf Ins Face Cond + extern Array1D SurfOpaqInsFaceCondGainRep; // Equals Opaq Surf Ins Face Cond // when Opaq Surf Ins Face Cond >= 0 - extern Array1D OpaqSurfInsFaceCondLossRep; // Equals -Opaq Surf Ins Face Cond + extern Array1D SurfOpaqInsFaceCondLossRep; // Equals -Opaq Surf Ins Face Cond // when Opaq Surf Ins Face Cond < 0 - extern Array1D OpaqSurfInsFaceConduction; // Opaque surface inside face heat conduction flow (W) + extern Array1D SurfOpaqInsFaceConduction; // Opaque surface inside face heat conduction flow (W) // from inside of opaque surfaces, for reporting (W) - extern Array1D OpaqSurfInsFaceConductionFlux; // Opaque surface inside face heat conduction flux (W/m2) + extern Array1D SurfOpaqInsFaceConductionFlux; // Opaque surface inside face heat conduction flux (W/m2) // from inside of opaque surfaces, for reporting (W/m2) - extern Array1D OpaqSurfInsFaceConductionEnergy; // Opaque surface inside face heat conduction flow (J) + extern Array1D SurfOpaqInsFaceConductionEnergy; // Opaque surface inside face heat conduction flow (J) // from inside of opaque surfaces, for reporting (J) - extern Array1D OpaqSurfExtFaceCondGainRep; // Equals Opaq Surf Ext Face Cond + extern Array1D SurfOpaqExtFaceCondGainRep; // Equals Opaq Surf Ext Face Cond // when Opaq Surf Ext Face Cond >= 0 - extern Array1D OpaqSurfExtFaceCondLossRep; // Equals -Opaq Surf Ext Face Cond + extern Array1D SurfOpaqExtFaceCondLossRep; // Equals -Opaq Surf Ext Face Cond // when Opaq Surf Ext Face Cond < 0 - extern Array1D OpaqSurfOutsideFaceConduction; // Opaque surface outside face heat conduction flow (W) + extern Array1D SurfOpaqOutsideFaceConduction; // Opaque surface outside face heat conduction flow (W) // from inside of opaque surfaces, for reporting (W) - extern Array1D OpaqSurfOutsideFaceConductionFlux; // Opaque surface outside face heat conduct flux (W/m2) + extern Array1D SurfOpaqOutsideFaceConductionFlux; // Opaque surface outside face heat conduct flux (W/m2) // from outside of opaque surfaces, for reporting (W/m2) - extern Array1D OpaqSurfOutsideFaceConductionEnergy; // Opaque surface outside face heat conduction flow (J) + extern Array1D SurfOpaqOutsideFaceConductionEnergy; // Opaque surface outside face heat conduction flow (J) // from inside of opaque surfaces, for reporting (J) - extern Array1D OpaqSurfAvgFaceCondGainRep; // Equals Opaq Surf average Face Cond + extern Array1D SurfOpaqAvgFaceCondGainRep; // Equals Opaq Surf average Face Cond // when Opaq Surf average Face Cond >= 0 - extern Array1D OpaqSurfAvgFaceCondLossRep; // Equals -Opaq Surf average Face Cond + extern Array1D SurfOpaqAvgFaceCondLossRep; // Equals -Opaq Surf average Face Cond // when Opaq Surf average Face Cond < 0 - extern Array1D OpaqSurfAvgFaceConduction; // Opaque surface average heat conduction flow (W) + extern Array1D SurfOpaqAvgFaceConduction; // Opaque surface average heat conduction flow (W) // net conduction from outside environ toward inside zone // from inside of opaque surfaces, for reporting (W) - extern Array1D OpaqSurfAvgFaceConductionFlux; // Opaque surface average face heat conduction flux (W/m2) + extern Array1D SurfOpaqAvgFaceConductionFlux; // Opaque surface average face heat conduction flux (W/m2) // net conduction from outside environ to inside zone // from inside of opaque surfaces, for reporting (W/m2) - extern Array1D OpaqSurfAvgFaceConductionEnergy; // Opaque surface average heat conduction flow (J) + extern Array1D SurfOpaqAvgFaceConductionEnergy; // Opaque surface average heat conduction flow (J) // net conduction from outside environ toward inside zone // from inside of opaque surfaces, for reporting (J) - extern Array1D OpaqSurfStorageGainRep; // Equals Opaque surface stored heat conduction flow + extern Array1D SurfOpaqStorageGainRep; // Equals Opaque surface stored heat conduction flow // when Opaque surface stored heat conduction flow >= 0 - extern Array1D OpaqSurfStorageCondLossRep; // Equals -Opaque surface stored heat conduction flow + extern Array1D SurfOpaqStorageCondLossRep; // Equals -Opaque surface stored heat conduction flow // when Opaque surface stored heat conduction flow < 0 - extern Array1D OpaqSurfStorageConduction; // Opaque surface stored heat conduction flow (W) + extern Array1D SurfOpaqStorageConduction; // Opaque surface stored heat conduction flow (W) // storage of heat inside surface, positive is increasing in surf - extern Array1D OpaqSurfStorageConductionFlux; // Opaque surface stored heat conduction flux (W/m2) + extern Array1D SurfOpaqStorageConductionFlux; // Opaque surface stored heat conduction flux (W/m2) // storage of heat inside surface, positive is increasing in surf - extern Array1D OpaqSurfStorageConductionEnergy; // Opaque surface stored heat conduction flow (J) + extern Array1D SurfOpaqStorageConductionEnergy; // Opaque surface stored heat conduction flow (J) // storage of heat inside surface, positive is increasing in surf - extern Array1D OpaqSurfInsFaceBeamSolAbsorbed; // Opaque surface inside face absorbed beam solar, + extern Array1D SurfOpaqInsFaceBeamSolAbsorbed; // Opaque surface inside face absorbed beam solar, // for reporting (W) - extern Array1D TempSurfOut; // Temperature of the Outside Surface for each heat transfer surface + extern Array1D SurfTempOut; // Temperature of the Outside Surface for each heat transfer surface // used for reporting purposes only. Ref: TH(x,1,1) - extern Array1D QRadSWOutMvIns; // Short wave radiation absorbed on outside of movable insulation + extern Array1D SurfQRadSWOutMvIns; // Short wave radiation absorbed on outside of movable insulation // unusedREAL(r64), ALLOCATABLE, DIMENSION(:) :: QBV !Beam solar absorbed by interior shades in a zone, plus // diffuse from beam not absorbed in zone, plus // beam absorbed at inside surfaces - extern Array1D QC; // Short-Wave Radiation Converted Direct To Convection - extern Array1D QD; // Diffuse solar radiation in a zone from sky and ground diffuse entering + extern Array1D EnclSolQD; // Diffuse solar radiation in a zone from sky and ground diffuse entering // through exterior windows and reflecting from interior surfaces, // beam from exterior windows reflecting from interior surfaces, // and beam entering through interior windows (considered diffuse) - extern Array1D QDforDaylight; // Diffuse solar radiation in a zone from sky and ground diffuse entering + extern Array1D EnclSolQDforDaylight; // Diffuse solar radiation in a zone from sky and ground diffuse entering // through exterior windows, beam from exterior windows reflecting // from interior surfaces, and beam entering through interior windows //(considered diffuse) // Originally QD, now used only for QSDifSol calc for daylighting - extern Array1D QDV; // Diffuse solar radiation in a zone from sky and ground diffuse entering - // through exterior windows - extern Array1D VMULT; // 1/(Sum Of A Zone's Inside Surfaces Area*Absorptance) - extern Array1D VCONV; // Fraction Of Short-Wave Radiation From Lights Converted To Convection - extern Array1D NetLWRadToSurf; // Net interior long wavelength radiation to a surface from other surfaces + extern Array1D EnclSolVMULT; // 1/(Sum Of A Zone's Inside Surfaces Area*Absorptance) + extern Array1D SurfNetLWRadToSurf; // Net interior long wavelength radiation to a surface from other surfaces extern Array1D ZoneMRT; // Zone Mean Radiant Temperature - extern Array1D QRadSWLightsInAbs; // Short wave from Lights radiation absorbed on inside of opaque surface + extern Array1D SurfOpaqQRadSWLightsInAbs; // Short wave from Lights radiation absorbed on inside of opaque surface // Variables that are used in both the Surface Heat Balance and the Moisture Balance - extern Array1D QRadSWOutAbs; // Short wave radiation absorbed on outside of opaque surface - extern Array1D QRadSWInAbs; // Short wave radiation absorbed on inside of opaque surface - extern Array1D QRadLWOutSrdSurfs; // Long wave radiation absorbed on outside of exterior surface + extern Array1D SurfOpaqQRadSWOutAbs; // Short wave radiation absorbed on outside of opaque surface + extern Array1D SurfOpaqQRadSWInAbs; // Short wave radiation absorbed on inside of opaque surface + extern Array1D SurfQRadLWOutSrdSurfs; // Long wave radiation absorbed on outside of exterior surface - extern Array1D QAdditionalHeatSourceOutside; // Additional heat source term on boundary conditions - extern Array1D QAdditionalHeatSourceInside; // Additional heat source term on boundary conditions + extern Array1D SurfQAdditionalHeatSourceOutside; // Additional heat source term on boundary conditions + extern Array1D SurfQAdditionalHeatSourceInside; // Additional heat source term on boundary conditions - extern Array1D InitialDifSolInAbs; // Initial diffuse solar absorbed on inside of opaque surface [W/m2] - extern Array1D InitialDifSolInTrans; // Initial diffuse solar transmitted out through window surface [W/m2] + extern Array1D SurfOpaqInitialDifSolInAbs; // Initial diffuse solar absorbed on inside of opaque surface [W/m2] + extern Array1D SurfWinInitialDifSolInTrans; // Initial diffuse solar transmitted out through window surface [W/m2] // REAL(r64) variables from BLDCTF.inc and only used in the Heat Balance extern Array3D TH; // Temperature History (SurfNum,Hist Term,In/Out) where: diff --git a/src/EnergyPlus/DataHeatBalance.cc b/src/EnergyPlus/DataHeatBalance.cc index d5dc7a85bf2..d002250a826 100644 --- a/src/EnergyPlus/DataHeatBalance.cc +++ b/src/EnergyPlus/DataHeatBalance.cc @@ -631,39 +631,7 @@ namespace DataHeatBalance { Array1D ZoneOpaqSurfExtFaceCond; // Zone outside face opaque surface conduction (W) Array1D ZoneOpaqSurfExtFaceCondGainRep; // = Zone outside face opaque surface conduction when >= 0 Array1D ZoneOpaqSurfExtFaceCondLossRep; // = -Zone outside face opaque surface conduction when < 0 - Array1D QRadThermInAbs; // Thermal radiation absorbed on inside surfaces - Array2D QRadSWwinAbs; // Short wave radiation absorbed in window glass layers - Array2D InitialDifSolwinAbs; // Initial diffuse solar absorbed in window glass layers - // from inside(W/m2) - Array1D QRadSWOutIncident; // Exterior beam plus diffuse solar incident on surface (W/m2) - Array1D QRadSWOutIncidentBeam; // Exterior beam solar incident on surface (W/m2) - Array1D BmIncInsSurfIntensRep; // Beam sol irrad from ext wins on inside of surface (W/m2) - Array1D BmIncInsSurfAmountRep; // Beam sol amount from ext wins incident on inside of surface (W) - Array1D IntBmIncInsSurfIntensRep; // Beam sol irrad from int wins on inside of surface (W/m2) - Array1D IntBmIncInsSurfAmountRep; // Beam sol amount from int wins incident on inside of surface (W) - Array1D QRadSWOutIncidentSkyDiffuse; // Exterior sky diffuse solar incident on surface (W/m2) - Array1D QRadSWOutIncidentGndDiffuse; // Exterior ground diffuse solar incident on surface (W/m2) - Array1D QRadSWOutIncBmToDiffReflGnd; // Exterior diffuse solar incident from beam to diffuse - // reflection from ground (W/m2) - Array1D QRadSWOutIncSkyDiffReflGnd; // Exterior diffuse solar incident from sky diffuse - // reflection from ground (W/m2) - Array1D QRadSWOutIncBmToBmReflObs; // Exterior beam solar incident from beam-to-beam - // reflection from obstructions (W/m2) - Array1D QRadSWOutIncBmToDiffReflObs; // Exterior diffuse solar incident from beam-to-diffuse - // reflection from obstructions (W/m2) - Array1D QRadSWOutIncSkyDiffReflObs; // Exterior diffuse solar incident from sky diffuse - // reflection from obstructions (W/m2) - Array1D CosIncidenceAngle; // Cosine of beam solar incidence angle (for reporting) - - Array1D_int SurfWinBSDFBeamDirectionRep; // BSDF beam direction number for given complex fenestration state (for reporting) [] - Array1D SurfWinBSDFBeamThetaRep; // BSDF beam Theta angle (for reporting) [rad] - Array1D SurfWinBSDFBeamPhiRep; // BSDF beam Phi angle (for reporting) [rad] - - Array1D QRadSWwinAbsTot; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) - Array2D QRadSWwinAbsLayer; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) - - Array2D FenLaySurfTempFront; // Front surface temperatures of fenestration layers - Array2D FenLaySurfTempBack; // Back surface temperatures of fenestration layers + Array1D ZoneTransSolarEnergy; // Energy of ZoneTransSolar [J] Array1D ZoneWinHeatGainRepEnergy; // Energy of ZoneWinHeatGainRep [J] Array1D ZoneWinHeatLossRepEnergy; // Energy of ZoneWinHeatLossRep [J] @@ -675,21 +643,43 @@ namespace DataHeatBalance { Array1D ZnOpqSurfInsFaceCondLsRepEnrg; // Energy of ZoneOpaqSurfInsFaceCondLossRep [J] Array1D ZnOpqSurfExtFaceCondGnRepEnrg; // Energy of ZoneOpaqSurfInsFaceCondGainRep [J] Array1D ZnOpqSurfExtFaceCondLsRepEnrg; // Energy of ZoneOpaqSurfInsFaceCondLossRep [J] - Array1D BmIncInsSurfAmountRepEnergy; // energy of BmIncInsSurfAmountRep [J] - Array1D IntBmIncInsSurfAmountRepEnergy; // energy of IntBmIncInsSurfAmountRep [J] - Array1D QRadSWwinAbsTotEnergy; // Energy of QRadSWwinAbsTot [J] - Array1D SWwinAbsTotalReport; // Report - Total interior/exterior shortwave - // absorbed in all glass layers of window (W) - Array1D InitialDifSolInAbsReport; // Report - Initial transmitted diffuse solar - // absorbed on inside of surface (W) - Array1D InitialDifSolInTransReport; // Report - Initial transmitted diffuse solar - // transmitted out through inside of window surface (W) - Array1D SWInAbsTotalReport; // Report - Total interior/exterior shortwave - // absorbed on inside of surface (W) - Array1D SWOutAbsTotalReport; // Report - Total exterior shortwave/solar - // absorbed on outside of surface (W) - Array1D SWOutAbsEnergyReport; // Report - Total exterior shortwave/solar - // absorbed on outside of surface (j) + + Array1D SurfQRadThermInAbs; // Thermal radiation absorbed on inside surfaces + Array1D SurfQRadSWOutIncident; // Exterior beam plus diffuse solar incident on surface (W/m2) + Array1D SurfQRadSWOutIncidentBeam; // Exterior beam solar incident on surface (W/m2) + Array1D SurfBmIncInsSurfIntensRep; // Beam sol irrad from ext wins on inside of surface (W/m2) + Array1D SurfBmIncInsSurfAmountRep; // Beam sol amount from ext wins incident on inside of surface (W) + Array1D SurfIntBmIncInsSurfIntensRep; // Beam sol irrad from int wins on inside of surface (W/m2) + Array1D SurfIntBmIncInsSurfAmountRep; // Beam sol amount from int wins incident on inside of surface (W) + Array1D SurfQRadSWOutIncidentSkyDiffuse; // Exterior sky diffuse solar incident on surface (W/m2) + Array1D SurfQRadSWOutIncidentGndDiffuse; // Exterior ground diffuse solar incident on surface (W/m2) + Array1D SurfQRadSWOutIncBmToDiffReflGnd; // Exterior diffuse solar incident from beam to diffuse reflection from ground (W/m2) + Array1D SurfQRadSWOutIncSkyDiffReflGnd; // Exterior diffuse solar incident from sky diffuse reflection from ground (W/m2) + Array1D SurfQRadSWOutIncBmToBmReflObs; // Exterior beam solar incident from beam-to-beam reflection from obstructions (W/m2) + Array1D SurfQRadSWOutIncBmToDiffReflObs; // Exterior diffuse solar incident from beam-to-diffuse reflection from obstructions (W/m2) + Array1D SurfQRadSWOutIncSkyDiffReflObs; // Exterior diffuse solar incident from sky diffuse reflection from obstructions (W/m2) + Array1D SurfCosIncidenceAngle; // Cosine of beam solar incidence angle (for reporting) + + Array1D SurfSWInAbsTotalReport; // Report - Total interior/exterior shortwave absorbed on inside of surface (W) + Array1D SurfBmIncInsSurfAmountRepEnergy; // energy of BmIncInsSurfAmountRep [J] + Array1D SurfIntBmIncInsSurfAmountRepEnergy; // energy of IntBmIncInsSurfAmountRep [J] + Array1D SurfInitialDifSolInAbsReport; // Report - Initial transmitted diffuse solar absorbed on inside of surface (W) + + Array1D_int SurfWinBSDFBeamDirectionRep; // BSDF beam direction number for given complex fenestration state (for reporting) [] + Array1D SurfWinBSDFBeamThetaRep; // BSDF beam Theta angle (for reporting) [rad] + Array1D SurfWinBSDFBeamPhiRep; // BSDF beam Phi angle (for reporting) [rad] + Array1D SurfWinQRadSWwinAbsTot; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) + Array2D SurfWinQRadSWwinAbsLayer; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) + Array2D SurfWinFenLaySurfTempFront; // Front surface temperatures of fenestration layers + Array2D SurfWinFenLaySurfTempBack; // Back surface temperatures of fenestration layers + Array1D SurfWinQRadSWwinAbsTotEnergy; // Energy of QRadSWwinAbsTot [J] + Array1D SurfWinSWwinAbsTotalReport; // Report - Total interior/exterior shortwave absorbed in all glass layers of window (W) + Array1D SurfWinInitialDifSolInTransReport; // Report - Initial transmitted diffuse solar transmitted out through inside of window surface (W) + Array2D SurfWinQRadSWwinAbs; // Short wave radiation absorbed in window glass layers + Array2D SurfWinInitialDifSolwinAbs; // Initial diffuse solar absorbed in window glass layers from inside(W/m2) + + Array1D SurfOpaqSWOutAbsTotalReport; // Report - Total exterior shortwave/solar absorbed on outside of surface (W) + Array1D SurfOpaqSWOutAbsEnergyReport; // Report - Total exterior shortwave/solar absorbed on outside of surface (j) Array1D NominalR; // Nominal R value of each material -- used in matching interzone surfaces Array1D NominalRforNominalUCalculation; // Nominal R values are summed to calculate NominalU values for constructions @@ -989,30 +979,7 @@ namespace DataHeatBalance { ZoneOpaqSurfExtFaceCond.deallocate(); ZoneOpaqSurfExtFaceCondGainRep.deallocate(); ZoneOpaqSurfExtFaceCondLossRep.deallocate(); - QRadThermInAbs.deallocate(); - QRadSWwinAbs.deallocate(); - InitialDifSolwinAbs.deallocate(); - QRadSWOutIncident.deallocate(); - QRadSWOutIncidentBeam.deallocate(); - BmIncInsSurfIntensRep.deallocate(); - BmIncInsSurfAmountRep.deallocate(); - IntBmIncInsSurfIntensRep.deallocate(); - IntBmIncInsSurfAmountRep.deallocate(); - QRadSWOutIncidentSkyDiffuse.deallocate(); - QRadSWOutIncidentGndDiffuse.deallocate(); - QRadSWOutIncBmToDiffReflGnd.deallocate(); - QRadSWOutIncSkyDiffReflGnd.deallocate(); - QRadSWOutIncBmToBmReflObs.deallocate(); - QRadSWOutIncBmToDiffReflObs.deallocate(); - QRadSWOutIncSkyDiffReflObs.deallocate(); - CosIncidenceAngle.deallocate(); - SurfWinBSDFBeamDirectionRep.deallocate(); - SurfWinBSDFBeamThetaRep.deallocate(); - SurfWinBSDFBeamPhiRep.deallocate(); - QRadSWwinAbsTot.deallocate(); - QRadSWwinAbsLayer.deallocate(); - FenLaySurfTempFront.deallocate(); - FenLaySurfTempBack.deallocate(); + ZoneTransSolarEnergy.deallocate(); ZoneWinHeatGainRepEnergy.deallocate(); ZoneWinHeatLossRepEnergy.deallocate(); @@ -1024,15 +991,44 @@ namespace DataHeatBalance { ZnOpqSurfInsFaceCondLsRepEnrg.deallocate(); ZnOpqSurfExtFaceCondGnRepEnrg.deallocate(); ZnOpqSurfExtFaceCondLsRepEnrg.deallocate(); - BmIncInsSurfAmountRepEnergy.deallocate(); - IntBmIncInsSurfAmountRepEnergy.deallocate(); - QRadSWwinAbsTotEnergy.deallocate(); - SWwinAbsTotalReport.deallocate(); - InitialDifSolInAbsReport.deallocate(); - InitialDifSolInTransReport.deallocate(); - SWInAbsTotalReport.deallocate(); - SWOutAbsTotalReport.deallocate(); - SWOutAbsEnergyReport.deallocate(); + + SurfQRadThermInAbs.deallocate(); + SurfQRadSWOutIncident.deallocate(); + SurfQRadSWOutIncidentBeam.deallocate(); + SurfBmIncInsSurfIntensRep.deallocate(); + SurfBmIncInsSurfAmountRep.deallocate(); + SurfIntBmIncInsSurfIntensRep.deallocate(); + SurfIntBmIncInsSurfAmountRep.deallocate(); + SurfBmIncInsSurfAmountRepEnergy.deallocate(); + SurfIntBmIncInsSurfAmountRepEnergy.deallocate(); + SurfInitialDifSolInAbsReport.deallocate(); + SurfSWInAbsTotalReport.deallocate(); + + SurfQRadSWOutIncidentSkyDiffuse.deallocate(); + SurfQRadSWOutIncidentGndDiffuse.deallocate(); + SurfQRadSWOutIncBmToDiffReflGnd.deallocate(); + SurfQRadSWOutIncSkyDiffReflGnd.deallocate(); + SurfQRadSWOutIncBmToBmReflObs.deallocate(); + SurfQRadSWOutIncBmToDiffReflObs.deallocate(); + SurfQRadSWOutIncSkyDiffReflObs.deallocate(); + SurfCosIncidenceAngle.deallocate(); + + SurfWinBSDFBeamDirectionRep.deallocate(); + SurfWinBSDFBeamThetaRep.deallocate(); + SurfWinBSDFBeamPhiRep.deallocate(); + SurfWinQRadSWwinAbsTot.deallocate(); + SurfWinQRadSWwinAbsLayer.deallocate(); + SurfWinFenLaySurfTempFront.deallocate(); + SurfWinFenLaySurfTempBack.deallocate(); + SurfWinQRadSWwinAbs.deallocate(); + SurfWinInitialDifSolwinAbs.deallocate(); + SurfWinQRadSWwinAbsTotEnergy.deallocate(); + SurfWinSWwinAbsTotalReport.deallocate(); + SurfWinInitialDifSolInTransReport.deallocate(); + + SurfOpaqSWOutAbsTotalReport.deallocate(); + SurfOpaqSWOutAbsEnergyReport.deallocate(); + NominalR.deallocate(); NominalRforNominalUCalculation.deallocate(); NominalU.deallocate(); diff --git a/src/EnergyPlus/DataHeatBalance.hh b/src/EnergyPlus/DataHeatBalance.hh index 619182c71bc..c112de3554b 100644 --- a/src/EnergyPlus/DataHeatBalance.hh +++ b/src/EnergyPlus/DataHeatBalance.hh @@ -478,39 +478,7 @@ namespace DataHeatBalance { extern Array1D ZoneOpaqSurfExtFaceCond; // Zone outside face opaque surface conduction (W) extern Array1D ZoneOpaqSurfExtFaceCondGainRep; // = Zone outside face opaque surface conduction when >= 0 extern Array1D ZoneOpaqSurfExtFaceCondLossRep; // = -Zone outside face opaque surface conduction when < 0 - extern Array1D QRadThermInAbs; // Thermal radiation absorbed on inside surfaces - extern Array2D QRadSWwinAbs; // Short wave radiation absorbed in window glass layers - extern Array2D InitialDifSolwinAbs; // Initial diffuse solar absorbed in window glass layers - // from inside(W/m2) - extern Array1D QRadSWOutIncident; // Exterior beam plus diffuse solar incident on surface (W/m2) - extern Array1D QRadSWOutIncidentBeam; // Exterior beam solar incident on surface (W/m2) - extern Array1D BmIncInsSurfIntensRep; // Beam sol irrad from ext wins on inside of surface (W/m2) - extern Array1D BmIncInsSurfAmountRep; // Beam sol amount from ext wins incident on inside of surface (W) - extern Array1D IntBmIncInsSurfIntensRep; // Beam sol irrad from int wins on inside of surface (W/m2) - extern Array1D IntBmIncInsSurfAmountRep; // Beam sol amount from int wins incident on inside of surface (W) - extern Array1D QRadSWOutIncidentSkyDiffuse; // Exterior sky diffuse solar incident on surface (W/m2) - extern Array1D QRadSWOutIncidentGndDiffuse; // Exterior ground diffuse solar incident on surface (W/m2) - extern Array1D QRadSWOutIncBmToDiffReflGnd; // Exterior diffuse solar incident from beam to diffuse - // reflection from ground (W/m2) - extern Array1D QRadSWOutIncSkyDiffReflGnd; // Exterior diffuse solar incident from sky diffuse - // reflection from ground (W/m2) - extern Array1D QRadSWOutIncBmToBmReflObs; // Exterior beam solar incident from beam-to-beam - // reflection from obstructions (W/m2) - extern Array1D QRadSWOutIncBmToDiffReflObs; // Exterior diffuse solar incident from beam-to-diffuse - // reflection from obstructions (W/m2) - extern Array1D QRadSWOutIncSkyDiffReflObs; // Exterior diffuse solar incident from sky diffuse - // reflection from obstructions (W/m2) - extern Array1D CosIncidenceAngle; // Cosine of beam solar incidence angle (for reporting) - - extern Array1D_int SurfWinBSDFBeamDirectionRep; // BSDF beam direction number for given complex fenestration state (for reporting) [] - extern Array1D SurfWinBSDFBeamThetaRep; // BSDF beam Theta angle (for reporting) [rad] - extern Array1D SurfWinBSDFBeamPhiRep; // BSDF beam Phi angle (for reporting) [rad] - - extern Array1D QRadSWwinAbsTot; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) - extern Array2D QRadSWwinAbsLayer; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) - - extern Array2D FenLaySurfTempFront; // Front surface temperatures of fenestration layers - extern Array2D FenLaySurfTempBack; // Back surface temperatures of fenestration layers + extern Array1D ZoneTransSolarEnergy; // Energy of ZoneTransSolar [J] extern Array1D ZoneWinHeatGainRepEnergy; // Energy of ZoneWinHeatGainRep [J] extern Array1D ZoneWinHeatLossRepEnergy; // Energy of ZoneWinHeatLossRep [J] @@ -522,21 +490,44 @@ namespace DataHeatBalance { extern Array1D ZnOpqSurfInsFaceCondLsRepEnrg; // Energy of ZoneOpaqSurfInsFaceCondLossRep [J] extern Array1D ZnOpqSurfExtFaceCondGnRepEnrg; // Energy of ZoneOpaqSurfInsFaceCondGainRep [J] extern Array1D ZnOpqSurfExtFaceCondLsRepEnrg; // Energy of ZoneOpaqSurfInsFaceCondLossRep [J] - extern Array1D BmIncInsSurfAmountRepEnergy; // energy of BmIncInsSurfAmountRep [J] - extern Array1D IntBmIncInsSurfAmountRepEnergy; // energy of IntBmIncInsSurfAmountRep [J] - extern Array1D QRadSWwinAbsTotEnergy; // Energy of QRadSWwinAbsTot [J] - extern Array1D SWwinAbsTotalReport; // Report - Total interior/exterior shortwave - // absorbed in all glass layers of window (W) - extern Array1D InitialDifSolInAbsReport; // Report - Initial transmitted diffuse solar - // absorbed on inside of surface (W) - extern Array1D InitialDifSolInTransReport; // Report - Initial transmitted diffuse solar - // transmitted out through inside of window surface (W) - extern Array1D SWInAbsTotalReport; // Report - Total interior/exterior shortwave - // absorbed on inside of surface (W) - extern Array1D SWOutAbsTotalReport; // Report - Total exterior shortwave/solar - // absorbed on outside of surface (W) - extern Array1D SWOutAbsEnergyReport; // Report - Total exterior shortwave/solar - // absorbed on outside of surface (j) + + extern Array1D SurfQRadThermInAbs; // Thermal radiation absorbed on inside surfaces + extern Array1D SurfQRadSWOutIncident; // Exterior beam plus diffuse solar incident on surface (W/m2) + extern Array1D SurfQRadSWOutIncidentBeam; // Exterior beam solar incident on surface (W/m2) + extern Array1D SurfBmIncInsSurfIntensRep; // Beam sol irrad from ext wins on inside of surface (W/m2) + extern Array1D SurfBmIncInsSurfAmountRep; // Beam sol amount from ext wins incident on inside of surface (W) + extern Array1D SurfIntBmIncInsSurfIntensRep; // Beam sol irrad from int wins on inside of surface (W/m2) + extern Array1D SurfIntBmIncInsSurfAmountRep; // Beam sol amount from int wins incident on inside of surface (W) + extern Array1D SurfQRadSWOutIncidentSkyDiffuse; // Exterior sky diffuse solar incident on surface (W/m2) + extern Array1D SurfQRadSWOutIncidentGndDiffuse; // Exterior ground diffuse solar incident on surface (W/m2) + extern Array1D SurfQRadSWOutIncBmToDiffReflGnd; // Exterior diffuse solar incident from beam to diffuse reflection from ground (W/m2) + extern Array1D SurfQRadSWOutIncSkyDiffReflGnd; // Exterior diffuse solar incident from sky diffuse reflection from ground (W/m2) + extern Array1D SurfQRadSWOutIncBmToBmReflObs; // Exterior beam solar incident from beam-to-beam reflection from obstructions (W/m2) + extern Array1D SurfQRadSWOutIncBmToDiffReflObs; // Exterior diffuse solar incident from beam-to-diffuse reflection from obstructions (W/m2) + extern Array1D SurfQRadSWOutIncSkyDiffReflObs; // Exterior diffuse solar incident from sky diffuse reflection from obstructions (W/m2) + extern Array1D SurfCosIncidenceAngle; // Cosine of beam solar incidence angle (for reporting) + + extern Array1D SurfSWInAbsTotalReport; // Report - Total interior/exterior shortwave absorbed on inside of surface (W) + extern Array1D SurfBmIncInsSurfAmountRepEnergy; // energy of BmIncInsSurfAmountRep [J] + extern Array1D SurfIntBmIncInsSurfAmountRepEnergy; // energy of IntBmIncInsSurfAmountRep [J] + extern Array1D SurfInitialDifSolInAbsReport; // Report - Initial transmitted diffuse solar absorbed on inside of surface (W) + + extern Array1D_int SurfWinBSDFBeamDirectionRep; // BSDF beam direction number for given complex fenestration state (for reporting) [] + extern Array1D SurfWinBSDFBeamThetaRep; // BSDF beam Theta angle (for reporting) [rad] + extern Array1D SurfWinBSDFBeamPhiRep; // BSDF beam Phi angle (for reporting) [rad] + extern Array1D SurfWinQRadSWwinAbsTot; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) + extern Array2D SurfWinQRadSWwinAbsLayer; // Exterior beam plus diffuse solar absorbed in glass layers of window (W) + extern Array2D SurfWinFenLaySurfTempFront; // Front surface temperatures of fenestration layers + extern Array2D SurfWinFenLaySurfTempBack; // Back surface temperatures of fenestration layers + extern Array1D SurfWinQRadSWwinAbsTotEnergy; // Energy of QRadSWwinAbsTot [J] + extern Array1D SurfWinSWwinAbsTotalReport; // Report - Total interior/exterior shortwave absorbed in all glass layers of window (W) + extern Array1D SurfWinInitialDifSolInTransReport; // Report - Initial transmitted diffuse solar transmitted out through inside of window surface (W) + extern Array2D SurfWinQRadSWwinAbs; // Short wave radiation absorbed in window glass layers + extern Array2D SurfWinInitialDifSolwinAbs; // Initial diffuse solar absorbed in window glass layers from inside(W/m2) + + extern Array1D SurfOpaqSWOutAbsTotalReport; // Report - Total exterior shortwave/solar absorbed on outside of surface (W) + extern Array1D SurfOpaqSWOutAbsEnergyReport; // Report - Total exterior shortwave/solar absorbed on outside of surface (j) + extern Array1D NominalR; // Nominal R value of each material -- used in matching interzone surfaces extern Array1D NominalRforNominalUCalculation; // Nominal R values are summed to calculate NominalU values for constructions diff --git a/src/EnergyPlus/DataSurfaces.cc b/src/EnergyPlus/DataSurfaces.cc index 661497b59a7..3ea428f7467 100644 --- a/src/EnergyPlus/DataSurfaces.cc +++ b/src/EnergyPlus/DataSurfaces.cc @@ -411,6 +411,7 @@ namespace DataSurfaces { Array1D BmToDiffReflFacObs; // Factor for incident solar from diffuse beam refl // from obstructions (W/m2)/(W/m2) Array1D BmToDiffReflFacGnd; // Factor for incident solar from diffuse beam refl from ground + Array1D SkyDiffReflFacGnd; // sky diffuse reflection view factors from ground Array2D AWinSurf; // Time step value of factor for beam // absorbed in window glass layers @@ -980,7 +981,7 @@ namespace DataSurfaces { // PURPOSE OF THIS SUBROUTINE: // Return total short wave incident to the surface - return QRadSWOutIncident(t_SurfNum) + QS(Surface(t_SurfNum).SolarEnclIndex); + return SurfQRadSWOutIncident(t_SurfNum) + QS(Surface(t_SurfNum).SolarEnclIndex); } Real64 SurfaceData::getSWBeamIncident(const int t_SurfNum) @@ -994,7 +995,7 @@ namespace DataSurfaces { // PURPOSE OF THIS SUBROUTINE: // Return total short wave incident from outside beam - return QRadSWOutIncidentBeam(t_SurfNum); + return SurfQRadSWOutIncidentBeam(t_SurfNum); } Real64 SurfaceData::getSWDiffuseIncident(const int t_SurfNum) @@ -1008,7 +1009,7 @@ namespace DataSurfaces { // PURPOSE OF THIS SUBROUTINE: // Return total short wave diffuse incident to the surface - return QRadSWOutIncidentSkyDiffuse(t_SurfNum) + QRadSWOutIncidentGndDiffuse(t_SurfNum) + QS(Surface(t_SurfNum).SolarEnclIndex); + return SurfQRadSWOutIncidentSkyDiffuse(t_SurfNum) + SurfQRadSWOutIncidentGndDiffuse(t_SurfNum) + QS(Surface(t_SurfNum).SolarEnclIndex); } int SurfaceData::getTotLayers() const @@ -1234,6 +1235,7 @@ namespace DataSurfaces { BmToBmReflFacObs.deallocate(); BmToDiffReflFacObs.deallocate(); BmToDiffReflFacGnd.deallocate(); + SkyDiffReflFacGnd.deallocate(); AWinSurf.deallocate(); AWinSurfDiffFront.deallocate(); AWinSurfDiffBack.deallocate(); diff --git a/src/EnergyPlus/DataSurfaces.hh b/src/EnergyPlus/DataSurfaces.hh index c6c129da030..eb471069d0c 100644 --- a/src/EnergyPlus/DataSurfaces.hh +++ b/src/EnergyPlus/DataSurfaces.hh @@ -390,6 +390,7 @@ namespace DataSurfaces { extern Array1D BmToDiffReflFacObs; // Factor for incident solar from diffuse beam refl // from obstructions (W/m2)/(W/m2) extern Array1D BmToDiffReflFacGnd; // Factor for incident solar from diffuse beam refl from ground + extern Array1D SkyDiffReflFacGnd; // sky diffuse reflection view factors from ground extern Array2D AWinSurf; // Time step value of factor for beam // absorbed in window glass layers diff --git a/src/EnergyPlus/DaylightingDevices.cc b/src/EnergyPlus/DaylightingDevices.cc index 7fd30ec3c31..a80e05affce 100644 --- a/src/EnergyPlus/DaylightingDevices.cc +++ b/src/EnergyPlus/DaylightingDevices.cc @@ -1458,9 +1458,9 @@ namespace DaylightingDevices { // REFERENCES: na // Using/Aliasing - using DataHeatBalance::QRadSWOutIncident; - using DataHeatBalance::QRadSWwinAbs; - using DataHeatBalance::QRadSWwinAbsTot; + using DataHeatBalance::SurfQRadSWOutIncident; + using DataHeatBalance::SurfWinQRadSWwinAbs; + using DataHeatBalance::SurfWinQRadSWwinAbsTot; using DataHeatBalance::QS; using DataSurfaces::SurfWinTransSolar; @@ -1483,18 +1483,17 @@ namespace DaylightingDevices { // Calculate diffuse solar reflected back up the pipe by the inside surface of the TDD:DIFFUSER // All solar arriving at the diffuser is assumed to be isotropically diffuse by this point - QRefl = (QRadSWOutIncident(DiffSurf) - QRadSWwinAbsTot(DiffSurf)) * Surface(DiffSurf).Area - SurfWinTransSolar(DiffSurf); + QRefl = (SurfQRadSWOutIncident(DiffSurf) - SurfWinQRadSWwinAbsTot(DiffSurf)) * Surface(DiffSurf).Area - SurfWinTransSolar(DiffSurf); // Add diffuse interior shortwave reflected from zone surfaces and from zone sources, lights, etc. QRefl += QS(Surface(DiffSurf).SolarEnclIndex) * Surface(DiffSurf).Area * transDiff; - TotTDDPipeGain = SurfWinTransSolar(TDDPipe(PipeNum).Dome) - QRadSWOutIncident(DiffSurf) * Surface(DiffSurf).Area + + TotTDDPipeGain = SurfWinTransSolar(TDDPipe(PipeNum).Dome) - SurfQRadSWOutIncident(DiffSurf) * Surface(DiffSurf).Area + QRefl * (1.0 - TDDPipe(PipeNum).TransSolIso / transDiff) + - QRadSWwinAbs(1, TDDPipe(PipeNum).Dome) * Surface(DiffSurf).Area / 2.0 + - QRadSWwinAbs(1, DiffSurf) * Surface(DiffSurf).Area / 2.0; // Solar entering pipe | Solar exiting pipe | Absorbed due to + SurfWinQRadSWwinAbs(1, TDDPipe(PipeNum).Dome) * Surface(DiffSurf).Area / 2.0 + + SurfWinQRadSWwinAbs(1, DiffSurf) * Surface(DiffSurf).Area / 2.0; // Solar entering pipe | Solar exiting pipe | Absorbed due to // reflections on the way out | Inward absorbed solar from dome // glass | Inward absorbed solar from diffuser glass - TDDPipe(PipeNum).PipeAbsorbedSolar = max(0.0, TotTDDPipeGain); // Report variable [W] for (TZoneNum = 1; TZoneNum <= TDDPipe(PipeNum).NumOfTZones; ++TZoneNum) { diff --git a/src/EnergyPlus/EcoRoofManager.cc b/src/EnergyPlus/EcoRoofManager.cc index af9151cd5af..bd09fa4cbc3 100644 --- a/src/EnergyPlus/EcoRoofManager.cc +++ b/src/EnergyPlus/EcoRoofManager.cc @@ -453,9 +453,9 @@ namespace EcoRoofManager { if (dataConstruction.Construct(ConstrNum).CTFCross(0) > 0.01) { QuickConductionSurf = true; F1temp = dataConstruction.Construct(ConstrNum).CTFCross(0) / (dataConstruction.Construct(ConstrNum).CTFInside(0) + HConvIn(SurfNum)); - Qsoilpart1 = -CTFConstOutPart(SurfNum) + F1temp * (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + QRadThermInAbs(SurfNum) + + Qsoilpart1 = -CTFConstOutPart(SurfNum) + F1temp * (CTFConstInPart(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + SurfQRadThermInAbs(SurfNum) + dataConstruction.Construct(ConstrNum).CTFSourceIn(0) * QsrcHist(SurfNum, 1) + - HConvIn(SurfNum) * MAT(ZoneNum) + NetLWRadToSurf(SurfNum)); + HConvIn(SurfNum) * MAT(ZoneNum) + SurfNetLWRadToSurf(SurfNum)); } else { Qsoilpart1 = -CTFConstOutPart(SurfNum) + dataConstruction.Construct(ConstrNum).CTFCross(0) * TempSurfIn(SurfNum); F1temp = 0.0; diff --git a/src/EnergyPlus/GeneralRoutines.cc b/src/EnergyPlus/GeneralRoutines.cc index b13d161f576..10f324fa686 100644 --- a/src/EnergyPlus/GeneralRoutines.cc +++ b/src/EnergyPlus/GeneralRoutines.cc @@ -1040,7 +1040,7 @@ void CalcPassiveExteriorBaffleGap(EnergyPlusData &state, // USE DataLoopNode , ONLY: Node using ConvectionCoefficients::InitExteriorConvectionCoeff; using DataGlobals::BeginEnvrnFlag; - using DataHeatBalance::QRadSWOutIncident; + using DataHeatBalance::SurfQRadSWOutIncident; using DataHeatBalSurface::TH; using DataSurfaces::Surface; using DataSurfaces::SurfaceData; @@ -1217,7 +1217,7 @@ void CalcPassiveExteriorBaffleGap(EnergyPlusData &state, // Tso = sum( TH( 1, 1, SurfPtrARR ) * Surface( SurfPtrARR ).Area ) / A; //Autodesk:F2C++ Array subscript usage: Replaced by below Tso = sum_product_sub(TH(1, 1, _), Surface, &SurfaceData::Area, SurfPtrARR) / A; // Autodesk:F2C++ Functions handle array subscript usage // Isc = sum( QRadSWOutIncident( SurfPtrARR ) * Surface( SurfPtrARR ).Area ) / A; //Autodesk:F2C++ Array subscript usage: Replaced by below - Isc = sum_product_sub(QRadSWOutIncident, Surface, &SurfaceData::Area, SurfPtrARR) / A; // Autodesk:F2C++ Functions handle array subscript usage + Isc = sum_product_sub(SurfQRadSWOutIncident, Surface, &SurfaceData::Area, SurfPtrARR) / A; // Autodesk:F2C++ Functions handle array subscript usage TmeanK = 0.5 * (TmpTsBaf + Tso) + KelvinConv; diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.cc b/src/EnergyPlus/HeatBalFiniteDiffManager.cc index 4a777204eb6..fd560b5939c 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -110,7 +110,7 @@ namespace HeatBalFiniteDiffManager { using DataEnvironment::IsRain; using DataEnvironment::SkyTemp; using DataHeatBalance::Air; - using DataHeatBalance::QRadThermInAbs; + using DataHeatBalance::SurfQRadThermInAbs; using DataHeatBalance::RegularMaterial; using DataHeatBalance::TotConstructs; using DataHeatBalance::TotMaterials; @@ -124,17 +124,17 @@ namespace HeatBalFiniteDiffManager { using DataHeatBalFanSys::ZoneAirHumRat; using DataHeatBalSurface::MaxSurfaceTempLimit; using DataHeatBalSurface::MinSurfaceTempLimit; - using DataHeatBalSurface::NetLWRadToSurf; - using DataHeatBalSurface::OpaqSurfInsFaceConduction; - using DataHeatBalSurface::OpaqSurfInsFaceConductionFlux; - using DataHeatBalSurface::OpaqSurfOutsideFaceConduction; - using DataHeatBalSurface::OpaqSurfOutsideFaceConductionFlux; + using DataHeatBalSurface::SurfNetLWRadToSurf; + using DataHeatBalSurface::SurfOpaqInsFaceConduction; + using DataHeatBalSurface::SurfOpaqInsFaceConductionFlux; + using DataHeatBalSurface::SurfOpaqOutsideFaceConduction; + using DataHeatBalSurface::SurfOpaqOutsideFaceConductionFlux; using DataHeatBalSurface::QdotRadNetSurfInRep; using DataHeatBalSurface::QdotRadOutRepPerArea; using DataHeatBalSurface::QRadNetSurfInReport; - using DataHeatBalSurface::QRadSWInAbs; - using DataHeatBalSurface::QRadSWOutAbs; - using DataHeatBalSurface::QRadSWOutMvIns; + using DataHeatBalSurface::SurfOpaqQRadSWInAbs; + using DataHeatBalSurface::SurfOpaqQRadSWOutAbs; + using DataHeatBalSurface::SurfQRadSWOutMvIns; using DataHeatBalSurface::TempSource; using DataHeatBalSurface::TempUserLoc; using DataSurfaces::Ground; @@ -669,8 +669,8 @@ namespace HeatBalFiniteDiffManager { // And then initialize QHeatInFlux = 0.0; QHeatOutFlux = 0.0; - OpaqSurfInsFaceConductionFlux = 0.0; - OpaqSurfOutsideFaceConductionFlux = 0.0; + SurfOpaqInsFaceConductionFlux = 0.0; + SurfOpaqOutsideFaceConductionFlux = 0.0; // Setup Output Variables @@ -1440,8 +1440,8 @@ namespace HeatBalFiniteDiffManager { Tsky = OSCM(surface.OSCMPtr).TRad; QRadSWOutFD = 0.0; // eliminate incident shortwave on underlying surface } else { // Set the external conditions to local variables - QRadSWOutFD = QRadSWOutAbs(Surf); - QRadSWOutMvInsulFD = QRadSWOutMvIns(Surf); + QRadSWOutFD = SurfOpaqQRadSWOutAbs(Surf); + QRadSWOutMvInsulFD = SurfQRadSWOutMvIns(Surf); Tsky = SkyTemp; } @@ -1510,10 +1510,10 @@ namespace HeatBalFiniteDiffManager { SurfaceFD(Surf).CpDelXRhoS2(i) = surfaceFDEBC.CpDelXRhoS1(TotNodesPlusOne); // Save this for computing node flux values } - Real64 const QNetSurfFromOutside(OpaqSurfInsFaceConductionFlux(surface_ExtBoundCond)); // filled in InteriorBCEqns + Real64 const QNetSurfFromOutside(SurfOpaqInsFaceConductionFlux(surface_ExtBoundCond)); // filled in InteriorBCEqns // QFluxOutsideToOutSurf(Surf) = QnetSurfFromOutside - OpaqSurfOutsideFaceConductionFlux(Surf) = -QNetSurfFromOutside; - OpaqSurfOutsideFaceConduction(Surf) = surface.Area * OpaqSurfOutsideFaceConductionFlux(Surf); + SurfOpaqOutsideFaceConductionFlux(Surf) = -QNetSurfFromOutside; + SurfOpaqOutsideFaceConduction(Surf) = surface.Area * SurfOpaqOutsideFaceConductionFlux(Surf); QHeatOutFlux(Surf) = QNetSurfFromOutside; } else if (surface_ExtBoundCond <= 0) { // regular outside conditions @@ -1653,8 +1653,8 @@ namespace HeatBalFiniteDiffManager { Real64 const QNetSurfFromOutside(QRadSWOutFD + (hgnd * (-TDT_i + Tgnd) + (hconvo + hrad) * Toa_TDT_i + hsky * (-TDT_i + Tsky))); // Same sign convention as CTFs - OpaqSurfOutsideFaceConductionFlux(Surf) = -QNetSurfFromOutside; - OpaqSurfOutsideFaceConduction(Surf) = surface.Area * OpaqSurfOutsideFaceConductionFlux(Surf); + SurfOpaqOutsideFaceConductionFlux(Surf) = -QNetSurfFromOutside; + SurfOpaqOutsideFaceConduction(Surf) = surface.Area * SurfOpaqOutsideFaceConductionFlux(Surf); // Report all outside BC heat fluxes QdotRadOutRepPerArea(Surf) = -(hgnd * (TDT_i - Tgnd) + hrad * (-Toa_TDT_i) + hsky * (TDT_i - Tsky)); @@ -2096,8 +2096,8 @@ namespace HeatBalFiniteDiffManager { int const ConstrNum(surface.Construction); // Set the internal conditions to local variables - Real64 const NetLWRadToSurfFD(NetLWRadToSurf(Surf)); // Net interior long wavelength radiation to surface from other surfaces - Real64 const QRadSWInFD(QRadSWInAbs(Surf)); // Short wave radiation absorbed on inside of opaque surface + Real64 const NetLWRadToSurfFD(SurfNetLWRadToSurf(Surf)); // Net interior long wavelength radiation to surface from other surfaces + Real64 const QRadSWInFD(SurfOpaqQRadSWInAbs(Surf)); // Short wave radiation absorbed on inside of opaque surface Real64 const QHtRadSysSurfFD( QHTRadSysSurf(Surf)); // Current radiant heat flux at a surface due to the presence of high temperature radiant heaters Real64 const QHWBaseboardSurfFD( @@ -2108,7 +2108,7 @@ namespace HeatBalFiniteDiffManager { QElecBaseboardSurf(Surf)); // Current radiant heat flux at a surface due to the presence of electric baseboard heaters Real64 const QCoolingPanelSurfFD( QCoolingPanelSurf(Surf)); // Current radiant heat flux at a surface due to the presence of simple cooling panels - Real64 const QRadThermInFD(QRadThermInAbs(Surf)); // Thermal radiation absorbed on inside surfaces + Real64 const QRadThermInFD(SurfQRadThermInAbs(Surf)); // Thermal radiation absorbed on inside surfaces // Boundary Conditions from Simulation for Interior Real64 hconvi(HConvInFD(Surf)); @@ -2218,9 +2218,9 @@ namespace HeatBalFiniteDiffManager { Real64 const QNetSurfInside(-(QFac + hconvi * (-TDT_i + Tia))); // Pass inside conduction Flux [W/m2] to DataHeatBalanceSurface array - OpaqSurfInsFaceConductionFlux(Surf) = QNetSurfInside; + SurfOpaqInsFaceConductionFlux(Surf) = QNetSurfInside; // QFluxZoneToInSurf(Surf) = QNetSurfInside - OpaqSurfInsFaceConduction(Surf) = QNetSurfInside * surface.Area; // for reporting as in CTF, PT + SurfOpaqInsFaceConduction(Surf) = QNetSurfInside * surface.Area; // for reporting as in CTF, PT } void CheckFDSurfaceTempLimits(int const SurfNum, // surface number @@ -2368,7 +2368,7 @@ namespace HeatBalFiniteDiffManager { // so the arrays are all allocated to Totodes+1 // Heat flux at the inside face node (TotNodes+1) - surfaceFD.QDreport(TotNodes + 1) = OpaqSurfInsFaceConductionFlux(Surf); + surfaceFD.QDreport(TotNodes + 1) = SurfOpaqInsFaceConductionFlux(Surf); // Heat flux for remaining nodes. for (node = TotNodes; node >= 1; --node) { diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.cc b/src/EnergyPlus/HeatBalanceHAMTManager.cc index 475ce2073d9..c61045f4efe 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.cc +++ b/src/EnergyPlus/HeatBalanceHAMTManager.cc @@ -120,9 +120,9 @@ namespace HeatBalanceHAMTManager { using DataHeatBalSurface::MaxSurfaceTempLimitBeforeFatal; using DataHeatBalSurface::MinSurfaceTempLimit; using DataHeatBalSurface::MinSurfaceTempLimitBeforeFatal; - using DataHeatBalSurface::NetLWRadToSurf; - using DataHeatBalSurface::QRadSWInAbs; - using DataHeatBalSurface::QRadSWOutAbs; + using DataHeatBalSurface::SurfNetLWRadToSurf; + using DataHeatBalSurface::SurfOpaqQRadSWInAbs; + using DataHeatBalSurface::SurfOpaqQRadSWOutAbs; using namespace DataHeatBalance; using namespace Psychrometrics; using DataEnvironment::IsRain; @@ -1101,7 +1101,7 @@ namespace HeatBalanceHAMTManager { // na // Using/Aliasing - using DataHeatBalSurface::QAdditionalHeatSourceInside; + using DataHeatBalSurface::SurfQAdditionalHeatSourceInside; using DataSurfaces::OSCM; using DataSurfaces::OtherSideCondModeledExt; using General::RoundSigDigits; @@ -1201,7 +1201,7 @@ namespace HeatBalanceHAMTManager { } else { cells(ExtSkycell(sid)).temp = SkyTemp; - cells(Extcell(sid)).Qadds = Surface(sid).Area * QRadSWOutAbs(sid); + cells(Extcell(sid)).Qadds = Surface(sid).Area * SurfOpaqQRadSWOutAbs(sid); } cells(ExtGrncell(sid)).temp = TempOutsideAirFD(sid); @@ -1225,8 +1225,8 @@ namespace HeatBalanceHAMTManager { cells(IntConcell(sid)).htc = HConvInFD(sid); cells(Intcell(sid)).Qadds = - Surface(sid).Area * (QRadSWInAbs(sid) + NetLWRadToSurf(sid) + QHTRadSysSurf(sid) + QCoolingPanelSurf(sid) + QHWBaseboardSurf(sid) + - QSteamBaseboardSurf(sid) + QElecBaseboardSurf(sid) + QRadThermInAbs(sid) + QAdditionalHeatSourceInside(sid)); + Surface(sid).Area * (SurfOpaqQRadSWInAbs(sid) + SurfNetLWRadToSurf(sid) + QHTRadSysSurf(sid) + QCoolingPanelSurf(sid) + QHWBaseboardSurf(sid) + + QSteamBaseboardSurf(sid) + QElecBaseboardSurf(sid) + SurfQRadThermInAbs(sid) + SurfQAdditionalHeatSourceInside(sid)); // Check, Is this per unit area or for the whole wall. // cells(Intcell(sid))%Qadds=QRadSWInAbs(sid)+NetLWRadToSurf(sid)+QHtRadSysSurf(sid)+QRadThermInAbs(sid) diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index 2f00f7d1316..522d15089df 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -370,8 +370,8 @@ namespace HeatBalanceKivaManager { bcs->diffuseHorizontalFlux = DataEnvironment::DifSolarRad; bcs->skyEmissivity = pow4(DataEnvironment::SkyTempKelvin) / pow4(bcs->outdoorTemp); - bcs->slabAbsRadiation = DataHeatBalSurface::QRadSWInAbs(floorSurface) + // solar - DataHeatBalance::QRadThermInAbs(floorSurface) + // internal gains + bcs->slabAbsRadiation = DataHeatBalSurface::SurfOpaqQRadSWInAbs(floorSurface) + // solar + DataHeatBalance::SurfQRadThermInAbs(floorSurface) + // internal gains DataHeatBalFanSys::QHTRadSysSurf(floorSurface) + DataHeatBalFanSys::QHWBaseboardSurf(floorSurface) + DataHeatBalFanSys::QCoolingPanelSurf(floorSurface) + DataHeatBalFanSys::QSteamBaseboardSurf(floorSurface) + DataHeatBalFanSys::QElecBaseboardSurf(floorSurface); // HVAC @@ -389,8 +389,8 @@ namespace HeatBalanceKivaManager { Real64 TARadTotal = 0.0; Real64 TAConvTotal = 0.0; for (auto &wl : wallSurfaces) { - Real64 Q = DataHeatBalSurface::QRadSWInAbs(wl) + // solar - DataHeatBalance::QRadThermInAbs(wl) + // internal gains + Real64 Q = DataHeatBalSurface::SurfOpaqQRadSWInAbs(wl) + // solar + DataHeatBalance::SurfQRadThermInAbs(wl) + // internal gains DataHeatBalFanSys::QHTRadSysSurf(wl) + DataHeatBalFanSys::QHWBaseboardSurf(floorSurface) + DataHeatBalFanSys::QCoolingPanelSurf(wl) + DataHeatBalFanSys::QSteamBaseboardSurf(floorSurface) + DataHeatBalFanSys::QElecBaseboardSurf(wl); // HVAC diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index c7d71b13cb5..e7988531d31 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -5917,8 +5917,8 @@ namespace HeatBalanceManager { if (thisSurface.Class == DataSurfaces::SurfaceClass_Window) { auto &thisConstruct(thisSurface.Construction); if (!dataConstruction.Construct(thisConstruct).WindowTypeBSDF && !dataConstruction.Construct(thisConstruct).TypeIsAirBoundaryInteriorWindow) { - FenLaySurfTempFront(1, SurfNum) = TH(1, 1, SurfNum); - FenLaySurfTempBack(dataConstruction.Construct(thisConstruct).TotLayers, SurfNum) = TH(2, 1, SurfNum); + SurfWinFenLaySurfTempFront(1, SurfNum) = TH(1, 1, SurfNum); + SurfWinFenLaySurfTempBack(dataConstruction.Construct(thisConstruct).TotLayers, SurfNum) = TH(2, 1, SurfNum); } } } diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index b0983e71994..db5a446ee3e 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -49,6 +49,7 @@ #include #include #include +#include // ObjexxFCL Headers #include #include @@ -386,34 +387,6 @@ namespace HeatBalanceSurfaceManager { // DERIVED TYPE DEFINITIONS: // na - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int SurfNum; // DO loop counter for surfaces - int SrdSurfsNum; // DO loop counter for srd surfaces - int SrdSurfNum; - Real64 SrdSurfsViewFactor; - - // RJH DElight Modification Begin - Real64 dPowerReducFac; // Return value Electric Lighting Power Reduction Factor for current Zone and Timestep - Real64 dHISKFFC; // double value for argument passing - Real64 dHISUNFFC; // double value for argument passing - Real64 dSOLCOS1; // double value for argument passing - Real64 dSOLCOS2; // double value for argument passing - Real64 dSOLCOS3; // double value for argument passing - Real64 dLatitude; // double value for argument passing - Real64 dCloudFraction; // double value for argument passing - int iErrorFlag; // Error Flag for warning/errors returned from DElight - int iReadStatus; // Error File Read Status - std::string cErrorMsg; // Each DElight Error Message can be up to 200 characters long - bool bEndofErrFile; // End of Error File flag - int iDElightRefPt; // Reference Point number for reading DElight Dump File (eplusout.delighteldmp) - Real64 dRefPtIllum; // tmp var for reading RefPt illuminance - // RJH DElight Modification End - - int MapNum; - bool errFlag; - bool elOpened; - // LOGICAL :: ShadowingSurf - // FLOW: assert(equal_dimensions(TH, QH)); @@ -441,7 +414,7 @@ namespace HeatBalanceSurfaceManager { // IF (Surface(SurfNum)%ExtWind) Surface(SurfNum)%WindSpeed = WindSpeedAt(Surface(SurfNum)%Centroid%z) // END DO if (AnyLocalEnvironmentsInModel) { - for (SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { + for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { if (Surface(SurfNum).HasLinkedOutAirNode) { Surface(SurfNum).OutDryBulbTemp = Node(Surface(SurfNum).LinkedOutAirNode).OutAirDryBulb; Surface(SurfNum).OutWetBulbTemp = Node(Surface(SurfNum).LinkedOutAirNode).OutAirWetBulb; @@ -450,15 +423,15 @@ namespace HeatBalanceSurfaceManager { } if (InitSurfaceHeatBalancefirstTime && Surface(SurfNum).HasSurroundingSurfProperties) { - SrdSurfsNum = Surface(SurfNum).SurroundingSurfacesNum; - SrdSurfsViewFactor = 0; + Real64 SrdSurfsNum = Surface(SurfNum).SurroundingSurfacesNum; + Real64 SrdSurfsViewFactor = 0; if (SurroundingSurfsProperty(SrdSurfsNum).SkyViewFactor >= 0) { SrdSurfsViewFactor += SurroundingSurfsProperty(SrdSurfsNum).SkyViewFactor; } if (SurroundingSurfsProperty(SrdSurfsNum).GroundViewFactor >= 0) { SrdSurfsViewFactor += SurroundingSurfsProperty(SrdSurfsNum).GroundViewFactor; } - for (SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { + for (int SrdSurfNum = 1; SrdSurfNum <= SurroundingSurfsProperty(SrdSurfsNum).TotSurroundingSurface; SrdSurfNum++) { SrdSurfsViewFactor += SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; } // Check if the sum of all defined view factors > 1.0 @@ -490,7 +463,7 @@ namespace HeatBalanceSurfaceManager { } // Overwriting surface and zone level environmental data with EMS override value if (AnyEnergyManagementSystemInModel) { - for (SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { + for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { if (Surface(SurfNum).OutDryBulbTempEMSOverrideOn) { Surface(SurfNum).OutDryBulbTemp = Surface(SurfNum).OutDryBulbTempEMSOverrideValue; } @@ -601,16 +574,22 @@ namespace HeatBalanceSurfaceManager { // Check if the sun is up and the current Thermal Zone hosts a Daylighting:DElight object if (SunIsUp && ZoneDaylight(NZ).TotalDaylRefPoints != 0 && (ZoneDaylight(NZ).DaylightMethod == DataDaylighting::DElightDaylighting)) { // Call DElight interior illuminance and electric lighting control subroutine - dPowerReducFac = 1.0; - dHISKFFC = HISKF * LUX2FC; - dHISUNFFC = HISUNF * LUX2FC; - dSOLCOS1 = SOLCOS(1); - dSOLCOS2 = SOLCOS(2); - dSOLCOS3 = SOLCOS(3); - dLatitude = Latitude; - dCloudFraction = CloudFraction; - // Init Error Flag to 0 (no Warnings or Errors) - iErrorFlag = 0; + Real64 dPowerReducFac = 1.0; // Return value Electric Lighting Power Reduction Factor for current Zone and Timestep + Real64 dHISKFFC = HISKF * LUX2FC; + Real64 dHISUNFFC = HISUNF * LUX2FC; + Real64 dSOLCOS1 = SOLCOS(1); + Real64 dSOLCOS2 = SOLCOS(2); + Real64 dSOLCOS3 = SOLCOS(3); + Real64 dLatitude = Latitude; + Real64 dCloudFraction = CloudFraction; + // Init Error Flag to 0 (no Warnings or Errors) (returned from DElight) + int iErrorFlag = 0; + bool elOpened; + + int iReadStatus; // Error File Read Status + std::string cErrorMsg; // Each DElight Error Message can be up to 200 characters long + bool bEndofErrFile; // End of Error File flag + DElightElecLtgCtrl(len(Zone(NZ).Name), Zone(NZ).Name, dLatitude, @@ -684,11 +663,11 @@ namespace HeatBalanceSurfaceManager { // Sequentially read lines in DElight Electric Lighting Dump File // and extract refpt illuminances for standard EPlus output handling bEndofErrFile = false; - iDElightRefPt = 0; + int iDElightRefPt = 0; // Reference Point number for reading DElight Dump File (eplusout.delighteldmp) iReadStatus = 0; while (!bEndofErrFile && elOpened) { auto line = iDElightErrorFile.read(); - dRefPtIllum = line.data; + Real64 dRefPtIllum = line.data; // tmp var for reading RefPt illuminance if (line.eof) { bEndofErrFile = true; continue; @@ -714,7 +693,6 @@ namespace HeatBalanceSurfaceManager { // RJH DElight Modification End - Call to DElight electric lighting control subroutine } - errFlag = false; for (int zoneNum = 1; zoneNum <= NumOfZones; ++zoneNum) { int const firstSurfWin = Zone(zoneNum).WindowSurfaceFirst; int const lastSurfWin = Zone(zoneNum).WindowSurfaceLast; @@ -729,13 +707,14 @@ namespace HeatBalanceSurfaceManager { } } - CalcInteriorRadExchange(TH(2, 1, _), 0, NetLWRadToSurf, _, "Main"); + CalcInteriorRadExchange(TH(2, 1, _), 0, SurfNetLWRadToSurf, _, "Main"); if (AirflowWindows) WindowGapAirflowControl(); // The order of these initializations is important currently. Over time we hope to // take the appropriate parts of these inits to the other heat balance managers if (InitSurfaceHeatBalancefirstTime) DisplayString("Initializing Solar Heat Gains"); + InitSolarHeatGains(state); if (SunIsUp && (BeamSolarRad + GndSolarRad + DifSolarRad > 0.0)) { for (int NZ = 1; NZ <= NumOfZones; ++NZ) { @@ -748,7 +727,7 @@ namespace HeatBalanceSurfaceManager { } } } else if (mapResultsToReport && TimeStep == NumOfTimeStepInHour) { - for (MapNum = 1; MapNum <= TotIllumMaps; ++MapNum) { + for (int MapNum = 1; MapNum <= TotIllumMaps; ++MapNum) { ReportIllumMap(state, MapNum); } mapResultsToReport = false; @@ -1434,7 +1413,7 @@ namespace HeatBalanceSurfaceManager { // na // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int loop; + // na // FLOW: @@ -1464,26 +1443,24 @@ namespace HeatBalanceSurfaceManager { HAirExtSurf.dimension(TotSurfaces, 0.0); HSkyExtSurf.dimension(TotSurfaces, 0.0); HGrdExtSurf.dimension(TotSurfaces, 0.0); - QRadLWOutSrdSurfs.dimension(TotSurfaces, 0.0); + TempSurfIn.dimension(TotSurfaces, 0.0); TempInsOld.dimension(TotSurfaces, 0.0); TempSurfInTmp.dimension(TotSurfaces, 0.0); TempSurfInTmp.dimension(TotSurfaces, 0.0); RefAirTemp.dimension(TotSurfaces, 0.0); - QRadSWOutAbs.dimension(TotSurfaces, 0.0); - QRadSWInAbs.dimension(TotSurfaces, 0.0); - InitialDifSolInAbs.dimension(TotSurfaces, 0.0); - InitialDifSolInTrans.dimension(TotSurfaces, 0.0); - QRadSWwinAbs.dimension(DataWindowEquivalentLayer::CFSMAXNL + 1, TotSurfaces, 0.0); - InitialDifSolwinAbs.dimension(DataWindowEquivalentLayer::CFSMAXNL, TotSurfaces, 0.0); - QRadSWOutMvIns.dimension(TotSurfaces, 0.0); - QRadThermInAbs.dimension(TotSurfaces, 0.0); - QAdditionalHeatSourceOutside.dimension(TotSurfaces, 0.0); - QAdditionalHeatSourceInside.dimension(TotSurfaces, 0.0); + SurfQRadLWOutSrdSurfs.dimension(TotSurfaces, 0.0); + + SurfWinQRadSWwinAbs.dimension(DataWindowEquivalentLayer::CFSMAXNL + 1, TotSurfaces, 0.0); + SurfWinInitialDifSolwinAbs.dimension(DataWindowEquivalentLayer::CFSMAXNL, TotSurfaces, 0.0); + SurfQRadSWOutMvIns.dimension(TotSurfaces, 0.0); + SurfQRadThermInAbs.dimension(TotSurfaces, 0.0); + SurfQAdditionalHeatSourceOutside.dimension(TotSurfaces, 0.0); + SurfQAdditionalHeatSourceInside.dimension(TotSurfaces, 0.0); SUMH.dimension(TotSurfaces, 0); TH.dimension(2, Construction::MaxCTFTerms, TotSurfaces, 0.0); - TempSurfOut.dimension(TotSurfaces, 0.0); + SurfTempOut.dimension(TotSurfaces, 0.0); TempSurfInRep.dimension(TotSurfaces, 0.0); TempSurfInMovInsRep.dimension(TotSurfaces, 0.0); QConvInReport.dimension(TotSurfaces, 0.0); @@ -1521,34 +1498,41 @@ namespace HeatBalanceSurfaceManager { QAirExtReport.dimension(TotSurfaces, 0.0); QHeatEmiReport.dimension(TotSurfaces, 0.0); - OpaqSurfInsFaceConduction.dimension(TotSurfaces, 0.0); - OpaqSurfInsFaceConductionFlux.dimension(TotSurfaces, 0.0); - OpaqSurfInsFaceCondGainRep.dimension(TotSurfaces, 0.0); - OpaqSurfInsFaceCondLossRep.dimension(TotSurfaces, 0.0); - OpaqSurfInsFaceConductionEnergy.dimension(TotSurfaces, 0.0); - - SWOutAbsTotalReport.dimension(TotSurfaces, 0.0); - SWOutAbsEnergyReport.dimension(TotSurfaces, 0.0); - - OpaqSurfOutsideFaceConduction.dimension(TotSurfaces, 0.0); - OpaqSurfOutsideFaceConductionFlux.dimension(TotSurfaces, 0.0); - OpaqSurfExtFaceCondGainRep.dimension(TotSurfaces, 0.0); - OpaqSurfExtFaceCondLossRep.dimension(TotSurfaces, 0.0); - OpaqSurfOutsideFaceConductionEnergy.dimension(TotSurfaces, 0.0); - - OpaqSurfAvgFaceCondGainRep.dimension(TotSurfaces, 0.0); - OpaqSurfAvgFaceCondLossRep.dimension(TotSurfaces, 0.0); - OpaqSurfAvgFaceConduction.dimension(TotSurfaces, 0.0); - OpaqSurfAvgFaceConductionFlux.dimension(TotSurfaces, 0.0); - OpaqSurfAvgFaceConductionEnergy.dimension(TotSurfaces, 0.0); - - OpaqSurfStorageGainRep.dimension(TotSurfaces, 0.0); - OpaqSurfStorageCondLossRep.dimension(TotSurfaces, 0.0); - OpaqSurfStorageConduction.dimension(TotSurfaces, 0.0); - OpaqSurfStorageConductionFlux.dimension(TotSurfaces, 0.0); - OpaqSurfStorageConductionEnergy.dimension(TotSurfaces, 0.0); - - OpaqSurfInsFaceBeamSolAbsorbed.dimension(TotSurfaces, 0.0); + SurfOpaqSWOutAbsTotalReport.dimension(TotSurfaces, 0.0); + SurfOpaqSWOutAbsEnergyReport.dimension(TotSurfaces, 0.0); + + SurfOpaqInsFaceConduction.dimension(TotSurfaces, 0.0); + SurfOpaqInsFaceConductionFlux.dimension(TotSurfaces, 0.0); + SurfOpaqInsFaceCondGainRep.dimension(TotSurfaces, 0.0); + SurfOpaqInsFaceCondLossRep.dimension(TotSurfaces, 0.0); + SurfOpaqInsFaceConductionEnergy.dimension(TotSurfaces, 0.0); + + SurfOpaqOutsideFaceConduction.dimension(TotSurfaces, 0.0); + SurfOpaqOutsideFaceConductionFlux.dimension(TotSurfaces, 0.0); + SurfOpaqExtFaceCondGainRep.dimension(TotSurfaces, 0.0); + SurfOpaqExtFaceCondLossRep.dimension(TotSurfaces, 0.0); + SurfOpaqOutsideFaceConductionEnergy.dimension(TotSurfaces, 0.0); + + SurfOpaqAvgFaceCondGainRep.dimension(TotSurfaces, 0.0); + SurfOpaqAvgFaceCondLossRep.dimension(TotSurfaces, 0.0); + SurfOpaqAvgFaceConduction.dimension(TotSurfaces, 0.0); + SurfOpaqAvgFaceConductionFlux.dimension(TotSurfaces, 0.0); + SurfOpaqAvgFaceConductionEnergy.dimension(TotSurfaces, 0.0); + + SurfOpaqStorageGainRep.dimension(TotSurfaces, 0.0); + SurfOpaqStorageCondLossRep.dimension(TotSurfaces, 0.0); + SurfOpaqStorageConduction.dimension(TotSurfaces, 0.0); + SurfOpaqStorageConductionFlux.dimension(TotSurfaces, 0.0); + SurfOpaqStorageConductionEnergy.dimension(TotSurfaces, 0.0); + + SurfOpaqInsFaceBeamSolAbsorbed.dimension(TotSurfaces, 0.0); + + SurfOpaqQRadSWOutAbs.dimension(TotSurfaces, 0.0); + SurfOpaqQRadSWInAbs.dimension(TotSurfaces, 0.0); + + SurfOpaqInitialDifSolInAbs.dimension(TotSurfaces, 0.0); + SurfWinInitialDifSolInTrans.dimension(TotSurfaces, 0.0); + QH.dimension(2, Construction::MaxCTFTerms, TotSurfaces, 0.0); THM.dimension(2, Construction::MaxCTFTerms, TotSurfaces, 0.0); QHM.dimension(2, Construction::MaxCTFTerms, TotSurfaces, 0.0); @@ -1563,9 +1547,6 @@ namespace HeatBalanceSurfaceManager { QsrcHistM.dimension(TotSurfaces, Construction::MaxCTFTerms, 0.0); } - NetLWRadToSurf.dimension(TotSurfaces, 0.0); - QRadSWLightsInAbs.dimension(TotSurfaces, 0.0); - RadSysTiHBConstCoef.dimension(TotSurfaces, 0.0); RadSysTiHBToutCoef.dimension(TotSurfaces, 0.0); RadSysTiHBQsrcCoef.dimension(TotSurfaces, 0.0); @@ -1601,13 +1582,15 @@ namespace HeatBalanceSurfaceManager { HGrndFD.dimension(TotSurfaces, 0.0); HAirFD.dimension(TotSurfaces, 0.0); + SurfNetLWRadToSurf.dimension(TotSurfaces, 0.0); + SurfOpaqQRadSWLightsInAbs.dimension(TotSurfaces, 0.0); SurfSkySolarInc.dimension(TotSurfaces, 0); SurfGndSolarInc.dimension(TotSurfaces, 0); DisplayString("Setting up Surface Reporting Variables"); // Setup surface report variables CurrentModuleObject='Opaque Surfaces' - for (loop = 1; loop <= TotSurfaces; ++loop) { + for (int loop = 1; loop <= TotSurfaces; ++loop) { if (!Surface(loop).HeatTransSurf) continue; SetupOutputVariable(state, "Surface Inside Face Temperature", OutputProcessor::Unit::C, TempSurfInRep(loop), "Zone", "State", Surface(loop).Name); @@ -1620,7 +1603,7 @@ namespace HeatBalanceSurfaceManager { if (Surface(loop).ExtBoundCond != KivaFoundation) { SetupOutputVariable(state, - "Surface Outside Face Temperature", OutputProcessor::Unit::C, TempSurfOut(loop), "Zone", "State", Surface(loop).Name); + "Surface Outside Face Temperature", OutputProcessor::Unit::C, SurfTempOut(loop), "Zone", "State", Surface(loop).Name); } SetupOutputVariable(state, @@ -1839,19 +1822,19 @@ namespace HeatBalanceSurfaceManager { if (Surface(loop).Class != SurfaceClass_Window) { SetupOutputVariable(state, "Surface Outside Face Solar Radiation Heat Gain Rate", OutputProcessor::Unit::W, - SWOutAbsTotalReport(loop), + SurfOpaqSWOutAbsTotalReport(loop), "Zone", "Average", Surface(loop).Name); SetupOutputVariable(state, "Surface Outside Face Solar Radiation Heat Gain Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutAbs(loop), + SurfOpaqQRadSWOutAbs(loop), "Zone", "Average", Surface(loop).Name); SetupOutputVariable(state, "Surface Outside Face Solar Radiation Heat Gain Energy", OutputProcessor::Unit::J, - SWOutAbsEnergyReport(loop), + SurfOpaqSWOutAbsEnergyReport(loop), "Zone", "Sum", Surface(loop).Name); @@ -1862,31 +1845,31 @@ namespace HeatBalanceSurfaceManager { // IF (DisplayAdvancedReportVariables) THEN !CurrentModuleObject='Opaque Surfaces(Advanced)' SetupOutputVariable(state, "Surface Inside Face Conduction Heat Transfer Rate", OutputProcessor::Unit::W, - OpaqSurfInsFaceConduction(loop), + SurfOpaqInsFaceConduction(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Gain Rate", OutputProcessor::Unit::W, - OpaqSurfInsFaceCondGainRep(loop), + SurfOpaqInsFaceCondGainRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Loss Rate", OutputProcessor::Unit::W, - OpaqSurfInsFaceCondLossRep(loop), + SurfOpaqInsFaceCondLossRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Transfer Rate per Area", OutputProcessor::Unit::W_m2, - OpaqSurfInsFaceConductionFlux(loop), + SurfOpaqInsFaceConductionFlux(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Inside Face Conduction Heat Transfer Energy", OutputProcessor::Unit::J, - OpaqSurfInsFaceConductionEnergy(loop), + SurfOpaqInsFaceConductionEnergy(loop), "Zone", "Sum", Surface(loop).Name); @@ -1894,89 +1877,89 @@ namespace HeatBalanceSurfaceManager { if (Surface(loop).ExtBoundCond != KivaFoundation) { SetupOutputVariable(state, "Surface Outside Face Conduction Heat Transfer Rate", OutputProcessor::Unit::W, - OpaqSurfOutsideFaceConduction(loop), + SurfOpaqOutsideFaceConduction(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Gain Rate", OutputProcessor::Unit::W, - OpaqSurfExtFaceCondGainRep(loop), + SurfOpaqExtFaceCondGainRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Loss Rate", OutputProcessor::Unit::W, - OpaqSurfExtFaceCondLossRep(loop), + SurfOpaqExtFaceCondLossRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Transfer Rate per Area", OutputProcessor::Unit::W_m2, - OpaqSurfOutsideFaceConductionFlux(loop), + SurfOpaqOutsideFaceConductionFlux(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Outside Face Conduction Heat Transfer Energy", OutputProcessor::Unit::J, - OpaqSurfOutsideFaceConductionEnergy(loop), + SurfOpaqOutsideFaceConductionEnergy(loop), "Zone", "Sum", Surface(loop).Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Transfer Rate", OutputProcessor::Unit::W, - OpaqSurfAvgFaceConduction(loop), + SurfOpaqAvgFaceConduction(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Gain Rate", OutputProcessor::Unit::W, - OpaqSurfAvgFaceCondGainRep(loop), + SurfOpaqAvgFaceCondGainRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Loss Rate", OutputProcessor::Unit::W, - OpaqSurfAvgFaceCondLossRep(loop), + SurfOpaqAvgFaceCondLossRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Transfer Rate per Area", OutputProcessor::Unit::W_m2, - OpaqSurfAvgFaceConductionFlux(loop), + SurfOpaqAvgFaceConductionFlux(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Average Face Conduction Heat Transfer Energy", OutputProcessor::Unit::J, - OpaqSurfAvgFaceConductionEnergy(loop), + SurfOpaqAvgFaceConductionEnergy(loop), "Zone", "Sum", Surface(loop).Name); SetupOutputVariable(state, - "Surface Heat Storage Rate", OutputProcessor::Unit::W, OpaqSurfStorageConduction(loop), "Zone", "State", Surface(loop).Name); + "Surface Heat Storage Rate", OutputProcessor::Unit::W, SurfOpaqStorageConduction(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Heat Storage Gain Rate", OutputProcessor::Unit::W, - OpaqSurfStorageGainRep(loop), + SurfOpaqStorageGainRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Heat Storage Loss Rate", OutputProcessor::Unit::W, - OpaqSurfStorageCondLossRep(loop), + SurfOpaqStorageCondLossRep(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Heat Storage Rate per Area", OutputProcessor::Unit::W_m2, - OpaqSurfStorageConductionFlux(loop), + SurfOpaqStorageConductionFlux(loop), "Zone", "State", Surface(loop).Name); SetupOutputVariable(state, "Surface Heat Storage Energy", OutputProcessor::Unit::J, - OpaqSurfStorageConductionEnergy(loop), + SurfOpaqStorageConductionEnergy(loop), "Zone", "Sum", Surface(loop).Name); @@ -1987,7 +1970,7 @@ namespace HeatBalanceSurfaceManager { SetupOutputVariable(state, "Surface Inside Face Beam Solar Radiation Heat Gain Rate", OutputProcessor::Unit::W, - OpaqSurfInsFaceBeamSolAbsorbed(loop), + SurfOpaqInsFaceBeamSolAbsorbed(loop), "Zone", "State", Surface(loop).Name); @@ -2064,13 +2047,13 @@ namespace HeatBalanceSurfaceManager { SetupOutputVariable(state, "Surface Inside Face Heat Source Gain Rate per Area", OutputProcessor::Unit::W_m2, - QAdditionalHeatSourceInside(loop), + SurfQAdditionalHeatSourceInside(loop), "Zone", "Average", Surface(loop).Name); SetupOutputVariable(state, "Surface Outside Face Heat Source Gain Rate per Area", OutputProcessor::Unit::W_m2, - QAdditionalHeatSourceOutside(loop), + SurfQAdditionalHeatSourceOutside(loop), "Zone", "Average", Surface(loop).Name); @@ -2084,10 +2067,8 @@ namespace HeatBalanceSurfaceManager { // unused ALLOCATE(QBV(NumOfZones)) // unused QBV=0.0 - QC.dimension(NumOfZones, 0.0); - QD.dimension(NumOfZones, 0.0); - QDforDaylight.dimension(NumOfZones, 0.0); - QDV.dimension(NumOfZones, 0.0); + EnclSolQD.dimension(NumOfZones, 0.0); + EnclSolQDforDaylight.dimension(NumOfZones, 0.0); QL.dimension(NumOfZones, 0.0); // UCSD @@ -2096,7 +2077,7 @@ namespace HeatBalanceSurfaceManager { // Allocate Reporting Variables and set up tracking ZoneMRT.dimension(NumOfZones, 0.0); - for (loop = 1; loop <= NumOfZones; ++loop) { + for (int loop = 1; loop <= NumOfZones; ++loop) { // CurrentModuleObject='Zone' SetupOutputVariable(state, "Zone Mean Radiant Temperature", OutputProcessor::Unit::C, ZoneMRT(loop), "Zone", "State", Zone(loop).Name); } @@ -2187,7 +2168,7 @@ namespace HeatBalanceSurfaceManager { HAirExtSurf(SurfNum) = 0.0; HSkyExtSurf(SurfNum) = 0.0; HGrdExtSurf(SurfNum) = 0.0; - TempSurfOut(SurfNum) = 0.0; + SurfTempOut(SurfNum) = 0.0; TempSurfInRep(SurfNum) = 0.0; TempSurfInMovInsRep(SurfNum) = 0.0; QConvInReport(SurfNum) = 0.0; @@ -2216,11 +2197,16 @@ namespace HeatBalanceSurfaceManager { QdotRadOutRepPerArea(SurfNum) = 0.0; QAirExtReport(SurfNum) = 0.0; QHeatEmiReport(SurfNum) = 0.0; - OpaqSurfInsFaceConduction(SurfNum) = 0.0; - OpaqSurfInsFaceConductionFlux(SurfNum) = 0.0; - OpaqSurfInsFaceConductionEnergy(SurfNum) = 0.0; - OpaqSurfInsFaceBeamSolAbsorbed(SurfNum) = 0.0; - + } // end of Surf array + int const firstSurfOpaq = Zone(zoneNum).NonWindowSurfaceFirst; + int const lastSurfOpaq = Zone(zoneNum).NonWindowSurfaceLast; + if (firstSurfOpaq >= 0) { + for (int SurfNum = firstSurfOpaq; SurfNum <= lastSurfOpaq; ++SurfNum) { + SurfOpaqInsFaceConduction(SurfNum) = 0.0; + SurfOpaqInsFaceConductionFlux(SurfNum) = 0.0; + SurfOpaqInsFaceConductionEnergy(SurfNum) = 0.0; + SurfOpaqInsFaceBeamSolAbsorbed(SurfNum) = 0.0; + } // end of Zone Surf } int const firstSurfWin = Zone(zoneNum).WindowSurfaceFirst; int const lastSurfWin = Zone(zoneNum).WindowSurfaceLast; @@ -2237,9 +2223,9 @@ namespace HeatBalanceSurfaceManager { // Initialize previous-timestep shading indicators SurfWinExtIntShadePrevTS(SurfNum) = 0; SurfWinShadingFlag(SurfNum) = NoShade; - } // end of Zone Surf array + } // end of Zone Surf } - } // end of Zone array + } // end of Zone // "Bulk" initializations of temperature arrays with dimensions (TotSurface,MaxCTFTerms,2) TH = 23.0; // module level array @@ -2351,162 +2337,49 @@ namespace HeatBalanceSurfaceManager { using SolarShading::SurfaceScheduledSolarInc; using SolarShading::WindowScheduledSolarAbs; - Real64 AbsExt; // Absorptivity of outer most layer (or movable insulation if present) - int ConstrNum; // Index for the Construct derived type - int ConstrNumSh; // Shaded window construction - Real64 HMovInsul; // Resistance or "h" value of movable insulation (from EvalOutsideMovableInsulation, not used) - int RoughIndexMovInsul; // Roughness index of movable insulation - int SurfNum2; // TDD:DOME object number - int PipeNum; // TDD pipe object number - int ShelfNum; // Daylighting shelf object number - int InShelfSurf; // Inside daylighting shelf surface number - int OutShelfSurf; // Outside daylighting shelf surface number - Real64 ShelfSolarRad; // Shelf diffuse solar radiation - int ShadeFlag; // Window shading flag - Real64 SwitchFac; // Switching factor for switchable glazing - Real64 BeamSolar; // Local variable for BeamSolarRad - Real64 SkySolarInc; // Sky diffuse solar incident on a surface - Real64 GndSolarInc; // Ground diffuse solar incident on a surface - int TotGlassLay; // Number of glass layers - int TotSolidLay; // Number of solid layers in fenestration system (glass + shading) - int CurrentState; // Current state for Complex Fenestration static Array1D AbsDiffWin(CFSMAXNL); // Diffuse solar absorptance of glass layers //Tuned Made static static Array1D AbsDiffWinGnd(CFSMAXNL); // Ground diffuse solar absorptance of glass layers //Tuned Made static static Array1D AbsDiffWinSky(CFSMAXNL); // Sky diffuse solar absorptance of glass layers //Tuned Made static - int Lay; // Layer number - Real64 DividerAbs; // Window divider solar absorptance - Real64 DividerRefl; // Window divider solar reflectance - int MatNumGl; // Outer glass layer material number - int MatNumGlSh; // Outer glass layer material number, switched construction - Real64 TransGl; // Outer glass solar transmittance, reflectance, absorptance - Real64 ReflGl; - Real64 AbsGl; - Real64 TransGlSh; // Outer glass solar trans, refl, absorptance if switched - Real64 ReflGlSh; - Real64 AbsGlSh; - Real64 TransDiffGl; // Diffuse solar transmittance - Real64 TransDiffGlSh; // Diffuse solar transmittance, switched construction - int FrDivNum; // Frame/divider number - Real64 FrArea; // Frame, divider area (m2) - Real64 DivArea; - Real64 FrWidth; // Frame, divider width (m) - Real64 DivWidth; - Real64 FrProjOut; // Frame, divider outside projection (m) - Real64 DivProjOut; - Real64 FrProjIn; // Frame, divider outside projection (m) - Real64 DivProjIn; - Real64 PhiWin; // Altitude and azimuth angle of outward window normal (radians) - Real64 ThWin; - Real64 PhiSun; // Altitude and azimuth angle of sun (radians) - Real64 ThSun; - Real64 CosInc; // Cosine of incidence angle of beam solar on glass - Real64 CosIncAngHorProj; // Cosine of incidence angle of sun on horizontal faces of a frame or - // divider projection - Real64 CosIncAngVertProj; // Cosine of incidence angle of sun on vertical faces of a frame or - // divider projection - Real64 FracSunLit; // Fraction of window sunlit this time step - Real64 BeamFaceInc; // Beam solar incident window plane this time step (W/m2) - Real64 DifSolarFaceInc; // Diffuse solar incident on window plane this time step (W/m2) - Real64 FrIncSolarOut; // Total solar incident on outside offrame including solar - // on frame projection (W/m2) - Real64 FrIncSolarIn; // Total solar incident on inside offrame including solar - // on frame projection (W/m2) - - Real64 DivIncSolarOutBm; // Beam solar incident on outside of divider including beam on divider - // projection (W/m2) - Real64 DivIncSolarOutDif; // Diffuse solar incident on outside of divider including diffuse on divider - // projection (W/m2) - Real64 DivIncSolarInBm; // Beam solar incident on inside of divider including beam on divider - // projection (W/m2) - Real64 DivIncSolarInDif; // Diffuse solar incident on inside of divider including diffuse on divider - // projection (W/m2) - Real64 BeamFrHorFaceInc; // Beam solar on frame's horizontal projection faces (W/m2) - Real64 BeamFrVertFaceInc; // Beam solar on frame's vertical projection faces (W/m2) - Real64 BeamDivHorFaceInc; // Beam solar on divider's horizontal outside projection faces (W/m2) - Real64 BeamDivVertFaceInc; // Beam solar on divider's vertical outside projection faces (W/m2) - Real64 BeamDivHorFaceIncIn; // Beam solar on divider's horizontal inside projection faces (W/m2) - Real64 BeamDivVertFaceIncIn; // Beam solar on divider's vertical inside projection faces (W/m2) - int BlNum; // Blind number - Real64 ProfAng; // Solar profile angle (rad) - Real64 SlatAng; // Slat angle (rad) - Real64 TBlBmBm; // Blind beam-beam solar transmittance - Real64 TBlBmDif; // Blind diffuse-diffuse solar transmittance - Real64 ACosTlt; // Absolute value of cosine of surface tilt angle - Real64 AbsDiffBlindGnd; // System blind front ground diffuse solar absorptance at a particular slat angle - Real64 AbsDiffBlindSky; // System blind front sky diffuse solar absorptance at a particular slat angle - Real64 AbsDiffGlassLayGnd; // System glass layer ground diffuse solar absorptance with blind on - Real64 AbsDiffGlassLaySky; // System glass layer sky diffuse solar absorptance with blind on - int SurfSolAbs; // Pointer to scheduled surface gains object for fenestration systems - int SurfSolIncPtr; // Pointer to schedule surface gain object for interior side of the surface + Array1D currCosInc(TotSurfaces); // Cosine of incidence angle of beam solar on glass + Array1D currBeamSolar(TotSurfaces); // Local variable for BeamSolarRad + Array1D currSkySolarInc(TotSurfaces); // Sky diffuse solar incident on a surface + Array1D currGndSolarInc(TotSurfaces); // Ground diffuse solar incident on a surface // Always initialize the shortwave quantities - for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { - QRadSWOutAbs(SurfNum) = 0.0; - QRadSWInAbs(SurfNum) = 0.0; - QRadSWLightsInAbs(SurfNum) = 0.0; - InitialDifSolInAbs(SurfNum) = 0.0; - InitialDifSolInTrans(SurfNum) = 0.0; - - QRadSWwinAbsTot(SurfNum) = 0.0; - SWwinAbsTotalReport(SurfNum) = 0.0; - InitialDifSolInAbsReport(SurfNum) = 0.0; - InitialDifSolInTransReport(SurfNum) = 0.0; - SWInAbsTotalReport(SurfNum) = 0.0; - SWOutAbsTotalReport(SurfNum) = 0.0; - SWOutAbsEnergyReport(SurfNum) = 0.0; - - BmIncInsSurfIntensRep(SurfNum) = 0.0; - BmIncInsSurfAmountRep(SurfNum) = 0.0; - IntBmIncInsSurfIntensRep(SurfNum) = 0.0; - IntBmIncInsSurfAmountRep(SurfNum) = 0.0; - - QRadSWOutIncident(SurfNum) = 0.0; - QRadSWOutIncidentBeam(SurfNum) = 0.0; - QRadSWOutIncidentSkyDiffuse(SurfNum) = 0.0; - QRadSWOutIncidentGndDiffuse(SurfNum) = 0.0; - - QRadSWOutIncBmToDiffReflGnd(SurfNum) = 0.0; - QRadSWOutIncSkyDiffReflGnd(SurfNum) = 0.0; - QRadSWOutIncBmToBmReflObs(SurfNum) = 0.0; - QRadSWOutIncBmToDiffReflObs(SurfNum) = 0.0; - QRadSWOutIncSkyDiffReflObs(SurfNum) = 0.0; - CosIncidenceAngle(SurfNum) = 0.0; - - BmIncInsSurfIntensRep(SurfNum) = 0.0; - BmIncInsSurfAmountRep(SurfNum) = 0.0; - IntBmIncInsSurfIntensRep(SurfNum) = 0.0; - IntBmIncInsSurfAmountRep(SurfNum) = 0.0; - QRadSWwinAbsTotEnergy(SurfNum) = 0.0; - BmIncInsSurfAmountRepEnergy(SurfNum) = 0.0; - IntBmIncInsSurfAmountRepEnergy(SurfNum) = 0.0; - - OpaqSurfInsFaceBeamSolAbsorbed(SurfNum) = 0.0; - OpaqSurfInsFaceCondGainRep(SurfNum) = 0.0; - OpaqSurfInsFaceCondLossRep(SurfNum) = 0.0; + + SurfInitialDifSolInAbsReport(SurfNum) = 0.0; + SurfSWInAbsTotalReport(SurfNum) = 0.0; + + SurfBmIncInsSurfIntensRep(SurfNum) = 0.0; + SurfBmIncInsSurfAmountRep(SurfNum) = 0.0; + SurfIntBmIncInsSurfIntensRep(SurfNum) = 0.0; + SurfIntBmIncInsSurfAmountRep(SurfNum) = 0.0; + + SurfQRadSWOutIncident(SurfNum) = 0.0; + SurfQRadSWOutIncidentBeam(SurfNum) = 0.0; + SurfQRadSWOutIncidentSkyDiffuse(SurfNum) = 0.0; + SurfQRadSWOutIncidentGndDiffuse(SurfNum) = 0.0; + + SurfQRadSWOutIncBmToDiffReflGnd(SurfNum) = 0.0; + SurfQRadSWOutIncSkyDiffReflGnd(SurfNum) = 0.0; + SurfQRadSWOutIncBmToBmReflObs(SurfNum) = 0.0; + SurfQRadSWOutIncBmToDiffReflObs(SurfNum) = 0.0; + SurfQRadSWOutIncSkyDiffReflObs(SurfNum) = 0.0; + SurfCosIncidenceAngle(SurfNum) = 0.0; + + SurfBmIncInsSurfIntensRep(SurfNum) = 0.0; + SurfBmIncInsSurfAmountRep(SurfNum) = 0.0; + SurfIntBmIncInsSurfIntensRep(SurfNum) = 0.0; + SurfIntBmIncInsSurfAmountRep(SurfNum) = 0.0; + SurfBmIncInsSurfAmountRepEnergy(SurfNum) = 0.0; + SurfIntBmIncInsSurfAmountRepEnergy(SurfNum) = 0.0; SurfSkySolarInc(SurfNum) = 0.0; SurfGndSolarInc(SurfNum) = 0.0; } - for (int Lay = 1; Lay <= DataHeatBalance::MaxSolidWinLayers; Lay++) { - for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { - QRadSWwinAbsLayer(Lay, SurfNum) = 0.0; - } - } - for (int Lay = 1; Lay <= DataWindowEquivalentLayer::CFSMAXNL + 1; Lay++) { - for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { - QRadSWwinAbs(Lay, SurfNum) = 0.0; - } - } - - for (int Lay = 1; Lay <= DataWindowEquivalentLayer::CFSMAXNL; Lay++) { - for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { - InitialDifSolwinAbs(Lay, SurfNum) = 0.0; - } - } - for (int zoneNum = 1; zoneNum <= DataGlobals::NumOfZones; ++zoneNum) { InitialZoneDifSolReflW(zoneNum) = 0.0; ZoneWinHeatGainRepEnergy(zoneNum) = 0.0; @@ -2525,6 +2398,22 @@ namespace HeatBalanceSurfaceManager { ZoneOpaqSurfExtFaceCond(zoneNum) = 0.0; ZoneOpaqSurfExtFaceCondGainRep(zoneNum) = 0.0; ZoneOpaqSurfExtFaceCondLossRep(zoneNum) = 0.0; + } + for (int zoneNum = 1; zoneNum <= DataGlobals::NumOfZones; ++zoneNum) { + int const firstSurfOpaq = Zone(zoneNum).NonWindowSurfaceFirst; + int const lastSurfOpaq = Zone(zoneNum).NonWindowSurfaceLast; + if (firstSurfOpaq == -1) continue; + for (int SurfNum = firstSurfOpaq; SurfNum <= lastSurfOpaq; ++SurfNum) { + SurfOpaqInsFaceBeamSolAbsorbed(SurfNum) = 0.0; + SurfOpaqInsFaceCondGainRep(SurfNum) = 0.0; + SurfOpaqInsFaceCondLossRep(SurfNum) = 0.0; + SurfOpaqQRadSWOutAbs(SurfNum) = 0.0; + SurfOpaqQRadSWInAbs(SurfNum) = 0.0; + SurfOpaqQRadSWLightsInAbs(SurfNum) = 0.0; + SurfOpaqInitialDifSolInAbs(SurfNum) = 0.0; + SurfOpaqSWOutAbsTotalReport(SurfNum) = 0.0; + SurfOpaqSWOutAbsEnergyReport(SurfNum) = 0.0; + } // end of ZoneSurf int const firstSurfWin = Zone(zoneNum).WindowSurfaceFirst; int const lastSurfWin = Zone(zoneNum).WindowSurfaceLast; @@ -2543,6 +2432,8 @@ namespace HeatBalanceSurfaceManager { SurfWinIntLWAbsByShade(SurfNum) = 0.0; SurfWinConvHeatFlowNatural(SurfNum) = 0.0; SurfWinConvHeatGainToZoneAir(SurfNum) = 0.0; + } + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { SurfWinRetHeatGainToZoneAir(SurfNum) = 0.0; SurfWinDividerHeatGain(SurfNum) = 0.0; SurfWinBlTsolBmBm(SurfNum) = 0.0; @@ -2556,6 +2447,8 @@ namespace HeatBalanceSurfaceManager { SurfWinScGlSysTsolBmBm(SurfNum) = 0.0; SurfWinScGlSysTsolDifDif(SurfNum) = 0.0; SurfWinGlTsolBmBm(SurfNum) = 0.0; + } + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { SurfWinGlTsolBmDif(SurfNum) = 0.0; SurfWinGlTsolDifDif(SurfNum) = 0.0; SurfWinBmSolTransThruIntWinRep(SurfNum) = 0.0; @@ -2568,6 +2461,8 @@ namespace HeatBalanceSurfaceManager { SurfWinInsRevealDiffOntoGlazing(SurfNum) = 0.0; SurfWinInsRevealDiffIntoZone(SurfNum) = 0.0; SurfWinOutsRevealDiffOntoFrame(SurfNum) = 0.0; + } + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { SurfWinInsRevealDiffOntoFrame(SurfNum) = 0.0; SurfWinInsRevealDiffOntoGlazingReport(SurfNum) = 0.0; SurfWinInsRevealDiffIntoZoneReport(SurfNum) = 0.0; @@ -2578,9 +2473,10 @@ namespace HeatBalanceSurfaceManager { SurfWinBmSolRefldInsRevealRepEnergy(SurfNum) = 0.0; SurfWinProfileAngHor(SurfNum) = 0.0; SurfWinProfileAngVert(SurfNum) = 0.0; - SurfWinHeatGain(SurfNum) = 0.0; SurfWinHeatTransfer(SurfNum) = 0.0; + } + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { SurfWinHeatGainRep(SurfNum) = 0.0; SurfWinHeatLossRep(SurfNum) = 0.0; SurfWinGainConvGlazToZoneRep(SurfNum) = 0.0; @@ -2593,6 +2489,8 @@ namespace HeatBalanceSurfaceManager { SurfWinGapConvHtFlowRep(SurfNum) = 0.0; SurfWinShadingAbsorbedSolar(SurfNum) = 0.0; SurfWinSysSolTransmittance(SurfNum) = 0.0; + } + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { SurfWinSysSolReflectance(SurfNum) = 0.0; SurfWinSysSolAbsorptance(SurfNum) = 0.0; SurfWinHeatGainRepEnergy(SurfNum) = 0.0; @@ -2601,23 +2499,45 @@ namespace HeatBalanceSurfaceManager { SurfWinHeatTransferRepEnergy(SurfNum) = 0.0; SurfWinShadingAbsorbedSolarEnergy(SurfNum) = 0.0; SurfWinOtherConvGainInsideFaceToZoneRep(SurfNum) = 0.0; - SurfWinBSDFBeamDirectionRep(SurfNum) = 0; SurfWinBSDFBeamThetaRep(SurfNum) = 0.0; SurfWinBSDFBeamPhiRep(SurfNum) = 0.0; + SurfWinQRadSWwinAbsTot(SurfNum) = 0.0; + SurfWinQRadSWwinAbsTotEnergy(SurfNum) = 0.0; + SurfWinSWwinAbsTotalReport(SurfNum) = 0.0; + SurfWinInitialDifSolInTrans(SurfNum) = 0.0; + SurfWinInitialDifSolInTransReport(SurfNum) = 0.0; } + + for (int Lay = 1; Lay <= DataHeatBalance::MaxSolidWinLayers; Lay++) { + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = 0.0; + } + } + for (int Lay = 1; Lay <= DataWindowEquivalentLayer::CFSMAXNL + 1; Lay++) { + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { + SurfWinQRadSWwinAbs(Lay, SurfNum) = 0.0; + } + } + for (int Lay = 1; Lay <= DataWindowEquivalentLayer::CFSMAXNL; Lay++) { + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { + SurfWinInitialDifSolwinAbs(Lay, SurfNum) = 0.0; + } + } + } + if (InitSurfaceHeatBalancefirstTime) { + for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { + BmToDiffReflFacGnd(SurfNum) = Surface(SurfNum).ViewFactorGround; + SkyDiffReflFacGnd(SurfNum) = Surface(SurfNum).ViewFactorGround; + } } if (!SunIsUp || (BeamSolarRad + GndSolarRad + DifSolarRad <= 0.0)) { // Sun is down - QD = 0.0; - QDforDaylight = 0.0; - QC = 0.0; - QDV = 0.0; - // unused QBV = 0.0 - for (int zoneNum = 1; zoneNum <= DataGlobals::NumOfZones; ++zoneNum) { + EnclSolQD(zoneNum) = 0.0; + EnclSolQDforDaylight(zoneNum) = 0.0; ZoneTransSolar(zoneNum) = 0.0; ZoneBmSolFrExtWinsRep(zoneNum) = 0.0; ZoneBmSolFrIntWinsRep(zoneNum) = 0.0; @@ -2629,6 +2549,8 @@ namespace HeatBalanceSurfaceManager { ZoneBmSolFrIntWinsRepEnergy(zoneNum) = 0.0; ZoneDifSolFrExtWinsRepEnergy(zoneNum) = 0.0; ZoneDifSolFrIntWinsRepEnergy(zoneNum) = 0.0; + } + for (int zoneNum = 1; zoneNum <= DataGlobals::NumOfZones; ++zoneNum) { int const firstSurfWin = Zone(zoneNum).WindowSurfaceFirst; int const lastSurfWin = Zone(zoneNum).WindowSurfaceLast; if (firstSurfWin == -1) continue; @@ -2649,54 +2571,60 @@ namespace HeatBalanceSurfaceManager { } if (NumOfTDDPipes > 0) { - for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { - SurfWinTransSolar(SurfNum) = 0.0; - SurfWinTransSolarEnergy(SurfNum) = 0.0; - } for (auto &e : TDDPipe) { e.TransSolBeam = 0.0; e.TransSolDiff = 0.0; e.TransVisBeam = 0.0; e.TransVisDiff = 0.0; e.TransmittedSolar = 0.0; + int SurfDome = e.Dome; + SurfWinTransSolar(SurfDome) = 0.0; + SurfQRadSWOutIncident(SurfDome) = 0.0; + SurfWinQRadSWwinAbsTot(SurfDome) = 0.0; + for (int Lay = 1; Lay <= DataWindowEquivalentLayer::CFSMAXNL + 1; Lay++) { + SurfWinQRadSWwinAbs(Lay, SurfDome) = 0.0; + } } } if (CalcSolRefl) { - BmToBmReflFacObs = 0.0; - BmToDiffReflFacObs = 0.0; - BmToDiffReflFacGnd = 0.0; + for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { + BmToBmReflFacObs(SurfNum) = 0.0; + BmToDiffReflFacObs(SurfNum) = 0.0; + BmToDiffReflFacGnd(SurfNum) = 0.0; + } } } else { // Sun is up, calculate solar quantities assert(equal_dimensions(ReflFacBmToBmSolObs, ReflFacBmToDiffSolObs)); // For linear indexing assert(equal_dimensions(ReflFacBmToBmSolObs, ReflFacBmToDiffSolGnd)); // For linear indexing - Array2D::size_type lSH(CalcSolRefl ? ReflFacBmToBmSolObs.index(HourOfDay, 1) : 0u); - Array2D::size_type lSP(CalcSolRefl ? ReflFacBmToBmSolObs.index(PreviousHour, 1) : 0u); for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { SurfSkySolarInc(SurfNum) = DifSolarRad * AnisoSkyMult(SurfNum); SurfGndSolarInc(SurfNum) = GndSolarRad * Surface(SurfNum).ViewFactorGround; - // For Complex Fenestrations: SurfWinSkyGndSolarInc(SurfNum) = SurfGndSolarInc(SurfNum); SurfWinBmGndSolarInc(SurfNum) = 0.0; - if (CalcSolRefl) { // Tuned Linear indexing // [ lSH ] == ( HourOfDay, SurfNum ) // [ lSP ] == ( PreviousHour, SurfNum ) - - // For Complex Fenestrations: + } + if (CalcSolRefl) { + // [ lSH ] == ( HourOfDay, SurfNum ) // [ lSP ] == ( PreviousHour, SurfNum ) + Array1D::size_type lSH = ReflFacBmToBmSolObs.index(HourOfDay, 1) - 1; + Array1D::size_type lSP = ReflFacBmToBmSolObs.index(PreviousHour, 1) - 1; + // For Complex Fenestrations: + for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { SurfWinSkyGndSolarInc(SurfNum) = DifSolarRad * GndReflectance * ReflFacSkySolGnd(SurfNum); SurfWinBmGndSolarInc(SurfNum) = BeamSolarRad * SOLCOS(3) * GndReflectance * BmToDiffReflFacGnd(SurfNum); - BmToBmReflFacObs(SurfNum) = WeightNow * ReflFacBmToBmSolObs[lSH] + WeightPreviousHour * ReflFacBmToBmSolObs[lSP]; - BmToDiffReflFacObs(SurfNum) = WeightNow * ReflFacBmToDiffSolObs[lSH] + WeightPreviousHour * ReflFacBmToDiffSolObs[lSP]; - BmToDiffReflFacGnd(SurfNum) = WeightNow * ReflFacBmToDiffSolGnd[lSH] + WeightPreviousHour * ReflFacBmToDiffSolGnd[lSP]; - + BmToBmReflFacObs(SurfNum) = WeightNow * ReflFacBmToBmSolObs[lSH + SurfNum] + + WeightPreviousHour * ReflFacBmToBmSolObs[lSP + SurfNum]; + BmToDiffReflFacObs(SurfNum) = WeightNow * ReflFacBmToDiffSolObs[lSH + SurfNum] + + WeightPreviousHour * ReflFacBmToDiffSolObs[lSP + SurfNum]; + BmToDiffReflFacGnd(SurfNum) = WeightNow * ReflFacBmToDiffSolGnd[lSH + SurfNum] + + WeightPreviousHour * ReflFacBmToDiffSolGnd[lSP + SurfNum]; // TH2 CR 9056 SurfSkySolarInc(SurfNum) += BeamSolarRad * (BmToBmReflFacObs(SurfNum) + BmToDiffReflFacObs(SurfNum)) + DifSolarRad * ReflFacSkySolObs(SurfNum); SurfGndSolarInc(SurfNum) = BeamSolarRad * SOLCOS(3) * GndReflectance * BmToDiffReflFacGnd(SurfNum) + DifSolarRad * GndReflectance * ReflFacSkySolGnd(SurfNum); - - ++lSH; - ++lSP; + SkyDiffReflFacGnd(SurfNum) = ReflFacSkySolGnd(SurfNum); } } @@ -2729,7 +2657,7 @@ namespace HeatBalanceSurfaceManager { // DBZone needs to subtract this part since it is already counted in DBZone. // Use InitialZoneDifSolReflW (Rob's previous work) as it better counts initial distribution of // diffuse solar rather than using weighted area*absorptance - QDforDaylight(ZoneNum) = + EnclSolQDforDaylight(ZoneNum) = (DBZone(ZoneNum) - DBZoneIntWin(ZoneNum)) * BeamSolarRad + DBZoneSSG(ZoneNum) + InitialZoneDifSolReflW(ZoneNum); // RJH 08/30/07 - Substitute InitialZoneDifSolReflW(ZoneNum) for DSZone and DGZone here @@ -2740,14 +2668,14 @@ namespace HeatBalanceSurfaceManager { // QD(ZoneNum) = DBZone(ZoneNum)*BeamSolarRad & // +DSZone(ZoneNum)*DifSolarRad & // +DGZone(ZoneNum)*GndSolarRad - QD(ZoneNum) = DBZone(ZoneNum) * BeamSolarRad + DBZoneSSG(ZoneNum) + InitialZoneDifSolReflW(ZoneNum); + EnclSolQD(ZoneNum) = DBZone(ZoneNum) * BeamSolarRad + DBZoneSSG(ZoneNum) + InitialZoneDifSolReflW(ZoneNum); } // Flux of diffuse solar in each zone QSDifSol = 0.0; for (int enclNum = 1; enclNum <= DataViewFactorInformation::NumOfSolarEnclosures; ++enclNum) { - QSDifSol(enclNum) = QDforDaylight(enclNum); + QSDifSol(enclNum) = EnclSolQDforDaylight(enclNum); } if (InterZoneWindow) { @@ -2757,7 +2685,7 @@ namespace HeatBalanceSurfaceManager { auto lZone(FractDifShortZtoZ.index(enclNum, 1)); // Tuned Linear indexing for (int otherEnclNum = 1; otherEnclNum <= DataViewFactorInformation::NumOfSolarEnclosures; ++otherEnclNum, ++lZone) { if ((otherEnclNum != enclNum) && (RecDifShortFromZ(otherEnclNum))) { - QSDifSol_sum += FractDifShortZtoZ[lZone] * QDforDaylight(otherEnclNum); // [ lZone ] == ( enclNum, otherEnclNum ) + QSDifSol_sum += FractDifShortZtoZ[lZone] * EnclSolQDforDaylight(otherEnclNum); // [ lZone ] == ( enclNum, otherEnclNum ) } } QSDifSol(enclNum) += QSDifSol_sum; @@ -2767,9 +2695,9 @@ namespace HeatBalanceSurfaceManager { for (int enclNum = 1; enclNum <= DataViewFactorInformation::NumOfSolarEnclosures; ++enclNum) { if (InterZoneWindow) - QSDifSol(enclNum) *= FractDifShortZtoZ(enclNum, enclNum) * VMULT(enclNum); + QSDifSol(enclNum) *= FractDifShortZtoZ(enclNum, enclNum) * EnclSolVMULT(enclNum); else - QSDifSol(enclNum) *= VMULT(enclNum); + QSDifSol(enclNum) *= EnclSolVMULT(enclNum); } // RJH - 09-12-07 commented out report varariable calcs here since they refer to old distribution method @@ -2786,225 +2714,331 @@ namespace HeatBalanceSurfaceManager { // DifIncInsSurfIntensRep(SurfNum) // DifIncInsSurfAmountRepEnergy(SurfNum) = DifIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec // END DO - - for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { - if (Surface(SurfNum).HeatTransSurf) { - ConstrNum = Surface(SurfNum).Construction; - if (SurfWinStormWinFlag(SurfNum) == 1) ConstrNum = Surface(SurfNum).StormWinConstruction; - } else { - ConstrNum = 0; - } - ShelfNum = Surface(SurfNum).Shelf; - if (ShelfNum > 0) { - InShelfSurf = Shelf(ShelfNum).InSurf; // Inside daylighting shelf present if > 0 - OutShelfSurf = Shelf(ShelfNum).OutSurf; // Outside daylighting shelf present if > 0 - } else { - InShelfSurf = 0; - OutShelfSurf = 0; - } - - if (Surface(SurfNum).ExtSolar || SurfWinOriginalClass(SurfNum) == SurfaceClass_TDD_Diffuser) { - - if (SurfWinOriginalClass(SurfNum) == SurfaceClass_TDD_Diffuser) { - PipeNum = SurfWinTDDPipeNum(SurfNum); - SurfNum2 = TDDPipe(PipeNum).Dome; - - CosInc = CosIncAng(TimeStep, HourOfDay, SurfNum2); - - // Reconstruct the beam, sky, and ground radiation transmittance of just the TDD:DOME and TDD pipe - // by dividing out diffuse solar transmittance of TDD:DIFFUSER - BeamSolar = BeamSolarRad * TransTDD(PipeNum, CosInc, SolarBeam) / dataConstruction.Construct(ConstrNum).TransDiff; - - SkySolarInc = DifSolarRad * AnisoSkyMult(SurfNum2) * TransTDD(PipeNum, CosInc, SolarAniso) / - dataConstruction.Construct(ConstrNum).TransDiff; - - GndSolarInc = GndSolarRad * Surface(SurfNum2).ViewFactorGround * TDDPipe(PipeNum).TransSolIso / - dataConstruction.Construct(ConstrNum).TransDiff; - - } else if (OutShelfSurf > 0) { // Outside daylighting shelf - SurfNum2 = SurfNum; - - CosInc = CosIncAng(TimeStep, HourOfDay, SurfNum); - - BeamSolar = BeamSolarRad; - SkySolarInc = DifSolarRad * AnisoSkyMult(SurfNum); - - ShelfSolarRad = (BeamSolarRad * SunlitFrac(TimeStep, HourOfDay, OutShelfSurf) * CosIncAng(TimeStep, HourOfDay, OutShelfSurf) + - DifSolarRad * AnisoSkyMult(OutShelfSurf)) * - Shelf(ShelfNum).OutReflectSol; - - // Add all reflected solar from the outside shelf to the ground solar - // NOTE: If the shelf blocks part of the view to the ground, the user must reduce the ground view factor!! - GndSolarInc = GndSolarRad * Surface(SurfNum).ViewFactorGround + ShelfSolarRad * Shelf(ShelfNum).ViewFactor; - - } else { // Regular surface - SurfNum2 = SurfNum; - CosInc = CosIncAng(TimeStep, HourOfDay, SurfNum); - BeamSolar = BeamSolarRad; - SkySolarInc = SurfSkySolarInc(SurfNum); - GndSolarInc = SurfGndSolarInc(SurfNum); - } - + if (BuildingShadingCount || FixedShadingCount || AttachedShadingCount) { + for (int SurfNum = 1; SurfNum <= TotSurfaces; ++SurfNum) { + if (!Surface(SurfNum).ShadowingSurf) continue; // Cosine of incidence angle and solar incident on outside of surface, for reporting - CosIncidenceAngle(SurfNum) = CosInc; - - // Report variables for various incident solar quantities - + Real64 CosInc = CosIncAng(TimeStep, HourOfDay, SurfNum); + SurfCosIncidenceAngle(SurfNum) = CosInc; // Incident direct (unreflected) beam - QRadSWOutIncidentBeam(SurfNum) = BeamSolar * SunlitFrac(TimeStep, HourOfDay, SurfNum2) * CosInc; // NOTE: SurfNum2 - + SurfQRadSWOutIncidentBeam(SurfNum) = + BeamSolarRad * SunlitFrac(TimeStep, HourOfDay, SurfNum) * CosInc; // Incident (unreflected) diffuse solar from sky -- TDD_Diffuser calculated differently - if (SurfWinOriginalClass(SurfNum) == SurfaceClass_TDD_Diffuser) { - QRadSWOutIncidentSkyDiffuse(SurfNum) = SkySolarInc; - } else { - QRadSWOutIncidentSkyDiffuse(SurfNum) = DifSolarRad * AnisoSkyMult(SurfNum); - } + SurfQRadSWOutIncidentSkyDiffuse(SurfNum) = DifSolarRad * AnisoSkyMult(SurfNum); // Incident diffuse solar from sky diffuse reflected from ground plus beam reflected from ground - QRadSWOutIncidentGndDiffuse(SurfNum) = GndSolarInc; + SurfQRadSWOutIncidentGndDiffuse(SurfNum) = SurfGndSolarInc(SurfNum); // Incident diffuse solar from beam-to-diffuse reflection from ground - if (CalcSolRefl) { - QRadSWOutIncBmToDiffReflGnd(SurfNum) = BeamSolarRad * SOLCOS(3) * GndReflectance * BmToDiffReflFacGnd(SurfNum); - } else { - QRadSWOutIncBmToDiffReflGnd(SurfNum) = BeamSolarRad * SOLCOS(3) * GndReflectance * Surface(SurfNum).ViewFactorGround; - } + SurfQRadSWOutIncBmToDiffReflGnd(SurfNum) = + BeamSolarRad * SOLCOS(3) * GndReflectance * BmToDiffReflFacGnd(SurfNum); // Incident diffuse solar from sky diffuse reflection from ground - if (CalcSolRefl) { - QRadSWOutIncSkyDiffReflGnd(SurfNum) = DifSolarRad * GndReflectance * ReflFacSkySolGnd(SurfNum); - } else { - QRadSWOutIncSkyDiffReflGnd(SurfNum) = DifSolarRad * GndReflectance * Surface(SurfNum).ViewFactorGround; - } + SurfQRadSWOutIncSkyDiffReflGnd(SurfNum) = DifSolarRad * GndReflectance * SkyDiffReflFacGnd(SurfNum); // Total incident solar. Beam and sky reflection from obstructions, if calculated, is included // in SkySolarInc. - // QRadSWOutIncident(SurfNum) = QRadSWOutIncidentBeam(SurfNum) + SkySolarInc + GndSolarInc - - // TH2 CR 9056 - QRadSWOutIncident(SurfNum) = QRadSWOutIncidentBeam(SurfNum) + QRadSWOutIncidentSkyDiffuse(SurfNum) + - QRadSWOutIncBmToDiffReflGnd(SurfNum) + QRadSWOutIncSkyDiffReflGnd(SurfNum); - - if (CalcSolRefl) { - // Incident beam solar from beam-to-beam (specular) reflection from obstructions - QRadSWOutIncBmToBmReflObs(SurfNum) = BmToBmReflFacObs(SurfNum) * BeamSolarRad; - // Incident diffuse solar from beam-to-diffuse reflection from obstructions - QRadSWOutIncBmToDiffReflObs(SurfNum) = BmToDiffReflFacObs(SurfNum) * BeamSolarRad; - // Incident diffuse solar from sky diffuse reflection from obstructions - QRadSWOutIncSkyDiffReflObs(SurfNum) = DifSolarRad * ReflFacSkySolObs(SurfNum); - // TH2 CR 9056: Add reflections from obstructions to the total incident - QRadSWOutIncident(SurfNum) += - QRadSWOutIncBmToBmReflObs(SurfNum) + QRadSWOutIncBmToDiffReflObs(SurfNum) + QRadSWOutIncSkyDiffReflObs(SurfNum); - } - - if (Surface(SurfNum).HeatTransSurf) { // Exclude special shading surfaces which required QRadSWOut calculations above - - RoughIndexMovInsul = 0; + SurfQRadSWOutIncident(SurfNum) = + SurfQRadSWOutIncidentBeam(SurfNum) + SurfQRadSWOutIncidentSkyDiffuse(SurfNum) + + SurfQRadSWOutIncBmToDiffReflGnd(SurfNum) + SurfQRadSWOutIncSkyDiffReflGnd(SurfNum); - if (Surface(SurfNum).MaterialMovInsulExt > 0) EvalOutsideMovableInsulation(SurfNum, HMovInsul, RoughIndexMovInsul, AbsExt); - - if (RoughIndexMovInsul <= 0) { // No movable insulation present + } + } - if (dataConstruction.Construct(ConstrNum).TransDiff <= 0.0) { // Opaque surface + for (int zoneNum = 1; zoneNum <= DataGlobals::NumOfZones; ++zoneNum) { + int const firstSurf = Zone(zoneNum).SurfaceFirst; + int const lastSurf = Zone(zoneNum).SurfaceLast; + for (int SurfNum = firstSurf; SurfNum <= lastSurf; ++SurfNum) { + if (Surface(SurfNum).ExtSolar) { + // Regular surface + currCosInc(SurfNum) = CosIncAng(TimeStep, HourOfDay, SurfNum); + currBeamSolar(SurfNum) = BeamSolarRad; + currSkySolarInc(SurfNum) = SurfSkySolarInc(SurfNum); + currGndSolarInc(SurfNum) = SurfGndSolarInc(SurfNum); + // Cosine of incidence angle and solar incident on outside of surface, for reporting + SurfCosIncidenceAngle(SurfNum) = currCosInc(SurfNum); + // Report variables for various incident solar quantities + // Incident direct (unreflected) beam + SurfQRadSWOutIncidentBeam(SurfNum) = + currBeamSolar(SurfNum) * SunlitFrac(TimeStep, HourOfDay, SurfNum) * currCosInc(SurfNum); + + // Incident (unreflected) diffuse solar from sky -- TDD_Diffuser calculated differently + SurfQRadSWOutIncidentSkyDiffuse(SurfNum) = DifSolarRad * AnisoSkyMult(SurfNum); + // Incident diffuse solar from sky diffuse reflected from ground plus beam reflected from ground + SurfQRadSWOutIncidentGndDiffuse(SurfNum) = currGndSolarInc(SurfNum); + // Incident diffuse solar from beam-to-diffuse reflection from ground + SurfQRadSWOutIncBmToDiffReflGnd(SurfNum) = + BeamSolarRad * SOLCOS(3) * GndReflectance * BmToDiffReflFacGnd(SurfNum); + + // Incident diffuse solar from sky diffuse reflection from ground + SurfQRadSWOutIncSkyDiffReflGnd(SurfNum) = + DifSolarRad * GndReflectance * SkyDiffReflFacGnd(SurfNum); + // Total incident solar. Beam and sky reflection from obstructions, if calculated, is included + // in SkySolarInc. + // QRadSWOutIncident(SurfNum) = QRadSWOutIncidentBeam(SurfNum) + SkySolarInc + GndSolarInc + + // TH2 CR 9056 + SurfQRadSWOutIncident(SurfNum) = + SurfQRadSWOutIncidentBeam(SurfNum) + SurfQRadSWOutIncidentSkyDiffuse(SurfNum) + + SurfQRadSWOutIncBmToDiffReflGnd(SurfNum) + SurfQRadSWOutIncSkyDiffReflGnd(SurfNum); + + if (CalcSolRefl) { + // Incident beam solar from beam-to-beam (specular) reflection from obstructions + SurfQRadSWOutIncBmToBmReflObs(SurfNum) = BmToBmReflFacObs(SurfNum) * BeamSolarRad; + // Incident diffuse solar from beam-to-diffuse reflection from obstructions + SurfQRadSWOutIncBmToDiffReflObs(SurfNum) = BmToDiffReflFacObs(SurfNum) * BeamSolarRad; + // Incident diffuse solar from sky diffuse reflection from obstructions + SurfQRadSWOutIncSkyDiffReflObs(SurfNum) = DifSolarRad * ReflFacSkySolObs(SurfNum); + // TH2 CR 9056: Add reflections from obstructions to the total incident + SurfQRadSWOutIncident(SurfNum) += + SurfQRadSWOutIncBmToBmReflObs(SurfNum) + SurfQRadSWOutIncBmToDiffReflObs(SurfNum) + + SurfQRadSWOutIncSkyDiffReflObs(SurfNum); + } + } + } + } + for (int PipeNum = 1; PipeNum <= NumOfTDDPipes; ++PipeNum) { + int SurfNum = TDDPipe(PipeNum).Diffuser; // TDD: Diffuser object number + int SurfNum2 = TDDPipe(PipeNum).Dome; // TDD: DOME object number + int ConstrNum = Surface(SurfNum).Construction; + if (SurfWinStormWinFlag(SurfNum) == 1) ConstrNum = Surface(SurfNum).StormWinConstruction; + + currCosInc(SurfNum) = CosIncAng(TimeStep, HourOfDay, SurfNum2); + + // Reconstruct the beam, sky, and ground radiation transmittance of just the TDD:DOME and TDD pipe + // by dividing out diffuse solar transmittance of TDD:DIFFUSER + currBeamSolar(SurfNum) = BeamSolarRad * TransTDD(PipeNum, currCosInc(SurfNum), SolarBeam) / + dataConstruction.Construct(ConstrNum).TransDiff; + + currSkySolarInc(SurfNum) = DifSolarRad * AnisoSkyMult(SurfNum2) * + TransTDD(PipeNum, currCosInc(SurfNum), SolarAniso) / + dataConstruction.Construct(ConstrNum).TransDiff; + + currGndSolarInc(SurfNum) = + GndSolarRad * Surface(SurfNum2).ViewFactorGround * TDDPipe(PipeNum).TransSolIso / + dataConstruction.Construct(ConstrNum).TransDiff; + // Incident direct (unreflected) beam + SurfQRadSWOutIncidentBeam(SurfNum) = + currBeamSolar(SurfNum) * SunlitFrac(TimeStep, HourOfDay, SurfNum2) * + currCosInc(SurfNum); // NOTE: SurfNum2 + + // Incident (unreflected) diffuse solar from sky -- TDD_Diffuser calculated differently + SurfQRadSWOutIncidentSkyDiffuse(SurfNum) = currSkySolarInc(SurfNum); + SurfQRadSWOutIncident(SurfNum) = + SurfQRadSWOutIncidentBeam(SurfNum) + SurfQRadSWOutIncidentSkyDiffuse(SurfNum) + + SurfQRadSWOutIncBmToDiffReflGnd(SurfNum) + SurfQRadSWOutIncSkyDiffReflGnd(SurfNum); + } + for (int ShelfNum = 1; ShelfNum <= NumOfShelf; ++ShelfNum) { + int SurfNum = Shelf(ShelfNum).Window; // Daylighting shelf object number + int OutShelfSurf = Shelf(ShelfNum).OutSurf; // Outside daylighting shelf present if > 0 + currCosInc(SurfNum) = CosIncAng(TimeStep, HourOfDay, SurfNum); + currBeamSolar(SurfNum) = BeamSolarRad; + currSkySolarInc(SurfNum) = DifSolarRad * AnisoSkyMult(SurfNum); + // Shelf diffuse solar radiation + Real64 ShelfSolarRad = (BeamSolarRad * SunlitFrac(TimeStep, HourOfDay, OutShelfSurf) * + CosIncAng(TimeStep, HourOfDay, OutShelfSurf) + + DifSolarRad * AnisoSkyMult(OutShelfSurf)) * + Shelf(ShelfNum).OutReflectSol; + + // Add all reflected solar from the outside shelf to the ground solar + // NOTE: If the shelf blocks part of the view to the ground, the user must reduce the ground view factor!! + currGndSolarInc(SurfNum) = GndSolarRad * Surface(SurfNum).ViewFactorGround + + ShelfSolarRad * Shelf(ShelfNum).ViewFactor; + } - AbsExt = dataMaterial.Material(dataConstruction.Construct(ConstrNum).LayerPoint(1)).AbsorpSolar; + for (int zoneNum = 1; zoneNum <= DataGlobals::NumOfZones; ++zoneNum) { + int const firstSurfOpaq = Zone(zoneNum).NonWindowSurfaceFirst; + int const lastSurfOpaq = Zone(zoneNum).NonWindowSurfaceLast; + for (int SurfNum = firstSurfOpaq; SurfNum <= lastSurfOpaq; ++SurfNum) { + if (Surface(SurfNum).HeatTransSurf) { + int ConstrNum = Surface(SurfNum).Construction; + if (SurfWinStormWinFlag(SurfNum) == 1) ConstrNum = Surface(SurfNum).StormWinConstruction; + if (Surface(SurfNum).ExtSolar) { + // Exclude special shading surfaces which required QRadSWOut calculations above + int RoughIndexMovInsul = 0; // Roughness index of movable insulation + Real64 HMovInsul; // Resistance or "h" value of movable insulation (from EvalOutsideMovableInsulation, not used) + Real64 AbsExt; // Absorptivity of outer most layer (or movable insulation if present) + if (Surface(SurfNum).MaterialMovInsulExt > 0) + EvalOutsideMovableInsulation(SurfNum, HMovInsul, RoughIndexMovInsul, AbsExt); + + if (RoughIndexMovInsul <= 0) { // No movable insulation present + + AbsExt = dataMaterial.Material( + dataConstruction.Construct(ConstrNum).LayerPoint(1)).AbsorpSolar; + } + // Opaque heat transfer surface + SurfOpaqQRadSWOutAbs(SurfNum) = + AOSurf(SurfNum) * BeamSolarRad + AbsExt * (currSkySolarInc(SurfNum) + currGndSolarInc(SurfNum)); + SurfOpaqSWOutAbsTotalReport(SurfNum) = + SurfOpaqQRadSWOutAbs(SurfNum) * Surface(SurfNum).Area; + SurfOpaqSWOutAbsEnergyReport(SurfNum) = + SurfOpaqSWOutAbsTotalReport(SurfNum) * TimeStepZoneSec; + } + if (ConstrNum > 0) { + int SurfSolIncPtr = SurfaceScheduledSolarInc(SurfNum, ConstrNum); + if (SurfSolIncPtr == 0) { + if (dataConstruction.Construct(ConstrNum).TransDiff <= 0.0) { // Opaque surface + int ShelfNum = Surface(SurfNum).Shelf; // Daylighting shelf object number + int InShelfSurf = 0; // Inside daylighting shelf surface number + if (ShelfNum > 0) { + InShelfSurf = Shelf(ShelfNum).InSurf; // Inside daylighting shelf present if > 0 + } + SurfOpaqQRadSWInAbs(SurfNum) += AISurf(SurfNum) * BeamSolarRad; + if (InShelfSurf > 0) { // Inside daylighting shelf + // Shelf surface area is divided by 2 because only one side sees beam (Area was multiplied by 2 during init) + SurfOpaqInsFaceBeamSolAbsorbed(SurfNum) = + AISurf(SurfNum) * BeamSolarRad * (0.5 * Surface(SurfNum).Area); + } else { // Regular surface + SurfOpaqInsFaceBeamSolAbsorbed(SurfNum) = + AISurf(SurfNum) * BeamSolarRad * Surface(SurfNum).Area; + } + } + } else { + SurfOpaqQRadSWInAbs(SurfNum) += AISurf(SurfNum); + } + } + } + } + int const firstSurfWin = Zone(zoneNum).WindowSurfaceFirst; + int const lastSurfWin = Zone(zoneNum).WindowSurfaceLast; + for (int SurfNum = firstSurfWin; SurfNum <= lastSurfWin; ++SurfNum) { + if (Surface(SurfNum).ExtSolar || SurfWinOriginalClass(SurfNum) == SurfaceClass_TDD_Diffuser) { + if (Surface(SurfNum).HeatTransSurf) { + // Exclude special shading surfaces which required QRadSWOut calculations above + int RoughIndexMovInsul = 0; // Roughness index of movable insulation + Real64 HMovInsul; // Resistance or "h" value of movable insulation (from EvalOutsideMovableInsulation, not used) + Real64 AbsExt; // Absorptivity of outer most layer (or movable insulation if present) + + if (Surface(SurfNum).MaterialMovInsulExt > 0) + EvalOutsideMovableInsulation(SurfNum, HMovInsul, RoughIndexMovInsul, AbsExt); + int ConstrNum = 0 ; + if (Surface(SurfNum).HeatTransSurf) { + ConstrNum = Surface(SurfNum).Construction; + if (SurfWinStormWinFlag(SurfNum) == 1) ConstrNum = Surface(SurfNum).StormWinConstruction; + } + if (RoughIndexMovInsul <= 0) { // No movable insulation present + Real64 CosInc = currCosInc(SurfNum); // Cosine of incidence angle of beam solar on glass + Real64 BeamSolar = currBeamSolar(SurfNum); // Local variable for BeamSolarRad + Real64 SkySolarInc = currSkySolarInc(SurfNum); // Sky diffuse solar incident on a surface + Real64 GndSolarInc = currGndSolarInc(SurfNum); // Ground diffuse solar incident on a surface - } else { // Exterior window + int ShadeFlag = SurfWinShadingFlag(SurfNum); if (SurfWinWindowModelType(SurfNum) != WindowBSDFModel && SurfWinWindowModelType(SurfNum) != WindowEQLModel && !state.dataWindowManager->inExtWindowModel->isExternalLibraryModel()) { - TotGlassLay = dataConstruction.Construct(ConstrNum).TotGlassLayers; - for (Lay = 1; Lay <= TotGlassLay; ++Lay) { + int TotGlassLay = dataConstruction.Construct(ConstrNum).TotGlassLayers; // Number of glass layers + for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { AbsDiffWin(Lay) = dataConstruction.Construct(ConstrNum).AbsDiff(Lay); } - ShadeFlag = SurfWinShadingFlag(SurfNum); - if (ShadeFlag > 0) { // Shaded window - ConstrNumSh = Surface(SurfNum).activeShadedConstruction; + + int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; // Shaded window construction if (SurfWinStormWinFlag(SurfNum) == 1) ConstrNumSh = Surface(SurfNum).activeStormWinShadedConstruction; if (ShadeFlag == IntShadeOn || ShadeFlag == ExtShadeOn || ShadeFlag == BGShadeOn || ShadeFlag == ExtScreenOn) { // Shade/screen on - for (Lay = 1; Lay <= TotGlassLay; ++Lay) { + for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { AbsDiffWin(Lay) = dataConstruction.Construct(ConstrNumSh).AbsDiff(Lay); } SurfWinExtDiffAbsByShade(SurfNum) = - dataConstruction.Construct(ConstrNumSh).AbsDiffShade * (SkySolarInc + GndSolarInc); + dataConstruction.Construct(ConstrNumSh).AbsDiffShade * + (SkySolarInc + GndSolarInc); } - if (ShadeFlag == IntBlindOn || ShadeFlag == ExtBlindOn || ShadeFlag == BGBlindOn) { // Blind on - for (Lay = 1; Lay <= TotGlassLay; ++Lay) { + if (ShadeFlag == IntBlindOn || ShadeFlag == ExtBlindOn || + ShadeFlag == BGBlindOn) { // Blind on + for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { + // TODO: InterpSlatAng AbsDiffWin(Lay) = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).BlAbsDiff({1, MaxSlatAngs}, Lay)); + dataConstruction.Construct( + ConstrNumSh).BlAbsDiff( + {1, MaxSlatAngs}, Lay)); AbsDiffWinGnd(Lay) = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).BlAbsDiffGnd({1, MaxSlatAngs}, Lay)); + dataConstruction.Construct( + ConstrNumSh).BlAbsDiffGnd( + {1, MaxSlatAngs}, Lay)); AbsDiffWinSky(Lay) = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).BlAbsDiffSky({1, MaxSlatAngs}, Lay)); + dataConstruction.Construct( + ConstrNumSh).BlAbsDiffSky( + {1, MaxSlatAngs}, Lay)); } - SurfWinExtDiffAbsByShade(SurfNum) = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), - SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).AbsDiffBlind) * - (SkySolarInc + GndSolarInc); + SurfWinExtDiffAbsByShade(SurfNum) = + InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), + dataConstruction.Construct( ConstrNumSh).AbsDiffBlind) * + (SkySolarInc + GndSolarInc); if (Blind(SurfWinBlindNumber(SurfNum)).SlatOrientation == Horizontal) { - ACosTlt = std::abs(Surface(SurfNum).CosTilt); - AbsDiffBlindGnd = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), - SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).AbsDiffBlindGnd); - AbsDiffBlindSky = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), - SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).AbsDiffBlindSky); + Real64 ACosTlt = std::abs(Surface(SurfNum).CosTilt); + Real64 AbsDiffBlindGnd = InterpSlatAng( + SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), + dataConstruction.Construct(ConstrNumSh).AbsDiffBlindGnd); + Real64 AbsDiffBlindSky = InterpSlatAng( + SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), + dataConstruction.Construct(ConstrNumSh).AbsDiffBlindSky); SurfWinExtDiffAbsByShade(SurfNum) = - SkySolarInc * (0.5 * ACosTlt * AbsDiffBlindGnd + (1.0 - 0.5 * ACosTlt) * AbsDiffBlindSky) + - GndSolarInc * ((1.0 - 0.5 * ACosTlt) * AbsDiffBlindGnd + 0.5 * ACosTlt * AbsDiffBlindSky); + SkySolarInc * (0.5 * ACosTlt * AbsDiffBlindGnd + (1.0 - 0.5 * ACosTlt) * AbsDiffBlindSky) + + GndSolarInc * ((1.0 - 0.5 * ACosTlt) * AbsDiffBlindGnd + + 0.5 * ACosTlt * AbsDiffBlindSky); } } // Correct for shadowing of divider onto interior shading device (note that dividers are // not allowed in windows with between-glass shade/blind) - if ((ShadeFlag == IntShadeOn || ShadeFlag == IntBlindOn) && SurfWinDividerArea(SurfNum) > 0.0) + if ((ShadeFlag == IntShadeOn || ShadeFlag == IntBlindOn) && + SurfWinDividerArea(SurfNum) > 0.0) SurfWinExtDiffAbsByShade(SurfNum) *= SurfWinGlazedFrac(SurfNum); if (ShadeFlag == SwitchableGlazing) { // Switchable glazing - SwitchFac = SurfWinSwitchingFactor(SurfNum); - for (Lay = 1; Lay <= TotGlassLay; ++Lay) { - AbsDiffWin(Lay) = - InterpSw(SwitchFac, AbsDiffWin(Lay), dataConstruction.Construct(ConstrNumSh).AbsDiff(Lay)); + Real64 SwitchFac = SurfWinSwitchingFactor( + SurfNum); // Switching factor for switchable glazing + for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { + AbsDiffWin(Lay) = InterpSw(SwitchFac, AbsDiffWin(Lay), + dataConstruction.Construct( + ConstrNumSh).AbsDiff(Lay)); } } } // End of check if window has shading device on - QRadSWwinAbsTot(SurfNum) = 0.0; - for (Lay = 1; Lay <= TotGlassLay; ++Lay) { - QRadSWwinAbs(Lay, SurfNum) = AbsDiffWin(Lay) * (SkySolarInc + GndSolarInc) + - AWinSurf(Lay, SurfNum) * BeamSolar; // AWinSurf is from InteriorSolarDistribution - if (ShadeFlag == IntBlindOn || ShadeFlag == ExtBlindOn || ShadeFlag == BGBlindOn) { + SurfWinQRadSWwinAbsTot(SurfNum) = 0.0; + for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { + SurfWinQRadSWwinAbs(Lay, SurfNum) = AbsDiffWin(Lay) * (SkySolarInc + GndSolarInc) + + AWinSurf(Lay, SurfNum) * BeamSolar; + // AWinSurf is from InteriorSolarDistribution + if (ShadeFlag == IntBlindOn || ShadeFlag == ExtBlindOn || + ShadeFlag == BGBlindOn) { + int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; if (Blind(SurfWinBlindNumber(SurfNum)).SlatOrientation == Horizontal) { - AbsDiffGlassLayGnd = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), - SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).BlAbsDiffGnd({1, 19}, Lay)); - AbsDiffGlassLaySky = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), - SurfWinMovableSlats(SurfNum), - dataConstruction.Construct(ConstrNumSh).BlAbsDiffSky({1, 19}, Lay)); - - QRadSWwinAbs(Lay, SurfNum) = - SkySolarInc * (0.5 * ACosTlt * AbsDiffGlassLayGnd + (1.0 - 0.5 * ACosTlt) * AbsDiffGlassLaySky) + - GndSolarInc * ((1.0 - 0.5 * ACosTlt) * AbsDiffGlassLayGnd + 0.5 * ACosTlt * AbsDiffGlassLaySky) + - AWinSurf(Lay, SurfNum) * BeamSolar; + // AbsDiffGlassLayGnd - System glass layer ground diffuse solar absorptance with blind on + // AbsDiffGlassLaySky - System glass layer sky diffuse solar absorptance with blind on + Real64 ACosTlt = std::abs(Surface(SurfNum).CosTilt); + // Absolute value of cosine of surface tilt angle + Real64 AbsDiffGlassLayGnd = + InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), + dataConstruction.Construct(ConstrNumSh).BlAbsDiffGnd({1, 19}, Lay)); + Real64 AbsDiffGlassLaySky = + InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), + dataConstruction.Construct(ConstrNumSh).BlAbsDiffSky({1, 19}, Lay)); + + SurfWinQRadSWwinAbs(Lay, SurfNum) = + SkySolarInc * (0.5 * ACosTlt * AbsDiffGlassLayGnd + (1.0 - 0.5 * ACosTlt) * AbsDiffGlassLaySky) + + GndSolarInc * ((1.0 - 0.5 * ACosTlt) * AbsDiffGlassLayGnd + 0.5 * ACosTlt * AbsDiffGlassLaySky) + + AWinSurf(Lay, SurfNum) * BeamSolar; } } // Total solar absorbed in solid layer (W), for reporting - QRadSWwinAbsLayer(Lay, SurfNum) = QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = + SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; // Total solar absorbed in all glass layers (W), for reporting - QRadSWwinAbsTot(SurfNum) += QRadSWwinAbsLayer(Lay, SurfNum); + SurfWinQRadSWwinAbsTot(SurfNum) += SurfWinQRadSWwinAbsLayer(Lay, SurfNum); } - QRadSWwinAbsTotEnergy(SurfNum) = QRadSWwinAbsTot(SurfNum) * TimeStepZoneSec; + SurfWinQRadSWwinAbsTotEnergy(SurfNum) = + SurfWinQRadSWwinAbsTot(SurfNum) * TimeStepZoneSec; // Need to do it this way for now beaucse of scheduled surface gains. They do work only with // BSDF windows and overwriting absorbtances will work only for ordinary windows // } else if ( SurfaceWindow( SurfNum ).WindowModelType != WindowBSDFModel && @@ -3016,327 +3050,385 @@ namespace HeatBalanceSurfaceManager { // ( QRadSWOutIncident( SurfNum ) + QS( Surface( SurfNum ).Zone ) ); // } } else if (SurfWinWindowModelType(SurfNum) == WindowBSDFModel) { - TotSolidLay = dataConstruction.Construct(ConstrNum).TotSolidLayers; - CurrentState = SurfaceWindow(SurfNum).ComplexFen.CurrentState; + int TotSolidLay = dataConstruction.Construct(ConstrNum).TotSolidLayers; + // Number of solid layers in fenestration system (glass + shading) + int CurrentState = SurfaceWindow(SurfNum).ComplexFen.CurrentState; + // Current state for Complex Fenestration // Examine for schedule surface gain - SurfSolAbs = WindowScheduledSolarAbs(SurfNum, ConstrNum); + Real64 SurfSolAbs = WindowScheduledSolarAbs(SurfNum, + ConstrNum); // Pointer to scheduled surface gains object for fenestration systems - for (Lay = 1; Lay <= TotSolidLay; ++Lay) { + for (int Lay = 1; Lay <= TotSolidLay; ++Lay) { if (SurfSolAbs != 0) { - AWinSurf(Lay, SurfNum) = GetCurrentScheduleValue(FenLayAbsSSG(SurfSolAbs).SchedPtrs(Lay)); + AWinSurf(Lay, SurfNum) = GetCurrentScheduleValue( + FenLayAbsSSG(SurfSolAbs).SchedPtrs(Lay)); // ABWin(Lay) = AWinSurf(SurfNum,Lay) - QRadSWwinAbs(Lay, SurfNum) = AWinSurf(Lay, SurfNum); + SurfWinQRadSWwinAbs(Lay, SurfNum) = AWinSurf(Lay, SurfNum); } else { // Several notes about this equation. First part is accounting for duffuse solar radiation for the ground // and from the sky. Second item (AWinSurf(SurfNum,Lay) * BeamSolar) is accounting for absorbed solar // radiation originating from beam on exterior side. Third item (AWinCFOverlap(SurfNum,Lay)) is // accounting for absorptances from beam hitting back of the window which passes through rest of exterior // windows - QRadSWwinAbs(Lay, SurfNum) = - SurfaceWindow(SurfNum).ComplexFen.State(CurrentState).WinSkyFtAbs(Lay) * SkySolarInc + - SurfaceWindow(SurfNum).ComplexFen.State(CurrentState).WinSkyGndAbs(Lay) * GndSolarInc + - AWinSurf(Lay, SurfNum) * BeamSolar + AWinCFOverlap(Lay, SurfNum) * BeamSolar; + SurfWinQRadSWwinAbs(Lay, SurfNum) = + SurfaceWindow(SurfNum).ComplexFen.State(CurrentState).WinSkyFtAbs(Lay) * SkySolarInc + + SurfaceWindow(SurfNum).ComplexFen.State(CurrentState).WinSkyGndAbs(Lay) * GndSolarInc + + AWinSurf(Lay, SurfNum) * BeamSolar + + AWinCFOverlap(Lay, SurfNum) * BeamSolar; } // Total solar absorbed in solid layer (W), for reporting - QRadSWwinAbsLayer(Lay, SurfNum) = QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = + SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; // Total solar absorbed in all glass layers (W), for reporting - QRadSWwinAbsTot(SurfNum) += QRadSWwinAbsLayer(Lay, SurfNum); + SurfWinQRadSWwinAbsTot(SurfNum) += SurfWinQRadSWwinAbsLayer(Lay, SurfNum); } - QRadSWwinAbsTotEnergy(SurfNum) = QRadSWwinAbsTot(SurfNum) * TimeStepZoneSec; - - ShadeFlag = SurfWinShadingFlag(SurfNum); + SurfWinQRadSWwinAbsTotEnergy(SurfNum) = + SurfWinQRadSWwinAbsTot(SurfNum) * TimeStepZoneSec; } else if (SurfWinWindowModelType(SurfNum) == WindowEQLModel) { - QRadSWwinAbsTot(SurfNum) = 0.0; + SurfWinQRadSWwinAbsTot(SurfNum) = 0.0; // EQLNum = Construct(Surface(SurfNum)%Construction)%EQLConsPtr - TotSolidLay = CFS(dataConstruction.Construct(Surface(SurfNum).Construction).EQLConsPtr).NL; - for (Lay = 1; Lay <= TotSolidLay; ++Lay) { + int TotSolidLay = CFS(dataConstruction.Construct( + Surface(SurfNum).Construction).EQLConsPtr).NL; + for (int Lay = 1; Lay <= TotSolidLay; ++Lay) { // Absorbed window components include: // (1) beam solar radiation absorbed by all layers in the fenestration // (2) sky and ground reflected duffuse solar radiation absorbed by all layers // (3) diffuse short wave incident on the inside face of the fenestration. The short wave internal sources // include light, ... - AbsDiffWin(Lay) = dataConstruction.Construct(ConstrNum).AbsDiffFrontEQL(Lay); - QRadSWwinAbs(Lay, SurfNum) = - AWinSurf(Lay, SurfNum) * BeamSolar + AbsDiffWin(Lay) * (SkySolarInc + GndSolarInc); + AbsDiffWin(Lay) = dataConstruction.Construct(ConstrNum).AbsDiffFrontEQL( + Lay); + SurfWinQRadSWwinAbs(Lay, SurfNum) = AWinSurf(Lay, SurfNum) * BeamSolar + + AbsDiffWin(Lay) * (SkySolarInc + GndSolarInc); // Total solar absorbed in solid layer (W), for reporting - QRadSWwinAbsLayer(Lay, SurfNum) = QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = + SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; // Total solar absorbed in all glass layers (W), for reporting - QRadSWwinAbsTot(SurfNum) += QRadSWwinAbsLayer(Lay, SurfNum); + SurfWinQRadSWwinAbsTot(SurfNum) += SurfWinQRadSWwinAbsLayer(Lay, SurfNum); } - QRadSWwinAbsTotEnergy(SurfNum) = QRadSWwinAbsTot(SurfNum) * TimeStepZoneSec; + SurfWinQRadSWwinAbsTotEnergy(SurfNum) = + SurfWinQRadSWwinAbsTot(SurfNum) * TimeStepZoneSec; } else if (state.dataWindowManager->inExtWindowModel->isExternalLibraryModel()) { + int SurfNum2 = SurfNum; + if (SurfWinOriginalClass(SurfNum) == SurfaceClass_TDD_Diffuser) { + SurfNum2 = TDDPipe(SurfWinTDDPipeNum(SurfNum)).Dome; + } std::pair incomingAngle = - getSunWCEAngles(state, SurfNum2, BSDFHemisphere::Incoming); + getSunWCEAngles(state, SurfNum2, BSDFHemisphere::Incoming); Real64 Theta = incomingAngle.first; Real64 Phi = incomingAngle.second; std::shared_ptr aLayer = CWindowConstructionsSimplified::instance().getEquivalentLayer( state, WavelengthRange::Solar, ConstrNum); - size_t totLayers = aLayer->getNumOfLayers(); for (size_t Lay = 1; Lay <= totLayers; ++Lay) { - Real64 AbWinDiff = aLayer->getAbsorptanceLayer(Lay, Side::Front, ScatteringSimple::Diffuse, Theta, Phi); + Real64 AbWinDiff = aLayer->getAbsorptanceLayer(Lay, Side::Front, + ScatteringSimple::Diffuse, + Theta, Phi); - QRadSWwinAbs(Lay, SurfNum) = AbWinDiff * (SkySolarInc + GndSolarInc) + AWinSurf(Lay, SurfNum) * BeamSolar; + SurfWinQRadSWwinAbs(Lay, SurfNum) = + AbWinDiff * (SkySolarInc + GndSolarInc) + + AWinSurf(Lay, SurfNum) * BeamSolar; // Total solar absorbed in solid layer (W), for reporting - QRadSWwinAbsLayer(Lay, SurfNum) = QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = + SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; // Total solar absorbed in all glass layers (W), for reporting - QRadSWwinAbsTot(SurfNum) += QRadSWwinAbsLayer(Lay, SurfNum); + SurfWinQRadSWwinAbsTot(SurfNum) += SurfWinQRadSWwinAbsLayer(Lay, SurfNum); } } // Solar absorbed by window frame and dividers - FrDivNum = Surface(SurfNum).FrameDivider; - FrArea = SurfWinFrameArea(SurfNum); + int FrDivNum = Surface(SurfNum).FrameDivider; // Frame/divider number if (FrDivNum > 0) { - FrWidth = FrameDivider(FrDivNum).FrameWidth; - FrProjOut = FrameDivider(FrDivNum).FrameProjectionOut; - FrProjIn = FrameDivider(FrDivNum).FrameProjectionIn; - DivArea = SurfWinDividerArea(SurfNum); - DivWidth = FrameDivider(FrDivNum).DividerWidth; - DivProjOut = FrameDivider(FrDivNum).DividerProjectionOut; - DivProjIn = FrameDivider(FrDivNum).DividerProjectionIn; - } else { - FrWidth = 0.0; - FrProjOut = 0.0; - FrProjIn = 0.0; - DivArea = 0.0; - DivWidth = 0.0; - DivProjOut = 0.0; - DivProjIn = 0.0; - } - CosIncAngHorProj = 0.0; - CosIncAngVertProj = 0.0; - if (FrArea > 0.0 || DivArea > 0.0) { - FracSunLit = SunlitFrac(TimeStep, HourOfDay, SurfNum); - BeamFaceInc = BeamSolarRad * SunlitFrac(TimeStep, HourOfDay, SurfNum) * CosInc; - DifSolarFaceInc = SkySolarInc + GndSolarInc; - } else { - FracSunLit = 0.0; - } - if (FracSunLit > 0.0) { - if ((FrArea > 0.0 && (FrProjOut > 0.0 || FrProjIn > 0.0)) || - (DivArea > 0.0 && (DivProjOut > 0.0 || DivProjIn > 0.0))) { - // Dot products used to calculate beam solar incident on faces of - // frame and divider perpendicular to the glass surface. - // Note that SOLCOS is the current timestep's solar direction cosines. - // PhiWin = ASIN(WALCOS(3,SurfNum)) - PhiWin = std::asin(Surface(SurfNum).OutNormVec(3)); - ThWin = std::atan2(Surface(SurfNum).OutNormVec(2), Surface(SurfNum).OutNormVec(1)); - PhiSun = std::asin(SOLCOS(3)); - ThSun = std::atan2(SOLCOS(2), SOLCOS(1)); - Real64 const cos_PhiWin(std::cos(PhiWin)); - Real64 const cos_PhiSun(std::cos(PhiSun)); - CosIncAngHorProj = - std::abs(std::sin(PhiWin) * cos_PhiSun * std::cos(ThWin - ThSun) - cos_PhiWin * std::sin(PhiSun)); - CosIncAngVertProj = std::abs(cos_PhiWin * cos_PhiSun * std::sin(ThWin - ThSun)); + Real64 FrArea = SurfWinFrameArea(SurfNum); // Frame, divider area (m2) + Real64 FrProjOut = FrameDivider(FrDivNum).FrameProjectionOut; // Frame, divider outside projection (m) + Real64 FrProjIn = FrameDivider(FrDivNum).FrameProjectionIn; + Real64 DivArea = SurfWinDividerArea(SurfNum); + Real64 DivWidth = FrameDivider(FrDivNum).DividerWidth; + Real64 DivProjOut = FrameDivider(FrDivNum).DividerProjectionOut; + Real64 DivProjIn = FrameDivider(FrDivNum).DividerProjectionIn; + Real64 CosIncAngHorProj = 0.0; // Cosine of incidence angle of sun on horizontal faces of a frame or divider projection + Real64 CosIncAngVertProj = 0.0; // Cosine of incidence angle of sun on vertical faces of a frame or divider projection + Real64 FracSunLit = 0.0; // Fraction of window sunlit this time step + Real64 BeamFaceInc; // Beam solar incident window plane this time step (W/m2) + Real64 DifSolarFaceInc; // Diffuse solar incident on window plane this time step (W/m2) + if (FrArea > 0.0 || DivArea > 0.0) { + FracSunLit = SunlitFrac(TimeStep, HourOfDay, SurfNum); + BeamFaceInc = + BeamSolarRad * SunlitFrac(TimeStep, HourOfDay, SurfNum) * CosInc; + DifSolarFaceInc = SkySolarInc + GndSolarInc; } - } - - // Frame solar - - // (A window shade or blind, if present, is assumed to not shade the frame, so no special - // treatment of frame solar needed if window has an exterior shade or blind.) - if (FrArea > 0.0) { - FrIncSolarOut = BeamFaceInc; - FrIncSolarIn = 0.0; - TransDiffGl = 0.0; - if (FrProjOut > 0.0 || FrProjIn > 0.0) { - BeamFrHorFaceInc = BeamSolarRad * CosIncAngHorProj * - (Surface(SurfNum).Width - FrameDivider(FrDivNum).VertDividers * DivWidth) * FracSunLit / - FrArea; - BeamFrVertFaceInc = BeamSolarRad * CosIncAngVertProj * - (Surface(SurfNum).Height - FrameDivider(FrDivNum).HorDividers * DivWidth) * FracSunLit / - FrArea; - // Beam solar on outside of frame - FrIncSolarOut += (BeamFrHorFaceInc + BeamFrVertFaceInc) * FrProjOut; - if (FrProjIn > 0.0) { - TransGl = POLYF(CosInc, dataConstruction.Construct(ConstrNum).TransSolBeamCoef); - TransDiffGl = dataConstruction.Construct(ConstrNum).TransDiff; - if (ShadeFlag == SwitchableGlazing) { // Switchable glazing - TransGlSh = POLYF(CosInc, dataConstruction.Construct(ConstrNumSh).TransSolBeamCoef); - TransGl = InterpSw(SwitchFac, TransGl, TransGlSh); - TransDiffGlSh = dataConstruction.Construct(ConstrNumSh).TransDiff; - TransDiffGl = InterpSw(SwitchFac, TransDiffGl, TransDiffGlSh); - } - // Beam solar on inside of frame - FrIncSolarIn = (BeamFrHorFaceInc + BeamFrVertFaceInc) * FrProjIn * TransGl; + if (FracSunLit > 0.0) { + if ((FrArea > 0.0 && (FrProjOut > 0.0 || FrProjIn > 0.0)) || + (DivArea > 0.0 && (DivProjOut > 0.0 || DivProjIn > 0.0))) { + // Dot products used to calculate beam solar incident on faces of + // frame and divider perpendicular to the glass surface. + // Note that SOLCOS is the current timestep's solar direction cosines. + // PhiWin = ASIN(WALCOS(3,SurfNum)) + Real64 PhiWin = std::asin(Surface(SurfNum).OutNormVec( + 3)); // Altitude and azimuth angle of outward window normal (radians) + Real64 ThWin = std::atan2(Surface(SurfNum).OutNormVec(2), + Surface(SurfNum).OutNormVec(1)); + Real64 PhiSun = std::asin( + SOLCOS(3)); // Altitude and azimuth angle of sun (radians) + Real64 ThSun = std::atan2(SOLCOS(2), SOLCOS(1)); + Real64 const cos_PhiWin(std::cos(PhiWin)); + Real64 const cos_PhiSun(std::cos(PhiSun)); + CosIncAngHorProj = std::abs( + std::sin(PhiWin) * cos_PhiSun * std::cos(ThWin - ThSun) - + cos_PhiWin * std::sin(PhiSun)); + CosIncAngVertProj = std::abs( + cos_PhiWin * cos_PhiSun * std::sin(ThWin - ThSun)); } } - // Beam plus diffuse solar on outside of frame - FrIncSolarOut += DifSolarFaceInc * (1.0 + 0.5 * SurfWinProjCorrFrOut(SurfNum)); - SurfWinFrameQRadOutAbs(SurfNum) = FrIncSolarOut * SurfWinFrameSolAbsorp(SurfNum); - // Add diffuse from beam reflected from window outside reveal surfaces - SurfWinFrameQRadOutAbs(SurfNum) += - BeamSolarRad * SurfWinOutsRevealDiffOntoFrame(SurfNum) * SurfWinFrameSolAbsorp(SurfNum); - - // Beam plus diffuse solar on inside of frame - FrIncSolarIn += DifSolarFaceInc * TransDiffGl * 0.5 * SurfWinProjCorrFrIn(SurfNum); - SurfWinFrameQRadInAbs(SurfNum) = FrIncSolarIn * SurfWinFrameSolAbsorp(SurfNum); - // Add diffuse from beam reflected from window inside reveal surfaces - SurfWinFrameQRadInAbs(SurfNum) += - BeamSolarRad * SurfWinInsRevealDiffOntoFrame(SurfNum) * SurfWinFrameSolAbsorp(SurfNum); - } - - // Divider solar - - // (An exterior shade or blind, when in place, is assumed to completely cover the divider. - // Dividers are not allowed on windows with between-glass shade/blind so DivProjOut and - // DivProjIn will be zero in this case.) - - if (DivArea > 0.0) { // Solar absorbed by window divider - DividerAbs = SurfWinDividerSolAbsorp(SurfNum); - if (SurfWinDividerType(SurfNum) == Suspended) { - // Suspended (between-glass) divider; account for effect glass on outside of divider - // (note that outside and inside projection for this type of divider are both zero) - MatNumGl = dataConstruction.Construct(ConstrNum).LayerPoint(1); - TransGl = dataMaterial.Material(MatNumGl).Trans; - ReflGl = dataMaterial.Material(MatNumGl).ReflectSolBeamFront; - AbsGl = 1.0 - TransGl - ReflGl; - if (ShadeFlag == SwitchableGlazing) { // Switchable glazing - MatNumGlSh = dataConstruction.Construct(ConstrNumSh).LayerPoint(1); - TransGlSh = dataMaterial.Material(MatNumGlSh).Trans; - ReflGlSh = dataMaterial.Material(MatNumGlSh).ReflectSolBeamFront; - AbsGlSh = 1.0 - TransGlSh - ReflGlSh; - TransGl = InterpSw(SwitchFac, TransGl, TransGlSh); - ReflGl = InterpSw(SwitchFac, ReflGl, ReflGlSh); - AbsGl = InterpSw(SwitchFac, AbsGl, AbsGlSh); + // Frame solar + // (A window shade or blind, if present, is assumed to not shade the frame, so no special + // treatment of frame solar needed if window has an exterior shade or blind.) + if (FrArea > 0.0) { + Real64 FrIncSolarOut = BeamFaceInc; // Total solar incident on outside offrame including solar + Real64 FrIncSolarIn = 0.0; // Total solar incident on inside offrame including solar on frame projection (W/m2) + Real64 TransDiffGl = 0.0; // Diffuse solar transmittance + if (FrProjOut > 0.0 || FrProjIn > 0.0) { + Real64 BeamFrHorFaceInc = BeamSolarRad * CosIncAngHorProj * + (Surface(SurfNum).Width - + FrameDivider(FrDivNum).VertDividers * + DivWidth) * FracSunLit / FrArea; + Real64 BeamFrVertFaceInc = BeamSolarRad * CosIncAngVertProj * + (Surface(SurfNum).Height - + FrameDivider(FrDivNum).HorDividers * + DivWidth) * FracSunLit / FrArea; + // Beam solar on outside of frame + FrIncSolarOut += (BeamFrHorFaceInc + BeamFrVertFaceInc) * FrProjOut; + if (FrProjIn > 0.0) { + Real64 TransGl = POLYF(CosInc, dataConstruction.Construct( + ConstrNum).TransSolBeamCoef); + TransDiffGl = dataConstruction.Construct(ConstrNum).TransDiff; + if (ShadeFlag == SwitchableGlazing) { // Switchable glazing + Real64 SwitchFac = SurfWinSwitchingFactor(SurfNum); + int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; + Real64 TransGlSh = POLYF(CosInc, dataConstruction.Construct( + ConstrNumSh).TransSolBeamCoef); + TransGl = InterpSw(SwitchFac, TransGl, TransGlSh); + Real64 TransDiffGlSh = dataConstruction.Construct( + ConstrNumSh).TransDiff; + TransDiffGl = InterpSw(SwitchFac, TransDiffGl, TransDiffGlSh); + } + // Beam solar on inside of frame + FrIncSolarIn = + (BeamFrHorFaceInc + BeamFrVertFaceInc) * FrProjIn * TransGl; + } } - DividerRefl = 1.0 - DividerAbs; - DividerAbs = AbsGl + TransGl * (DividerAbs + DividerRefl * AbsGl) / (1.0 - DividerRefl * ReflGl); + // Beam plus diffuse solar on outside of frame + FrIncSolarOut += + DifSolarFaceInc * (1.0 + 0.5 * SurfWinProjCorrFrOut(SurfNum)); + SurfWinFrameQRadOutAbs(SurfNum) = + FrIncSolarOut * SurfWinFrameSolAbsorp(SurfNum); + // Add diffuse from beam reflected from window outside reveal surfaces + SurfWinFrameQRadOutAbs(SurfNum) += + BeamSolarRad * SurfWinOutsRevealDiffOntoFrame(SurfNum) * + SurfWinFrameSolAbsorp(SurfNum); + + // Beam plus diffuse solar on inside of frame + FrIncSolarIn += + DifSolarFaceInc * TransDiffGl * 0.5 * SurfWinProjCorrFrIn(SurfNum); + SurfWinFrameQRadInAbs(SurfNum) = + FrIncSolarIn * SurfWinFrameSolAbsorp(SurfNum); + // Add diffuse from beam reflected from window inside reveal surfaces + SurfWinFrameQRadInAbs(SurfNum) += + BeamSolarRad * SurfWinInsRevealDiffOntoFrame(SurfNum) * + SurfWinFrameSolAbsorp(SurfNum); } - BeamDivHorFaceInc = 0.0; - BeamDivVertFaceInc = 0.0; - // Beam incident on horizontal and vertical projection faces of divider if no exterior shading - if (DivProjOut > 0.0 && ShadeFlag != ExtShadeOn && ShadeFlag != ExtBlindOn && ShadeFlag != ExtScreenOn) { - BeamDivHorFaceInc = BeamSolarRad * CosIncAngHorProj * FrameDivider(FrDivNum).HorDividers * DivProjOut * - (Surface(SurfNum).Width - FrameDivider(FrDivNum).VertDividers * DivWidth) * FracSunLit / - DivArea; - BeamDivVertFaceInc = BeamSolarRad * CosIncAngVertProj * FrameDivider(FrDivNum).VertDividers * DivProjOut * - (Surface(SurfNum).Height - FrameDivider(FrDivNum).HorDividers * DivWidth) * FracSunLit / - DivArea; - } - DivIncSolarOutBm = 0.0; - DivIncSolarOutDif = 0.0; - DivIncSolarInBm = 0.0; - DivIncSolarInDif = 0.0; - if (ShadeFlag != ExtShadeOn && ShadeFlag != ExtBlindOn && ShadeFlag != BGShadeOn && ShadeFlag != BGBlindOn && - ShadeFlag != ExtScreenOn) { // No exterior or between-glass shading - DivIncSolarOutBm = BeamFaceInc + BeamDivHorFaceInc + BeamDivVertFaceInc; - DivIncSolarOutDif = DifSolarFaceInc * (1.0 + SurfWinProjCorrDivOut(SurfNum)); - if (DivProjIn > 0.0) { - TransGl = POLYF(CosInc, dataConstruction.Construct(ConstrNum).TransSolBeamCoef); - TransDiffGl = dataConstruction.Construct(ConstrNum).TransDiff; + // Divider solar + // (An exterior shade or blind, when in place, is assumed to completely cover the divider. + // Dividers are not allowed on windows with between-glass shade/blind so DivProjOut and + // DivProjIn will be zero in this case.) + if (DivArea > 0.0) { // Solar absorbed by window divider + Real64 DividerAbs = SurfWinDividerSolAbsorp( + SurfNum); // Window divider solar absorptance + if (SurfWinDividerType(SurfNum) == Suspended) { + // Suspended (between-glass) divider; account for effect glass on outside of divider + // (note that outside and inside projection for this type of divider are both zero) + int MatNumGl = dataConstruction.Construct(ConstrNum).LayerPoint( + 1); // Outer glass layer material number + Real64 TransGl = dataMaterial.Material( + MatNumGl).Trans; // Outer glass layer material number, switched construction + Real64 ReflGl = dataMaterial.Material(MatNumGl).ReflectSolBeamFront; + Real64 AbsGl = 1.0 - TransGl - ReflGl; + Real64 SwitchFac = SurfWinSwitchingFactor(SurfNum); + int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; if (ShadeFlag == SwitchableGlazing) { // Switchable glazing - TransGlSh = POLYF(CosInc, dataConstruction.Construct(ConstrNumSh).TransSolBeamCoef); + Real64 MatNumGlSh = dataConstruction.Construct( + ConstrNumSh).LayerPoint(1); + Real64 TransGlSh = dataMaterial.Material(MatNumGlSh).Trans; + Real64 ReflGlSh = dataMaterial.Material( + MatNumGlSh).ReflectSolBeamFront; + Real64 AbsGlSh = 1.0 - TransGlSh - ReflGlSh; TransGl = InterpSw(SwitchFac, TransGl, TransGlSh); - TransDiffGlSh = dataConstruction.Construct(ConstrNumSh).TransDiff; - TransDiffGl = InterpSw(SwitchFac, TransDiffGl, TransDiffGlSh); + ReflGl = InterpSw(SwitchFac, ReflGl, ReflGlSh); + AbsGl = InterpSw(SwitchFac, AbsGl, AbsGlSh); } - // Beam plus diffuse solar on inside of divider - BeamDivHorFaceIncIn = BeamSolarRad * CosIncAngHorProj * FrameDivider(FrDivNum).HorDividers * DivProjIn * - (Surface(SurfNum).Width - FrameDivider(FrDivNum).VertDividers * DivWidth) * - FracSunLit / DivArea; - BeamDivVertFaceIncIn = - BeamSolarRad * CosIncAngVertProj * FrameDivider(FrDivNum).VertDividers * DivProjIn * - (Surface(SurfNum).Height - FrameDivider(FrDivNum).HorDividers * DivWidth) * FracSunLit / DivArea; - DivIncSolarInBm = TransGl * (BeamDivHorFaceIncIn + BeamDivVertFaceIncIn); - DivIncSolarInDif = TransDiffGl * DifSolarFaceInc * SurfWinProjCorrDivIn(SurfNum); + Real64 DividerRefl = + 1.0 - DividerAbs; // Window divider solar reflectance + DividerAbs = AbsGl + TransGl * (DividerAbs + DividerRefl * AbsGl) / + (1.0 - DividerRefl * ReflGl); } - } else { // Exterior shade, screen or blind present - DivIncSolarOutBm = BeamFaceInc * (1.0 + SurfWinProjCorrDivOut(SurfNum)); - DivIncSolarOutDif = DifSolarFaceInc * (1.0 + SurfWinProjCorrDivOut(SurfNum)); - DivIncSolarInBm = BeamFaceInc * SurfWinProjCorrDivIn(SurfNum) * dataConstruction.Construct(ConstrNum).TransDiff; - DivIncSolarInDif = DifSolarFaceInc * SurfWinProjCorrDivIn(SurfNum) * dataConstruction.Construct(ConstrNum).TransDiff; - } - - if (ShadeFlag != ExtShadeOn && ShadeFlag != ExtBlindOn && ShadeFlag != ExtScreenOn && ShadeFlag != BGShadeOn && - ShadeFlag != BGBlindOn) { // No exterior or between-glass shade, screen or blind - SurfWinDividerQRadOutAbs(SurfNum) = DividerAbs * (DivIncSolarOutBm + DivIncSolarOutDif); - SurfWinDividerQRadInAbs(SurfNum) = DividerAbs * (DivIncSolarInBm + DivIncSolarInDif); - // Exterior shade, screen or blind - } else if (ShadeFlag == ExtShadeOn || ShadeFlag == ExtBlindOn || ShadeFlag == ExtScreenOn) { - - if (ShadeFlag == ExtBlindOn) { // Exterior blind - BlNum = SurfWinBlindNumber(SurfNum); + Real64 BeamDivHorFaceInc = 0.0; // Beam solar on divider's horizontal outside projection faces (W/m2) + Real64 BeamDivVertFaceInc = 0.0; // Beam solar on divider's vertical outside projection faces (W/m2) + // Beam incident on horizontal and vertical projection faces of divider if no exterior shading + if (DivProjOut > 0.0 && ShadeFlag != ExtShadeOn && + ShadeFlag != ExtBlindOn && ShadeFlag != ExtScreenOn) { + BeamDivHorFaceInc = BeamSolarRad * CosIncAngHorProj * + FrameDivider(FrDivNum).HorDividers * DivProjOut * + (Surface(SurfNum).Width - + FrameDivider(FrDivNum).VertDividers * DivWidth) * + FracSunLit / DivArea; + BeamDivVertFaceInc = BeamSolarRad * CosIncAngVertProj * + FrameDivider(FrDivNum).VertDividers * DivProjOut * + (Surface(SurfNum).Height - + FrameDivider(FrDivNum).HorDividers * DivWidth) * + FracSunLit / DivArea; + } + Real64 DivIncSolarOutBm = 0.0; // Diffuse solar incident on outside of divider including beam on divider projection (W/m2) + Real64 DivIncSolarOutDif = 0.0; // Diffuse solar incident on outside of divider including diffuse on divider projection (W/m2) + Real64 DivIncSolarInBm = 0.0; // Diffuse solar incident on inside of divider including beam on divider projection (W/m2) + Real64 DivIncSolarInDif = 0.0; // Diffuse solar incident on inside of divider including diffuse on divider projection (W/m2) + if (ShadeFlag != ExtShadeOn && ShadeFlag != ExtBlindOn && + ShadeFlag != BGShadeOn && ShadeFlag != BGBlindOn && + ShadeFlag != ExtScreenOn) { // No exterior or between-glass shading + DivIncSolarOutBm = BeamFaceInc + BeamDivHorFaceInc + BeamDivVertFaceInc; + DivIncSolarOutDif = + DifSolarFaceInc * (1.0 + SurfWinProjCorrDivOut(SurfNum)); + if (DivProjIn > 0.0) { + Real64 TransGl = POLYF(CosInc, dataConstruction.Construct( + ConstrNum).TransSolBeamCoef); + Real64 TransDiffGl = dataConstruction.Construct( + ConstrNum).TransDiff; // Diffuse solar transmittance + if (ShadeFlag == SwitchableGlazing) { // Switchable glazing + Real64 SwitchFac = SurfWinSwitchingFactor(SurfNum); + int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; + Real64 TransGlSh = POLYF(CosInc, dataConstruction.Construct( + ConstrNumSh).TransSolBeamCoef); + // Outer glass solar trans, refl, absorptance if switched + TransGl = InterpSw(SwitchFac, TransGl, TransGlSh); + Real64 TransDiffGlSh = dataConstruction.Construct( + ConstrNumSh).TransDiff; + // Diffuse solar transmittance, switched construction + TransDiffGl = InterpSw(SwitchFac, TransDiffGl, TransDiffGlSh); + } + // Beam plus diffuse solar on inside of divider + // BeamDivHorFaceIncIn - Beam solar on divider's horizontal inside projection faces (W/m2) + // BeamDivVertFaceIncIn - Beam solar on divider's vertical inside projection faces (W/m2) + Real64 BeamDivHorFaceIncIn = BeamSolarRad * CosIncAngHorProj * + FrameDivider(FrDivNum).HorDividers * + DivProjIn * (Surface(SurfNum).Width - + FrameDivider( + FrDivNum).VertDividers * + DivWidth) * FracSunLit / + DivArea; + Real64 BeamDivVertFaceIncIn = BeamSolarRad * CosIncAngVertProj * + FrameDivider(FrDivNum).VertDividers * + DivProjIn * (Surface(SurfNum).Height - + FrameDivider( + FrDivNum).HorDividers * + DivWidth) * FracSunLit / + DivArea; + DivIncSolarInBm = + TransGl * (BeamDivHorFaceIncIn + BeamDivVertFaceIncIn); + DivIncSolarInDif = TransDiffGl * DifSolarFaceInc * + SurfWinProjCorrDivIn(SurfNum); + } + } else { // Exterior shade, screen or blind present + + DivIncSolarOutBm = BeamFaceInc * (1.0 + SurfWinProjCorrDivOut(SurfNum)); + DivIncSolarOutDif = + DifSolarFaceInc * (1.0 + SurfWinProjCorrDivOut(SurfNum)); + DivIncSolarInBm = BeamFaceInc * SurfWinProjCorrDivIn(SurfNum) * + dataConstruction.Construct(ConstrNum).TransDiff; + DivIncSolarInDif = DifSolarFaceInc * SurfWinProjCorrDivIn(SurfNum) * + dataConstruction.Construct(ConstrNum).TransDiff; + } + if (ShadeFlag != ExtShadeOn && ShadeFlag != ExtBlindOn && + ShadeFlag != ExtScreenOn && ShadeFlag != BGShadeOn && ShadeFlag != BGBlindOn) { + // No exterior or between-glass shade, screen or blind + SurfWinDividerQRadOutAbs(SurfNum) = + DividerAbs * (DivIncSolarOutBm + DivIncSolarOutDif); + SurfWinDividerQRadInAbs(SurfNum) = + DividerAbs * (DivIncSolarInBm + DivIncSolarInDif); + // Exterior shade, screen or blind + } else if (ShadeFlag == ExtBlindOn) { // Exterior blind + int BlNum = SurfWinBlindNumber(SurfNum); + Real64 ProfAng; // Solar profile angle (rad) ProfileAngle(SurfNum, SOLCOS, Blind(BlNum).SlatOrientation, ProfAng); - SlatAng = SurfWinSlatAngThisTS(SurfNum); - TBlBmBm = BlindBeamBeamTrans( - ProfAng, SlatAng, Blind(BlNum).SlatWidth, Blind(BlNum).SlatSeparation, Blind(BlNum).SlatThickness); - TBlBmDif = InterpProfSlatAng( - ProfAng, SlatAng, SurfWinMovableSlats(SurfNum), Blind(BlNum).SolFrontBeamDiffTrans); + Real64 SlatAng = SurfWinSlatAngThisTS(SurfNum); // Slat angle (rad) + // TBlBmBm - Blind beam-beam solar transmittance + // TBlBmDif - Blind diffuse-diffuse solar transmittance + Real64 TBlBmBm = BlindBeamBeamTrans(ProfAng, SlatAng, + Blind(BlNum).SlatWidth, + Blind(BlNum).SlatSeparation, + Blind(BlNum).SlatThickness); + Real64 TBlBmDif = InterpProfSlatAng(ProfAng, SlatAng, + SurfWinMovableSlats(SurfNum), + Blind(BlNum).SolFrontBeamDiffTrans); SurfWinDividerQRadOutAbs(SurfNum) = - DividerAbs * (DivIncSolarOutBm * (TBlBmBm + TBlBmDif) + - DivIncSolarOutDif * InterpSlatAng(SlatAng, SurfWinMovableSlats(SurfNum), Blind(BlNum).SolFrontDiffDiffTrans)); + DividerAbs * (DivIncSolarOutBm * (TBlBmBm + TBlBmDif) + + DivIncSolarOutDif * InterpSlatAng(SlatAng, SurfWinMovableSlats(SurfNum), + Blind(BlNum).SolFrontDiffDiffTrans)); SurfWinDividerQRadInAbs(SurfNum) = - DividerAbs * - (DivIncSolarInBm * (TBlBmBm + TBlBmDif) + - DivIncSolarInDif * - InterpSlatAng(SlatAng, SurfWinMovableSlats(SurfNum), Blind(BlNum).SolFrontDiffDiffTrans)); + DividerAbs * (DivIncSolarInBm * (TBlBmBm + TBlBmDif) + + DivIncSolarInDif * InterpSlatAng(SlatAng, SurfWinMovableSlats(SurfNum), + Blind(BlNum).SolFrontDiffDiffTrans)); } else if (ShadeFlag == ExtShadeOn) { // Exterior shade - - SurfWinDividerQRadOutAbs(SurfNum) = DividerAbs * - dataMaterial.Material(dataConstruction.Construct(ConstrNumSh).LayerPoint(1)).Trans * - (DivIncSolarOutBm + DivIncSolarOutDif); - SurfWinDividerQRadInAbs(SurfNum) = DividerAbs * - dataMaterial.Material(dataConstruction.Construct(ConstrNumSh).LayerPoint(1)).Trans * - (DivIncSolarInBm + DivIncSolarInDif); - - } else if (ShadeFlag == ExtScreenOn) { // Exterior screen + int ConstrNumSh = Surface(SurfNum).activeShadedConstruction; SurfWinDividerQRadOutAbs(SurfNum) = - DividerAbs * - (SurfaceScreens(SurfWinScreenNumber(SurfNum)).BmBmTrans + - SurfaceScreens(SurfWinScreenNumber(SurfNum)).BmDifTrans) * - (DivIncSolarOutBm + DivIncSolarOutDif); + DividerAbs * dataMaterial.Material(dataConstruction.Construct(ConstrNumSh).LayerPoint(1)).Trans * + (DivIncSolarOutBm +DivIncSolarOutDif); SurfWinDividerQRadInAbs(SurfNum) = - DividerAbs * - (SurfaceScreens(SurfWinScreenNumber(SurfNum)).BmBmTrans + - SurfaceScreens(SurfWinScreenNumber(SurfNum)).BmDifTrans) * - (DivIncSolarInBm + DivIncSolarInDif); + DividerAbs * dataMaterial.Material(dataConstruction.Construct(ConstrNumSh).LayerPoint(1)).Trans * + (DivIncSolarInBm +DivIncSolarInDif); + + } else if (ShadeFlag == ExtScreenOn) { // Exterior screen + SurfWinDividerQRadOutAbs(SurfNum) = DividerAbs * (SurfaceScreens( + SurfWinScreenNumber(SurfNum)).BmBmTrans + SurfaceScreens( + SurfWinScreenNumber(SurfNum)).BmDifTrans) * + (DivIncSolarOutBm + + DivIncSolarOutDif); + SurfWinDividerQRadInAbs(SurfNum) = DividerAbs * (SurfaceScreens( + SurfWinScreenNumber(SurfNum)).BmBmTrans + SurfaceScreens( + SurfWinScreenNumber(SurfNum)).BmDifTrans) * + (DivIncSolarInBm + + DivIncSolarInDif); } } } - } - } // RoughIndexMovInsul <= 0, no movable insulation - - if (Surface(SurfNum).HeatTransSurf && - dataConstruction.Construct(ConstrNum).TransDiff <= 0.0) { // Opaque heat transfer surface - QRadSWOutAbs(SurfNum) = AOSurf(SurfNum) * BeamSolarRad + AbsExt * (SkySolarInc + GndSolarInc); - SWOutAbsTotalReport(SurfNum) = QRadSWOutAbs(SurfNum) * Surface(SurfNum).Area; - SWOutAbsEnergyReport(SurfNum) = SWOutAbsTotalReport(SurfNum) * TimeStepZoneSec; - } - } // Surface(SurfNum)%HeatTransSurf - - } // Surface(SurfNum)%ExtSolar - - if (Surface(SurfNum).HeatTransSurf && ConstrNum > 0) { - SurfSolIncPtr = SurfaceScheduledSolarInc(SurfNum, ConstrNum); - if (SurfSolIncPtr == 0) { - if (dataConstruction.Construct(ConstrNum).TransDiff <= 0.0) { // Opaque surface - QRadSWInAbs(SurfNum) += AISurf(SurfNum) * BeamSolarRad; - if (InShelfSurf > 0) { // Inside daylighting shelf - // Shelf surface area is divided by 2 because only one side sees beam (Area was multiplied by 2 during init) - OpaqSurfInsFaceBeamSolAbsorbed(SurfNum) = AISurf(SurfNum) * BeamSolarRad * (0.5 * Surface(SurfNum).Area); - } else { // Regular surface - OpaqSurfInsFaceBeamSolAbsorbed(SurfNum) = AISurf(SurfNum) * BeamSolarRad * Surface(SurfNum).Area; - } - } - } else { - QRadSWInAbs(SurfNum) += AISurf(SurfNum); - } + } // RoughIndexMovInsul <= 0, no movable insulation + } // Surface(SurfNum)%HeatTransSurf + } // Surface(SurfNum)%ExtSolar + } // end of surface window loop + } // end of zone loop + for (int PipeNum = 1; PipeNum <= NumOfTDDPipes; ++PipeNum) { + int SurfNum = TDDPipe(PipeNum).Dome; // TDD: DOME object number + int ConstrNum = Surface(SurfNum).Construction; + int TotGlassLay = dataConstruction.Construct(ConstrNum).TotGlassLayers; // Number of glass layers + SurfWinQRadSWwinAbsTot(SurfNum) = 0.0; + for (int Lay = 1; Lay <= TotGlassLay; ++Lay) { + AbsDiffWin(Lay) = dataConstruction.Construct(ConstrNum).AbsDiff(Lay); + SurfWinQRadSWwinAbs(Lay, SurfNum) = AbsDiffWin(Lay) * (currSkySolarInc(SurfNum) + currGndSolarInc(SurfNum)) + + AWinSurf(Lay, SurfNum) * currBeamSolar(SurfNum); + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinQRadSWwinAbsTot(SurfNum) += SurfWinQRadSWwinAbsLayer(Lay, SurfNum); } - } // End of surface loop + SurfWinQRadSWwinAbsTotEnergy(SurfNum) = SurfWinQRadSWwinAbsTot(SurfNum) * TimeStepZoneSec; + } } // End of sun-up check } @@ -3426,7 +3518,7 @@ namespace HeatBalanceSurfaceManager { for (int zoneNum : DataViewFactorInformation::ZoneSolarInfo(enclosureNum).ZoneNums) { sumZoneQLTSW += ZoneIntGain(zoneNum).QLTSW; } - QS(enclosureNum) = QD(enclosureNum) + sumZoneQLTSW; + QS(enclosureNum) = EnclSolQD(enclosureNum) + sumZoneQLTSW; QSLights(enclosureNum) = sumZoneQLTSW; } @@ -3443,8 +3535,8 @@ namespace HeatBalanceSurfaceManager { for (int zoneNum : DataViewFactorInformation::ZoneSolarInfo(OtherenclosureNum).ZoneNums) { sumZoneQLTSW += ZoneIntGain(zoneNum).QLTSW; } - QS(enclosureNum) += FractDifShortZtoZ(enclosureNum, OtherenclosureNum) * (QD(OtherenclosureNum) + sumZoneQLTSW); - ZoneDifSolFrIntWinsRep(enclosureNum) += FractDifShortZtoZ(enclosureNum, OtherenclosureNum) * QD(OtherenclosureNum); + QS(enclosureNum) += FractDifShortZtoZ(enclosureNum, OtherenclosureNum) * (EnclSolQD(OtherenclosureNum) + sumZoneQLTSW); + ZoneDifSolFrIntWinsRep(enclosureNum) += FractDifShortZtoZ(enclosureNum, OtherenclosureNum) * EnclSolQD(OtherenclosureNum); ZoneDifSolFrIntWinsRepEnergy(enclosureNum) = ZoneDifSolFrIntWinsRep(enclosureNum) * TimeStepZoneSec; } } @@ -3460,10 +3552,10 @@ namespace HeatBalanceSurfaceManager { //!!! Following may need to be removed or changed when shelves are considered in adjacent reflection calculations if (Surface(SurfNum).Class == SurfaceClass_Shading) continue; int const enclosureNum = Surface(SurfNum).SolarEnclIndex; - IntBmIncInsSurfIntensRep(SurfNum) = + SurfIntBmIncInsSurfIntensRep(SurfNum) = ZoneBmSolFrIntWinsRep(enclosureNum) / DataViewFactorInformation::ZoneSolarInfo(enclosureNum).TotalSurfArea; - IntBmIncInsSurfAmountRep(SurfNum) = IntBmIncInsSurfIntensRep(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)); - IntBmIncInsSurfAmountRepEnergy(SurfNum) = IntBmIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec; + SurfIntBmIncInsSurfAmountRep(SurfNum) = SurfIntBmIncInsSurfIntensRep(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)); + SurfIntBmIncInsSurfAmountRepEnergy(SurfNum) = SurfIntBmIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec; // IntDifIncInsSurfIntensRep(SurfNum) = ZoneDifSolFrIntWinsRep(ZoneNum)/Zone(ZoneNum)%TotalSurfArea // IntDifIncInsSurfAmountRep(SurfNum) = IntDifIncInsSurfIntensRep(SurfNum) * & // (Surface(SurfNum)%Area + SurfaceWindow(SurfNum)%DividerArea) @@ -3474,12 +3566,12 @@ namespace HeatBalanceSurfaceManager { // COMPUTE CONVECTIVE GAINS AND ZONE FLUX DENSITY. for (int enclosureNum = 1; enclosureNum <= DataViewFactorInformation::NumOfSolarEnclosures; ++enclosureNum) { if (InterZoneWindow) { - QS(enclosureNum) *= FractDifShortZtoZ(enclosureNum, enclosureNum) * VMULT(enclosureNum); + QS(enclosureNum) *= FractDifShortZtoZ(enclosureNum, enclosureNum) * EnclSolVMULT(enclosureNum); // CR 8695, VMULT not based on visible - QSLights(enclosureNum) *= FractDifShortZtoZ(enclosureNum, enclosureNum) * VMULT(enclosureNum); + QSLights(enclosureNum) *= FractDifShortZtoZ(enclosureNum, enclosureNum) * EnclSolVMULT(enclosureNum); } else { - QS(enclosureNum) *= VMULT(enclosureNum); - QSLights(enclosureNum) *= VMULT(enclosureNum); + QS(enclosureNum) *= EnclSolVMULT(enclosureNum); + QSLights(enclosureNum) *= EnclSolVMULT(enclosureNum); } } @@ -3502,8 +3594,8 @@ namespace HeatBalanceSurfaceManager { if (Surface(SurfNum).MaterialMovInsulInt > 0) EvalInsideMovableInsulation(SurfNum, HMovInsul, AbsInt); if (HMovInsul > 0.0) AbsIntSurf = AbsInt; - QRadSWInAbs(SurfNum) += QS(solEnclosureNum) * AbsIntSurf; - QRadSWLightsInAbs(SurfNum) += QSLights(solEnclosureNum) * AbsIntSurfVis; + SurfOpaqQRadSWInAbs(SurfNum) += QS(solEnclosureNum) * AbsIntSurf; + SurfOpaqQRadSWLightsInAbs(SurfNum) += QSLights(solEnclosureNum) * AbsIntSurfVis; } if (dataConstruction.Construct(ConstrNum).TransDiff <= 0.0) { // Opaque exterior surface @@ -3511,36 +3603,36 @@ namespace HeatBalanceSurfaceManager { HMovInsul = 0.0; if (Surface(SurfNum).MaterialMovInsulExt > 0) EvalOutsideMovableInsulation(SurfNum, HMovInsul, RoughIndexMovInsul, AbsExt); if (HMovInsul > 0) { // Movable outside insulation in place - QRadSWOutMvIns(SurfNum) = QRadSWOutAbs(SurfNum) * AbsExt / dataMaterial.Material(dataConstruction.Construct(ConstrNum).LayerPoint(1)).AbsorpSolar; + SurfQRadSWOutMvIns(SurfNum) = SurfOpaqQRadSWOutAbs(SurfNum) * AbsExt / dataMaterial.Material(dataConstruction.Construct(ConstrNum).LayerPoint(1)).AbsorpSolar; // For transparent insulation, allow some sunlight to get through the movable insulation. // The equation below is derived by taking what is transmitted through the layer and applying // the fraction that is absorbed plus the back reflected portion (first order reflection only) // to the plane between the transparent insulation and the exterior surface face. - QRadSWOutAbs(SurfNum) = dataMaterial.Material(Surface(SurfNum).MaterialMovInsulExt).Trans * QRadSWOutMvIns(SurfNum) * + SurfOpaqQRadSWOutAbs(SurfNum) = dataMaterial.Material(Surface(SurfNum).MaterialMovInsulExt).Trans * SurfQRadSWOutMvIns(SurfNum) * ((dataMaterial.Material(dataConstruction.Construct(ConstrNum).LayerPoint(1)).AbsorpSolar / AbsExt) + (1 - dataMaterial.Material(dataConstruction.Construct(ConstrNum).LayerPoint(1)).AbsorpSolar)); - SWOutAbsTotalReport(SurfNum) = QRadSWOutAbs(SurfNum) * Surface(SurfNum).Area; - SWOutAbsEnergyReport(SurfNum) = SWOutAbsTotalReport(SurfNum) * TimeStepZoneSec; + SurfOpaqSWOutAbsTotalReport(SurfNum) = SurfOpaqQRadSWOutAbs(SurfNum) * Surface(SurfNum).Area; + SurfOpaqSWOutAbsEnergyReport(SurfNum) = SurfOpaqSWOutAbsTotalReport(SurfNum) * TimeStepZoneSec; } } // RJH 08/30/07 - Add InitialDifSolInAbs, InitialDifSolwinAbs, and InitialDifSolAbsByShade // calced in CalcWinTransDifSolInitialDistribution to QRadSWInAbs, QRadSWwinAbs, and IntSWAbsByShade here if (dataConstruction.Construct(ConstrNum).TransDiff <= 0.0) { // Opaque surface - QRadSWInAbs(SurfNum) += InitialDifSolInAbs(SurfNum); + SurfOpaqQRadSWInAbs(SurfNum) += SurfOpaqInitialDifSolInAbs(SurfNum); } // Report - SWwinAbsTotalReport(SurfNum) = 0.0; - SWInAbsTotalReport(SurfNum) = 0.0; - InitialDifSolInAbsReport(SurfNum) = 0.0; - InitialDifSolInTransReport(SurfNum) = 0.0; +// SWwinAbsTotalReport(SurfNum) = 0.0; + SurfSWInAbsTotalReport(SurfNum) = 0.0; + SurfInitialDifSolInAbsReport(SurfNum) = 0.0; +// SurfWinInitialDifSolInTransReport(SurfNum) = 0.0; //TOCHECK if (dataConstruction.Construct(ConstrNum).TransDiff <= 0.0) { // Opaque surface // Initial Transmitted Diffuse Solar Absorbed on Inside of Surface[W] - InitialDifSolInAbsReport(SurfNum) = InitialDifSolInAbs(SurfNum) * Surface(SurfNum).Area; + SurfInitialDifSolInAbsReport(SurfNum) = SurfOpaqInitialDifSolInAbs(SurfNum) * Surface(SurfNum).Area; // Total Shortwave Radiation Absorbed on Inside of Surface[W] - SWInAbsTotalReport(SurfNum) = QRadSWInAbs(SurfNum) * Surface(SurfNum).Area; + SurfSWInAbsTotalReport(SurfNum) = SurfOpaqQRadSWInAbs(SurfNum) * Surface(SurfNum).Area; } - } // end of opague + } // end of opaque int const firstSurfWin = Zone(zoneNum).WindowSurfaceFirst; int const lastSurfWin = Zone(zoneNum).WindowSurfaceLast; @@ -3563,7 +3655,7 @@ namespace HeatBalanceSurfaceManager { // These calculations are repeated from InitInternalHeatGains for the Zone Component Loads Report pulseMultipler = 0.01; // the W/sqft pulse for the zone if (!doLoadComponentPulseNow) { - QRadThermInAbs(SurfNum) = QL(radEnclosureNum) * TMULT(radEnclosureNum) * ITABSF(SurfNum); + SurfQRadThermInAbs(SurfNum) = QL(radEnclosureNum) * TMULT(radEnclosureNum) * ITABSF(SurfNum); } else { curQL = QL(radEnclosureNum); // for the loads component report during the special sizing run increase the radiant portion @@ -3573,12 +3665,12 @@ namespace HeatBalanceSurfaceManager { // ITABSF is the Inside Thermal Absorptance // TMULT is a multiplier for each zone/enclosure // QRadThermInAbs is the thermal radiation absorbed on inside surfaces - QRadThermInAbs(SurfNum) = adjQL * TMULT(radEnclosureNum) * ITABSF(SurfNum); + SurfQRadThermInAbs(SurfNum) = adjQL * TMULT(radEnclosureNum) * ITABSF(SurfNum); } if (ShadeFlag <= 0) { // No window shading for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { - QRadSWwinAbs(IGlass, SurfNum) += + SurfWinQRadSWwinAbs(IGlass, SurfNum) += QS(solEnclosureNum) * dataConstruction.Construct(ConstrNum).AbsDiffBack(IGlass); } } else if (ConstrNumSh != 0 && (ShadeFlag == IntShadeOn || ShadeFlag >= 3)) { @@ -3586,14 +3678,14 @@ namespace HeatBalanceSurfaceManager { for (IGlass = 1; IGlass <= dataConstruction.Construct(ConstrNumSh).TotGlassLayers; ++IGlass) { if (ShadeFlag == IntShadeOn || ShadeFlag == ExtShadeOn || ShadeFlag == BGShadeOn || ShadeFlag == ExtScreenOn) - QRadSWwinAbs(IGlass, SurfNum) += QS(solEnclosureNum) * + SurfWinQRadSWwinAbs(IGlass, SurfNum) += QS(solEnclosureNum) * dataConstruction.Construct(ConstrNumSh).AbsDiffBack( IGlass); if (ShadeFlag == IntBlindOn || ShadeFlag == ExtBlindOn) { BlAbsDiffBk = InterpSlatAng(SurfWinSlatAngThisTS(SurfNum), SurfWinMovableSlats(SurfNum), dataConstruction.Construct(ConstrNumSh).BlAbsDiffBack(_, IGlass)); - QRadSWwinAbs(IGlass, SurfNum) += QS(solEnclosureNum) * BlAbsDiffBk; + SurfWinQRadSWwinAbs(IGlass, SurfNum) += QS(solEnclosureNum) * BlAbsDiffBk; } } BlNum = SurfWinBlindNumber(SurfNum); @@ -3623,7 +3715,7 @@ namespace HeatBalanceSurfaceManager { } else if (ShadeFlag == SwitchableGlazing) { // Switchable glazing for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { - QRadSWwinAbs(IGlass, SurfNum) += QS(solEnclosureNum) * + SurfWinQRadSWwinAbs(IGlass, SurfNum) += QS(solEnclosureNum) * InterpSw(SurfWinSwitchingFactor(SurfNum), dataConstruction.Construct(ConstrNum).AbsDiffBack( IGlass), dataConstruction.Construct( @@ -3683,7 +3775,7 @@ namespace HeatBalanceSurfaceManager { // These calculations are repeated from InitInternalHeatGains for the Zone Component Loads Report pulseMultipler = 0.01; // the W/sqft pulse for the zone if (!doLoadComponentPulseNow) { - QRadThermInAbs(SurfNum) = QL(radEnclosureNum) * TMULT(radEnclosureNum) * ITABSF(SurfNum); + SurfQRadThermInAbs(SurfNum) = QL(radEnclosureNum) * TMULT(radEnclosureNum) * ITABSF(SurfNum); } else { curQL = QL(radEnclosureNum); // for the loads component report during the special sizing run increase the radiant portion @@ -3693,12 +3785,12 @@ namespace HeatBalanceSurfaceManager { // ITABSF is the Inside Thermal Absorptance // TMULT is a multiplier for each zone/radiant enclosure // QRadThermInAbs is the thermal radiation absorbed on inside surfaces - QRadThermInAbs(SurfNum) = adjQL * TMULT(radEnclosureNum) * ITABSF(SurfNum); + SurfQRadThermInAbs(SurfNum) = adjQL * TMULT(radEnclosureNum) * ITABSF(SurfNum); } // Radiations absorbed by the window layers coming from zone side EQLNum = dataConstruction.Construct(ConstrNum).EQLConsPtr; for (Lay = 1; Lay <= CFS(EQLNum).NL; ++Lay) { - QRadSWwinAbs(Lay, SurfNum) += + SurfWinQRadSWwinAbs(Lay, SurfNum) += QS(solEnclosureNum) * dataConstruction.Construct(ConstrNum).AbsDiffBackEQL(Lay); } // Window frame has not been included for equivalent layer model yet @@ -3715,8 +3807,8 @@ namespace HeatBalanceSurfaceManager { if (SurfWinWindowModelType(SurfNumAdjZone) != WindowEQLModel) { for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { - QRadSWwinAbs(IGlass, SurfNumAdjZone) += QS(solEnclosureNum) * - dataConstruction.Construct( + SurfWinQRadSWwinAbs(IGlass, SurfNumAdjZone) += QS(solEnclosureNum) * + dataConstruction.Construct( Surface(SurfNumAdjZone).Construction).AbsDiff( IGlass); // Note that AbsDiff rather than AbsDiffBack is used in the above since the @@ -3727,7 +3819,7 @@ namespace HeatBalanceSurfaceManager { ConstrNum = Surface(SurfNumAdjZone).Construction; EQLNum = dataConstruction.Construct(ConstrNum).EQLConsPtr; for (Lay = 1; Lay <= CFS(EQLNum).NL; ++Lay) { - QRadSWwinAbs(Lay, SurfNumAdjZone) += QS(solEnclosureNum) * dataConstruction.Construct( + SurfWinQRadSWwinAbs(Lay, SurfNumAdjZone) += QS(solEnclosureNum) * dataConstruction.Construct( ConstrNum).AbsDiffFrontEQL(Lay); // Note that AbsDiffFrontEQL rather than AbsDiffBackEQL is used in the above // since the radiation from the current zone is incident on the outside of the @@ -3747,12 +3839,12 @@ namespace HeatBalanceSurfaceManager { ShadeFlag = SurfWinShadingFlag(SurfNum); if (ShadeFlag <= 0) { // No window shading for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { - QRadSWwinAbs(IGlass, SurfNum) += InitialDifSolwinAbs(IGlass, SurfNum); + SurfWinQRadSWwinAbs(IGlass, SurfNum) += SurfWinInitialDifSolwinAbs(IGlass, SurfNum); } } else if (ShadeFlag == IntShadeOn || ShadeFlag >= 3) { // Interior, exterior or between-glass shade, screen or blind in place for (IGlass = 1; IGlass <= dataConstruction.Construct(ConstrNumSh).TotGlassLayers; ++IGlass) { - QRadSWwinAbs(IGlass, SurfNum) += InitialDifSolwinAbs(IGlass, SurfNum); + SurfWinQRadSWwinAbs(IGlass, SurfNum) += SurfWinInitialDifSolwinAbs(IGlass, SurfNum); } if (ShadeFlag == IntShadeOn || ShadeFlag == ExtShadeOn || ShadeFlag == BGShadeOn || ShadeFlag == ExtScreenOn) @@ -3762,13 +3854,13 @@ namespace HeatBalanceSurfaceManager { } } else if (ShadeFlag == SwitchableGlazing) { // Switchable glazing for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { - QRadSWwinAbs(IGlass, SurfNum) += InitialDifSolwinAbs(IGlass, SurfNum); + SurfWinQRadSWwinAbs(IGlass, SurfNum) += SurfWinInitialDifSolwinAbs(IGlass, SurfNum); } } // End of shading flag check } else if (SurfWinWindowModelType(SurfNum) == WindowBSDFModel) { TotGlassLayers = dataConstruction.Construct(ConstrNum).TotGlassLayers; for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { - QRadSWwinAbs(IGlass, SurfNum) += InitialDifSolwinAbs(IGlass, SurfNum); + SurfWinQRadSWwinAbs(IGlass, SurfNum) += SurfWinInitialDifSolwinAbs(IGlass, SurfNum); } } else if (SurfWinWindowModelType(SurfNum) == WindowEQLModel) { @@ -3776,16 +3868,16 @@ namespace HeatBalanceSurfaceManager { EQLNum = dataConstruction.Construct(ConstrNum).EQLConsPtr; for (Lay = 1; Lay <= CFS(EQLNum).NL; ++Lay) { - QRadSWwinAbs(Lay, SurfNum) += InitialDifSolwinAbs(Lay, SurfNum); + SurfWinQRadSWwinAbs(Lay, SurfNum) += SurfWinInitialDifSolwinAbs(Lay, SurfNum); } } // report variables for surface absorbed short wave radiation - SWwinAbsTotalReport(SurfNum) = 0.0; - SWInAbsTotalReport(SurfNum) = 0.0; - InitialDifSolInAbsReport(SurfNum) = 0.0; - InitialDifSolInTransReport(SurfNum) = 0.0; - InitialDifSolInTransReport(SurfNum) += InitialDifSolInTrans(SurfNum) * Surface(SurfNum).Area; + SurfWinSWwinAbsTotalReport(SurfNum) = 0.0; + SurfSWInAbsTotalReport(SurfNum) = 0.0; + SurfInitialDifSolInAbsReport(SurfNum) = 0.0; + SurfWinInitialDifSolInTransReport(SurfNum) = 0.0; + SurfWinInitialDifSolInTransReport(SurfNum) += SurfWinInitialDifSolInTrans(SurfNum) * Surface(SurfNum).Area; if (SurfWinWindowModelType(SurfNum) != WindowEQLModel) { ConstrNumSh = Surface(SurfNum).activeShadedConstruction; if (SurfWinStormWinFlag(SurfNum) == 1) { @@ -3801,33 +3893,33 @@ namespace HeatBalanceSurfaceManager { if (ShadeFlag <= 0 || SurfWinWindowModelType(SurfNum) == WindowBSDFModel) { // No window shading for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { // Initial Transmitted Diffuse Solar Absorbed on Inside of Surface[W] - InitialDifSolInAbsReport(SurfNum) += - InitialDifSolwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfInitialDifSolInAbsReport(SurfNum) += + SurfWinInitialDifSolwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Radiation Absorbed on Inside of Surface[W] - SWInAbsTotalReport(SurfNum) += QRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfSWInAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Absorbed:All Glass Layers[W] - SWwinAbsTotalReport(SurfNum) += QRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfWinSWwinAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; } } else if (ShadeFlag == IntShadeOn || ShadeFlag >= 3) { // Interior, exterior or between-glass shade, screen or blind in place for (IGlass = 1; IGlass <= dataConstruction.Construct(ConstrNumSh).TotGlassLayers; ++IGlass) { // Initial Transmitted Diffuse Solar Absorbed on Inside of Surface[W] - InitialDifSolInAbsReport(SurfNum) += - InitialDifSolwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfInitialDifSolInAbsReport(SurfNum) += + SurfWinInitialDifSolwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Radiation Absorbed on Inside of Surface[W] - SWInAbsTotalReport(SurfNum) += QRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfSWInAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Absorbed:All Glass Layers[W] - SWwinAbsTotalReport(SurfNum) += QRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfWinSWwinAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; } } else if (ShadeFlag == SwitchableGlazing) { // Switchable glazing for (IGlass = 1; IGlass <= TotGlassLayers; ++IGlass) { // Initial Transmitted Diffuse Solar Absorbed on Inside of Surface[W] - InitialDifSolInAbsReport(SurfNum) += - InitialDifSolwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfInitialDifSolInAbsReport(SurfNum) += + SurfWinInitialDifSolwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Radiation Absorbed on Inside of Surface[W] - SWInAbsTotalReport(SurfNum) += QRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfSWInAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Absorbed:All Glass Layers[W] - SWwinAbsTotalReport(SurfNum) += QRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; + SurfWinSWwinAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(IGlass, SurfNum) * Surface(SurfNum).Area; } } // End of shading flag check } else { // IF (SurfaceWindow(SurfNum)%WindowModelType == WindowEQLModel) THEN @@ -3836,11 +3928,11 @@ namespace HeatBalanceSurfaceManager { for (Lay = 1; Lay <= CFS(EQLNum).NL; ++Lay) { // Initial Transmitted Diffuse Solar Absorbed on Inside of Surface[W] - InitialDifSolInAbsReport(SurfNum) += InitialDifSolwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfInitialDifSolInAbsReport(SurfNum) += SurfWinInitialDifSolwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Radiation Absorbed on Inside of Surface[W] - SWInAbsTotalReport(SurfNum) += QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfSWInAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; // Total Shortwave Absorbed:All solid Layers[W] - SWwinAbsTotalReport(SurfNum) += QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinSWwinAbsTotalReport(SurfNum) += SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; } } } // End of window @@ -4039,9 +4131,8 @@ namespace HeatBalanceSurfaceManager { // FLOW: - if (!allocated(VMULT)) { - VMULT.dimension(DataViewFactorInformation::NumOfSolarEnclosures, 0.0); - VCONV.dimension(DataViewFactorInformation::NumOfSolarEnclosures, 0.0); + if (!allocated(EnclSolVMULT)) { + EnclSolVMULT.dimension(DataViewFactorInformation::NumOfSolarEnclosures, 0.0); } if (ComputeIntSWAbsorpFactorsfirstTime) { FirstCalcZone.dimension(NumOfZones, true); @@ -4165,7 +4256,7 @@ namespace HeatBalanceSurfaceManager { } // End of loop over surfaces in zone if (SUM1 > SmallestAreaAbsProductAllowed) { // Everything is okay, proceed with the regular calculation - VMULT(enclosureNum) = 1.0 / SUM1; + EnclSolVMULT(enclosureNum) = 1.0 / SUM1; } else { // the sum of area*solar absorptance for all surfaces in the zone is zero--either the user screwed up // or they really want to disallow any solar from being absorbed on the inside surfaces. Fire off a @@ -4178,7 +4269,7 @@ namespace HeatBalanceSurfaceManager { DataViewFactorInformation::ZoneSolarInfo(enclosureNum).Name); FirstCalcZone(enclosureNum) = false; } - VMULT(enclosureNum) = 0.0; + EnclSolVMULT(enclosureNum) = 0.0; } } // End of zone/enclosure loop } @@ -4222,8 +4313,8 @@ namespace HeatBalanceSurfaceManager { if (!Zone(surfZoneNum).HasInterZoneWindow) continue; int NZ = Surface(SurfNum).SolarEnclIndex; int MZ = Surface(Surface(SurfNum).ExtBoundCond).SolarEnclIndex; - FractDifShortZtoZ(NZ, MZ) += dataConstruction.Construct(Surface(SurfNum).Construction).TransDiff * VMULT(NZ) * Surface(SurfNum).Area; - if (VMULT(NZ) != 0.0) RecDifShortFromZ(NZ) = true; + FractDifShortZtoZ(NZ, MZ) += dataConstruction.Construct(Surface(SurfNum).Construction).TransDiff * EnclSolVMULT(NZ) * Surface(SurfNum).Area; + if (EnclSolVMULT(NZ) != 0.0) RecDifShortFromZ(NZ) = true; } // Compute fractions for multiple passes. @@ -4776,21 +4867,21 @@ namespace HeatBalanceSurfaceManager { surface.Class == SurfaceClass_Roof || surface.Class == SurfaceClass_Door) { if (construct.SourceSinkPresent) { Real64 const QH_12s = QH[l21] = QH_12 + QsrcHist(SurfNum, 1) * construct.CTFSourceIn(0); - OpaqSurfInsFaceConduction(SurfNum) = surface.Area * QH_12s; - OpaqSurfInsFaceConductionFlux(SurfNum) = QH_12s; + SurfOpaqInsFaceConduction(SurfNum) = surface.Area * QH_12s; + SurfOpaqInsFaceConductionFlux(SurfNum) = QH_12s; } else { - OpaqSurfInsFaceConduction(SurfNum) = surface.Area * QH_12; - OpaqSurfInsFaceConductionFlux(SurfNum) = QH_12; // CR 8901 + SurfOpaqInsFaceConduction(SurfNum) = surface.Area * QH_12; + SurfOpaqInsFaceConductionFlux(SurfNum) = QH_12; // CR 8901 } // IF (Surface(SurfNum)%Class/=SurfaceClass_IntMass) & // ZoneOpaqSurfInsFaceCond(Surface(SurfNum)%Zone) = ZoneOpaqSurfInsFaceCond(Surface(SurfNum)%Zone) + & // OpaqSurfInsFaceConduction(SurfNum) - OpaqSurfInsFaceCondGainRep(SurfNum) = 0.0; - OpaqSurfInsFaceCondLossRep(SurfNum) = 0.0; - if (OpaqSurfInsFaceConduction(SurfNum) >= 0.0) { - OpaqSurfInsFaceCondGainRep(SurfNum) = OpaqSurfInsFaceConduction(SurfNum); + SurfOpaqInsFaceCondGainRep(SurfNum) = 0.0; + SurfOpaqInsFaceCondLossRep(SurfNum) = 0.0; + if (SurfOpaqInsFaceConduction(SurfNum) >= 0.0) { + SurfOpaqInsFaceCondGainRep(SurfNum) = SurfOpaqInsFaceConduction(SurfNum); } else { - OpaqSurfInsFaceCondLossRep(SurfNum) = -OpaqSurfInsFaceConduction(SurfNum); + SurfOpaqInsFaceCondLossRep(SurfNum) = - SurfOpaqInsFaceConduction(SurfNum); } } @@ -4813,8 +4904,8 @@ namespace HeatBalanceSurfaceManager { } if (surface.Class == SurfaceClass_Floor || surface.Class == SurfaceClass_Wall || surface.Class == SurfaceClass_IntMass || surface.Class == SurfaceClass_Roof || surface.Class == SurfaceClass_Door) { - OpaqSurfOutsideFaceConductionFlux(SurfNum) = -QH[l11]; // switch sign for balance at outside face - OpaqSurfOutsideFaceConduction(SurfNum) = surface.Area * OpaqSurfOutsideFaceConductionFlux(SurfNum); + SurfOpaqOutsideFaceConductionFlux(SurfNum) = -QH[l11]; // switch sign for balance at outside face + SurfOpaqOutsideFaceConduction(SurfNum) = surface.Area * SurfOpaqOutsideFaceConductionFlux(SurfNum); } } // ...end of loop over all (heat transfer) surfaces... @@ -5439,15 +5530,15 @@ namespace HeatBalanceSurfaceManager { // Tuned Replaced by one line form below for speed // QdotRadNetSurfInRep( SurfNum ) = NetLWRadToSurf( SurfNum ) * surfaceArea; // QdotRadNetSurfInRepPerArea( SurfNum ) = NetLWRadToSurf( SurfNum ); - QdotRadNetSurfInRep(SurfNum) = (QdotRadNetSurfInRepPerArea(SurfNum) = NetLWRadToSurf(SurfNum)) * surfaceArea; + QdotRadNetSurfInRep(SurfNum) = (QdotRadNetSurfInRepPerArea(SurfNum) = SurfNetLWRadToSurf(SurfNum)) * surfaceArea; QRadNetSurfInReport(SurfNum) = QdotRadNetSurfInRep(SurfNum) * TimeStepZoneSec; if (Surface(SurfNum).Class != SurfaceClass_Window) { // not a window... - QdotRadSolarInRepPerArea(SurfNum) = QRadSWInAbs(SurfNum) - QRadSWLightsInAbs(SurfNum); + QdotRadSolarInRepPerArea(SurfNum) = SurfOpaqQRadSWInAbs(SurfNum) - SurfOpaqQRadSWLightsInAbs(SurfNum); QdotRadSolarInRep(SurfNum) = QdotRadSolarInRepPerArea(SurfNum) * surfaceArea; QRadSolarInReport(SurfNum) = QdotRadSolarInRep(SurfNum) * TimeStepZoneSec; - QdotRadLightsInRepPerArea(SurfNum) = QRadSWLightsInAbs(SurfNum); + QdotRadLightsInRepPerArea(SurfNum) = SurfOpaqQRadSWLightsInAbs(SurfNum); QdotRadLightsInRep(SurfNum) = QdotRadLightsInRepPerArea(SurfNum) * surfaceArea; QRadLightsInReport(SurfNum) = QdotRadLightsInRep(SurfNum) * TimeStepZoneSec; @@ -5462,7 +5553,7 @@ namespace HeatBalanceSurfaceManager { // Tuned Replaced by one line form below for speed // QdotRadIntGainsInRepPerArea( SurfNum ) = QRadThermInAbs( SurfNum ); // QdotRadIntGainsInRep( SurfNum ) = QdotRadIntGainsInRepPerArea( SurfNum ) * surfaceArea; - QdotRadIntGainsInRep(SurfNum) = (QdotRadIntGainsInRepPerArea(SurfNum) = QRadThermInAbs(SurfNum)) * surfaceArea; + QdotRadIntGainsInRep(SurfNum) = (QdotRadIntGainsInRepPerArea(SurfNum) = SurfQRadThermInAbs(SurfNum)) * surfaceArea; QRadIntGainsInReport(SurfNum) = QdotRadIntGainsInRep(SurfNum) * TimeStepZoneSec; QdotRadHVACInRepPerArea(SurfNum) = QHTRadSysSurf(SurfNum) + QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) + @@ -5485,50 +5576,50 @@ namespace HeatBalanceSurfaceManager { Surface(SurfNum).Class == SurfaceClass_Door) { // inside face conduction updates - OpaqSurfInsFaceConductionEnergy(SurfNum) = OpaqSurfInsFaceConduction(SurfNum) * TimeStepZoneSec; - ZoneOpaqSurfInsFaceCond(Surface(SurfNum).Zone) += OpaqSurfInsFaceConduction(SurfNum); - OpaqSurfInsFaceCondGainRep(SurfNum) = 0.0; - OpaqSurfInsFaceCondLossRep(SurfNum) = 0.0; - if (OpaqSurfInsFaceConduction(SurfNum) >= 0.0) { - OpaqSurfInsFaceCondGainRep(SurfNum) = OpaqSurfInsFaceConduction(SurfNum); + SurfOpaqInsFaceConductionEnergy(SurfNum) = SurfOpaqInsFaceConduction(SurfNum) * TimeStepZoneSec; + ZoneOpaqSurfInsFaceCond(Surface(SurfNum).Zone) += SurfOpaqInsFaceConduction(SurfNum); + SurfOpaqInsFaceCondGainRep(SurfNum) = 0.0; + SurfOpaqInsFaceCondLossRep(SurfNum) = 0.0; + if (SurfOpaqInsFaceConduction(SurfNum) >= 0.0) { + SurfOpaqInsFaceCondGainRep(SurfNum) = SurfOpaqInsFaceConduction(SurfNum); } else { - OpaqSurfInsFaceCondLossRep(SurfNum) = -OpaqSurfInsFaceConduction(SurfNum); + SurfOpaqInsFaceCondLossRep(SurfNum) = - SurfOpaqInsFaceConduction(SurfNum); } // outside face conduction updates - OpaqSurfOutsideFaceConductionEnergy(SurfNum) = OpaqSurfOutsideFaceConduction(SurfNum) * TimeStepZoneSec; - ZoneOpaqSurfExtFaceCond(Surface(SurfNum).Zone) += OpaqSurfOutsideFaceConduction(SurfNum); - OpaqSurfExtFaceCondGainRep(SurfNum) = 0.0; - OpaqSurfExtFaceCondLossRep(SurfNum) = 0.0; - if (OpaqSurfOutsideFaceConduction(SurfNum) >= 0.0) { - OpaqSurfExtFaceCondGainRep(SurfNum) = OpaqSurfOutsideFaceConduction(SurfNum); + SurfOpaqOutsideFaceConductionEnergy(SurfNum) = SurfOpaqOutsideFaceConduction(SurfNum) * TimeStepZoneSec; + ZoneOpaqSurfExtFaceCond(Surface(SurfNum).Zone) += SurfOpaqOutsideFaceConduction(SurfNum); + SurfOpaqExtFaceCondGainRep(SurfNum) = 0.0; + SurfOpaqExtFaceCondLossRep(SurfNum) = 0.0; + if (SurfOpaqOutsideFaceConduction(SurfNum) >= 0.0) { + SurfOpaqExtFaceCondGainRep(SurfNum) = SurfOpaqOutsideFaceConduction(SurfNum); } else { - OpaqSurfExtFaceCondLossRep(SurfNum) = -OpaqSurfOutsideFaceConduction(SurfNum); + SurfOpaqExtFaceCondLossRep(SurfNum) = -SurfOpaqOutsideFaceConduction(SurfNum); } // do average surface conduction updates - OpaqSurfAvgFaceConduction(SurfNum) = (OpaqSurfInsFaceConduction(SurfNum) - OpaqSurfOutsideFaceConduction(SurfNum)) / 2.0; - OpaqSurfAvgFaceConductionFlux(SurfNum) = (OpaqSurfInsFaceConductionFlux(SurfNum) - OpaqSurfOutsideFaceConductionFlux(SurfNum)) / 2.0; - OpaqSurfAvgFaceConductionEnergy(SurfNum) = OpaqSurfAvgFaceConduction(SurfNum) * TimeStepZoneSec; - OpaqSurfAvgFaceCondGainRep(SurfNum) = 0.0; - OpaqSurfAvgFaceCondLossRep(SurfNum) = 0.0; - if (OpaqSurfAvgFaceConduction(SurfNum) >= 0.0) { - OpaqSurfAvgFaceCondGainRep(SurfNum) = OpaqSurfAvgFaceConduction(SurfNum); + SurfOpaqAvgFaceConduction(SurfNum) = (SurfOpaqInsFaceConduction(SurfNum) - SurfOpaqOutsideFaceConduction(SurfNum)) / 2.0; + SurfOpaqAvgFaceConductionFlux(SurfNum) = (SurfOpaqInsFaceConductionFlux(SurfNum) - SurfOpaqOutsideFaceConductionFlux(SurfNum)) / 2.0; + SurfOpaqAvgFaceConductionEnergy(SurfNum) = SurfOpaqAvgFaceConduction(SurfNum) * TimeStepZoneSec; + SurfOpaqAvgFaceCondGainRep(SurfNum) = 0.0; + SurfOpaqAvgFaceCondLossRep(SurfNum) = 0.0; + if (SurfOpaqAvgFaceConduction(SurfNum) >= 0.0) { + SurfOpaqAvgFaceCondGainRep(SurfNum) = SurfOpaqAvgFaceConduction(SurfNum); } else { - OpaqSurfAvgFaceCondLossRep(SurfNum) = -OpaqSurfAvgFaceConduction(SurfNum); + SurfOpaqAvgFaceCondLossRep(SurfNum) = - SurfOpaqAvgFaceConduction(SurfNum); } // do surface storage rate updates - OpaqSurfStorageConductionFlux(SurfNum) = -(OpaqSurfInsFaceConductionFlux(SurfNum) + OpaqSurfOutsideFaceConductionFlux(SurfNum)); - OpaqSurfStorageConduction(SurfNum) = -(OpaqSurfInsFaceConduction(SurfNum) + OpaqSurfOutsideFaceConduction(SurfNum)); - OpaqSurfStorageConductionEnergy(SurfNum) = OpaqSurfStorageConduction(SurfNum) * TimeStepZoneSec; - OpaqSurfStorageGainRep(SurfNum) = 0.0; - OpaqSurfStorageCondLossRep(SurfNum) = 0.0; - if (OpaqSurfStorageConduction(SurfNum) >= 0.0) { - OpaqSurfStorageGainRep(SurfNum) = OpaqSurfStorageConduction(SurfNum); + SurfOpaqStorageConductionFlux(SurfNum) = - (SurfOpaqInsFaceConductionFlux(SurfNum) + SurfOpaqOutsideFaceConductionFlux(SurfNum)); + SurfOpaqStorageConduction(SurfNum) = - (SurfOpaqInsFaceConduction(SurfNum) + SurfOpaqOutsideFaceConduction(SurfNum)); + SurfOpaqStorageConductionEnergy(SurfNum) = SurfOpaqStorageConduction(SurfNum) * TimeStepZoneSec; + SurfOpaqStorageGainRep(SurfNum) = 0.0; + SurfOpaqStorageCondLossRep(SurfNum) = 0.0; + if (SurfOpaqStorageConduction(SurfNum) >= 0.0) { + SurfOpaqStorageGainRep(SurfNum) = SurfOpaqStorageConduction(SurfNum); } else { - OpaqSurfStorageCondLossRep(SurfNum) = -OpaqSurfStorageConduction(SurfNum); + SurfOpaqStorageCondLossRep(SurfNum) = - SurfOpaqStorageConduction(SurfNum); } } // opaque heat transfer surfaces. @@ -5675,9 +5766,9 @@ namespace HeatBalanceSurfaceManager { } if (present(ZoneToResimulate)) { - CalcInteriorRadExchange(TH(2, 1, _), 0, NetLWRadToSurf, ZoneToResimulate, Outside); + CalcInteriorRadExchange(TH(2, 1, _), 0, SurfNetLWRadToSurf, ZoneToResimulate, Outside); } else { - CalcInteriorRadExchange(TH(2, 1, _), 0, NetLWRadToSurf, _, Outside); + CalcInteriorRadExchange(TH(2, 1, _), 0, SurfNetLWRadToSurf, _, Outside); } for (int zoneNum = 1; zoneNum <= NumOfZones; ++zoneNum) {// Loop through all surfaces... @@ -5705,12 +5796,12 @@ namespace HeatBalanceSurfaceManager { HAirExtSurf(SurfNum) = 0.0; HSkyExtSurf(SurfNum) = 0.0; HGrdExtSurf(SurfNum) = 0.0; - QRadLWOutSrdSurfs(SurfNum) = 0.0; + SurfQRadLWOutSrdSurfs(SurfNum) = 0.0; // Calculate heat extract due to additional heat flux source term as the surface boundary condition if (Surface(SurfNum).OutsideHeatSourceTermSchedule) { - QAdditionalHeatSourceOutside(SurfNum) = EnergyPlus::ScheduleManager::GetCurrentScheduleValue( + SurfQAdditionalHeatSourceOutside(SurfNum) = EnergyPlus::ScheduleManager::GetCurrentScheduleValue( Surface(SurfNum).OutsideHeatSourceTermSchedule); } @@ -6128,7 +6219,7 @@ namespace HeatBalanceSurfaceManager { } } // Calculate LWR from surrounding surfaces if defined for an exterior surface - QRadLWOutSrdSurfs(SurfNum) = 0; + SurfQRadLWOutSrdSurfs(SurfNum) = 0; if (Surface(SurfNum).HasSurroundingSurfProperties) { int SrdSurfsNum = Surface(SurfNum).SurroundingSurfacesNum; // Absolute temperature of the outside surface of an exterior surface @@ -6138,7 +6229,7 @@ namespace HeatBalanceSurfaceManager { Real64 SrdSurfViewFac = SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).ViewFactor; // Absolute temperature of a surrounding surface Real64 SrdSurfTempAbs = GetCurrentScheduleValue(SurroundingSurfsProperty(SrdSurfsNum).SurroundingSurfs(SrdSurfNum).TempSchNum) + KelvinConv; - QRadLWOutSrdSurfs(SurfNum) += StefanBoltzmann * AbsThermSurf * SrdSurfViewFac * (pow_4(SrdSurfTempAbs) - pow_4(TSurf)); + SurfQRadLWOutSrdSurfs(SurfNum) += StefanBoltzmann * AbsThermSurf * SrdSurfViewFac * (pow_4(SrdSurfTempAbs) - pow_4(TSurf)); } } @@ -6470,7 +6561,7 @@ namespace HeatBalanceSurfaceManager { if (DataSurfaces::AnyHeatBalanceInsideSourceTerm) { for (int SurfNum : HTSurfs) { if (Surface(SurfNum).InsideHeatSourceTermSchedule) { - QAdditionalHeatSourceInside(SurfNum) = + SurfQAdditionalHeatSourceInside(SurfNum) = EnergyPlus::ScheduleManager::GetCurrentScheduleValue(Surface(SurfNum).InsideHeatSourceTermSchedule); } } @@ -6497,7 +6588,7 @@ namespace HeatBalanceSurfaceManager { } HeatBalanceIntRadExchange::CalcInteriorRadExchange( - TempSurfIn, InsideSurfIterations, NetLWRadToSurf, ZoneToResimulate, Inside); // Update the radiation balance + TempSurfIn, InsideSurfIterations, SurfNetLWRadToSurf, ZoneToResimulate, Inside); // Update the radiation balance if (DataHeatBalance::AnyKiva) { for (auto &kivaSurf : SurfaceGeometry::kivaManager.surfaceMap) { @@ -6571,10 +6662,10 @@ namespace HeatBalanceSurfaceManager { } // Pre-calculate a few terms // - Real64 const TempTerm(CTFConstInPart(SurfNum) + QRadThermInAbs(SurfNum) + QRadSWInAbs(SurfNum) + - QAdditionalHeatSourceInside(SurfNum) + HConvIn_surf * RefAirTemp(SurfNum) + QHTRadSysSurf(SurfNum) + + Real64 const TempTerm(CTFConstInPart(SurfNum) + SurfQRadThermInAbs(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + + SurfQAdditionalHeatSourceInside(SurfNum) + HConvIn_surf * RefAirTemp(SurfNum) + QHTRadSysSurf(SurfNum) + QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) + QSteamBaseboardSurf(SurfNum) + - QElecBaseboardSurf(SurfNum) + NetLWRadToSurf(SurfNum) + (QRadSurfAFNDuct(SurfNum) / TimeStepZoneSec)); + QElecBaseboardSurf(SurfNum) + SurfNetLWRadToSurf(SurfNum) + (QRadSurfAFNDuct(SurfNum) / TimeStepZoneSec)); Real64 const TempDiv(1.0 / (construct.CTFInside(0) - construct.CTFCross(0) + HConvIn_surf + IterDampConst)); // Calculate the current inside surface temperature if ((!surface.IsPool) || ((surface.IsPool) && (std::abs(QPoolSurfNumerator(SurfNum)) < PoolIsOperatingLimit) && @@ -6671,10 +6762,10 @@ namespace HeatBalanceSurfaceManager { MoistureBalanceEMPDManager::CalcMoistureBalanceEMPD(state, SurfNum, TempSurfInTmp(SurfNum), MAT_zone, TempSurfInSat); } // Pre-calculate a few terms - Real64 const TempTerm(CTFConstInPart(SurfNum) + QRadThermInAbs(SurfNum) + QRadSWInAbs(SurfNum) + - QAdditionalHeatSourceInside(SurfNum) + HConvIn_surf * RefAirTemp(SurfNum) + QHTRadSysSurf(SurfNum) + + Real64 const TempTerm(CTFConstInPart(SurfNum) + SurfQRadThermInAbs(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + + SurfQAdditionalHeatSourceInside(SurfNum) + HConvIn_surf * RefAirTemp(SurfNum) + QHTRadSysSurf(SurfNum) + QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) + QSteamBaseboardSurf(SurfNum) + - QElecBaseboardSurf(SurfNum) + NetLWRadToSurf(SurfNum) + + QElecBaseboardSurf(SurfNum) + SurfNetLWRadToSurf(SurfNum) + (QRadSurfAFNDuct(SurfNum) / TimeStepZoneSec)); Real64 const TempDiv(1.0 / (construct.CTFInside(0) + HConvIn_surf + IterDampConst)); // Calculate the current inside surface temperature @@ -6784,8 +6875,8 @@ namespace HeatBalanceSurfaceManager { } else if (surface.HeatTransferAlgorithm == HeatTransferModel_Kiva) { // Read Kiva results for each surface TempSurfInTmp(SurfNum) = SurfaceGeometry::kivaManager.surfaceMap[SurfNum].results.Tconv - DataGlobals::KelvinConv; - OpaqSurfInsFaceConductionFlux(SurfNum) = SurfaceGeometry::kivaManager.surfaceMap[SurfNum].results.qtot; - OpaqSurfInsFaceConduction(SurfNum) = OpaqSurfInsFaceConductionFlux(SurfNum) * DataSurfaces::Surface(SurfNum).Area; + SurfOpaqInsFaceConductionFlux(SurfNum) = SurfaceGeometry::kivaManager.surfaceMap[SurfNum].results.qtot; + SurfOpaqInsFaceConduction(SurfNum) = SurfOpaqInsFaceConductionFlux(SurfNum) * DataSurfaces::Surface(SurfNum).Area; TH11 = 0.0; } @@ -6808,15 +6899,15 @@ namespace HeatBalanceSurfaceManager { Real64 F1 = HMovInsul / (HMovInsul + HConvIn_surf + IterDampConst); TempSurfIn(SurfNum) = - (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + construct.CTFCross(0) * TH11 + - F1 * (QRadThermInAbs(SurfNum) + HConvIn_surf * RefAirTemp(SurfNum) + NetLWRadToSurf(SurfNum) + QHTRadSysSurf(SurfNum) + + (CTFConstInPart(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + construct.CTFCross(0) * TH11 + + F1 * (SurfQRadThermInAbs(SurfNum) + HConvIn_surf * RefAirTemp(SurfNum) + SurfNetLWRadToSurf(SurfNum) + QHTRadSysSurf(SurfNum) + QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) + QSteamBaseboardSurf(SurfNum) + - QElecBaseboardSurf(SurfNum) + QAdditionalHeatSourceInside(SurfNum) + IterDampConst * TempInsOld(SurfNum))) / + QElecBaseboardSurf(SurfNum) + SurfQAdditionalHeatSourceInside(SurfNum) + IterDampConst * TempInsOld(SurfNum))) / (construct.CTFInside(0) + HMovInsul - F1 * HMovInsul); // Convection from surface to zone air TempSurfInTmp(SurfNum) = (construct.CTFInside(0) * TempSurfIn(SurfNum) + HMovInsul * TempSurfIn(SurfNum) - - QRadSWInAbs(SurfNum) - CTFConstInPart(SurfNum) - construct.CTFCross(0) * TH11) / - (HMovInsul); + SurfOpaqQRadSWInAbs(SurfNum) - CTFConstInPart(SurfNum) - construct.CTFCross(0) * TH11) / + (HMovInsul); // if any mixed heat transfer models in zone, apply limits to CTF result if (DataHeatBalSurface::Zone_has_mixed_HT_models[ZoneNum]) TempSurfInTmp(SurfNum) = @@ -6842,8 +6933,8 @@ namespace HeatBalanceSurfaceManager { // = QRadSWwinAbs(SurfNum,1)/2.0 Real64 const HConvIn_surf(HConvInFD(SurfNum) = HConvIn(SurfNum)); TempSurfIn(SurfNum) = TempSurfInTmp(SurfNum) = - (QRadThermInAbs(SurfNum) + QRadSWwinAbs(1, SurfNum) / 2.0 + QAdditionalHeatSourceInside(SurfNum) + - HConvIn_surf * RefAirTemp(SurfNum) + NetLWRadToSurf(SurfNum) + IterDampConst * TempInsOld(SurfNum) + + (SurfQRadThermInAbs(SurfNum) + SurfWinQRadSWwinAbs(1, SurfNum) / 2.0 + SurfQAdditionalHeatSourceInside(SurfNum) + + HConvIn_surf * RefAirTemp(SurfNum) + SurfNetLWRadToSurf(SurfNum) + IterDampConst * TempInsOld(SurfNum) + Ueff * TH(1, 1, domeNum)) / (Ueff + HConvIn_surf + IterDampConst); // LW radiation from internal sources | SW radiation from internal sources and // solar | Convection from surface to zone air | Net radiant exchange with @@ -6965,7 +7056,7 @@ namespace HeatBalanceSurfaceManager { Real64 &TH11(TH(1, 1, SurfNum)); Real64 &TH12(TH(2, 1, SurfNum)); TH12 = TempSurfInRep(SurfNum) = TempSurfIn(SurfNum); - TempSurfOut(SurfNum) = TH11; // For reporting + SurfTempOut(SurfNum) = TH11; // For reporting if (SurfWinOriginalClass(SurfNum) == SurfaceClass_TDD_Diffuser) { // Tubular daylighting device // Tubular daylighting devices are treated as one big object with an effective R value. @@ -6980,7 +7071,7 @@ namespace HeatBalanceSurfaceManager { // Set outside temp reporting variable of TDD:DOME (since it gets skipped otherwise) // Reset outside temp variables of TDD:DIFFUSER equal to outside temp of TDD:DOME - TH11 = TempSurfOut(SurfNum) = TempSurfOut(domeNum) = TH(1, 1, domeNum); + TH11 = SurfTempOut(SurfNum) = SurfTempOut(domeNum) = TH(1, 1, domeNum); } if ((TH12 > MaxSurfaceTempLimit) || (TH12 < MinSurfaceTempLimit)) { @@ -7002,7 +7093,7 @@ namespace HeatBalanceSurfaceManager { // By going through all of the surfaces, this should pick up the other side as well as affect the next iteration. // [ SurfNum - 1 ] == ( 1, 1, SurfNum ) // [ l211 + surfExtBoundCond ] == ( 2, 1, surfExtBoundCond ) - TempSurfOut(SurfNum) = TH[SurfNum - 1] = TH[l211 + surfExtBoundCond]; + SurfTempOut(SurfNum) = TH[SurfNum - 1] = TH[l211 + surfExtBoundCond]; } ++InsideSurfIterations; @@ -7089,7 +7180,7 @@ namespace HeatBalanceSurfaceManager { } else { OutputReportTabular::loadConvectedNormal(DataSizing::CurOverallSimDay, TimeStepInDay, surfNum) = QdotConvInRep(surfNum); OutputReportTabular::netSurfRadSeq(DataSizing::CurOverallSimDay, TimeStepInDay, surfNum) = - NetLWRadToSurf(surfNum) * Surface(surfNum).Area; + SurfNetLWRadToSurf(surfNum) * Surface(surfNum).Area; } } } @@ -7330,7 +7421,7 @@ namespace HeatBalanceSurfaceManager { if (DataSurfaces::AnyHeatBalanceInsideSourceTerm) { for (int surfNum = firstSurf; surfNum <= lastSurf; ++surfNum) { if (Surface(surfNum).InsideHeatSourceTermSchedule) { - QAdditionalHeatSourceInside(surfNum) = + SurfQAdditionalHeatSourceInside(surfNum) = EnergyPlus::ScheduleManager::GetCurrentScheduleValue(Surface(surfNum).InsideHeatSourceTermSchedule); } } @@ -7345,10 +7436,10 @@ namespace HeatBalanceSurfaceManager { for (int surfNum = firstNonWinSurf; surfNum <= lastNonWinSurf; ++surfNum) { // Pre-calculate a few terms before the iteration loop - TempTermSurf(surfNum) = CTFConstInPart(surfNum) + QRadThermInAbs(surfNum) + QRadSWInAbs(surfNum) + - QAdditionalHeatSourceInside(surfNum) + HConvIn(surfNum) * RefAirTemp(surfNum) + QHTRadSysSurf(surfNum) + - QCoolingPanelSurf(surfNum) + QHWBaseboardSurf(surfNum) + QSteamBaseboardSurf(surfNum) + - QElecBaseboardSurf(surfNum) + (QRadSurfAFNDuct(surfNum) / timeStepZoneSeconds); + TempTermSurf(surfNum) = CTFConstInPart(surfNum) + SurfQRadThermInAbs(surfNum) + SurfOpaqQRadSWInAbs(surfNum) + + SurfQAdditionalHeatSourceInside(surfNum) + HConvIn(surfNum) * RefAirTemp(surfNum) + QHTRadSysSurf(surfNum) + + QCoolingPanelSurf(surfNum) + QHWBaseboardSurf(surfNum) + QSteamBaseboardSurf(surfNum) + + QElecBaseboardSurf(surfNum) + (QRadSurfAFNDuct(surfNum) / timeStepZoneSeconds); TempDivSurf(surfNum) = 1.0 / (CTFInside0(surfNum) - IsAdiabatic(surfNum) * CTFCross0(surfNum) + IsPoolSurf(surfNum) * PoolHeatTransCoefs(surfNum) + IsNotPoolSurf(surfNum) * HConvIn(surfNum) + iterDampConstant); @@ -7362,7 +7453,7 @@ namespace HeatBalanceSurfaceManager { TempInsOld = TempSurfIn; // Keep track of last iteration's temperature values HeatBalanceIntRadExchange::CalcInteriorRadExchange( - TempSurfIn, InsideSurfIterations, NetLWRadToSurf, ZoneToResimulate, Inside); // Update the radiation balance + TempSurfIn, InsideSurfIterations, SurfNetLWRadToSurf, ZoneToResimulate, Inside); // Update the radiation balance // Every 30 iterations, recalculate the inside convection coefficients in case // there has been a significant drift in the surface temperatures predicted. @@ -7381,7 +7472,7 @@ namespace HeatBalanceSurfaceManager { // this loop auto-vectorizes for (int surfNum = firstSurf; surfNum <= lastSurf; ++surfNum) { TempTermSurf(surfNum) = - CTFConstInPart(surfNum) + QRadThermInAbs(surfNum) + QRadSWInAbs(surfNum) + QAdditionalHeatSourceInside(surfNum) + + CTFConstInPart(surfNum) + SurfQRadThermInAbs(surfNum) + SurfOpaqQRadSWInAbs(surfNum) + SurfQAdditionalHeatSourceInside(surfNum) + HConvIn(surfNum) * RefAirTemp(surfNum) + QHTRadSysSurf(surfNum) + QCoolingPanelSurf(surfNum) + QHWBaseboardSurf(surfNum) + QSteamBaseboardSurf(surfNum) + QElecBaseboardSurf(surfNum) + (QRadSurfAFNDuct(surfNum) / timeStepZoneSeconds); TempDivSurf(surfNum) = @@ -7438,7 +7529,7 @@ namespace HeatBalanceSurfaceManager { // Calculate the current inside surface temperature TempSurfInTmp(surfNum) = - (IsNotPoolSurf(surfNum) * (TempTermSurf(surfNum) + NetLWRadToSurf(surfNum)) + + (IsNotPoolSurf(surfNum) * (TempTermSurf(surfNum) + SurfNetLWRadToSurf(surfNum)) + IsSource(surfNum) * CTFSourceIn0(surfNum) * QsrcHistSurf1(surfNum) + IsPoolSurf(surfNum) * CTFConstInPart(surfNum) + IsPoolSurf(surfNum) * QPoolSurfNumerator(surfNum) + iterDampConstant * TempInsOld(surfNum) + IsNotAdiabatic(surfNum) * CTFCross0(surfNum) * TH11Surf(surfNum)) * @@ -7474,13 +7565,13 @@ namespace HeatBalanceSurfaceManager { Real64 F1 = HMovInsul / (HMovInsul + HConvIn(surfNum) + IterDampConst); TempSurfIn(surfNum) = - (CTFConstInPart(surfNum) + QRadSWInAbs(surfNum) + CTFCross0(surfNum) * TH11Surf(surfNum) + - F1 * (QRadThermInAbs(surfNum) + HConvIn(surfNum) * RefAirTemp(surfNum) + NetLWRadToSurf(surfNum) + + (CTFConstInPart(surfNum) + SurfOpaqQRadSWInAbs(surfNum) + CTFCross0(surfNum) * TH11Surf(surfNum) + + F1 * (SurfQRadThermInAbs(surfNum) + HConvIn(surfNum) * RefAirTemp(surfNum) + SurfNetLWRadToSurf(surfNum) + QHTRadSysSurf(surfNum) + QCoolingPanelSurf(surfNum) + QHWBaseboardSurf(surfNum) + QSteamBaseboardSurf(surfNum) + - QElecBaseboardSurf(surfNum) + QAdditionalHeatSourceInside(surfNum) + IterDampConst * TempInsOld(surfNum))) / + QElecBaseboardSurf(surfNum) + SurfQAdditionalHeatSourceInside(surfNum) + IterDampConst * TempInsOld(surfNum))) / (CTFInside0(surfNum) + HMovInsul - F1 * HMovInsul); // Convection from surface to zone air - TempSurfInTmp(surfNum) = (CTFInside0(surfNum) * TempSurfIn(surfNum) + HMovInsul * TempSurfIn(surfNum) - QRadSWInAbs(surfNum) - + TempSurfInTmp(surfNum) = (CTFInside0(surfNum) * TempSurfIn(surfNum) + HMovInsul * TempSurfIn(surfNum) - SurfOpaqQRadSWInAbs(surfNum) - CTFConstInPart(surfNum) - CTFCross0(surfNum) * TH11Surf(surfNum)) / (HMovInsul); } @@ -7490,10 +7581,10 @@ namespace HeatBalanceSurfaceManager { // Set the appropriate parameters for the radiant system // Radiant system does not need the damping coefficient terms (hopefully) Real64 const RadSysDiv(1.0 / (CTFInside0(surfNum) + HConvIn(surfNum))); - Real64 const TempTerm(CTFConstInPart(surfNum) + QRadThermInAbs(surfNum) + QRadSWInAbs(surfNum) + - QAdditionalHeatSourceInside(surfNum) + HConvIn(surfNum) * RefAirTemp(surfNum) + + Real64 const TempTerm(CTFConstInPart(surfNum) + SurfQRadThermInAbs(surfNum) + SurfOpaqQRadSWInAbs(surfNum) + + SurfQAdditionalHeatSourceInside(surfNum) + HConvIn(surfNum) * RefAirTemp(surfNum) + QHTRadSysSurf(surfNum) + QCoolingPanelSurf(surfNum) + QHWBaseboardSurf(surfNum) + - QSteamBaseboardSurf(surfNum) + QElecBaseboardSurf(surfNum) + NetLWRadToSurf(surfNum) + + QSteamBaseboardSurf(surfNum) + QElecBaseboardSurf(surfNum) + SurfNetLWRadToSurf(surfNum) + (QRadSurfAFNDuct(surfNum) / TimeStepZoneSec)); RadSysTiHBConstCoef(surfNum) = TempTerm * RadSysDiv; // Constant portion of cond eq (history terms) | LW radiation from internal sources | SW @@ -7548,8 +7639,8 @@ namespace HeatBalanceSurfaceManager { // = QRadSWwinAbs(surfNum,1)/2.0 Real64 const HConvIn_surf(HConvInFD(surfNum) = HConvIn(surfNum)); TempSurfIn(surfNum) = TempSurfInTmp(surfNum) = - (QRadThermInAbs(surfNum) + QRadSWwinAbs(1, surfNum) / 2.0 + QAdditionalHeatSourceInside(surfNum) + - HConvIn_surf * RefAirTemp(surfNum) + NetLWRadToSurf(surfNum) + IterDampConst * TempInsOld(surfNum) + + (SurfQRadThermInAbs(surfNum) + SurfWinQRadSWwinAbs(1, surfNum) / 2.0 + SurfQAdditionalHeatSourceInside(surfNum) + + HConvIn_surf * RefAirTemp(surfNum) + SurfNetLWRadToSurf(surfNum) + IterDampConst * TempInsOld(surfNum) + Ueff * TH(1, 1, domeNum)) / (Ueff + HConvIn_surf + IterDampConst); // LW radiation from internal sources | SW radiation from internal sources and // solar | Convection from surface to zone air | Net radiant exchange with @@ -7674,7 +7765,7 @@ namespace HeatBalanceSurfaceManager { Real64 &TH11(TH(1, 1, surfNum)); Real64 &TH12(TH(2, 1, surfNum)); TH12 = TempSurfInRep(surfNum) = TempSurfIn(surfNum); - TempSurfOut(surfNum) = TH11; // For reporting + SurfTempOut(surfNum) = TH11; // For reporting if (SurfWinOriginalClass(surfNum) == SurfaceClass_TDD_Diffuser) { // Tubular daylighting device // Tubular daylighting devices are treated as one big object with an effective R value. @@ -7689,7 +7780,7 @@ namespace HeatBalanceSurfaceManager { // Set outside temp reporting variable of TDD:DOME (since it gets skipped otherwise) // Reset outside temp variables of TDD:DIFFUSER equal to outside temp of TDD:DOME - TH11 = TempSurfOut(surfNum) = TempSurfOut(domeNum) = TH(1, 1, domeNum); + TH11 = SurfTempOut(surfNum) = SurfTempOut(domeNum) = TH(1, 1, domeNum); } if ((TH12 > MaxSurfaceTempLimit) || (TH12 < MinSurfaceTempLimit)) { @@ -7711,8 +7802,8 @@ namespace HeatBalanceSurfaceManager { // By going through all of the surfaces, this should pick up the other side as well as affect the next iteration. // [ SurfNum - 1 ] == ( 1, 1, SurfNum ) // [ l211 + surfExtBoundCond ] == ( 2, 1, surfExtBoundCond ) - TempSurfOut(SurfNum) = TH[SurfNum - 1] = TH[l211 + surfExtBoundCond]; - TH11Surf(SurfNum) = TempSurfOut(SurfNum); + SurfTempOut(SurfNum) = TH[SurfNum - 1] = TH[l211 + surfExtBoundCond]; + TH11Surf(SurfNum) = SurfTempOut(SurfNum); } ++InsideSurfIterations; @@ -7784,7 +7875,7 @@ namespace HeatBalanceSurfaceManager { } else { OutputReportTabular::loadConvectedNormal(DataSizing::CurOverallSimDay, TimeStepInDay, surfNum) = QdotConvInRep(surfNum); OutputReportTabular::netSurfRadSeq(DataSizing::CurOverallSimDay, TimeStepInDay, surfNum) = - NetLWRadToSurf(surfNum) * Surface(surfNum).Area; + SurfNetLWRadToSurf(surfNum) * Surface(surfNum).Area; } } } @@ -8129,9 +8220,9 @@ namespace HeatBalanceSurfaceManager { //+Construct(ConstrNum)%CTFSourceIn(0) & TDDs cannot be radiant systems // *QsrcHist(1,SurfNum) & TH11 = - (QRadSWwinAbs(1, SurfNum) / 2.0 + QRadLWOutSrdSurfs(SurfNum) + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + - QAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround + - F1 * (QRadSWwinAbs(1, SurfNum2) / 2.0 + QRadThermInAbs(SurfNum2) + HConvIn(SurfNum2) * MAT(ZoneNum2) + NetLWRadToSurf(SurfNum2))) / + (SurfWinQRadSWwinAbs(1, SurfNum) / 2.0 + SurfQRadLWOutSrdSurfs(SurfNum) + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + + SurfQAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround + + F1 * (SurfWinQRadSWwinAbs(1, SurfNum2) / 2.0 + SurfQRadThermInAbs(SurfNum2) + HConvIn(SurfNum2) * MAT(ZoneNum2) + SurfNetLWRadToSurf(SurfNum2))) / (Ueff + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum) - F1 * Ueff); // Instead of QRadSWOutAbs(SurfNum) | ODB used to approx ground surface temp | Use TDD:DIFFUSER surface | Use // TDD:DIFFUSER surface | Use TDD:DIFFUSER surface and zone | Use TDD:DIFFUSER surface @@ -8141,15 +8232,15 @@ namespace HeatBalanceSurfaceManager { // Add LWR from surrounding surfaces if (Surface(SurfNum).OSCMPtr == 0) { if (construct.SourceSinkPresent) { - TH11 = (-CTFConstOutPart(SurfNum) + QRadSWOutAbs(SurfNum) + QRadLWOutSrdSurfs(SurfNum) + - (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + + TH11 = (-CTFConstOutPart(SurfNum) + SurfOpaqQRadSWOutAbs(SurfNum) + SurfQRadLWOutSrdSurfs(SurfNum) + + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround + construct.CTFCross(0) * TempSurfIn(SurfNum) + construct.CTFSourceOut(0) * QsrcHist(SurfNum, 1)) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum)); // ODB used to approx ground surface temp } else { - TH11 = (-CTFConstOutPart(SurfNum) + QRadSWOutAbs(SurfNum) + QRadLWOutSrdSurfs(SurfNum) + - (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + + TH11 = (-CTFConstOutPart(SurfNum) + SurfOpaqQRadSWOutAbs(SurfNum) + SurfQRadLWOutSrdSurfs(SurfNum) + + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround + construct.CTFCross(0) * TempSurfIn(SurfNum)) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum)); // ODB used to approx ground surface temp @@ -8163,11 +8254,11 @@ namespace HeatBalanceSurfaceManager { // patterned after "No movable insulation, slow conduction," but with new radiation terms and no sun, if (construct.SourceSinkPresent) { - TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + + TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + construct.CTFCross(0) * TempSurfIn(SurfNum) + construct.CTFSourceOut(0) * QsrcHist(SurfNum, 1)) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HRad); } else { - TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + + TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + construct.CTFCross(0) * TempSurfIn(SurfNum)) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HRad); } @@ -8176,19 +8267,19 @@ namespace HeatBalanceSurfaceManager { } else if ((!MovInsulPresent) && (QuickConductionSurf)) { if (Surface(SurfNum).OSCMPtr == 0) { if (construct.SourceSinkPresent) { - TH11 = (-CTFConstOutPart(SurfNum) + QRadSWOutAbs(SurfNum) + QRadLWOutSrdSurfs(SurfNum) + - (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + + TH11 = (-CTFConstOutPart(SurfNum) + SurfOpaqQRadSWOutAbs(SurfNum) + SurfQRadLWOutSrdSurfs(SurfNum) + + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround + construct.CTFSourceOut(0) * QsrcHist(SurfNum, 1) + - F1 * (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + QRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + - NetLWRadToSurf(SurfNum))) / + F1 * (CTFConstInPart(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + SurfQRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + + SurfNetLWRadToSurf(SurfNum))) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum) - F1 * construct.CTFCross(0)); // ODB used to approx ground surface temp | MAT use here is problem for room air models } else { - TH11 = (-CTFConstOutPart(SurfNum) + QRadSWOutAbs(SurfNum) + QRadLWOutSrdSurfs(SurfNum) + - (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + + TH11 = (-CTFConstOutPart(SurfNum) + SurfOpaqQRadSWOutAbs(SurfNum) + SurfQRadLWOutSrdSurfs(SurfNum) + + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround + - F1 * (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + QRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + - NetLWRadToSurf(SurfNum))) / + F1 * (CTFConstInPart(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + SurfQRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + + SurfNetLWRadToSurf(SurfNum))) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum) - F1 * construct.CTFCross(0)); // ODB used to approx ground surface temp | MAT use here is problem for room air models } @@ -8199,16 +8290,16 @@ namespace HeatBalanceSurfaceManager { HRad = OSCM(Surface(SurfNum).OSCMPtr).HRad; // patterned after "No movable insulation, quick conduction," but with new radiation terms and no sun, if (construct.SourceSinkPresent) { - TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + + TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + construct.CTFSourceOut(0) * QsrcHist(SurfNum, 1) + - F1 * (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + QRadThermInAbs(SurfNum) + - construct.CTFSourceIn(0) * QsrcHist(SurfNum, 1) + HConvIn(SurfNum) * MAT(ZoneNum) + NetLWRadToSurf(SurfNum))) / + F1 * (CTFConstInPart(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + SurfQRadThermInAbs(SurfNum) + + construct.CTFSourceIn(0) * QsrcHist(SurfNum, 1) + HConvIn(SurfNum) * MAT(ZoneNum) + SurfNetLWRadToSurf(SurfNum))) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HRad - F1 * construct.CTFCross(0)); // MAT use here is problem for room air models } else { - TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + - F1 * (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + QRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + - NetLWRadToSurf(SurfNum))) / + TH11 = (-CTFConstOutPart(SurfNum) + HcExtSurf(SurfNum) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HRad * RadTemp + + F1 * (CTFConstInPart(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + SurfQRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + + SurfNetLWRadToSurf(SurfNum))) / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HRad - F1 * construct.CTFCross(0)); // MAT use here is problem for room air models } @@ -8218,8 +8309,8 @@ namespace HeatBalanceSurfaceManager { F2 = HMovInsul / (HMovInsul + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum)); - TH11 = (-CTFConstOutPart(SurfNum) + QRadSWOutAbs(SurfNum) + QRadLWOutSrdSurfs(SurfNum) + construct.CTFCross(0) * TempSurfIn(SurfNum) + - F2 * (QRadSWOutMvIns(SurfNum) + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + + TH11 = (-CTFConstOutPart(SurfNum) + SurfOpaqQRadSWOutAbs(SurfNum) + SurfQRadLWOutSrdSurfs(SurfNum) + construct.CTFCross(0) * TempSurfIn(SurfNum) + + F2 * (SurfQRadSWOutMvIns(SurfNum) + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround)) / (construct.CTFOutside(0) + HMovInsul - F2 * HMovInsul); // ODB used to approx ground surface temp @@ -8228,10 +8319,10 @@ namespace HeatBalanceSurfaceManager { F2 = HMovInsul / (HMovInsul + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum)); - TH11 = (-CTFConstOutPart(SurfNum) + QRadSWOutAbs(SurfNum) + QRadLWOutSrdSurfs(SurfNum) + - F1 * (CTFConstInPart(SurfNum) + QRadSWInAbs(SurfNum) + QRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + - NetLWRadToSurf(SurfNum)) + - F2 * (QRadSWOutMvIns(SurfNum) + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + QAdditionalHeatSourceOutside(SurfNum) + + TH11 = (-CTFConstOutPart(SurfNum) + SurfOpaqQRadSWOutAbs(SurfNum) + SurfQRadLWOutSrdSurfs(SurfNum) + + F1 * (CTFConstInPart(SurfNum) + SurfOpaqQRadSWInAbs(SurfNum) + SurfQRadThermInAbs(SurfNum) + HConvIn(SurfNum) * MAT(ZoneNum) + + SurfNetLWRadToSurf(SurfNum)) + + F2 * (SurfQRadSWOutMvIns(SurfNum) + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + SurfQAdditionalHeatSourceOutside(SurfNum) + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround)) / (construct.CTFOutside(0) + HMovInsul - F2 * HMovInsul - F1 * construct.CTFCross(0)); // ODB used to approx ground surface temp @@ -8279,7 +8370,7 @@ namespace HeatBalanceSurfaceManager { 1.0 / (construct.CTFOutside(0) + HcExtSurf(SurfNum) + HAirExtSurf(SurfNum) + HSkyExtSurf(SurfNum) + HGrdExtSurf(SurfNum))); RadSysToHBConstCoef(SurfNum) = - (-CTFConstOutPart(SurfNum) + QRadSWOutAbs(SurfNum) + QRadLWOutSrdSurfs(SurfNum) + + (-CTFConstOutPart(SurfNum) + SurfOpaqQRadSWOutAbs(SurfNum) + SurfQRadLWOutSrdSurfs(SurfNum) + (HcExtSurf(SurfNum) + HAirExtSurf(SurfNum)) * TempExt + HSkyExtSurf(SurfNum) * TSky + HGrdExtSurf(SurfNum) * TGround) * RadSysDiv; // ODB used to approx ground surface temp diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 08e3a8d0a35..c38a7225131 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -5583,7 +5583,7 @@ namespace InternalHeatGains { if (!Surface(SurfNum).HeatTransSurf) continue; // Skip non-heat transfer surfaces int const radEnclosureNum = Zone(zoneNum).RadiantEnclosureNum; if (!doLoadComponentPulseNow) { - QRadThermInAbs(SurfNum) = QL(radEnclosureNum) * TMULT(radEnclosureNum) * ITABSF(SurfNum); + SurfQRadThermInAbs(SurfNum) = QL(radEnclosureNum) * TMULT(radEnclosureNum) * ITABSF(SurfNum); } else { curQL = QL(radEnclosureNum); // for the loads component report during the special sizing run increase the radiant portion @@ -5593,7 +5593,7 @@ namespace InternalHeatGains { // ITABSF is the Inside Thermal Absorptance // TMULT is a multiplier for each zone // QRadThermInAbs is the thermal radiation absorbed on inside surfaces - QRadThermInAbs(SurfNum) = adjQL * TMULT(radEnclosureNum) * ITABSF(SurfNum); + SurfQRadThermInAbs(SurfNum) = adjQL * TMULT(radEnclosureNum) * ITABSF(SurfNum); // store the magnitude and time of the pulse radiantPulseTimestep(CurOverallSimDay, zoneNum) = (HourOfDay - 1) * NumOfTimeStepInHour + TimeStep; radiantPulseReceived(CurOverallSimDay, SurfNum) = diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 8c081b6cb94..ad093e6a770 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -609,7 +609,7 @@ namespace PhotovoltaicThermalCollectors { if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { // heating only right now, so control flow requests based on incident solar; - if (DataHeatBalance::QRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { + if (DataHeatBalance::SurfQRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { this->MassFlowRate = this->MaxMassFlowRate; } else { this->MassFlowRate = 0.0; @@ -818,7 +818,7 @@ namespace PhotovoltaicThermalCollectors { if (this->WorkingFluidType == WorkingFluidEnum::AIR) { if (this->PVTModelType == SimplePVTmodel) { - if (DataHeatBalance::QRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { + if (DataHeatBalance::SurfQRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? // Outlet node is required to have a setpoint. if (DataLoopNode::Node(this->HVACOutletNodeNum).TempSetPoint > DataLoopNode::Node(this->HVACInletNodeNum).Temp) { @@ -846,7 +846,7 @@ namespace PhotovoltaicThermalCollectors { } else if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { if (this->PVTModelType == SimplePVTmodel) { - if (DataHeatBalance::QRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { + if (DataHeatBalance::SurfQRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? this->HeatingUseful = true; this->BypassDamperOff = true; @@ -910,7 +910,7 @@ namespace PhotovoltaicThermalCollectors { } } - Real64 PotentialHeatGain = DataHeatBalance::QRadSWOutIncident(this->SurfNum) * Eff * this->AreaCol; + Real64 PotentialHeatGain = DataHeatBalance::SurfQRadSWOutIncident(this->SurfNum) * Eff * this->AreaCol; if (this->WorkingFluidType == WorkingFluidEnum::AIR) { Real64 Winlet = DataLoopNode::Node(InletNode).HumRat; diff --git a/src/EnergyPlus/Photovoltaics.cc b/src/EnergyPlus/Photovoltaics.cc index 48b4d30b68f..1d2d52af79e 100644 --- a/src/EnergyPlus/Photovoltaics.cc +++ b/src/EnergyPlus/Photovoltaics.cc @@ -823,7 +823,7 @@ namespace Photovoltaics { // Using/Aliasing using DataGlobals::SecInHour; - using DataHeatBalance::QRadSWOutIncident; + using DataHeatBalance::SurfQRadSWOutIncident; using DataHVACGlobals::TimeStepSys; using DataSurfaces::Surface; using ScheduleManager::GetCurrentScheduleValue; @@ -848,7 +848,7 @@ namespace Photovoltaics { ThisSurf = PVarray(thisPV).SurfacePtr; - if (QRadSWOutIncident(ThisSurf) > MinIrradiance) { + if (SurfQRadSWOutIncident(ThisSurf) > MinIrradiance) { // get efficiency { @@ -871,7 +871,7 @@ namespace Photovoltaics { PVarray(thisPV).Report.DCPower = PVarray(thisPV).SimplePVModule.AreaCol * Eff * - QRadSWOutIncident(ThisSurf); // active solar cellsurface net area | solar conversion efficiency | solar incident + SurfQRadSWOutIncident(ThisSurf); // active solar cellsurface net area | solar conversion efficiency | solar incident // store sink term in appropriate place for surface heat transfer itegration PVarray(thisPV).SurfaceSink = PVarray(thisPV).Report.DCPower; @@ -971,10 +971,10 @@ namespace Photovoltaics { using DataEnvironment::Elevation; using DataEnvironment::SOLCOS; using DataGlobals::DegToRadians; - using DataHeatBalance::CosIncidenceAngle; - using DataHeatBalance::QRadSWOutIncident; - using DataHeatBalance::QRadSWOutIncidentBeam; - using DataHeatBalSurface::TempSurfOut; + using DataHeatBalance::SurfCosIncidenceAngle; + using DataHeatBalance::SurfQRadSWOutIncident; + using DataHeatBalance::SurfQRadSWOutIncidentBeam; + using DataHeatBalSurface::SurfTempOut; using DataSurfaces::Surface; using TranspiredCollector::GetUTSCTsColl; @@ -998,9 +998,9 @@ namespace Photovoltaics { ThisSurf = PVarray(PVnum).SurfacePtr; // get input from elsewhere in Energyplus for the current point in the simulation - PVarray(PVnum).SNLPVinto.IcBeam = QRadSWOutIncidentBeam(ThisSurf); //(W/m2)from DataHeatBalance - PVarray(PVnum).SNLPVinto.IcDiffuse = QRadSWOutIncident(ThisSurf) - QRadSWOutIncidentBeam(ThisSurf); //(W/ m2)(was kJ/hr m2) - PVarray(PVnum).SNLPVinto.IncidenceAngle = std::acos(CosIncidenceAngle(ThisSurf)) / DegToRadians; // (deg) from dataHeatBalance + PVarray(PVnum).SNLPVinto.IcBeam = SurfQRadSWOutIncidentBeam(ThisSurf); //(W/m2)from DataHeatBalance + PVarray(PVnum).SNLPVinto.IcDiffuse = SurfQRadSWOutIncident(ThisSurf) - SurfQRadSWOutIncidentBeam(ThisSurf); //(W/ m2)(was kJ/hr m2) + PVarray(PVnum).SNLPVinto.IncidenceAngle = std::acos(SurfCosIncidenceAngle(ThisSurf)) / DegToRadians; // (deg) from dataHeatBalance PVarray(PVnum).SNLPVinto.ZenithAngle = std::acos(SOLCOS(3)) / DegToRadians; //(degrees), PVarray(PVnum).SNLPVinto.Tamb = Surface(ThisSurf).OutDryBulbTemp; //(deg. C) PVarray(PVnum).SNLPVinto.WindSpeed = Surface(ThisSurf).WindSpeed; // (m/s) @@ -1031,7 +1031,7 @@ namespace Photovoltaics { } else if (SELECT_CASE_var == iSurfaceOutsideFaceCellIntegration) { // get back-of-module temperature from elsewhere in EnergyPlus - PVarray(PVnum).SNLPVCalc.Tback = TempSurfOut(PVarray(PVnum).SurfacePtr); + PVarray(PVnum).SNLPVCalc.Tback = SurfTempOut(PVarray(PVnum).SurfacePtr); PVarray(PVnum).SNLPVCalc.Tcell = SandiaTcellFromTmodule(PVarray(PVnum).SNLPVCalc.Tback, PVarray(PVnum).SNLPVinto.IcBeam, @@ -1227,7 +1227,7 @@ namespace Photovoltaics { using DataGlobals::SecInHour; using DataGlobals::TimeStep; using DataGlobals::TimeStepZone; - using DataHeatBalance::QRadSWOutIncident; + using DataHeatBalance::SurfQRadSWOutIncident; using DataHVACGlobals::SysTimeElapsed; using DataHVACGlobals::TimeStepSys; using DataSurfaces::Surface; @@ -1275,9 +1275,9 @@ namespace Photovoltaics { PVarray(PVnum).TRNSYSPVcalc.TimeElapsed = TimeElapsed; } - if (any_gt(QRadSWOutIncident, 0.0)) { + if (any_gt(SurfQRadSWOutIncident, 0.0)) { // Determine the amount of radiation incident on each PV - PVarray(PVnum).TRNSYSPVcalc.Insolation = QRadSWOutIncident(PVarray(PVnum).SurfacePtr); //[W/m2] + PVarray(PVnum).TRNSYSPVcalc.Insolation = SurfQRadSWOutIncident(PVarray(PVnum).SurfacePtr); //[W/m2] } else { PVarray(PVnum).TRNSYSPVcalc.Insolation = 0.0; } @@ -1313,7 +1313,7 @@ namespace Photovoltaics { using DataSurfaces::Surface; // USE DataPhotovoltaics, ONLY:CellTemp,LastCellTemp using DataHeatBalance::Zone; - using DataHeatBalSurface::TempSurfOut; + using DataHeatBalSurface::SurfTempOut; using TranspiredCollector::GetUTSCTsColl; // Locals @@ -1411,7 +1411,7 @@ namespace Photovoltaics { (1.0 - std::exp(-PVarray(PVnum).TRNSYSPVModule.HeatLossCoef / PVarray(PVnum).TRNSYSPVModule.HeatCapacity * PVTimeStep)); } else if (SELECT_CASE_var == iSurfaceOutsideFaceCellIntegration) { - CellTemp = TempSurfOut(PVarray(PVnum).SurfacePtr) + KelvinConv; + CellTemp = SurfTempOut(PVarray(PVnum).SurfacePtr) + KelvinConv; } else if (SELECT_CASE_var == iTranspiredCollectorCellIntegration) { GetUTSCTsColl(PVarray(PVnum).UTSCPtr, CellTemp); CellTemp += KelvinConv; @@ -1484,7 +1484,7 @@ namespace Photovoltaics { (PVarray(PVnum).TRNSYSPVcalc.LastCellTempK - Tambient) * std::exp(-PVarray(PVnum).TRNSYSPVModule.HeatLossCoef / PVarray(PVnum).TRNSYSPVModule.HeatCapacity * PVTimeStep); } else if (SELECT_CASE_var == iSurfaceOutsideFaceCellIntegration) { - CellTemp = TempSurfOut(PVarray(PVnum).SurfacePtr) + KelvinConv; + CellTemp = SurfTempOut(PVarray(PVnum).SurfacePtr) + KelvinConv; } else if (SELECT_CASE_var == iTranspiredCollectorCellIntegration) { GetUTSCTsColl(PVarray(PVnum).UTSCPtr, CellTemp); CellTemp += KelvinConv; diff --git a/src/EnergyPlus/SolarCollectors.cc b/src/EnergyPlus/SolarCollectors.cc index 6fe496e2124..561561ebf0b 100644 --- a/src/EnergyPlus/SolarCollectors.cc +++ b/src/EnergyPlus/SolarCollectors.cc @@ -983,9 +983,9 @@ namespace SolarCollectors { Real64 incidentAngleModifier; // Net incident angle modifier combining beam, sky, and ground radiation // Calculate incident angle modifier - if (DataHeatBalance::QRadSWOutIncident(SurfNum) > 0.0) { + if (DataHeatBalance::SurfQRadSWOutIncident(SurfNum) > 0.0) { // Equivalent incident angle of sky radiation (radians) - Real64 ThetaBeam = std::acos(DataHeatBalance::CosIncidenceAngle(SurfNum)); + Real64 ThetaBeam = std::acos(DataHeatBalance::SurfCosIncidenceAngle(SurfNum)); // Calculate equivalent incident angles for sky and ground radiation according to Brandemuehl and Beckman (1980) // Surface tilt angle (degrees) @@ -997,10 +997,10 @@ namespace SolarCollectors { // Equivalent incident angle of ground radiation (radians) Real64 ThetaGnd = (90.0 - 0.5788 * tilt + 0.002693 * pow_2(tilt)) * DataGlobals::DegToRadians; - incidentAngleModifier = (DataHeatBalance::QRadSWOutIncidentBeam(SurfNum) * SolarCollectors::Parameters(ParamNum).IAM(ThetaBeam) + - DataHeatBalance::QRadSWOutIncidentSkyDiffuse(SurfNum) * SolarCollectors::Parameters(ParamNum).IAM(ThetaSky) + - DataHeatBalance::QRadSWOutIncidentGndDiffuse(SurfNum) * SolarCollectors::Parameters(ParamNum).IAM(ThetaGnd)) / - DataHeatBalance::QRadSWOutIncident(SurfNum); + incidentAngleModifier = (DataHeatBalance::SurfQRadSWOutIncidentBeam(SurfNum) * SolarCollectors::Parameters(ParamNum).IAM(ThetaBeam) + + DataHeatBalance::SurfQRadSWOutIncidentSkyDiffuse(SurfNum) * SolarCollectors::Parameters(ParamNum).IAM(ThetaSky) + + DataHeatBalance::SurfQRadSWOutIncidentGndDiffuse(SurfNum) * SolarCollectors::Parameters(ParamNum).IAM(ThetaGnd)) / + DataHeatBalance::SurfQRadSWOutIncident(SurfNum); } else { incidentAngleModifier = 0.0; } @@ -1103,7 +1103,7 @@ namespace SolarCollectors { // Calculate fluid heat gain (or loss) // Heat loss is possible if there is no incident radiation and fluid is still flowing. - Q = (FRTAN * incidentAngleModifier * DataHeatBalance::QRadSWOutIncident(SurfNum) + + Q = (FRTAN * incidentAngleModifier * DataHeatBalance::SurfQRadSWOutIncident(SurfNum) + FRULpTest * (inletTemp - DataSurfaces::Surface(SurfNum).OutDryBulbTemp)) * area * FlowMod; @@ -1119,9 +1119,9 @@ namespace SolarCollectors { Q = massFlowRate * Cp * (outletTemp - inletTemp); } - if (DataHeatBalance::QRadSWOutIncident(SurfNum) > 0.0) { // Calculate thermal efficiency + if (DataHeatBalance::SurfQRadSWOutIncident(SurfNum) > 0.0) { // Calculate thermal efficiency // NOTE: Efficiency can be > 1 if Q > QRadSWOutIncident because of favorable delta T, i.e. warm outdoor temperature - efficiency = Q / (DataHeatBalance::QRadSWOutIncident(SurfNum) * area); // Q has units of W; QRadSWOutIncident has units of W/m2 + efficiency = Q / (DataHeatBalance::SurfQRadSWOutIncident(SurfNum) * area); // Q has units of W; QRadSWOutIncident has units of W/m2 } else { efficiency = 0.0; } @@ -1134,7 +1134,7 @@ namespace SolarCollectors { Real64 A = -FRULT; Real64 B = -FRUL + 2.0 * FRULT * DataSurfaces::Surface(SurfNum).OutDryBulbTemp; Real64 C = -FRULT * pow_2(DataSurfaces::Surface(SurfNum).OutDryBulbTemp) + FRUL * DataSurfaces::Surface(SurfNum).OutDryBulbTemp - - FRTAN * incidentAngleModifier * DataHeatBalance::QRadSWOutIncident(SurfNum); + FRTAN * incidentAngleModifier * DataHeatBalance::SurfQRadSWOutIncident(SurfNum); Real64 qEquation = (pow_2(B) - 4.0 * A * C); if (qEquation < 0.0) { if (this->ErrIndex == 0) { @@ -1151,7 +1151,7 @@ namespace SolarCollectors { } if (FRULT == 0.0 || qEquation < 0.0) { // Linear, 1st order solution outletTemp = DataSurfaces::Surface(SurfNum).OutDryBulbTemp - - FRTAN * incidentAngleModifier * DataHeatBalance::QRadSWOutIncident(SurfNum) / FRUL; + FRTAN * incidentAngleModifier * DataHeatBalance::SurfQRadSWOutIncident(SurfNum) / FRUL; } else { // Quadratic, 2nd order solution outletTemp = (-B + std::sqrt(qEquation)) / (2.0 * A); } @@ -1276,7 +1276,7 @@ namespace SolarCollectors { // Calculate transmittance-absorptance product of the system // Incident angle of beam radiation (radians) - Real64 ThetaBeam = std::acos(DataHeatBalance::CosIncidenceAngle(SurfNum)); + Real64 ThetaBeam = std::acos(DataHeatBalance::SurfCosIncidenceAngle(SurfNum)); this->CalcTransAbsorProduct(ThetaBeam); Real64 inletTemp = this->InletTemp; @@ -1319,12 +1319,12 @@ namespace SolarCollectors { Real64 ap = SolarCollectors::Parameters(ParamNum).ThermalMass * area; a1 = -area * (hConvCoefA2W + this->UTopLoss) / ap; a2 = area * hConvCoefA2W / ap; - a3 = area * (this->TauAlpha * DataHeatBalance::QRadSWOutIncident(SurfNum) + this->UTopLoss * TempOutdoorAir) / ap; + a3 = area * (this->TauAlpha * DataHeatBalance::SurfQRadSWOutIncident(SurfNum) + this->UTopLoss * TempOutdoorAir) / ap; } else { AbsPlateMassFlag = false; a1 = -area * (hConvCoefA2W + this->UTopLoss); a2 = area * hConvCoefA2W; - a3 = area * (this->TauAlpha * DataHeatBalance::QRadSWOutIncident(SurfNum) + this->UTopLoss * TempOutdoorAir); + a3 = area * (this->TauAlpha * DataHeatBalance::SurfQRadSWOutIncident(SurfNum) + this->UTopLoss * TempOutdoorAir); } // thermal mass of the collector water [J/K] @@ -1358,8 +1358,8 @@ namespace SolarCollectors { this->TempOfAbsPlate = TempAbsPlate; Real64 efficiency = 0.0; // Thermal efficiency of solar energy conversion - if (DataHeatBalance::QRadSWOutIncident(SurfNum) > 0.0) { - efficiency = (this->HeatGainRate + this->StoredHeatRate) / (DataHeatBalance::QRadSWOutIncident(SurfNum) * area); + if (DataHeatBalance::SurfQRadSWOutIncident(SurfNum) > 0.0) { + efficiency = (this->HeatGainRate + this->StoredHeatRate) / (DataHeatBalance::SurfQRadSWOutIncident(SurfNum) * area); if (efficiency < 0.0) efficiency = 0.0; } this->Efficiency = efficiency; @@ -1474,7 +1474,7 @@ namespace SolarCollectors { int SurfNum = this->Surface; int ParamNum = this->Parameters; - if (DataHeatBalance::QRadSWOutIncident(SurfNum) > 0.0) { + if (DataHeatBalance::SurfQRadSWOutIncident(SurfNum) > 0.0) { // cover system transmittance and reflectance from outer to inner cover this->CalcTransRefAbsOfCover(IncidAngle, TransSys, ReflSys, AbsCover1, AbsCover2); @@ -1489,25 +1489,25 @@ namespace SolarCollectors { CoversAbsBeam(2) = AbsCover2; // calc total solar radiation weighted transmittance-absorptance product - TuaAlpha = (DataHeatBalance::QRadSWOutIncidentBeam(SurfNum) * this->TauAlphaBeam + - DataHeatBalance::QRadSWOutIncidentSkyDiffuse(SurfNum) * this->TauAlphaSkyDiffuse + - DataHeatBalance::QRadSWOutIncidentGndDiffuse(SurfNum) * this->TauAlphaGndDiffuse) / - DataHeatBalance::QRadSWOutIncident(SurfNum); + TuaAlpha = (DataHeatBalance::SurfQRadSWOutIncidentBeam(SurfNum) * this->TauAlphaBeam + + DataHeatBalance::SurfQRadSWOutIncidentSkyDiffuse(SurfNum) * this->TauAlphaSkyDiffuse + + DataHeatBalance::SurfQRadSWOutIncidentGndDiffuse(SurfNum) * this->TauAlphaGndDiffuse) / + DataHeatBalance::SurfQRadSWOutIncident(SurfNum); if (SolarCollectors::Parameters(ParamNum).NumOfCovers == 1) { // calc total solar radiation weighted cover absorptance - this->CoverAbs(1) = (DataHeatBalance::QRadSWOutIncidentBeam(SurfNum) * CoversAbsBeam(1) + - DataHeatBalance::QRadSWOutIncidentSkyDiffuse(SurfNum) * this->CoversAbsSkyDiffuse(1) + - DataHeatBalance::QRadSWOutIncidentGndDiffuse(SurfNum) * this->CoversAbsGndDiffuse(1)) / - DataHeatBalance::QRadSWOutIncident(SurfNum); + this->CoverAbs(1) = (DataHeatBalance::SurfQRadSWOutIncidentBeam(SurfNum) * CoversAbsBeam(1) + + DataHeatBalance::SurfQRadSWOutIncidentSkyDiffuse(SurfNum) * this->CoversAbsSkyDiffuse(1) + + DataHeatBalance::SurfQRadSWOutIncidentGndDiffuse(SurfNum) * this->CoversAbsGndDiffuse(1)) / + DataHeatBalance::SurfQRadSWOutIncident(SurfNum); } else if (SolarCollectors::Parameters(ParamNum).NumOfCovers == 2) { // Num = 1 represents outer cover and Num = 2 represents inner cover for (int Num = 1; Num <= SolarCollectors::Parameters(ParamNum).NumOfCovers; ++Num) { - this->CoverAbs(Num) = (DataHeatBalance::QRadSWOutIncidentBeam(SurfNum) * CoversAbsBeam(Num) + - DataHeatBalance::QRadSWOutIncidentSkyDiffuse(SurfNum) * this->CoversAbsSkyDiffuse(Num) + - DataHeatBalance::QRadSWOutIncidentGndDiffuse(SurfNum) * this->CoversAbsGndDiffuse(Num)) / - DataHeatBalance::QRadSWOutIncident(SurfNum); + this->CoverAbs(Num) = (DataHeatBalance::SurfQRadSWOutIncidentBeam(SurfNum) * CoversAbsBeam(Num) + + DataHeatBalance::SurfQRadSWOutIncidentSkyDiffuse(SurfNum) * this->CoversAbsSkyDiffuse(Num) + + DataHeatBalance::SurfQRadSWOutIncidentGndDiffuse(SurfNum) * this->CoversAbsGndDiffuse(Num)) / + DataHeatBalance::SurfQRadSWOutIncident(SurfNum); } } @@ -1775,19 +1775,19 @@ namespace SolarCollectors { { auto const SELECT_CASE_var(NumCovers); if (SELECT_CASE_var == 1) { - tempnom = this->CoverAbs(1) * DataHeatBalance::QRadSWOutIncident(SurfNum) + TempOutdoorAir * (hConvCoefC2O + hRadCoefC2O) + + tempnom = this->CoverAbs(1) * DataHeatBalance::SurfQRadSWOutIncident(SurfNum) + TempOutdoorAir * (hConvCoefC2O + hRadCoefC2O) + TempAbsPlate * (hConvCoefA2C + hRadCoefA2C); tempdenom = (hConvCoefC2O + hRadCoefC2O) + (hConvCoefA2C + hRadCoefA2C); TempOuterCover = tempnom / tempdenom; } else if (SELECT_CASE_var == 2) { for (int Num = 1; Num <= NumCovers; ++Num) { if (Num == 1) { - tempnom = this->CoverAbs(Num) * DataHeatBalance::QRadSWOutIncident(SurfNum) + TempOutdoorAir * (hConvCoefC2O + hRadCoefC2O) + + tempnom = this->CoverAbs(Num) * DataHeatBalance::SurfQRadSWOutIncident(SurfNum) + TempOutdoorAir * (hConvCoefC2O + hRadCoefC2O) + TempInnerCover * (hConvCoefC2C + hRadCoefC2C); tempdenom = (hConvCoefC2O + hRadCoefC2O) + (hConvCoefC2C + hRadCoefC2C); TempOuterCover = tempnom / tempdenom; } else if (Num == 2) { - tempnom = this->CoverAbs(Num) * DataHeatBalance::QRadSWOutIncident(SurfNum) + TempAbsPlate * (hConvCoefA2C + hRadCoefA2C) + + tempnom = this->CoverAbs(Num) * DataHeatBalance::SurfQRadSWOutIncident(SurfNum) + TempAbsPlate * (hConvCoefA2C + hRadCoefA2C) + TempOuterCover * (hConvCoefC2C + hRadCoefC2C); tempdenom = (hConvCoefC2C + hRadCoefC2C + hConvCoefA2C + hRadCoefA2C); TempInnerCover = tempnom / tempdenom; diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index a908ee942df..f27f878d615 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -488,29 +488,31 @@ namespace SolarShading { ZoneOpaqSurfInsFaceCond = 0.0; ZoneOpaqSurfInsFaceCondGainRep = 0.0; ZoneOpaqSurfInsFaceCondLossRep = 0.0; - QRadSWOutIncident = 0.0; - QRadSWOutIncidentBeam = 0.0; - BmIncInsSurfIntensRep = 0.0; - BmIncInsSurfAmountRep = 0.0; - // DifIncInsSurfIntensRep=0.0 - // DifIncInsSurfAmountRep=0.0 - IntBmIncInsSurfIntensRep = 0.0; - IntBmIncInsSurfAmountRep = 0.0; - // IntDifIncInsSurfIntensRep=0.0 - // IntDifIncInsSurfAmountRep=0.0 - QRadSWOutIncidentSkyDiffuse = 0.0; - QRadSWOutIncidentGndDiffuse = 0.0; - QRadSWOutIncBmToDiffReflGnd = 0.0; - QRadSWOutIncSkyDiffReflGnd = 0.0; - QRadSWOutIncBmToBmReflObs = 0.0; - QRadSWOutIncBmToDiffReflObs = 0.0; - QRadSWOutIncSkyDiffReflObs = 0.0; - CosIncidenceAngle = 0.0; - QRadSWwinAbsTot = 0.0; - SWwinAbsTotalReport = 0.0; - InitialDifSolInAbsReport = 0.0; - InitialDifSolInTransReport = 0.0; - SWInAbsTotalReport = 0.0; + + SurfQRadSWOutIncident = 0.0; + SurfQRadSWOutIncidentBeam = 0.0; + SurfBmIncInsSurfIntensRep = 0.0; + SurfBmIncInsSurfAmountRep = 0.0; + SurfIntBmIncInsSurfIntensRep = 0.0; + SurfIntBmIncInsSurfAmountRep = 0.0; + SurfQRadSWOutIncidentSkyDiffuse = 0.0; + SurfQRadSWOutIncidentGndDiffuse = 0.0; + SurfQRadSWOutIncBmToDiffReflGnd = 0.0; + SurfQRadSWOutIncSkyDiffReflGnd = 0.0; + SurfQRadSWOutIncBmToBmReflObs = 0.0; + SurfQRadSWOutIncBmToDiffReflObs = 0.0; + SurfQRadSWOutIncSkyDiffReflObs = 0.0; + SurfCosIncidenceAngle = 0.0; + SurfSWInAbsTotalReport = 0.0; + SurfBmIncInsSurfAmountRepEnergy = 0.0; + SurfIntBmIncInsSurfAmountRepEnergy = 0.0; + + SurfWinQRadSWwinAbsTot = 0.0; + SurfWinQRadSWwinAbsTotEnergy = 0.0; + SurfWinSWwinAbsTotalReport = 0.0; + SurfInitialDifSolInAbsReport = 0.0; + SurfWinInitialDifSolInTransReport = 0.0; + WindowRevealStatus = 0; ZoneTransSolarEnergy = 0.0; ZoneBmSolFrExtWinsRepEnergy = 0.0; @@ -521,11 +523,7 @@ namespace SolarShading { ZoneWinHeatLossRepEnergy = 0.0; ZnOpqSurfInsFaceCondGnRepEnrg = 0.0; ZnOpqSurfInsFaceCondLsRepEnrg = 0.0; - BmIncInsSurfAmountRepEnergy = 0.0; - // DifIncInsSurfAmountRepEnergy=0.0 - IntBmIncInsSurfAmountRepEnergy = 0.0; - // IntDifIncInsSurfAmountRepEnergy=0.0 - QRadSWwinAbsTotEnergy = 0.0; + // Surface Win for (int zoneNum = 1; zoneNum <= DataGlobals::NumOfZones; ++zoneNum) { @@ -1070,42 +1068,43 @@ namespace SolarShading { ZoneOpaqSurfExtFaceCondGainRep.dimension(NumOfZones, 0.0); ZoneOpaqSurfExtFaceCondLossRep.dimension(NumOfZones, 0.0); - QRadSWOutIncident.dimension(TotSurfaces, 0.0); - QRadSWOutIncidentBeam.dimension(TotSurfaces, 0.0); - BmIncInsSurfIntensRep.dimension(TotSurfaces, 0.0); - BmIncInsSurfAmountRep.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncident.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncidentBeam.dimension(TotSurfaces, 0.0); + SurfBmIncInsSurfIntensRep.dimension(TotSurfaces, 0.0); + SurfBmIncInsSurfAmountRep.dimension(TotSurfaces, 0.0); // ALLOCATE(DifIncInsSurfIntensRep(TotSurfaces)) // DifIncInsSurfIntensRep=0.0 // ALLOCATE(DifIncInsSurfAmountRep(TotSurfaces)) // DifIncInsSurfAmountRep=0.0 - IntBmIncInsSurfIntensRep.dimension(TotSurfaces, 0.0); - IntBmIncInsSurfAmountRep.dimension(TotSurfaces, 0.0); + SurfIntBmIncInsSurfIntensRep.dimension(TotSurfaces, 0.0); + SurfIntBmIncInsSurfAmountRep.dimension(TotSurfaces, 0.0); // ALLOCATE(IntDifIncInsSurfIntensRep(TotSurfaces)) // IntDifIncInsSurfIntensRep=0.0 // ALLOCATE(IntDifIncInsSurfAmountRep(TotSurfaces)) // IntDifIncInsSurfAmountRep=0.0 - QRadSWOutIncidentSkyDiffuse.dimension(TotSurfaces, 0.0); - QRadSWOutIncidentGndDiffuse.dimension(TotSurfaces, 0.0); - QRadSWOutIncBmToDiffReflGnd.dimension(TotSurfaces, 0.0); - QRadSWOutIncSkyDiffReflGnd.dimension(TotSurfaces, 0.0); - QRadSWOutIncBmToBmReflObs.dimension(TotSurfaces, 0.0); - QRadSWOutIncBmToDiffReflObs.dimension(TotSurfaces, 0.0); - QRadSWOutIncSkyDiffReflObs.dimension(TotSurfaces, 0.0); - CosIncidenceAngle.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncidentSkyDiffuse.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncidentGndDiffuse.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncBmToDiffReflGnd.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncSkyDiffReflGnd.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncBmToBmReflObs.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncBmToDiffReflObs.dimension(TotSurfaces, 0.0); + SurfQRadSWOutIncSkyDiffReflObs.dimension(TotSurfaces, 0.0); + SurfCosIncidenceAngle.dimension(TotSurfaces, 0.0); + SurfWinBSDFBeamDirectionRep.dimension(TotSurfaces, 0); SurfWinBSDFBeamThetaRep.dimension(TotSurfaces, 0.0); SurfWinBSDFBeamPhiRep.dimension(TotSurfaces, 0.0); - QRadSWwinAbsTot.dimension(TotSurfaces, 0.0); + SurfWinQRadSWwinAbsTot.dimension(TotSurfaces, 0.0); - QRadSWwinAbsLayer.dimension(DataHeatBalance::MaxSolidWinLayers, TotSurfaces, 0.0); + SurfWinQRadSWwinAbsLayer.dimension(DataHeatBalance::MaxSolidWinLayers, TotSurfaces, 0.0); - FenLaySurfTempFront.dimension(DataHeatBalance::MaxSolidWinLayers, TotSurfaces, 0.0); - FenLaySurfTempBack.dimension(DataHeatBalance::MaxSolidWinLayers, TotSurfaces, 0.0); + SurfWinFenLaySurfTempFront.dimension(DataHeatBalance::MaxSolidWinLayers, TotSurfaces, 0.0); + SurfWinFenLaySurfTempBack.dimension(DataHeatBalance::MaxSolidWinLayers, TotSurfaces, 0.0); - SWwinAbsTotalReport.dimension(TotSurfaces, 0.0); - InitialDifSolInAbsReport.dimension(TotSurfaces, 0.0); - InitialDifSolInTransReport.dimension(TotSurfaces, 0.0); - SWInAbsTotalReport.dimension(TotSurfaces, 0.0); + SurfWinSWwinAbsTotalReport.dimension(TotSurfaces, 0.0); + SurfInitialDifSolInAbsReport.dimension(TotSurfaces, 0.0); + SurfWinInitialDifSolInTransReport.dimension(TotSurfaces, 0.0); + SurfSWInAbsTotalReport.dimension(TotSurfaces, 0.0); WindowRevealStatus.dimension(NumOfTimeStepInHour, 24, TotSurfaces, 0); // Weiler-Atherton @@ -1147,17 +1146,18 @@ namespace SolarShading { ZoneDifSolFrIntWinsRepEnergy.dimension(NumOfZones, 0.0); ZoneWinHeatGainRepEnergy.dimension(NumOfZones, 0.0); ZoneWinHeatLossRepEnergy.dimension(NumOfZones, 0.0); - BmIncInsSurfAmountRepEnergy.dimension(TotSurfaces, 0.0); + ZnOpqSurfInsFaceCondGnRepEnrg.dimension(NumOfZones, 0.0); ZnOpqSurfInsFaceCondLsRepEnrg.dimension(NumOfZones, 0.0); ZnOpqSurfExtFaceCondGnRepEnrg.dimension(NumOfZones, 0.0); ZnOpqSurfExtFaceCondLsRepEnrg.dimension(NumOfZones, 0.0); // ALLOCATE(DifIncInsSurfAmountRepEnergy(TotSurfaces)) // DifIncInsSurfAmountRepEnergy=0.0 - IntBmIncInsSurfAmountRepEnergy.dimension(TotSurfaces, 0.0); + SurfBmIncInsSurfAmountRepEnergy.dimension(TotSurfaces, 0.0); + SurfIntBmIncInsSurfAmountRepEnergy.dimension(TotSurfaces, 0.0); // ALLOCATE(IntDifIncInsSurfAmountRepEnergy(TotSurfaces)) // IntDifIncInsSurfAmountRepEnergy=0.0 - QRadSWwinAbsTotEnergy.dimension(TotSurfaces, 0.0); + SurfWinQRadSWwinAbsTotEnergy.dimension(TotSurfaces, 0.0); for (int SurfNum = 1; SurfNum <= TotSurfaces; SurfNum++) { SurfWinBmSolAbsdOutsReveal(SurfNum) = 0.0; @@ -1312,61 +1312,61 @@ namespace SolarShading { Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncident(SurfLoop), + SurfQRadSWOutIncident(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncidentBeam(SurfLoop), + SurfQRadSWOutIncidentBeam(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Sky Diffuse Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncidentSkyDiffuse(SurfLoop), + SurfQRadSWOutIncidentSkyDiffuse(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Ground Diffuse Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncidentGndDiffuse(SurfLoop), + SurfQRadSWOutIncidentGndDiffuse(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Beam Solar Incident Angle Cosine Value", OutputProcessor::Unit::None, - CosIncidenceAngle(SurfLoop), + SurfCosIncidenceAngle(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Sky Diffuse Ground Reflected Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncSkyDiffReflGnd(SurfLoop), + SurfQRadSWOutIncSkyDiffReflGnd(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Sky Diffuse Surface Reflected Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncSkyDiffReflObs(SurfLoop), + SurfQRadSWOutIncSkyDiffReflObs(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam To Beam Surface Reflected Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncBmToBmReflObs(SurfLoop), + SurfQRadSWOutIncBmToBmReflObs(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam To Diffuse Surface Reflected Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncBmToDiffReflObs(SurfLoop), + SurfQRadSWOutIncBmToDiffReflObs(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Outside Face Incident Beam To Diffuse Ground Reflected Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncBmToDiffReflGnd(SurfLoop), + SurfQRadSWOutIncBmToDiffReflGnd(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -1402,13 +1402,13 @@ namespace SolarShading { if (Surface(SurfLoop).ExtSolar) { SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", OutputProcessor::Unit::W, - QRadSWwinAbsTot(SurfLoop), + SurfWinQRadSWwinAbsTot(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Shortwave Radiation Rate", OutputProcessor::Unit::W, - SWwinAbsTotalReport(SurfLoop), + SurfWinSWwinAbsTotalReport(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -1422,7 +1422,7 @@ namespace SolarShading { if (dataConstruction.Construct(Surface(SurfLoop).Construction).WindowTypeBSDF) { SetupOutputVariable(state, "Surface Window Total Absorbed Shortwave Radiation Rate Layer " + RoundSigDigits(I) + "", OutputProcessor::Unit::W, - QRadSWwinAbsLayer(I, SurfLoop), + SurfWinQRadSWwinAbsLayer(I, SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -1430,7 +1430,7 @@ namespace SolarShading { if (dataConstruction.Construct(Surface(SurfLoop).Construction).WindowTypeBSDF || (I == 1)) { SetupOutputVariable(state, "Surface Window Front Face Temperature Layer " + RoundSigDigits(I) + "", OutputProcessor::Unit::C, - FenLaySurfTempFront(I, SurfLoop), + SurfWinFenLaySurfTempFront(I, SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -1438,7 +1438,7 @@ namespace SolarShading { if (dataConstruction.Construct(Surface(SurfLoop).Construction).WindowTypeBSDF || (I == NumOfLayers)) { SetupOutputVariable(state, "Surface Window Back Face Temperature Layer " + RoundSigDigits(I) + "", OutputProcessor::Unit::C, - FenLaySurfTempBack(I, SurfLoop), + SurfWinFenLaySurfTempBack(I, SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -1659,7 +1659,7 @@ namespace SolarShading { // Energy SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", OutputProcessor::Unit::J, - QRadSWwinAbsTotEnergy(SurfLoop), + SurfWinQRadSWwinAbsTotEnergy(SurfLoop), "Zone", "Sum", Surface(SurfLoop).Name); @@ -1938,14 +1938,14 @@ namespace SolarShading { if (SurfWinOriginalClass(SurfLoop) != SurfaceClass_TDD_Diffuser) { SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", OutputProcessor::Unit::W, - QRadSWwinAbsTot(SurfLoop), + SurfWinQRadSWwinAbsTot(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); } SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Shortwave Radiation Rate", OutputProcessor::Unit::W, - SWwinAbsTotalReport(SurfLoop), + SurfWinSWwinAbsTotalReport(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -2064,7 +2064,7 @@ namespace SolarShading { if (SurfWinOriginalClass(SurfLoop) != SurfaceClass_TDD_Diffuser) { SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", OutputProcessor::Unit::J, - QRadSWwinAbsTotEnergy(SurfLoop), + SurfWinQRadSWwinAbsTotEnergy(SurfLoop), "Zone", "Sum", Surface(SurfLoop).Name); @@ -2318,7 +2318,7 @@ namespace SolarShading { // CurrentModuleObject='TDD Domes' SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", OutputProcessor::Unit::W, - QRadSWwinAbsTot(SurfLoop), + SurfWinQRadSWwinAbsTot(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -2331,7 +2331,7 @@ namespace SolarShading { // energy SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", OutputProcessor::Unit::J, - QRadSWwinAbsTotEnergy(SurfLoop), + SurfWinQRadSWwinAbsTotEnergy(SurfLoop), "Zone", "Sum", Surface(SurfLoop).Name); @@ -2346,13 +2346,13 @@ namespace SolarShading { // CurrentModuleObject='TDD Diffusers' SetupOutputVariable(state, "Surface Outside Face Incident Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - QRadSWOutIncident(SurfLoop), + SurfQRadSWOutIncident(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Rate", OutputProcessor::Unit::W, - QRadSWwinAbsTot(SurfLoop), + SurfWinQRadSWwinAbsTot(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); @@ -2365,7 +2365,7 @@ namespace SolarShading { // energy SetupOutputVariable(state, "Surface Window Total Glazing Layers Absorbed Solar Radiation Energy", OutputProcessor::Unit::J, - QRadSWwinAbsTotEnergy(SurfLoop), + SurfWinQRadSWwinAbsTotEnergy(SurfLoop), "Zone", "Sum", Surface(SurfLoop).Name); @@ -2383,56 +2383,56 @@ namespace SolarShading { // CurrentModuleObject='Surfaces' SetupOutputVariable(state, "Surface Inside Face Exterior Windows Incident Beam Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - BmIncInsSurfIntensRep(SurfLoop), + SurfBmIncInsSurfIntensRep(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Inside Face Exterior Windows Incident Beam Solar Radiation Rate", OutputProcessor::Unit::W, - BmIncInsSurfAmountRep(SurfLoop), + SurfBmIncInsSurfAmountRep(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Inside Face Interior Windows Incident Beam Solar Radiation Rate per Area", OutputProcessor::Unit::W_m2, - IntBmIncInsSurfIntensRep(SurfLoop), + SurfIntBmIncInsSurfIntensRep(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Inside Face Interior Windows Incident Beam Solar Radiation Rate", OutputProcessor::Unit::W, - IntBmIncInsSurfAmountRep(SurfLoop), + SurfIntBmIncInsSurfAmountRep(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Inside Face Initial Transmitted Diffuse Absorbed Solar Radiation Rate", OutputProcessor::Unit::W, - InitialDifSolInAbsReport(SurfLoop), + SurfInitialDifSolInAbsReport(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Rate", OutputProcessor::Unit::W, - InitialDifSolInTransReport(SurfLoop), + SurfWinInitialDifSolInTransReport(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Inside Face Absorbed Shortwave Radiation Rate", OutputProcessor::Unit::W, - SWInAbsTotalReport(SurfLoop), + SurfSWInAbsTotalReport(SurfLoop), "Zone", "Average", Surface(SurfLoop).Name); // energy SetupOutputVariable(state, "Surface Inside Face Exterior Windows Incident Beam Solar Radiation Energy", OutputProcessor::Unit::J, - BmIncInsSurfAmountRepEnergy(SurfLoop), + SurfBmIncInsSurfAmountRepEnergy(SurfLoop), "Zone", "Sum", Surface(SurfLoop).Name); SetupOutputVariable(state, "Surface Inside Face Interior Windows Incident Beam Solar Radiation Energy", OutputProcessor::Unit::J, - IntBmIncInsSurfAmountRepEnergy(SurfLoop), + SurfIntBmIncInsSurfAmountRepEnergy(SurfLoop), "Zone", "Sum", Surface(SurfLoop).Name); @@ -8311,8 +8311,8 @@ namespace SolarShading { SurfWinBmSolTransThruIntWinRep(BackSurfNum) * TimeStepZoneSec; } } // End of check if back surface is opaque or window - BmIncInsSurfAmountRep(BackSurfNum) += BOverlap; - BmIncInsSurfAmountRepEnergy(BackSurfNum) = BmIncInsSurfAmountRep(BackSurfNum) * TimeStepZoneSec; + SurfBmIncInsSurfAmountRep(BackSurfNum) += BOverlap; + SurfBmIncInsSurfAmountRepEnergy(BackSurfNum) = SurfBmIncInsSurfAmountRep(BackSurfNum) * TimeStepZoneSec; } // End of loop over back surfaces } else if (SurfWinWindowModelType(SurfNum) == WindowBSDFModel) { // For complex window calculation goes over outgoing basis directions @@ -8580,8 +8580,8 @@ namespace SolarShading { SurfWinBmSolTransThruIntWinRep(BackSurfNum) * TimeStepZoneSec; } } // End of check if back surface is opaque or window - BmIncInsSurfAmountRep(BackSurfNum) += BOverlap; - BmIncInsSurfAmountRepEnergy(BackSurfNum) = BmIncInsSurfAmountRep(BackSurfNum) * TimeStepZoneSec; + SurfBmIncInsSurfAmountRep(BackSurfNum) += BOverlap; + SurfBmIncInsSurfAmountRepEnergy(BackSurfNum) = SurfBmIncInsSurfAmountRep(BackSurfNum) * TimeStepZoneSec; } // End of loop over back surfaces // ***************************** @@ -8679,23 +8679,23 @@ namespace SolarShading { // Variables for reporting for (int const SurfNum : thisEnclosure.SurfacePtr) { if (SolarDistribution == FullInteriorExterior) { - BmIncInsSurfAmountRep(SurfNum) *= BeamSolarRad; - BmIncInsSurfAmountRepEnergy(SurfNum) = BmIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec; - BmIncInsSurfIntensRep(SurfNum) = BmIncInsSurfAmountRep(SurfNum) / (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)); + SurfBmIncInsSurfAmountRep(SurfNum) *= BeamSolarRad; + SurfBmIncInsSurfAmountRepEnergy(SurfNum) = SurfBmIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec; + SurfBmIncInsSurfIntensRep(SurfNum) = SurfBmIncInsSurfAmountRep(SurfNum) / (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)); } else { // Simple interior solar distribution. All beam falls on floor. if (ISABSF(SurfNum) > 0.0 && Surface(SurfNum).HeatTransSurf) { if (thisEnclosure.FloorArea > 0.0) { // spread onto all floor surfaces, these may or may not be called "floor" - BmIncInsSurfIntensRep(SurfNum) = BeamSolarRad * BTOTZone / thisEnclosure.FloorArea; + SurfBmIncInsSurfIntensRep(SurfNum) = BeamSolarRad * BTOTZone / thisEnclosure.FloorArea; } else if (thisEnclosure.TotalSurfArea > 0.0) { // spread onto all interior surfaces - BmIncInsSurfIntensRep(SurfNum) = BeamSolarRad * BTOTZone / thisEnclosure.TotalSurfArea; + SurfBmIncInsSurfIntensRep(SurfNum) = BeamSolarRad * BTOTZone / thisEnclosure.TotalSurfArea; } else { // divide be zero otherwise - BmIncInsSurfIntensRep(SurfNum) = 0.0; + SurfBmIncInsSurfIntensRep(SurfNum) = 0.0; } } - BmIncInsSurfAmountRep(SurfNum) = Surface(SurfNum).Area * BmIncInsSurfIntensRep(SurfNum); - BmIncInsSurfAmountRepEnergy(SurfNum) = BmIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec; + SurfBmIncInsSurfAmountRep(SurfNum) = Surface(SurfNum).Area * SurfBmIncInsSurfIntensRep(SurfNum); + SurfBmIncInsSurfAmountRepEnergy(SurfNum) = SurfBmIncInsSurfAmountRep(SurfNum) * TimeStepZoneSec; } if (Surface(SurfNum).Class == SurfaceClass_Window || Surface(SurfNum).Class == SurfaceClass_TDD_Dome) { @@ -8971,10 +8971,10 @@ namespace SolarShading { // is becuase BeamSolarRad is direct normal radiation (looking at the Sun) while QRadSWOutIncident // is normal to window incidence. Since BSDF coefficients are taking into account angle of incidence, // BeamSolarRad should be used in this case - QRadSWwinAbs(Lay, SurfNum) = cplxState.WinSkyFtAbs(Lay) * SurfSkySolarInc(SurfNum2) + + SurfWinQRadSWwinAbs(Lay, SurfNum) = cplxState.WinSkyFtAbs(Lay) * SurfSkySolarInc(SurfNum2) + cplxState.WinSkyGndAbs(Lay) * SurfGndSolarInc(SurfNum2) + AWinSurf(Lay, SurfNum) * BeamSolarRad + AWinCFOverlap(Lay, SurfNum) * BeamSolarRad; - QRadSWwinAbsLayer(Lay, SurfNum) = QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; AWinSurfDiffFront(Lay, SurfNum) = cplxState.WinSkyGndAbs(Lay); } } else { @@ -8994,8 +8994,8 @@ namespace SolarShading { // incidence is already taken into account auto absBeam = AWinSurf(Lay, SurfNum) * BeamSolarRad; auto absDiff = AWinSurfDiffFront(Lay, SurfNum) * (SurfSkySolarInc(SurfNum2) + SurfGndSolarInc(SurfNum2)); - QRadSWwinAbs(Lay, SurfNum) = (absBeam + absDiff); - QRadSWwinAbsLayer(Lay, SurfNum) = QRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; + SurfWinQRadSWwinAbs(Lay, SurfNum) = (absBeam + absDiff); + SurfWinQRadSWwinAbsLayer(Lay, SurfNum) = SurfWinQRadSWwinAbs(Lay, SurfNum) * Surface(SurfNum).Area; } } } @@ -11864,10 +11864,10 @@ namespace SolarShading { using General::InterpSw; using ScheduleManager::GetCurrentScheduleValue; using namespace DataViewFactorInformation; - using DataHeatBalance::InitialDifSolwinAbs; + using DataHeatBalance::SurfWinInitialDifSolwinAbs; using DataHeatBalance::InitialZoneDifSolReflW; - using DataHeatBalSurface::InitialDifSolInAbs; - using DataHeatBalSurface::InitialDifSolInTrans; + using DataHeatBalSurface::SurfOpaqInitialDifSolInAbs; + using DataHeatBalSurface::SurfWinInitialDifSolInTrans; using namespace DataWindowEquivalentLayer; Real64 AbsInt; // Tmp var for Inside surface short-wave absorptance @@ -11916,14 +11916,14 @@ namespace SolarShading { int Lay; // equivalent layer fenestration layer index // Init accumulators for absorbed diffuse solar for all surfaces for later heat balance calcs - InitialDifSolInAbs = 0.0; - InitialDifSolwinAbs = 0.0; + SurfOpaqInitialDifSolInAbs = 0.0; + SurfWinInitialDifSolwinAbs = 0.0; // Init accumulator for total reflected diffuse solar within each zone for interreflection calcs InitialZoneDifSolReflW = 0.0; // Init accumulator for transmitted diffuse solar for all surfaces for reporting - InitialDifSolInTrans = 0.0; + SurfWinInitialDifSolInTrans = 0.0; // Loop over all zones doing initial distribution of diffuse solar to interior heat transfer surfaces for (int enclosureNum = 1; enclosureNum <= DataViewFactorInformation::NumOfRadiantEnclosures; ++enclosureNum) { @@ -12023,7 +12023,7 @@ namespace SolarShading { DifSolarAbs = DifSolarAbsW * per_HTSurfaceArea; // Accumulate absorbed diffuse solar [W/m2] on this surface for heat balance calcs - InitialDifSolInAbs(HeatTransSurfNum) += DifSolarAbs; + SurfOpaqInitialDifSolInAbs(HeatTransSurfNum) += DifSolarAbs; // Reflected diffuse solar [W] = current window transmitted diffuse solar // * view factor from current (sending) window DifTransSurfNum to current (receiving) surface HeatTransSurfNum @@ -12070,7 +12070,7 @@ namespace SolarShading { ZoneDifSolarDistAbsorbedTotl += WinDifSolLayAbsW; // debug // Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs - InitialDifSolwinAbs(IGlass, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; + SurfWinInitialDifSolwinAbs(IGlass, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; } // Calc diffuse solar reflected back to zone @@ -12139,7 +12139,7 @@ namespace SolarShading { ZoneDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] // Accumulate transmitted diffuse solar for reporting - InitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; + SurfWinInitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; } else if (ConstrNumSh != 0 && (ShadeFlag == IntShadeOn || ShadeFlag >= 3)) { // Interior, exterior or between-glass shade, screen or blind in place @@ -12172,7 +12172,7 @@ namespace SolarShading { ZoneDifSolarDistAbsorbedTotl += WinDifSolLayAbsW; // debug // Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs - InitialDifSolwinAbs(IGlass, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; + SurfWinInitialDifSolwinAbs(IGlass, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; } // Next calc diffuse solar reflected back to zone from window with shade or blind on @@ -12225,7 +12225,7 @@ namespace SolarShading { ZoneDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] // Accumulate transmitted diffuse solar for reporting - InitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; + SurfWinInitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; } else if (ShadeFlag == SwitchableGlazing) { // Switchable glazing // Init accumulator for transmittance calc below @@ -12248,7 +12248,7 @@ namespace SolarShading { ZoneDifSolarDistAbsorbedTotl += WinDifSolLayAbsW; // debug // Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs - InitialDifSolwinAbs(IGlass, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; + SurfWinInitialDifSolwinAbs(IGlass, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; } // Calc diffuse solar reflected back to zone @@ -12270,7 +12270,7 @@ namespace SolarShading { ZoneDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] // Accumulate transmitted diffuse solar for reporting - InitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; + SurfWinInitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; } // End of shading flag check @@ -12295,7 +12295,7 @@ namespace SolarShading { ZoneDifSolarDistAbsorbedTotl += WinDifSolLayAbsW; // debug // Accumulate diffuse solar absorbed from the inside by each window layer [W/m2] for heat balance calcs - InitialDifSolwinAbs(Lay, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; + SurfWinInitialDifSolwinAbs(Lay, HeatTransSurfNum) += WinDifSolLayAbsW * per_HTSurfaceArea; // ASHWAT equivalent layer model may require not the individual layer absorption but the flux // InitialDifSolwinEQL(HeatTransSurfNum) = WinDifSolar(DifTransSurfNum)* ViewFactor @@ -12354,7 +12354,7 @@ namespace SolarShading { WinDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] ZoneDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] // Accumulate transmitted diffuse solar for reporting - InitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; + SurfWinInitialDifSolInTrans(HeatTransSurfNum) += DifSolarTransW * per_HTSurfaceArea; } // IF (SurfaceWindow(HeatTransSurfNum)%WindowModelType /= WindowEQLModel) THEN @@ -12449,10 +12449,10 @@ namespace SolarShading { using General::InterpSw; using ScheduleManager::GetCurrentScheduleValue; using namespace DataViewFactorInformation; - using DataHeatBalance::InitialDifSolwinAbs; + using DataHeatBalance::SurfWinInitialDifSolwinAbs; using DataHeatBalance::InitialZoneDifSolReflW; - using DataHeatBalSurface::InitialDifSolInAbs; - using DataHeatBalSurface::InitialDifSolInTrans; + using DataHeatBalSurface::SurfOpaqInitialDifSolInAbs; + using DataHeatBalSurface::SurfWinInitialDifSolInTrans; // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int ConstrNumSh; // Shaded construction number @@ -12563,7 +12563,7 @@ namespace SolarShading { DifSolarAbs = DifSolarAbsW / Surface(HeatTransSurfNum).Area; // Accumulate absorbed diffuse solar [W/m2] on this surface for heat balance calcs - InitialDifSolInAbs(HeatTransSurfNum) += DifSolarAbs; + SurfOpaqInitialDifSolInAbs(HeatTransSurfNum) += DifSolarAbs; // Reflected diffuse solar [W] = current window transmitted diffuse solar // * view factor from current (sending) window IntWinSurfNum to current (receiving) surface HeatTransSurfNum @@ -12606,7 +12606,7 @@ namespace SolarShading { DifSolarAbsW += WinDifSolLayAbsW; // Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs - InitialDifSolwinAbs(IGlass, HeatTransSurfNum) += (WinDifSolLayAbsW / Surface(HeatTransSurfNum).Area); + SurfWinInitialDifSolwinAbs(IGlass, HeatTransSurfNum) += (WinDifSolLayAbsW / Surface(HeatTransSurfNum).Area); } // Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy // WinDifSolarDistAbsorbedTotl += DifSolarAbsW; // debug @@ -12637,7 +12637,7 @@ namespace SolarShading { // ZoneDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] // Accumulate transmitted diffuse solar for reporting - InitialDifSolInTrans(HeatTransSurfNum) += (DifSolarTransW / Surface(HeatTransSurfNum).Area); + SurfWinInitialDifSolInTrans(HeatTransSurfNum) += (DifSolarTransW / Surface(HeatTransSurfNum).Area); //----------------------------------------------------------------------------------- // ADD TRANSMITTED DIFFUSE SOLAR THROUGH INTERIOR WINDOW TO ADJACENT ZONE @@ -12686,7 +12686,7 @@ namespace SolarShading { DifSolarAbsW += WinDifSolLayAbsW; // Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs - InitialDifSolwinAbs(IGlass, HeatTransSurfNum) += (WinDifSolLayAbsW / Surface(HeatTransSurfNum).Area); + SurfWinInitialDifSolwinAbs(IGlass, HeatTransSurfNum) += (WinDifSolLayAbsW / Surface(HeatTransSurfNum).Area); } // Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy // WinDifSolarDistAbsorbedTotl += DifSolarAbsW; // debug @@ -12745,7 +12745,7 @@ namespace SolarShading { // ZoneDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] // Accumulate transmitted diffuse solar for reporting - InitialDifSolInTrans(HeatTransSurfNum) += (DifSolarTransW / Surface(HeatTransSurfNum).Area); + SurfWinInitialDifSolInTrans(HeatTransSurfNum) += (DifSolarTransW / Surface(HeatTransSurfNum).Area); } else if (ShadeFlag == SwitchableGlazing) { // Switchable glazing // Init accumulator for transmittance calc below @@ -12761,7 +12761,7 @@ namespace SolarShading { DifSolarAbsW += WinDifSolLayAbsW; // Accumulate diffuse solar absorbed from the inside by each window glass layer [W/m2] for heat balance calcs - InitialDifSolwinAbs(IGlass, HeatTransSurfNum) += (WinDifSolLayAbsW / Surface(HeatTransSurfNum).Area); + SurfWinInitialDifSolwinAbs(IGlass, HeatTransSurfNum) += (WinDifSolLayAbsW / Surface(HeatTransSurfNum).Area); } // Accumulate Window and Zone total distributed diffuse solar to check for conservation of energy // WinDifSolarDistAbsorbedTotl += DifSolarAbsW; // debug @@ -12787,7 +12787,7 @@ namespace SolarShading { // ZoneDifSolarDistTransmittedTotl += DifSolarTransW; // debug [W] // Accumulate transmitted diffuse solar for reporting - InitialDifSolInTrans(HeatTransSurfNum) += (DifSolarTransW / Surface(HeatTransSurfNum).Area); + SurfWinInitialDifSolInTrans(HeatTransSurfNum) += (DifSolarTransW / Surface(HeatTransSurfNum).Area); } // End of shading flag check diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index 1b4bfb92a10..32b6775005d 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -927,6 +927,7 @@ namespace SurfaceGeometry { BmToBmReflFacObs.dimension(TotSurfaces, 0.0); BmToDiffReflFacObs.dimension(TotSurfaces, 0.0); BmToDiffReflFacGnd.dimension(TotSurfaces, 0.0); + SkyDiffReflFacGnd.dimension(TotSurfaces, 0.0); AWinSurf.dimension(CFSMAXNL + 1, TotSurfaces, 0.0); AWinSurfDiffFront.dimension(CFSMAXNL + 1, TotSurfaces, 0.0); AWinSurfDiffBack.dimension(CFSMAXNL + 1, TotSurfaces, 0.0); diff --git a/src/EnergyPlus/SwimmingPool.cc b/src/EnergyPlus/SwimmingPool.cc index 4b720f65af5..9ae6c68f8a8 100644 --- a/src/EnergyPlus/SwimmingPool.cc +++ b/src/EnergyPlus/SwimmingPool.cc @@ -826,13 +826,13 @@ namespace SwimmingPool { // LW and SW radiation term modification: any "excess" radiation blocked by the cover gets convected // to the air directly and added to the zone air heat balance Real64 LWsum = - (DataHeatBalance::QRadThermInAbs(SurfNum) + DataHeatBalSurface::NetLWRadToSurf(SurfNum) + DataHeatBalFanSys::QHTRadSysSurf(SurfNum) + + (DataHeatBalance::SurfQRadThermInAbs(SurfNum) + DataHeatBalSurface::SurfNetLWRadToSurf(SurfNum) + DataHeatBalFanSys::QHTRadSysSurf(SurfNum) + DataHeatBalFanSys::QHWBaseboardSurf(SurfNum) + DataHeatBalFanSys::QSteamBaseboardSurf(SurfNum) + DataHeatBalFanSys::QElecBaseboardSurf(SurfNum)); // summation of all long-wavelenth radiation going to surface Real64 LWtotal = this->CurCoverLWRadFac * LWsum; // total flux from long-wavelength radiation to surface - Real64 SWtotal = this->CurCoverSWRadFac * DataHeatBalSurface::QRadSWInAbs(SurfNum); // total flux from short-wavelength radiation to surface + Real64 SWtotal = this->CurCoverSWRadFac * DataHeatBalSurface::SurfOpaqQRadSWInAbs(SurfNum); // total flux from short-wavelength radiation to surface this->RadConvertToConvect = - ((1.0 - this->CurCoverLWRadFac) * LWsum) + ((1.0 - this->CurCoverSWRadFac) * DataHeatBalSurface::QRadSWInAbs(SurfNum)); + ((1.0 - this->CurCoverLWRadFac) * LWsum) + ((1.0 - this->CurCoverSWRadFac) * DataHeatBalSurface::SurfOpaqQRadSWInAbs(SurfNum)); // Heat gain from people (assumed to be all convective to pool water) Real64 PeopleGain = diff --git a/src/EnergyPlus/TranspiredCollector.cc b/src/EnergyPlus/TranspiredCollector.cc index 1b63cb792da..5061540159b 100644 --- a/src/EnergyPlus/TranspiredCollector.cc +++ b/src/EnergyPlus/TranspiredCollector.cc @@ -115,7 +115,7 @@ namespace TranspiredCollector { using DataGlobals::DegToRadians; using DataGlobals::KelvinConv; using DataGlobals::SecInHour; - using DataHeatBalance::QRadSWOutIncident; + using DataHeatBalance::SurfQRadSWOutIncident; using DataVectorTypes::Vector; // Data @@ -1115,7 +1115,7 @@ namespace TranspiredCollector { // Isc = sum( QRadSWOutIncident( UTSC( UTSCNum ).SurfPtrs ) * Surface( UTSC( UTSCNum ).SurfPtrs ).Area ) / AreaSum; ////Autodesk:F2C++ Array subscript usage: Replaced by below - Isc = sum_product_sub(QRadSWOutIncident, Surface, &SurfaceData::Area, UTSC(UTSCNum).SurfPtrs) / + Isc = sum_product_sub(SurfQRadSWOutIncident, Surface, &SurfaceData::Area, UTSC(UTSCNum).SurfPtrs) / AreaSum; // Autodesk:F2C++ Functions handle array subscript usage // Tso = sum( TH( UTSC( UTSCNum ).SurfPtrs, 1, 1 ) * Surface( UTSC( UTSCNum ).SurfPtrs ).Area ) / AreaSum; //Autodesk:F2C++ Array // subscript usage: Replaced by below diff --git a/src/EnergyPlus/WindowComplexManager.cc b/src/EnergyPlus/WindowComplexManager.cc index ad4527f790d..ea007c449a0 100644 --- a/src/EnergyPlus/WindowComplexManager.cc +++ b/src/EnergyPlus/WindowComplexManager.cc @@ -3121,13 +3121,13 @@ namespace WindowComplexManager { // direct solar radiation if (CalcCondition == noCondition) { ShadeFlag = SurfWinShadingFlag(SurfNum); - dir = QRadSWOutIncident(SurfNum) + QS(Surface(SurfNum).SolarEnclIndex); // TODO, check , ! + dir = SurfQRadSWOutIncident(SurfNum) + QS(Surface(SurfNum).SolarEnclIndex); // TODO, check , ! // currently using Exterior beam plus diffuse solar incident on surface // plus zone short wave. CHECK // if (dir.ne.0.0d0) then for (IGlass = 1; IGlass <= nlayer; ++IGlass) { // IF (dir > 0.0D0 ) THEN - asol(IGlass) = QRadSWwinAbs(IGlass, SurfNum); + asol(IGlass) = SurfWinQRadSWwinAbs(IGlass, SurfNum); // ELSE // asol(IGLASS) = 0.0D0 // ENDIF @@ -3136,7 +3136,7 @@ namespace WindowComplexManager { // Add contribution of IR from zone internal gains (lights, equipment and people). This is absorbed in zone-side layer and it // is assumed that nothing is transmitted through - asol(nlayer) += QRadThermInAbs(SurfNum); + asol(nlayer) += SurfQRadThermInAbs(SurfNum); presure = OutBaroPress; @@ -3352,7 +3352,7 @@ namespace WindowComplexManager { SurfOutsideTemp = theta(1) - KelvinConv; SurfOutsideEmiss = emis(1); - IncidentSolar = Surface(SurfNum).Area * QRadSWOutIncident(SurfNum); + IncidentSolar = Surface(SurfNum).Area * SurfQRadSWOutIncident(SurfNum); if (ShadeFlag == IntShadeOn || ShadeFlag == IntBlindOn) { // Interior shade or blind ConvHeatFlowNatural = -qv(nlayer) * height * width; @@ -3479,9 +3479,9 @@ namespace WindowComplexManager { } if (SunIsUp) { SurfWinSysSolTransmittance(SurfNum) = - SurfWinTransSolar(SurfNum) / (QRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); - SurfWinSysSolAbsorptance(SurfNum) = (QRadSWwinAbsTot(SurfNum) + SurfWinShadingAbsorbedSolar(SurfNum)) / - (QRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); + SurfWinTransSolar(SurfNum) / (SurfQRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); + SurfWinSysSolAbsorptance(SurfNum) = (SurfWinQRadSWwinAbsTot(SurfNum) + SurfWinShadingAbsorbedSolar(SurfNum)) / + (SurfQRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); SurfWinSysSolReflectance(SurfNum) = 1.0 - SurfWinSysSolTransmittance(SurfNum) - SurfWinSysSolAbsorptance(SurfNum); } else { SurfWinSysSolTransmittance(SurfNum) = 0.0; @@ -3511,8 +3511,8 @@ namespace WindowComplexManager { SurfaceWindow(SurfNum).ThetaFace(2 * k) = theta(2 * k); // temperatures for reporting - FenLaySurfTempFront(k, SurfNum) = theta(2 * k - 1) - KelvinConv; - FenLaySurfTempBack(k, SurfNum) = theta(2 * k) - KelvinConv; + SurfWinFenLaySurfTempFront(k, SurfNum) = theta(2 * k - 1) - KelvinConv; + SurfWinFenLaySurfTempBack(k, SurfNum) = theta(2 * k) - KelvinConv; // thetas(k) = theta(k) } } diff --git a/src/EnergyPlus/WindowEquivalentLayer.cc b/src/EnergyPlus/WindowEquivalentLayer.cc index f387a753ab6..24c6303f14c 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.cc +++ b/src/EnergyPlus/WindowEquivalentLayer.cc @@ -832,7 +832,7 @@ namespace WindowEquivalentLayer { // The IR radiance of this window's "exterior" surround is the IR radiance // from surfaces and high-temp radiant sources in the adjacent zone outir = SurfWinIRfromParentZone(SurfNumAdj) + QHTRadSysSurf(SurfNumAdj) + QCoolingPanelSurf(SurfNumAdj) + - QHWBaseboardSurf(SurfNumAdj) + QSteamBaseboardSurf(SurfNumAdj) + QElecBaseboardSurf(SurfNumAdj) + QRadThermInAbs(SurfNumAdj); + QHWBaseboardSurf(SurfNumAdj) + QSteamBaseboardSurf(SurfNumAdj) + QElecBaseboardSurf(SurfNumAdj) + SurfQRadThermInAbs(SurfNumAdj); } else { // Exterior window (ExtBoundCond = 0) // Calculate LWR from surrounding surfaces if defined for an exterior window @@ -880,11 +880,11 @@ namespace WindowEquivalentLayer { // Indoor mean radiant temperature. // IR incident on window from zone surfaces and high-temp radiant sources rmir = SurfWinIRfromParentZone(SurfNum) + QHTRadSysSurf(SurfNum) + QCoolingPanelSurf(SurfNum) + QHWBaseboardSurf(SurfNum) + - QSteamBaseboardSurf(SurfNum) + QElecBaseboardSurf(SurfNum) + QRadThermInAbs(SurfNum); + QSteamBaseboardSurf(SurfNum) + QElecBaseboardSurf(SurfNum) + SurfQRadThermInAbs(SurfNum); TRMIN = root_4(rmir / StefanBoltzmann); // TODO check model equation. NL = CFS(EQLNum).NL; - QAllSWwinAbs({1, NL + 1}) = QRadSWwinAbs({1, NL + 1}, SurfNum); + QAllSWwinAbs({1, NL + 1}) = SurfWinQRadSWwinAbs({1, NL + 1}, SurfNum); // Solve energy balance(s) for temperature at each node/layer and // heat flux, including components, between each pair of nodes/layers ASHWAT_ThermalCalc(state, CFS(EQLNum), TIN, Tout, HcIn, HcOut, TRMOUT, TRMIN, QAllSWwinAbs({1, NL + 1}), TOL, QOCF, QOCFRoom, T, Q, JF, JB, H); diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index 2b0a87cf547..e3dfe35f87f 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -2055,7 +2055,7 @@ namespace WindowManager { using DataHeatBalSurface::QdotConvOutRepPerArea; using DataHeatBalSurface::QdotRadOutRep; using DataHeatBalSurface::QdotRadOutRepPerArea; - using DataHeatBalSurface::QRadLWOutSrdSurfs; + using DataHeatBalSurface::SurfQRadLWOutSrdSurfs; using DataHeatBalSurface::QRadOutReport; using DataLoopNode::Node; using DataZoneEquipment::ZoneEquipConfig; @@ -2305,14 +2305,14 @@ namespace WindowManager { // absorbed at each face. Assumes equal split between faces of short-wave absorbed in glass layer. for (IGlass = 1; IGlass <= TotGlassLay; ++IGlass) { - state.dataWindowManager->AbsRadGlassFace(2 * IGlass - 1) = QRadSWwinAbs(IGlass, SurfNum) / 2.0; - state.dataWindowManager->AbsRadGlassFace(2 * IGlass) = QRadSWwinAbs(IGlass, SurfNum) / 2.0; + state.dataWindowManager->AbsRadGlassFace(2 * IGlass - 1) = SurfWinQRadSWwinAbs(IGlass, SurfNum) / 2.0; + state.dataWindowManager->AbsRadGlassFace(2 * IGlass) = SurfWinQRadSWwinAbs(IGlass, SurfNum) / 2.0; } // IR from zone internal gains (lights, equipment and people) absorbed on zone-side face // (assumes inside glass layer is opaque to IR, so no contribution to other layers) - state.dataWindowManager->AbsRadGlassFace(2 * TotGlassLay) += QRadThermInAbs(SurfNum); + state.dataWindowManager->AbsRadGlassFace(2 * TotGlassLay) += SurfQRadThermInAbs(SurfNum); // Fill the layer properties needed for the thermal calculation. // For switchable glazing it is assumed that thermal properties, such @@ -2510,7 +2510,7 @@ namespace WindowManager { // Add long-wave radiation from adjacent zone absorbed by glass layer closest to the adjacent zone. - state.dataWindowManager->AbsRadGlassFace(1) += QRadThermInAbs(SurfNumAdj); + state.dataWindowManager->AbsRadGlassFace(1) += SurfQRadThermInAbs(SurfNumAdj); // The IR radiance of this window's "exterior" surround is the IR radiance // from surfaces and high-temp radiant sources in the adjacent zone @@ -2676,7 +2676,7 @@ namespace WindowManager { Real64 const rad_out_sky_per_area = - emiss_sigma_product * AirSkyRadSplit(SurfNum) * surface.ViewFactorSkyIR * (Tsout_4 - pow_4(SkyTempKelvin)); Real64 const rad_out_per_area = rad_out_air_per_area + rad_out_sky_per_area + rad_out_ground_per_area + rad_out_lw_srd_per_area; - QRadLWOutSrdSurfs(SurfNum) = rad_out_lw_srd_per_area; + SurfQRadLWOutSrdSurfs(SurfNum) = rad_out_lw_srd_per_area; QdotRadOutRep(SurfNum) = surface.Area * rad_out_per_area; QdotRadOutRepPerArea(SurfNum) = rad_out_per_area; QRadOutReport(SurfNum) = QdotRadOutRep(SurfNum) * TimeStepZoneSec; @@ -3449,7 +3449,7 @@ namespace WindowManager { // For interior shade, add convective gain from glass/shade gap air flow to zone convective gain; // For all cases, get total window heat gain for reporting. See CalcWinFrameAndDividerTemps for // contribution of frame and divider. - IncidentSolar = Surface(SurfNum).Area * QRadSWOutIncident(SurfNum); + IncidentSolar = Surface(SurfNum).Area * SurfQRadSWOutIncident(SurfNum); if (ShadeFlag == IntShadeOn || ShadeFlag == IntBlindOn) { // Interior shade or blind SurfWinConvHeatFlowNatural(SurfNum) = ConvHeatFlowNatural; @@ -3554,9 +3554,9 @@ namespace WindowManager { } if (SunIsUp) { SurfWinSysSolTransmittance(SurfNum) = - SurfWinTransSolar(SurfNum) / (QRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); - SurfWinSysSolAbsorptance(SurfNum) = (QRadSWwinAbsTot(SurfNum) + SurfWinShadingAbsorbedSolar(SurfNum)) / - (QRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); + SurfWinTransSolar(SurfNum) / (SurfQRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); + SurfWinSysSolAbsorptance(SurfNum) = (SurfWinQRadSWwinAbsTot(SurfNum) + SurfWinShadingAbsorbedSolar(SurfNum)) / + (SurfQRadSWOutIncident(SurfNum) * (Surface(SurfNum).Area + SurfWinDividerArea(SurfNum)) + 0.0001); SurfWinSysSolReflectance(SurfNum) = 1.0 - SurfWinSysSolTransmittance(SurfNum) - SurfWinSysSolAbsorptance(SurfNum); } else { SurfWinSysSolTransmittance(SurfNum) = 0.0; diff --git a/src/EnergyPlus/WindowManagerExteriorThermal.cc b/src/EnergyPlus/WindowManagerExteriorThermal.cc index 3c05d181fd8..95020bcf032 100644 --- a/src/EnergyPlus/WindowManagerExteriorThermal.cc +++ b/src/EnergyPlus/WindowManagerExteriorThermal.cc @@ -231,8 +231,8 @@ namespace WindowManager { SurfaceWindow(SurfNum).ThetaFace(2 * k) = state.dataWindowManager->thetas(2 * k); // temperatures for reporting - FenLaySurfTempFront(k, SurfNum) = state.dataWindowManager->thetas(2 * k - 1) - KelvinConv; - FenLaySurfTempBack(k, SurfNum) = state.dataWindowManager->thetas(2 * k) - KelvinConv; + SurfWinFenLaySurfTempFront(k, SurfNum) = state.dataWindowManager->thetas(2 * k - 1) - KelvinConv; + SurfWinFenLaySurfTempBack(k, SurfNum) = state.dataWindowManager->thetas(2 * k) - KelvinConv; } } @@ -457,9 +457,9 @@ namespace WindowManager { auto swRadiation = surface.getSWIncident(t_SurfNum); if (swRadiation > 0) { - auto absCoeff = QRadSWwinAbs(t_Index, t_SurfNum) / swRadiation; + auto absCoeff = SurfWinQRadSWwinAbs(t_Index, t_SurfNum) / swRadiation; if ((2 * t_Index - 1) == m_TotLay) { - absCoeff += QRadThermInAbs(t_SurfNum) / swRadiation; + absCoeff += SurfQRadThermInAbs(t_SurfNum) / swRadiation; } aSolidLayer->setSolarAbsorptance(absCoeff); diff --git a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc index 1bd78e2ae57..29dccbb3174 100644 --- a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc @@ -75,7 +75,7 @@ TEST_F(EnergyPlusFixture, HeatBalFiniteDiffManager_CalcNodeHeatFluxTest) SurfaceFD(SurfNum).TDT.allocate(numNodes + 1); SurfaceFD(SurfNum).CpDelXRhoS1.allocate(numNodes + 1); SurfaceFD(SurfNum).CpDelXRhoS2.allocate(numNodes + 1); - DataHeatBalSurface::OpaqSurfInsFaceConductionFlux.allocate(1); + DataHeatBalSurface::SurfOpaqInsFaceConductionFlux.allocate(1); DataGlobals::TimeStepZoneSec = 600.0; Real64 expectedResult1(0.0); @@ -85,41 +85,41 @@ TEST_F(EnergyPlusFixture, HeatBalFiniteDiffManager_CalcNodeHeatFluxTest) Real64 expectedResult5(0.0); // Steady-state case - DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum) = 100.0; + DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum) = 100.0; nodeNum = 1; SurfaceFD(SurfNum).TDpriortimestep(nodeNum) = 20.0; SurfaceFD(SurfNum).TDT(nodeNum) = 20.0; SurfaceFD(SurfNum).CpDelXRhoS1(nodeNum) = 1000.0; SurfaceFD(SurfNum).CpDelXRhoS2(nodeNum) = 2000.0; - expectedResult1 = DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum); + expectedResult1 = DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum); nodeNum = 2; SurfaceFD(SurfNum).TDpriortimestep(nodeNum) = 22.0; SurfaceFD(SurfNum).TDT(nodeNum) = 22.0; SurfaceFD(SurfNum).CpDelXRhoS1(nodeNum) = 1000.0; SurfaceFD(SurfNum).CpDelXRhoS2(nodeNum) = 2000.0; - expectedResult2 = DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum); + expectedResult2 = DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum); nodeNum = 3; SurfaceFD(SurfNum).TDpriortimestep(nodeNum) = 23.0; SurfaceFD(SurfNum).TDT(nodeNum) = 23.0; SurfaceFD(SurfNum).CpDelXRhoS1(nodeNum) = 1000.0; SurfaceFD(SurfNum).CpDelXRhoS2(nodeNum) = 2000.0; - expectedResult3 = DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum); + expectedResult3 = DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum); nodeNum = 4; SurfaceFD(SurfNum).TDpriortimestep(nodeNum) = 26.0; SurfaceFD(SurfNum).TDT(nodeNum) = 26.0; SurfaceFD(SurfNum).CpDelXRhoS1(nodeNum) = 1000.0; SurfaceFD(SurfNum).CpDelXRhoS2(nodeNum) = 2000.0; - expectedResult4 = DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum); + expectedResult4 = DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum); nodeNum = 5; SurfaceFD(SurfNum).TDpriortimestep(nodeNum) = 27.0; SurfaceFD(SurfNum).TDT(nodeNum) = 27.0; SurfaceFD(SurfNum).CpDelXRhoS1(nodeNum) = 1000.0; SurfaceFD(SurfNum).CpDelXRhoS2(nodeNum) = 2000.0; - expectedResult5 = DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum); + expectedResult5 = DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum); CalcNodeHeatFlux(SurfNum, numNodes); EXPECT_NEAR(SurfaceFD(SurfNum).QDreport(1), expectedResult1, 0.0001); @@ -138,14 +138,14 @@ TEST_F(EnergyPlusFixture, HeatBalFiniteDiffManager_CalcNodeHeatFluxTest) // Unsteady-state case DataGlobals::TimeStepZoneSec = 600.0; - DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum) = -200.0; + DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum) = -200.0; nodeNum = 5; SurfaceFD(SurfNum).TDpriortimestep(nodeNum) = 27.5; SurfaceFD(SurfNum).TDT(nodeNum) = 27.0; SurfaceFD(SurfNum).CpDelXRhoS1(nodeNum) = 0.0; SurfaceFD(SurfNum).CpDelXRhoS2(nodeNum) = 0.0; - expectedResult5 = DataHeatBalSurface::OpaqSurfInsFaceConductionFlux(SurfNum); + expectedResult5 = DataHeatBalSurface::SurfOpaqInsFaceConductionFlux(SurfNum); nodeNum = 4; SurfaceFD(SurfNum).TDpriortimestep(nodeNum) = 26.0; diff --git a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc index 35b4a9b73dd..56bec7b972d 100644 --- a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc @@ -1987,8 +1987,8 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_UpdateWindowFaceTempsNonBSDFWin) dataConstruction.Construct(2).TotLayers = SurfsForRegWindow; dataConstruction.Construct(3).TotLayers = 1; - FenLaySurfTempFront.dimension(10, DataSurfaces::TotSurfaces, 0.0); - FenLaySurfTempBack.dimension(10, DataSurfaces::TotSurfaces, 0.0); + SurfWinFenLaySurfTempFront.dimension(10, DataSurfaces::TotSurfaces, 0.0); + SurfWinFenLaySurfTempBack.dimension(10, DataSurfaces::TotSurfaces, 0.0); DataHeatBalSurface::TH.dimension(2, Construction::MaxCTFTerms, DataSurfaces::TotSurfaces, 0.0); DataHeatBalSurface::TH(1,1,1) = 21.0; @@ -2003,16 +2003,16 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_UpdateWindowFaceTempsNonBSDFWin) HeatBalanceManager::UpdateWindowFaceTempsNonBSDFWin(); // First surface is NOT a window so these should NOT be set - EXPECT_NEAR(FenLaySurfTempFront(1,1),ZeroResult,0.0001); - EXPECT_NEAR(FenLaySurfTempBack(1,1),ZeroResult,0.0001); + EXPECT_NEAR(SurfWinFenLaySurfTempFront(1,1),ZeroResult,0.0001); + EXPECT_NEAR(SurfWinFenLaySurfTempBack(1,1),ZeroResult,0.0001); // Second surface is a window so these should be set - EXPECT_NEAR(FenLaySurfTempFront(1,2),DataHeatBalSurface::TH(1,1,2),0.0001); - EXPECT_NEAR(FenLaySurfTempBack(SurfsForRegWindow,2),DataHeatBalSurface::TH(2,1,2),0.0001); + EXPECT_NEAR(SurfWinFenLaySurfTempFront(1,2),DataHeatBalSurface::TH(1,1,2),0.0001); + EXPECT_NEAR(SurfWinFenLaySurfTempBack(SurfsForRegWindow,2),DataHeatBalSurface::TH(2,1,2),0.0001); // Third surface is a window but is also a BSDF (complex window) so these should NOT be set - EXPECT_NEAR(FenLaySurfTempFront(1,3),ZeroResult,0.0001); - EXPECT_NEAR(FenLaySurfTempBack(1,3),ZeroResult,0.0001); + EXPECT_NEAR(SurfWinFenLaySurfTempFront(1,3),ZeroResult,0.0001); + EXPECT_NEAR(SurfWinFenLaySurfTempBack(1,3),ZeroResult,0.0001); } diff --git a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc index 587c6d1bf8b..c4e40a1626c 100644 --- a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc @@ -120,16 +120,16 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_CalcOutsideSurfTemp) DataHeatBalSurface::CTFConstOutPart.allocate(SurfNum); DataHeatBalSurface::CTFConstOutPart(SurfNum) = 1.0; - DataHeatBalSurface::QRadSWOutAbs.allocate(SurfNum); - DataHeatBalSurface::QRadSWOutAbs(SurfNum) = 1.0; + DataHeatBalSurface::SurfOpaqQRadSWOutAbs.allocate(SurfNum); + DataHeatBalSurface::SurfOpaqQRadSWOutAbs(SurfNum) = 1.0; DataHeatBalSurface::TempSurfIn.allocate(SurfNum); DataHeatBalSurface::TempSurfIn(SurfNum) = 1.0; - DataHeatBalSurface::QRadSWOutMvIns.allocate(SurfNum); - DataHeatBalSurface::QRadSWOutMvIns(SurfNum) = 1.0; - DataHeatBalSurface::QRadLWOutSrdSurfs.allocate(SurfNum); - DataHeatBalSurface::QRadLWOutSrdSurfs(SurfNum) = 1.0; - DataHeatBalSurface::QAdditionalHeatSourceOutside.allocate(SurfNum); - DataHeatBalSurface::QAdditionalHeatSourceOutside(SurfNum) = 0.0; + DataHeatBalSurface::SurfQRadSWOutMvIns.allocate(SurfNum); + DataHeatBalSurface::SurfQRadSWOutMvIns(SurfNum) = 1.0; + DataHeatBalSurface::SurfQRadLWOutSrdSurfs.allocate(SurfNum); + DataHeatBalSurface::SurfQRadLWOutSrdSurfs(SurfNum) = 1.0; + DataHeatBalSurface::SurfQAdditionalHeatSourceOutside.allocate(SurfNum); + DataHeatBalSurface::SurfQAdditionalHeatSourceOutside(SurfNum) = 0.0; DataHeatBalSurface::TH.allocate(2, 2, 1); DataSurfaces::Surface.allocate(SurfNum); @@ -1919,12 +1919,12 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestSurfPropertySrdSurfLWR) DataHeatBalSurface::HGrdExtSurf(1)); // Test if LWR from surrounding surfaces correctly calculated - EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * 0.6 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)), DataHeatBalSurface::QRadLWOutSrdSurfs(1)); + EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * 0.6 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)), DataHeatBalSurface::SurfQRadLWOutSrdSurfs(1)); EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * (0.3 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)) + 0.3 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv))), - DataHeatBalSurface::QRadLWOutSrdSurfs(2)); - EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * 0.5 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)), DataHeatBalSurface::QRadLWOutSrdSurfs(3)); - EXPECT_DOUBLE_EQ(0.0, DataHeatBalSurface::QRadLWOutSrdSurfs(4)); + DataHeatBalSurface::SurfQRadLWOutSrdSurfs(2)); + EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.9 * 0.5 * (pow_4(25.0 + KelvinConv) - pow_4(20.0 + KelvinConv)), DataHeatBalSurface::SurfQRadLWOutSrdSurfs(3)); + EXPECT_DOUBLE_EQ(0.0, DataHeatBalSurface::SurfQRadLWOutSrdSurfs(4)); } TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_SurfaceCOnstructionIndexTest) @@ -2461,10 +2461,10 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestSurfTempCalcHeatBalanceA // Test Additional Heat Source Calculation CalcHeatBalanceOutsideSurf(state); - EXPECT_EQ(-0.1, DataHeatBalSurface::QAdditionalHeatSourceOutside(1)); + EXPECT_EQ(-0.1, DataHeatBalSurface::SurfQAdditionalHeatSourceOutside(1)); CalcHeatBalanceInsideSurf(state); - EXPECT_EQ(0.1, DataHeatBalSurface::QAdditionalHeatSourceInside(6)); + EXPECT_EQ(0.1, DataHeatBalSurface::SurfQAdditionalHeatSourceInside(6)); DataZoneEquipment::ZoneEquipConfig.deallocate(); DataSizing::ZoneEqSizing.deallocate(); @@ -2569,10 +2569,10 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestInterzoneRadFactorCalc) DataHeatBalance::Zone.allocate(DataGlobals::NumOfZones); DataSurfaces::Surface.allocate(DataSurfaces::TotSurfaces); dataConstruction.Construct.allocate(DataHeatBalance::TotConstructs); - DataHeatBalSurface::VMULT.allocate(DataGlobals::NumOfZones); + DataHeatBalSurface::EnclSolVMULT.allocate(DataGlobals::NumOfZones); dataConstruction.Construct(1).TransDiff = 0.1; - DataHeatBalSurface::VMULT(1) = 1.0; - DataHeatBalSurface::VMULT(2) = 1.0; + DataHeatBalSurface::EnclSolVMULT(1) = 1.0; + DataHeatBalSurface::EnclSolVMULT(2) = 1.0; DataSurfaces::Surface(1).HeatTransSurf = true; DataSurfaces::Surface(1).Construction = 1; @@ -3109,9 +3109,9 @@ TEST_F(EnergyPlusFixture, HeatBalanceSurfaceManager_TestInitHBInterzoneWindow) DataHeatBalance::ZoneBmSolFrIntWinsRep(1) = 10.0; DataEnvironment::SunIsUp = false; InitIntSolarDistribution(); - EXPECT_EQ(0.0, DataHeatBalance::IntBmIncInsSurfIntensRep(1)); + EXPECT_EQ(0.0, DataHeatBalance::SurfIntBmIncInsSurfIntensRep(1)); DataEnvironment::SunIsUp = true; InitIntSolarDistribution(); - EXPECT_NEAR(1.666667, DataHeatBalance::IntBmIncInsSurfIntensRep(1), 0.00001); + EXPECT_NEAR(1.666667, DataHeatBalance::SurfIntBmIncInsSurfIntensRep(1), 0.00001); } } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/ICSCollector.unit.cc b/tst/EnergyPlus/unit/ICSCollector.unit.cc index e61434f35e7..f2fbfa852cd 100644 --- a/tst/EnergyPlus/unit/ICSCollector.unit.cc +++ b/tst/EnergyPlus/unit/ICSCollector.unit.cc @@ -125,8 +125,8 @@ TEST_F(EnergyPlusFixture, ICSSolarCollectorTest_CalcPassiveExteriorBaffleGapTest TH.allocate(NumOfSurf, 1, 2); TH(SurfNum, 1, 1) = 22.0; // allocate solar incident radiation variable data - QRadSWOutIncident.allocate(1); - QRadSWOutIncident(1) = 0.0; + SurfQRadSWOutIncident.allocate(1); + SurfQRadSWOutIncident(1) = 0.0; // set user defined conv. coeff. calculation to false state.dataConvectionCoefficient->GetUserSuppliedConvectionCoeffs = false; @@ -170,5 +170,5 @@ TEST_F(EnergyPlusFixture, ICSSolarCollectorTest_CalcPassiveExteriorBaffleGapTest ExtVentedCavity.deallocate(); Zone.deallocate(); TH.deallocate(); - QRadSWOutIncident.deallocate(); + SurfQRadSWOutIncident.deallocate(); } diff --git a/tst/EnergyPlus/unit/WindowManager.unit.cc b/tst/EnergyPlus/unit/WindowManager.unit.cc index c79a2385a08..bb10b5270f5 100644 --- a/tst/EnergyPlus/unit/WindowManager.unit.cc +++ b/tst/EnergyPlus/unit/WindowManager.unit.cc @@ -551,9 +551,9 @@ TEST_F(EnergyPlusFixture, WindowManager_RefAirTempTest) DataHeatBalFanSys::QHWBaseboardSurf.allocate(3); DataHeatBalFanSys::QSteamBaseboardSurf.allocate(3); DataHeatBalFanSys::QElecBaseboardSurf.allocate(3); - DataHeatBalance::QRadSWwinAbs.allocate(1, 3); - DataHeatBalance::QRadThermInAbs.allocate(3); - DataHeatBalance::QRadSWOutIncident.allocate(3); + DataHeatBalance::SurfWinQRadSWwinAbs.allocate(1, 3); + DataHeatBalance::SurfQRadThermInAbs.allocate(3); + DataHeatBalance::SurfQRadSWOutIncident.allocate(3); DataSurfaces::SurfWinTransSolar.allocate(3); DataHeatBalance::ZoneWinHeatGain.allocate(1); DataHeatBalance::ZoneWinHeatGainRep.allocate(1); @@ -580,13 +580,13 @@ TEST_F(EnergyPlusFixture, WindowManager_RefAirTempTest) DataHeatBalSurface::QdotRadOutRep.allocate(3); DataHeatBalSurface::QdotRadOutRepPerArea.allocate(3); DataHeatBalSurface::QRadOutReport.allocate(3); - DataHeatBalSurface::QRadLWOutSrdSurfs.allocate(3); + DataHeatBalSurface::SurfQRadLWOutSrdSurfs.allocate(3); DataHeatBalSurface::QAirExtReport.allocate(3); DataHeatBalSurface::QHeatEmiReport.allocate(3); - DataHeatBalance::QRadSWOutIncident = 0.0; - DataHeatBalance::QRadSWwinAbs = 0.0; - DataHeatBalance::QRadThermInAbs = 0.0; + DataHeatBalance::SurfQRadSWOutIncident = 0.0; + DataHeatBalance::SurfWinQRadSWwinAbs = 0.0; + DataHeatBalance::SurfQRadThermInAbs = 0.0; DataHeatBalFanSys::QHTRadSysSurf = 0.0; DataHeatBalFanSys::QHWBaseboardSurf = 0.0; @@ -2778,9 +2778,9 @@ TEST_F(EnergyPlusFixture, WindowManager_SrdLWRTest) DataHeatBalFanSys::QHWBaseboardSurf.allocate(3); DataHeatBalFanSys::QSteamBaseboardSurf.allocate(3); DataHeatBalFanSys::QElecBaseboardSurf.allocate(3); - DataHeatBalance::QRadSWwinAbs.allocate(1, 3); - DataHeatBalance::QRadThermInAbs.allocate(3); - DataHeatBalance::QRadSWOutIncident.allocate(3); + DataHeatBalance::SurfWinQRadSWwinAbs.allocate(1, 3); + DataHeatBalance::SurfQRadThermInAbs.allocate(3); + DataHeatBalance::SurfQRadSWOutIncident.allocate(3); DataSurfaces::SurfWinTransSolar.allocate(3); DataHeatBalance::ZoneWinHeatGain.allocate(1); DataHeatBalance::ZoneWinHeatGainRep.allocate(1); @@ -2807,13 +2807,13 @@ TEST_F(EnergyPlusFixture, WindowManager_SrdLWRTest) DataHeatBalSurface::QdotRadOutRep.allocate(3); DataHeatBalSurface::QdotRadOutRepPerArea.allocate(3); DataHeatBalSurface::QRadOutReport.allocate(3); - DataHeatBalSurface::QRadLWOutSrdSurfs.allocate(3); + DataHeatBalSurface::SurfQRadLWOutSrdSurfs.allocate(3); DataHeatBalSurface::QAirExtReport.allocate(3); DataHeatBalSurface::QHeatEmiReport.allocate(3); - DataHeatBalance::QRadSWOutIncident = 0.0; - DataHeatBalance::QRadSWwinAbs = 0.0; - DataHeatBalance::QRadThermInAbs = 0.0; + DataHeatBalance::SurfQRadSWOutIncident = 0.0; + DataHeatBalance::SurfWinQRadSWwinAbs = 0.0; + DataHeatBalance::SurfQRadThermInAbs = 0.0; DataHeatBalFanSys::QHTRadSysSurf = 0.0; DataHeatBalFanSys::QHWBaseboardSurf = 0.0; @@ -2831,7 +2831,7 @@ TEST_F(EnergyPlusFixture, WindowManager_SrdLWRTest) WindowManager::CalcWindowHeatBalance(state, surfNum2, DataHeatBalance::HConvIn(surfNum2), inSurfTemp, outSurfTemp); // Test if LWR from surrounding surfaces correctly calculated - EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.84 * 0.6 * (pow_4(25.0 + KelvinConv) - pow_4(state.dataWindowManager->thetas(1))), DataHeatBalSurface::QRadLWOutSrdSurfs(surfNum2)); + EXPECT_DOUBLE_EQ(StefanBoltzmann * 0.84 * 0.6 * (pow_4(25.0 + KelvinConv) - pow_4(state.dataWindowManager->thetas(1))), DataHeatBalSurface::SurfQRadLWOutSrdSurfs(surfNum2)); EXPECT_NEAR(-24.9342, DataHeatBalSurface::QHeatEmiReport(surfNum2),3); } TEST_F(EnergyPlusFixture, WindowMaterialComplexShadeTest)