Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solar and thermal absorptance calculation #8786

Merged
merged 21 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cb6f68c
thermal-absorp
xuanluo113 May 17, 2021
494e098
Merge branch 'surf-hb-struct' of https://github.com/energy-plus/Energ…
xuanluo113 May 20, 2021
e7b0598
Merge branch 'surf-hb-struct' of https://github.com/energy-plus/Energ…
xuanluo113 May 20, 2021
7752eb0
therm absorp
xuanluo113 May 21, 2021
e95cf61
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into sw-…
xuanluo113 May 21, 2021
5a68a65
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into sw-…
xuanluo113 May 22, 2021
a2ee627
Merge branch 'surf-hb-struct' of https://github.com/energy-plus/Energ…
xuanluo113 May 22, 2021
305b88d
skip loop
xuanluo113 May 25, 2021
118b724
Merge branch 'surf-hb-struct' of https://github.com/energy-plus/Energ…
xuanluo113 May 25, 2021
f7ac059
clang
xuanluo113 May 25, 2021
2871430
unit test
xuanluo113 May 25, 2021
12a5303
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into sw-…
xuanluo113 May 25, 2021
6dadeda
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into sw-…
xuanluo113 May 29, 2021
34149d9
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into sw-…
xuanluo113 Jun 7, 2021
3c82041
addressing the comments
xuanluo113 Jun 8, 2021
9b41b52
fix a conditon
xuanluo113 Jun 8, 2021
b253fb5
bypass some checks
xuanluo113 Jun 8, 2021
55cafae
Merge branch 'develop' of https://github.com/NREL/EnergyPlus into sw-…
xuanluo113 Jun 8, 2021
12c4ed8
Merge remote-tracking branch 'remotes/NRELEnergyPlus/develop' into sw…
mjwitte Jun 9, 2021
7129ce3
fix air boundary
xuanluo113 Jun 9, 2021
943bd84
Merge branch 'sw-thermal-absorp' of https://github.com/energy-plus/En…
xuanluo113 Jun 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/EnergyPlus/DataGlobals.hh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ struct DataGlobal : BaseGlobalStruct
bool FinalSizingHVACSizingSimIteration = false; // when doing HVAC sizing Simulation
bool AnyEnergyManagementSystemInModel = false; // true if there is any EMS or Erl in model. otherwise false
bool AnySurfPropOverridesInModel = false; // true if there is any EMS or Erl overriding the surface properties for any surface.
bool AnyConstrOverridesInModel = false; // true if there is any EMS or Erl overriding the surface properties for any surface.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments here need updating to distinguish between these two flags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

bool AnyLocalEnvironmentsInModel = false; // true if there is any local environmental data objected defined in model, otherwise false
bool AnyPlantInModel = false; // true if there are any plant or condenser loops in model, otherwise false
bool AnyIdealCondEntSetPointInModel = false; // true if there is any ideal condenser entering set point manager in model.
Expand Down Expand Up @@ -243,6 +244,7 @@ struct DataGlobal : BaseGlobalStruct
this->RedoSizesHVACSimulation = false;
this->FinalSizingHVACSizingSimIteration = false;
this->AnyEnergyManagementSystemInModel = false;
this->AnyConstrOverridesInModel = false;
this->AnySurfPropOverridesInModel = false;
this->AnyLocalEnvironmentsInModel = false;
this->AnyPlantInModel = false;
Expand Down
18 changes: 10 additions & 8 deletions src/EnergyPlus/DataHeatBalSurface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,16 @@ struct HeatBalSurfData : BaseGlobalStruct
Array1D<bool> SurfMovInsulExtPresent; // True when interior movable insulation is present
Array1D<bool> SurfMovInsulIntPresent; // True when interior movable insulation is present
Array1D<bool> SurfMovInsulIntPresentPrevTS; // True when interior movable insulation was present during the previous time step
Array1D<Real64> SurfMovInsulHExt; // Resistance or "h" value of exterior movable insulation
Array1D<Real64> SurfMovInsulHInt; // Resistance or "h" value of interior movable insulation
Array1D<Real64> SurfAbsSolarExt; // Solar Absorptivity of surface inside face or interior movable insulation if present
Array1D<Real64> SurfAbsThermalExt; // Thermal Absorptivity of surface inside face or interior movable insulation if present
Array1D<Real64> SurfAbsSolarInt; // Solar absorptivity of surface outside face or exterior movable insulation if present
Array1D<Real64> SurfRoughnessExt; // Roughness of surface inside face or interior movable insulation if present
Array1D<Real64> SurfAbsThermalInt; // Thermal absorptivity of surface outside face or exterior movable insulation if present
std::vector<int> SurfMovInsulIndexList;

Array1D<Real64> SurfMovInsulHExt; // Resistance or "h" value of exterior movable insulation
Array1D<Real64> SurfMovInsulHInt; // Resistance or "h" value of interior movable insulation
Array1D<Real64> SurfAbsSolarExt; // Solar Absorptivity of surface inside face or interior movable insulation if present
Array1D<Real64> SurfAbsThermalExt; // Thermal Absorptivity of surface inside face or interior movable insulation if present
Array1D<Real64> SurfAbsSolarInt; // Solar absorptivity of surface outside face or exterior movable insulation if present
Array1D<Real64> SurfRoughnessExt; // Roughness of surface inside face or interior movable insulation if present
Array1D<Real64> SurfAbsThermalInt; // Thermal absorptivity of surface outside face or exterior movable insulation if present
std::vector<int> SurfMovInsulIndexList;
std::vector<int> SurfMovSlatsIndexList;
void clear_state() override
{
this->Zone_has_mixed_HT_models.clear();
Expand Down Expand Up @@ -380,6 +381,7 @@ struct HeatBalSurfData : BaseGlobalStruct
this->SurfAbsThermalInt.deallocate();
this->SurfRoughnessExt.deallocate();
this->SurfMovInsulIndexList.clear();
this->SurfMovSlatsIndexList.clear();
}
};

Expand Down
19 changes: 8 additions & 11 deletions src/EnergyPlus/DataHeatBalance.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2179,13 +2179,11 @@ struct HeatBalanceData : BaseGlobalStruct
// from interior surfaces, and beam entering through interior windows
// (considered diffuse)
// Originally QD, now used only for EnclSolQSDifSol calc for daylighting
Array1D<Real64> EnclSolVMULT; // 1/(Sum Of A Zone's Inside Surfaces Area*Absorptance)
Array1D<Real64> EnclRadQThermalRad; // TOTAL THERMAL RADIATION ADDED TO ZONE or Radiant Enclosure (group of zones)

// todo - the following in absorptance branch
Array1D<Real64> ITABSF; // FRACTION OF THERMAL FLUX ABSORBED (PER UNIT AREA)
Array1D<Real64> TMULT; // TMULT - MULTIPLIER TO COMPUTE 'ITABSF'

Array1D<Real64> EnclSolVMULT; // 1/(Sum Of A Zone's Inside Surfaces Area*Absorptance)
Array1D<Real64> EnclRadQThermalRad; // TOTAL THERMAL RADIATION ADDED TO ZONE or Radiant Enclosure (group of zones)
Array1D<Real64> EnclRadThermAbsMult; // EnclRadThermAbsMult - MULTIPLIER TO COMPUTE 'ITABSF'
Array1D<bool> ZoneSolAbsFirstCalc; // for error message
Array1D<bool> EnclRadReCalc; // Enclosure solar or thermal radiation properties needs to be recalc due to window/shading status change
// todo - the following in absorptance branch
Array2D<Real64> SunlitFracHR; // Hourly fraction of heat transfer surface that is sunlit
Array2D<Real64> CosIncAngHR; // Hourly cosine of beam radiation incidence angle on surface
Expand Down Expand Up @@ -2468,10 +2466,9 @@ struct HeatBalanceData : BaseGlobalStruct
this->EnclSolQDforDaylight.deallocate();
this->EnclSolVMULT.deallocate();
this->EnclRadQThermalRad.deallocate();

this->ITABSF.deallocate();
this->TMULT.deallocate();

this->EnclRadThermAbsMult.deallocate();
this->ZoneSolAbsFirstCalc.deallocate();
this->EnclRadReCalc.deallocate();
this->SunlitFracHR.deallocate();
this->CosIncAngHR.deallocate();
this->SunlitFrac.deallocate();
Expand Down
7 changes: 5 additions & 2 deletions src/EnergyPlus/DataSurfaces.hh
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ namespace DataSurfaces {
std::vector<int> windowShadingControlList; // List of possible window shading controls
bool HasShadeControl; // True if the surface is listed in a WindowShadingControl object
int activeShadedConstruction; // The currently active shaded construction (windows only)
int activeShadedConstructionPrev; // The currently active shaded construction (windows only)
std::vector<int> shadedConstructionList; // List of shaded constructions that correspond with window shading controls (windows only - same
// indexes as windowShadingControlList)
std::vector<int> shadedStormWinConstructionList; // List of shaded constructions with storm window that correspond with window shading
Expand All @@ -668,8 +669,8 @@ namespace DataSurfaces {
HeatTransferAlgorithm(iHeatTransferModel::NotSet), BaseSurf(0), NumSubSurfaces(0), Zone(0), ExtBoundCond(0), ExtSolar(false),
ExtWind(false), ViewFactorGround(0.0), ViewFactorSky(0.0), ViewFactorGroundIR(0.0), ViewFactorSkyIR(0.0), OSCPtr(0), OSCMPtr(0),
MirroredSurf(false), IsShadowing(false), IsShadowPossibleObstruction(false), SchedShadowSurfIndex(0), IsTransparent(false),
SchedMinValue(0.0), activeWindowShadingControl(0), HasShadeControl(false), activeShadedConstruction(0), FrameDivider(0),
Multiplier(1.0), SolarEnclIndex(0), SolarEnclSurfIndex(0), IsAirBoundarySurf(false)
SchedMinValue(0.0), activeWindowShadingControl(0), HasShadeControl(false), activeShadedConstruction(0), activeShadedConstructionPrev(0),
FrameDivider(0), Multiplier(1.0), SolarEnclIndex(0), SolarEnclSurfIndex(0), IsAirBoundarySurf(false)
{
}

Expand Down Expand Up @@ -1199,6 +1200,7 @@ struct SurfacesData : BaseGlobalStruct
bool AnyHeatBalanceInsideSourceTerm = false; // True if any SurfaceProperty:HeatBalanceSourceTerm inside face used
bool AnyHeatBalanceOutsideSourceTerm = false; // True if any SurfaceProperty:HeatBalanceSourceTerm outside face used
bool AnyMovableInsulation = false; // True if any movable insulation presents
bool AnyMovableSlat = false; // True if there are any movable slats for window blinds presented
Array1D_int InsideGlassCondensationFlag; // 1 if innermost glass inside surface temp < zone air dew point; 0 otherwise
Array1D_int InsideFrameCondensationFlag; // 1 if frame inside surface temp < zone air dew point; 0 otherwise
Array1D_int InsideDividerCondensationFlag; // 1 if divider inside surface temp < zone air dew point; 0 otherwise
Expand Down Expand Up @@ -1589,6 +1591,7 @@ struct SurfacesData : BaseGlobalStruct
this->AirflowWindows = false;
this->ShadingTransmittanceVaries = false;
this->AnyMovableInsulation = false;
this->AnyMovableSlat = false;
this->InsideGlassCondensationFlag.deallocate();
this->InsideFrameCondensationFlag.deallocate();
this->InsideDividerCondensationFlag.deallocate();
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/HeatBalanceIntRadExchange.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ namespace HeatBalanceIntRadExchange {
zone_info.Emissivity(ZoneSurfNum) = state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
if (state.dataConstruction->Construct(ConstrNum).TypeIsWindow &&
ANY_INTERIOR_SHADE_BLIND(state.dataSurface->SurfWinShadingFlag(SurfNum))) {
zone_info.Emissivity(ZoneSurfNum) = state.dataHeatBal->ITABSF(SurfNum);
zone_info.Emissivity(ZoneSurfNum) = state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
}
if (state.dataSurface->SurfWinWindowModelType(SurfNum) == WindowEQLModel &&
state.dataWindowEquivLayer->CFS(state.dataConstruction->Construct(ConstrNum).EQLConsPtr).ISControlled) {
Expand Down Expand Up @@ -310,7 +310,7 @@ namespace HeatBalanceIntRadExchange {
// and emiss is used here that is a weighted combination of shade/blind and glass temp and emiss.
} else if (ANY_INTERIOR_SHADE_BLIND(state.dataSurface->SurfWinShadingFlag(SurfNum))) {
SurfaceTempRad[ZoneSurfNum] = state.dataSurface->SurfWinEffInsSurfTemp(SurfNum);
SurfaceEmiss[ZoneSurfNum] = state.dataHeatBal->ITABSF(SurfNum);
SurfaceEmiss[ZoneSurfNum] = state.dataHeatBalSurf->SurfAbsThermalInt(SurfNum);
} else {
SurfaceTempRad[ZoneSurfNum] = SurfaceTemp(SurfNum);
SurfaceEmiss[ZoneSurfNum] = construct.InsideAbsorpThermal;
Expand Down
8 changes: 8 additions & 0 deletions src/EnergyPlus/HeatBalanceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5715,6 +5715,8 @@ namespace HeatBalanceManager {
state.dataHeatBal->EnclSolQDforDaylight.allocate(state.dataGlobal->NumOfZones);
state.dataHeatBal->EnclRadQThermalRad.allocate(state.dataGlobal->NumOfZones);
state.dataHeatBal->ZoneMRT.allocate(state.dataGlobal->NumOfZones);
state.dataHeatBal->EnclRadThermAbsMult.allocate(state.dataGlobal->NumOfZones);
state.dataHeatBal->ZoneSolAbsFirstCalc.allocate(state.dataGlobal->NumOfZones);
for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
state.dataHeatBal->EnclSolDB(zoneNum) = 0.0;
state.dataHeatBal->EnclSolDBSSG(zoneNum) = 0.0;
Expand All @@ -5724,12 +5726,18 @@ namespace HeatBalanceManager {
state.dataHeatBal->EnclSolQDforDaylight(zoneNum) = 0.0;
state.dataHeatBal->EnclRadQThermalRad(zoneNum) = 0.0;
state.dataHeatBal->ZoneMRT(zoneNum) = 0.0;
state.dataHeatBal->EnclRadThermAbsMult(zoneNum) = 0.0;
state.dataHeatBal->ZoneSolAbsFirstCalc(zoneNum) = true;
}
state.dataHeatBal->EnclSolQSWRad.allocate(state.dataViewFactor->NumOfSolarEnclosures);
state.dataHeatBal->EnclSolQSWRadLights.allocate(state.dataViewFactor->NumOfSolarEnclosures);
state.dataHeatBal->EnclSolVMULT.allocate(state.dataViewFactor->NumOfSolarEnclosures);
state.dataHeatBal->EnclRadReCalc.allocate(state.dataViewFactor->NumOfSolarEnclosures);
for (int enclosureNum = 1; enclosureNum <= state.dataViewFactor->NumOfSolarEnclosures; ++enclosureNum) {
state.dataHeatBal->EnclSolQSWRad(enclosureNum) = 0.0;
state.dataHeatBal->EnclSolQSWRadLights(enclosureNum) = 0.0;
state.dataHeatBal->EnclSolVMULT(enclosureNum) = 0.0;
state.dataHeatBal->EnclRadReCalc(enclosureNum) = false;
}
}
void AllocateHeatBalArrays(EnergyPlusData &state)
Expand Down
Loading