Skip to content

Conversation

@Nigusse
Copy link
Contributor

@Nigusse Nigusse commented May 23, 2025

Pull request overview

Description of the purpose of this PR

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@Nigusse Nigusse added the Defect Includes code to repair a defect in EnergyPlus label May 23, 2025
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 23c733d

Regression Summary
  • EIO: 10
  • ESO Big Diffs: 10
  • Table Small Diffs: 4
  • Table Big Diffs: 9
  • ZSZ Big Diffs: 4
  • Table String Diffs: 5
  • MTR Big Diffs: 4
  • ERR: 1

@Nigusse
Copy link
Contributor Author

Nigusse commented May 27, 2025

Defect test file:

SurfacePropGroundSurfaces_LWR_FND.idf.txt

@Nigusse
Copy link
Contributor Author

Nigusse commented May 27, 2025

The following diagrams show the surface temperatures and LWR exchange flux terms of the wall and the roof surface before and after the fix.

January results for a wall before the fix:

image

January results for a wall after the fix:

image

The outside face temperature and the LWR exchange flux values align well between the conduction transfer function (CTF) and the conduction finite difference (FND) heat balance algorithm methods.

@Nigusse
Copy link
Contributor Author

Nigusse commented May 27, 2025

Similarly, the outside face temperature and the LWR exchange flux values align well with the conduction transfer function (CTF) and conduction finite difference (FND) heat balance algorithm methods for a roof.

July results for a roof before the fix:

image

July results for a roof after the fix:

image

Copy link
Contributor Author

@Nigusse Nigusse left a comment

Choose a reason for hiding this comment

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

Expanded LWR exchange with Surrounding surfaces for the Condition Finite Difference Heat Balance Algorithm.

Array1D<Real64> HSkyFD; // Sky Convection Coefficient
Array1D<Real64> HGrndFD; // Ground Convection Coefficient
Array1D<Real64> HAirFD; // Air Convection Coefficient
Array1D<Real64> HSurrFD; // Surrounding Surfaces LWR Exchange Coefficient
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defines an array variable for LWR exchange heat transfer coefficient between an exterior surface and the surrounding surfaces it sees.

if (state.dataSurface->Surface(Surf).SurfHasSurroundingSurfProperty) {
TsurrSurface = state.dataSurface->Surface(Surf).SrdSurfTemp;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sets an average surface temperature of the surrounding surfaces seen by the exterior surface, for use locally.

Real64 const hrad(state.dataMstBal->HAirFD(Surf));
Real64 const hsky(state.dataMstBal->HSkyFD(Surf));
Real64 const hgnd(state.dataMstBal->HGrndFD(Surf));
Real64 const hsurr(state.dataMstBal->HSurrFD(Surf));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defines and sets dimensions of the LWR heat transfer coefficient variable.

Real64 const hsurr(state.dataMstBal->HSurrFD(Surf));
Real64 const Toa(state.dataMstBal->TempOutsideAirFD(Surf));
Real64 const Tgnd(Tgndsurface);
Real64 const Tsurr(TsurrSurface);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sets the average temperature of the surrounding surfaces seen by an exterior surface.

TDT_i = (TDT_p + (QRadSWOutFD + hgnd * Tgnd + (hconvo + hrad) * Toa + hsky * Tsky) * Rlayer) /
(1.0 + (hconvo + hgnd + hrad + hsky) * Rlayer);
TDT_i = (TDT_p + (QRadSWOutFD + hgnd * Tgnd + (hconvo + hrad) * Toa + hsky * Tsky + hsurr * Tsurr) * Rlayer) /
(1.0 + (hconvo + hgnd + hrad + hsky + hsurr) * Rlayer);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adds the constant term (Boundary Condition) to an exterior surface temperature calculation equation that accounts for the effects of the surrounding surfaces' temperature.

state.dataHeatBalSurf->SurfHAirExt(SurfNum) = 0.0;
state.dataHeatBalSurf->SurfHSkyExt(SurfNum) = 0.0;
state.dataHeatBalSurf->SurfHGrdExt(SurfNum) = 0.0;
state.dataHeatBalSurf->SurfHSrdSurfExt(SurfNum) = 0.0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initializes the LWR exchange variable to 0.0.

state.dataHeatBalSurf->SurfHSkyExt(SurfNum) = 0.0;
state.dataHeatBalSurf->SurfHGrdExt(SurfNum) = 0.0;
state.dataHeatBalSurf->SurfQRadLWOutSrdSurfs(SurfNum) = 0.0;
state.dataHeatBalSurf->SurfHSrdSurfExt(SurfNum) = 0.0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initializes the LWR exchange heat transfer coefficient variable to 0.0.

state.dataMstBal->HSkyFD(SurfNum) = state.dataHeatBalSurf->SurfHSkyExt(SurfNum);
state.dataMstBal->HGrndFD(SurfNum) = state.dataHeatBalSurf->SurfHGrdExt(SurfNum);
state.dataMstBal->HAirFD(SurfNum) = state.dataHeatBalSurf->SurfHAirExt(SurfNum);
state.dataMstBal->HSurrFD(SurfNum) = state.dataHeatBalSurf->SurfHSrdSurfExt(SurfNum);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assigns a value to the LWR exchange with the surrounding surface heat transfer coefficient variable for use with the Conduction Finite Difference method.

state.dataMstBal->HSkyFD(SurfNum) = state.dataHeatBalSurf->SurfHSkyExt(SurfNum);
state.dataMstBal->HGrndFD(SurfNum) = state.dataHeatBalSurf->SurfHGrdExt(SurfNum);
state.dataMstBal->HAirFD(SurfNum) = state.dataHeatBalSurf->SurfHAirExt(SurfNum);
state.dataMstBal->HSurrFD(SurfNum) = state.dataHeatBalSurf->SurfHSrdSurfExt(SurfNum);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here

state.dataMstBal->HSkyFD(SurfNum) = state.dataHeatBalSurf->SurfHSkyExt(SurfNum);
state.dataMstBal->HGrndFD(SurfNum) = state.dataHeatBalSurf->SurfHGrdExt(SurfNum);
state.dataMstBal->HAirFD(SurfNum) = state.dataHeatBalSurf->SurfHAirExt(SurfNum);
state.dataMstBal->HSurrFD(SurfNum) = state.dataHeatBalSurf->SurfHSrdSurfExt(SurfNum);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here.

@Nigusse Nigusse added this to the EnergyPlus 25.2 milestone May 27, 2025
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit a872e63

Regression Summary
  • Table Big Diffs: 3

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 98aa961

Regression Summary
  • Table Big Diffs: 3

@nrel-bot-2c
Copy link

@Nigusse @Myoldmopar it has been 34 days since this pull request was last updated.

@Myoldmopar
Copy link
Member

One last pull since the last commit was weeks ago, but this should be good to go in now. Sorry for the delay.

@Myoldmopar
Copy link
Member

The documentation issue is fixed separately, and no reason to do anything else here. Thanks @Nigusse

@Myoldmopar Myoldmopar merged commit 98cc0ed into develop Jul 16, 2025
8 of 9 checks passed
@Myoldmopar Myoldmopar deleted the LWR_Exchange_wSurrSurf_FND_Issue9881 branch July 16, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add exterior surface long-wave exchange with surrounding surfaces to conduction finite difference heat balance algorithms

5 participants