-
Notifications
You must be signed in to change notification settings - Fork 421
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
Surface Outside Face Convection Heat Gain Rate was fixed when rain flag is true & to be altered for OSCM as well #7504
Conversation
…alse when calculates Surface Outside Face Convection Heat Gain Rate and Surface Outside Face Convection Heat Gain Rate per Area
…ode lines with the function
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.
Current code fixes the defect as expected (will retest after changes).
See comments below.
Real64 GetQdotConvOutRep(int SurfNum) | ||
{ | ||
if (IsRain) { | ||
return -Surface(SurfNum).Area * HcExtSurf(SurfNum) * (TH(1, 1, SurfNum) - Surface(SurfNum).OutWetBulbTemp); |
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.
It would be more efficient to leave area out of this, using this function to set QdotConvOutRepPerArea
, then QdotConvOutRep = QdotConvOutRepPerArea * ...Area
@@ -5707,17 +5707,29 @@ namespace HeatBalanceSurfaceManager { | |||
} | |||
|
|||
// fill in reporting values for outside face | |||
QdotConvOutRep(SurfNum) = -Surface(SurfNum).Area * HcExtSurf(SurfNum) * (TH(1, 1, SurfNum) - Surface(SurfNum).OutDryBulbTemp); | |||
|
|||
QdotConvOutRep(SurfNum) = GetQdotConvOutRep(SurfNum); | |||
|
|||
if (Surface(SurfNum).OSCMPtr > 0) { // Optr is set above in this case, use OSCM boundary data | |||
QdotConvOutRepPerArea(SurfNum) = -OSCM(OPtr).HConv * (TH(1, 1, SurfNum) - OSCM(OPtr).TConv); |
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.
It's wrong here that QdotConvOutRepPerArea
is altered for OSCM but not QdotConvOutRep
(not your error but another one here).
I would move this if into the new function as well. Then this area of code becomes 2 lines:
QdotConvOutRepPerArea(SurfNum) = GetQdotConvOutRep(SurfNum);
QdotConvOutRep(SurfNum) = QdotConvOutRepPerArea(SurfNum) * Surface(SurfNum).Area;
Please update the title and description to mention fixing this for OSCM.
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.
@mjwitte Thank you for all the reviews. I will fix these as you suggested.
} else { | ||
return -Surface(SurfNum).Area * HcExtSurf(SurfNum) * (TH(1, 1, SurfNum) - Surface(SurfNum).OutDryBulbTemp); | ||
} | ||
return Real64(); |
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.
Is this line necessary? @Myoldmopar ?
DataEnvironment::IsRain = true; | ||
Real64 ExpectedQconv1 = -58.197 * 1000 * (6.71793958923051 - 6.66143784594778); | ||
|
||
EXPECT_EQ(ExpectedQconv1, GetQdotConvOutRep(1)); |
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.
For Real64 calcs like this, we prefer EXPECT_NEAR
with a small tolerance reasonable for the expected result magnitude: EXPECT_NEAR(ExpectedQconv1, GetQdotConvOutRep(1), 0.01);
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.
@dareumnam Thanks - changes look good. I made one more small change adding const to the SurfNum agrument in the new function. Once CI completes, this will be merged.
} // ...end of DO loop over all surface (actually heat transfer surfaces) | ||
} | ||
|
||
Real64 GetQdotConvOutRepPerArea(int const SurfNum) | ||
{ | ||
int OPtr = Surface(SurfNum).OSCPtr; |
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.
@dareumnam Some integration tests are failing. Here's the problem - this should be .OSCMPtr
.
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.
@mjwitte Oops, thank you for letting me know. I'll fix it and push the branch again.
That's looking much better now - 2 files with small eso diffs. I'll let CI run its course here. |
I am guessing that these ESO diffs are coming from .csv output files that have |
Yep, the diffs are in Surface Outside Face Convection Heat Gain Rate, on the order of e-11 or less. |
Pull request overview
Fixes Surface outside face heat balance reporting is confusing when rain flag is true #6939 reporting for Surface Outside Face Convection (and Per Area) when raining
Also fixes Surface Outside Face Convection when using OtherSideConditionsModel (OSCM), the per Area value was correct and remains unchanged.
HeatBalanceSurfaceManager.cc & HeatBalanceSurfaceManager.hh
Surface Outside Face Convection Heat Gain Rate
calculation uses outdoor wet bulb temp.Surface Outside Face Convection Heat Gain Rate
calculation uses outdoor dry bulb temp.Add a unit test to HeatBalanceSurfaceManager.unit.cc
Expected Diffs:
Output: Variable
ofSurface Outside Face Convection Heat Gain Rate
orSurface Outside Face Convection Heat Gain Rate per Area
&&Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange labelIf structural output changes, add to output rules file and add OutputChange labelIf adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependenciesReviewer
This will not be exhaustively relevant to every PR.
If feature, test running new feature, try creative ways to break itVerify IDF naming conventions and styles, memos and notes and defaultsIf new idf included, locally check the err file and other outputs