-
Notifications
You must be signed in to change notification settings - Fork 398
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
More robust internal gain subtotals for UFAD and Displacement Ventilation #10419
Changes from all commits
a488004
5a308d8
a43372e
16fc905
ab9ebcf
1cdf1b1
baa961f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -511,8 +511,6 @@ namespace RoomAir { | |
Real64 TimeStepSys = state.dataHVACGlobal->TimeStepSys; | ||
Real64 TimeStepSysSec = state.dataHVACGlobal->TimeStepSysSec; | ||
|
||
using InternalHeatGains::SumInternalConvectionGainsByTypes; | ||
using InternalHeatGains::SumReturnAirConvectionGainsByTypes; | ||
using Psychrometrics::PsyCpAirFnW; | ||
using Psychrometrics::PsyRhoAirFnPbTdbW; | ||
using ScheduleManager::GetCurrentScheduleValue; | ||
|
@@ -603,27 +601,31 @@ namespace RoomAir { | |
} | ||
} | ||
|
||
ConvGainsOccupiedSubzone = SumInternalConvectionGainsByTypes(state, ZoneNum, IntGainTypesOccupied); | ||
ConvGainsOccupiedSubzone = InternalHeatGains::SumInternalConvectionGainsByTypes(state, ZoneNum, IntGainTypesOccupied); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the namespace fixing. |
||
|
||
ConvGainsOccupiedSubzone += 0.5 * thisZoneHB.SysDepZoneLoadsLagged; | ||
|
||
// Add heat to return air if zonal system (no return air) or cycling system (return air frequently very | ||
// low or zero) | ||
if (zone.NoHeatToReturnAir) { | ||
RetAirGain = SumReturnAirConvectionGainsByTypes(state, ZoneNum, IntGainTypesOccupied); | ||
RetAirGain = InternalHeatGains::SumReturnAirConvectionGainsByTypes(state, ZoneNum, IntGainTypesOccupied); | ||
ConvGainsOccupiedSubzone += RetAirGain; | ||
} | ||
|
||
ConvGainsMixedSubzone = SumInternalConvectionGainsByTypes(state, ZoneNum, IntGainTypesMixedSubzone); | ||
ConvGainsMixedSubzone = InternalHeatGains::SumInternalConvectionGainsByTypes(state, ZoneNum, IntGainTypesMixedSubzone); | ||
ConvGainsMixedSubzone += state.dataHeatBalFanSys->SumConvHTRadSys(ZoneNum) + state.dataHeatBalFanSys->SumConvPool(ZoneNum) + | ||
0.5 * thisZoneHB.SysDepZoneLoadsLagged; | ||
if (zone.NoHeatToReturnAir) { | ||
RetAirGain = SumReturnAirConvectionGainsByTypes(state, ZoneNum, IntGainTypesMixedSubzone); | ||
RetAirGain = InternalHeatGains::SumReturnAirConvectionGainsByTypes(state, ZoneNum, IntGainTypesMixedSubzone); | ||
ConvGainsMixedSubzone += RetAirGain; | ||
} | ||
|
||
ConvGains = ConvGainsOccupiedSubzone + ConvGainsMixedSubzone; | ||
|
||
// Make sure all types of internal gains have been gathered | ||
assert((int)(size(IntGainTypesOccupied) + size(IntGainTypesMixedSubzone) + size(ExcludedIntGainTypes)) == | ||
(int)DataHeatBalance::IntGainType::Num); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, this should be fine. |
||
|
||
//=================== Entering air system temperature and flow==================== | ||
SumSysMCp = 0.0; | ||
SumSysMCpT = 0.0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ namespace RoomAir { | |
|
||
void CalcDispVent3Node(EnergyPlusData &state, int ZoneNum); // Which Zonenum | ||
|
||
static constexpr std::array<DataHeatBalance::IntGainType, 31> IntGainTypesOccupied = { | ||
static constexpr std::array<DataHeatBalance::IntGainType, 51> IntGainTypesOccupied = { | ||
DataHeatBalance::IntGainType::People, | ||
DataHeatBalance::IntGainType::WaterHeaterMixed, | ||
DataHeatBalance::IntGainType::WaterHeaterStratified, | ||
|
@@ -109,11 +109,36 @@ namespace RoomAir { | |
DataHeatBalance::IntGainType::RefrigerationSystemSuctionPipe, | ||
DataHeatBalance::IntGainType::RefrigerationSecondaryReceiver, | ||
DataHeatBalance::IntGainType::RefrigerationSecondaryPipe, | ||
DataHeatBalance::IntGainType::RefrigerationWalkIn}; | ||
DataHeatBalance::IntGainType::RefrigerationWalkIn, | ||
DataHeatBalance::IntGainType::RefrigerationTransSysAirCooledGasCooler, | ||
DataHeatBalance::IntGainType::RefrigerationTransSysSuctionPipeMT, | ||
DataHeatBalance::IntGainType::RefrigerationTransSysSuctionPipeLT, | ||
DataHeatBalance::IntGainType::Pump_VarSpeed, | ||
DataHeatBalance::IntGainType::Pump_ConSpeed, | ||
DataHeatBalance::IntGainType::Pump_Cond, | ||
DataHeatBalance::IntGainType::PumpBank_VarSpeed, | ||
DataHeatBalance::IntGainType::PumpBank_ConSpeed, | ||
DataHeatBalance::IntGainType::PlantComponentUserDefined, | ||
DataHeatBalance::IntGainType::CoilUserDefined, | ||
DataHeatBalance::IntGainType::ZoneHVACForcedAirUserDefined, | ||
DataHeatBalance::IntGainType::AirTerminalUserDefined, | ||
DataHeatBalance::IntGainType::PackagedTESCoilTank, | ||
DataHeatBalance::IntGainType::SecCoolingDXCoilSingleSpeed, | ||
DataHeatBalance::IntGainType::SecHeatingDXCoilSingleSpeed, | ||
DataHeatBalance::IntGainType::SecCoolingDXCoilTwoSpeed, | ||
DataHeatBalance::IntGainType::SecCoolingDXCoilMultiSpeed, | ||
DataHeatBalance::IntGainType::SecHeatingDXCoilMultiSpeed, | ||
DataHeatBalance::IntGainType::ElectricLoadCenterConverter, | ||
DataHeatBalance::IntGainType::FanSystemModel}; | ||
Comment on lines
+113
to
+132
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm, seems like these end use types should be included in the occupied zone convective gains rather than be ignored? But maybe I don't understand the intent here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?? I'll accept it as is if everything is running fine, but open to comments/follow-up changes. |
||
|
||
static constexpr std::array<DataHeatBalance::IntGainType, 2> IntGainTypesMixedSubzone = {DataHeatBalance::IntGainType::DaylightingDeviceTubular, | ||
DataHeatBalance::IntGainType::Lights}; | ||
|
||
// Explicitly list internal gains not applicable for Displacement Vent | ||
static constexpr std::array<DataHeatBalance::IntGainType, 2> ExcludedIntGainTypes = { | ||
DataHeatBalance::IntGainType::ZoneContaminantSourceAndSinkCarbonDioxide, | ||
DataHeatBalance::IntGainType::ZoneContaminantSourceAndSinkGenericContam}; | ||
|
||
} // namespace RoomAir | ||
|
||
struct DisplacementVentMgrData : BaseGlobalStruct | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,12 +126,10 @@ void SetupSpaceInternalGain(EnergyPlusData &state, | |
|
||
auto &thisIntGain = state.dataHeatBal->spaceIntGainDevices(spaceNum); | ||
for (int IntGainsNum = 1; IntGainsNum <= thisIntGain.numberOfDevices; ++IntGainsNum) { | ||
if ((thisIntGain.device(IntGainsNum).CompObjectType == DataHeatBalance::IntGainTypeNamesUC[static_cast<int>(IntGainCompType)]) && | ||
(thisIntGain.device(IntGainsNum).CompType == IntGainCompType)) { | ||
if (thisIntGain.device(IntGainsNum).CompObjectName == UpperCaseObjectName) { | ||
FoundDuplicate = true; | ||
break; | ||
} | ||
if ((thisIntGain.device(IntGainsNum).CompType == IntGainCompType) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! |
||
(thisIntGain.device(IntGainsNum).CompObjectName == UpperCaseObjectName)) { | ||
FoundDuplicate = true; | ||
break; | ||
} | ||
} | ||
|
||
|
@@ -154,7 +152,6 @@ void SetupSpaceInternalGain(EnergyPlusData &state, | |
} | ||
++thisIntGain.numberOfDevices; | ||
|
||
thisIntGain.device(thisIntGain.numberOfDevices).CompObjectType = DataHeatBalance::IntGainTypeNamesUC[static_cast<int>(IntGainCompType)]; | ||
thisIntGain.device(thisIntGain.numberOfDevices).CompObjectName = UpperCaseObjectName; | ||
thisIntGain.device(thisIntGain.numberOfDevices).CompType = IntGainCompType; | ||
thisIntGain.device(thisIntGain.numberOfDevices).spaceGainFrac = spaceGainFraction; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, shouldn't need to hang on to these type strings.