-
Notifications
You must be signed in to change notification settings - Fork 394
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
Modify ground surface conduction calculation for Kiva surfaces and ensure conduction heat balance #9269
Conversation
src/EnergyPlus/ThermalComfort.cc
Outdated
if (AverageWithSurface) { | ||
CalcSurfaceWeightedMRT = | ||
0.5 * (state.dataHeatBalSurf->SurfInsideTempHist(1)(SurfNum) + (SumAET / state.dataThermalComforts->ZoneAESum(ZoneNum))); | ||
} else { | ||
CalcSurfaceWeightedMRT = SumAET / state.dataThermalComforts->ZoneAESum(ZoneNum); | ||
} |
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.
How about this:
CalcSurfaceWeightedMRT = SumAET / state.dataThermalComforts->ZoneAESum(ZoneNum);
if (AverageWithSurface) {
CalcSurfaceWeightedMRT = 0.5 * (state.dataHeatBalSurf->SurfInsideTempHist(1)(SurfNum) + CalcSurfaceWeightedMRT
}
src/EnergyPlus/ThermalComfort.cc
Outdated
if (AverageWithSurface) { | ||
CalcSurfaceWeightedMRT = 0.5 * (state.dataHeatBalSurf->SurfInsideTempHist(1)(SurfNum) + state.dataHeatBalFanSys->MAT(ZoneNum)); | ||
} else { | ||
CalcSurfaceWeightedMRT = state.dataHeatBalFanSys->MAT(ZoneNum); | ||
} |
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.
You can do something similar here.
// Inside face conduction calculation for Kiva surfaces | ||
if (surface.HeatTransferAlgorithm == DataSurfaces::HeatTransferModel::Kiva) { | ||
state.dataHeatBalSurf->SurfOpaqInsFaceCondFlux(surfNum) = | ||
-(state.dataHeatBalSurf->SurfQdotConvInPerArea(surfNum) + state.dataHeatBalSurf->SurfQdotRadNetLWInPerArea(surfNum) + | ||
state.dataHeatBalSurf->SurfQdotRadHVACInPerArea(surfNum) + state.dataHeatBal->SurfQdotRadIntGainsInPerArea(surfNum) + | ||
state.dataHeatBalSurf->SurfQdotRadSolarInRepPerArea(surfNum) + state.dataHeatBalSurf->SurfQdotRadLightsInPerArea(surfNum)); | ||
} | ||
|
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.
I think this should happen in UpdateIntermediateSurfaceHeatBalanceResults
. I also think you can use SurfOpaqQRadSWInAbs
instead of SurfQdotRadSolarInRepPerArea + SurfQdotRadLightsInPerArea
.
You also should remove the calculation of SurfOpaqInsFaceCondFlux
for Kiva surfaces in CalcHeatBalanceInsideSurf2
.
src/EnergyPlus/ThermalComfort.cc
Outdated
@@ -2085,7 +2085,7 @@ namespace ThermalComfort { | |||
return CalcAngleFactorMRT; | |||
} | |||
|
|||
Real64 CalcSurfaceWeightedMRT(EnergyPlusData &state, int const ZoneNum, int const SurfNum) | |||
Real64 CalcSurfaceWeightedMRT(EnergyPlusData &state, int const ZoneNum, int const SurfNum, bool AverageWithSurface = true) |
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.
You should modify the purpose description in the comment below to reflect the change here.
@matthew-larson Is this ready for final review? |
Yes, I think this one is ready. |
@nealkruis This branch has conflicts now. An attempt to merge and run unit tests locally shows a couple of unit tests failing. Not sure if it's from incorrect conflict resolution on my part or some other issue. So, leaving this for you to update. |
I merged develop in on this work locally, ran unit tests, and ran regression tests. Unit tests all run and pass, and the regression tests are consistent with the previous runs. I'm good with this going in right away. I'll hold it for 20 minutes or so, then merge unless someone chimes in. |
Pull request overview
Below are the annual conduction energy values showing the original (OLD) CalcSurfaceWeightedMRT calculation for Kiva surfaces and the NEW CalcSurfaceWeightedMRT calculation for Kiva surfaces. The modified calculation leads to a balance in conduction energy and heating/cooling energy within the zone.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.