You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same surface reference air temperature calculation was found to be done in multiple locations (WindowManager.cc, WindowComplexManager.cc, WindowEquivalentLayer.cc, and ZoneTempPredictorCorrector.cc) after the initial calculation in HeatBalanceSurfaceManager.cc. The results from HeatBalanceSurfaceManager.cc (state.dataHeatBalSurfMgr->RefAirTemp(SurfNum) and state.dataHeatBal->SurfTempEffBulkAir(SurfNum)) should be able to be referenced and used in the other locations without having to redo the calculation over again.
{
auto const SELECT_CASE_var(state.dataSurface->SurfTAirRef(SurfNum));
if (SELECT_CASE_var == ZoneMeanAirTemp) {
state.dataHeatBalSurfMgr->RefAirTemp(SurfNum) = state.dataHeatBalFanSys->MAT(ZoneNum);
state.dataHeatBal->SurfTempEffBulkAir(SurfNum) = state.dataHeatBalFanSys->MAT(ZoneNum); // for reporting surf adjacent air temp
} else if (SELECT_CASE_var == AdjacentAirTemp) {
state.dataHeatBalSurfMgr->RefAirTemp(SurfNum) = state.dataHeatBal->SurfTempEffBulkAir(SurfNum);
} else if (SELECT_CASE_var == ZoneSupplyAirTemp) {
// determine ZoneEquipConfigNum for this zone
int ZoneEquipConfigNum = ZoneNum;
// check whether this zone is a controlled zone or not
if (!state.dataHeatBal->Zone(ZoneNum).IsControlled) {
ShowFatalError(state,
"Zones must be controlled for Ceiling-Diffuser Convection model. No system serves zone " +
state.dataHeatBal->Zone(ZoneNum).Name);
return;
}
// determine supply air conditions
Real64 SumSysMCp = 0.0;
Real64 SumSysMCpT = 0.0;
Real64 const CpAir = Psychrometrics::PsyCpAirFnW(state.dataHeatBalFanSys->ZoneAirHumRat(ZoneNum));
for (int NodeNum = 1; NodeNum <= state.dataZoneEquip->ZoneEquipConfig(ZoneEquipConfigNum).NumInletNodes; ++NodeNum) {
Real64 NodeTemp = state.dataLoopNodes->Node(state.dataZoneEquip->ZoneEquipConfig(ZoneEquipConfigNum).InletNode(NodeNum)).Temp;
Real64 MassFlowRate =
state.dataLoopNodes->Node(state.dataZoneEquip->ZoneEquipConfig(ZoneEquipConfigNum).InletNode(NodeNum)).MassFlowRate;
// Real64 CpAir2 = PsyCpAirFnW(ZoneAirHumRat(ZoneNum), NodeTemp);
SumSysMCp += MassFlowRate * CpAir;
SumSysMCpT += MassFlowRate * CpAir * NodeTemp;
}
// a weighted average of the inlet temperatures.
if (SumSysMCp > 0.0) { // protect div by zero
state.dataHeatBalSurfMgr->RefAirTemp(SurfNum) = SumSysMCpT / SumSysMCp; // BG changed 02-16-2005 to add index (SurfNum)
} else {
state.dataHeatBalSurfMgr->RefAirTemp(SurfNum) = state.dataHeatBalFanSys->MAT(ZoneNum);
}
state.dataHeatBal->SurfTempEffBulkAir(SurfNum) =
state.dataHeatBalSurfMgr->RefAirTemp(SurfNum); // for reporting surf adjacent air temp
} else {
// currently set to mean air temp but should add error warning here
state.dataHeatBalSurfMgr->RefAirTemp(SurfNum) = state.dataHeatBalFanSys->MAT(ZoneNum);
state.dataHeatBal->SurfTempEffBulkAir(SurfNum) = state.dataHeatBalFanSys->MAT(ZoneNum); // for reporting surf adjacent air temp
}
}
Details
Some additional details for this issue (if relevant):
EnergyPlus v9.5
Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Defect file added (list location of defect file here)
Ticket added to Pivotal for defect (development team task)
Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
The text was updated successfully, but these errors were encountered:
There may be a reason for some of these to recalc with updated air temperatures during the system timesteps, just guessing.
For sure the blocks of code for this in CalcHeatBalanceInsideSurf2 and CalcHeatBalanceInsideSurf2CTFOnly can be pulled out into a common function.
Issue overview
The same surface reference air temperature calculation was found to be done in multiple locations (WindowManager.cc, WindowComplexManager.cc, WindowEquivalentLayer.cc, and ZoneTempPredictorCorrector.cc) after the initial calculation in HeatBalanceSurfaceManager.cc. The results from HeatBalanceSurfaceManager.cc (
state.dataHeatBalSurfMgr->RefAirTemp(SurfNum)
andstate.dataHeatBal->SurfTempEffBulkAir(SurfNum)
) should be able to be referenced and used in the other locations without having to redo the calculation over again.Details
Some additional details for this issue (if relevant):
Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
The text was updated successfully, but these errors were encountered: