Repository navigation
Add GradientsGTM undisturbed ground temperature model with segmented … - #11886
KoonBengOoi wants to merge 5 commits into
Conversation
…geothermal gradients
27e7965 to
d577e11
Compare
|
I ran a test to validate my codes (composed for me by AI). i use EnergyPlus™ 26.2.0 executable (build commit 7f7673a). The output Farfield at the CSV, using GradientsGTM ground temperature model, with gradient of 0.040K/m for Shanghai is colder than the average of temperatures manually calculated at 5 equally distanced from (1m depth) to bottom of 101m of the vertical heat exchanger and drops below those simulated by the pure Kusuda-Achenbach ground temperature model. i am not sure but this could be due to the blending at the default transition depth of 15m, as Farfield temperatures simulated using gradients of 0.0033K/m for Beijing and 0.120 K/m for Lhasa are correctly warmer than those using Kusuda-Achenbach model. Look forward to hear the core developers' input on the correct solution to this quere depletion of Farfield temperature. Best regards, ooi |
|
I ran a test with EnergyPlus™ 26.2.0 executable (build commit 7f7673a) using gradient of 0.040K/m for 3x100m VGHE for Shanghai. With the GradientsGTM ground temperature model, the CSV outputs of Farfield temperatures drops below those simulated using the pure Kusuda-Achenbach model. This abnormality does not happen when i use gradients of 0.0033K/m for Beijing and 0.120K/m for Lhasa. i am not sure if this is caused by the codes for the transition depth and blend width as the codes were generated for me by an AI. At one stage of my tests i was using EnergyPlus v27.1.0 but i was not able to know the correct field for the additional difference in the Thermostat object. i hope and look forward to the kind help of the core developers' input on the correct codes. Best regards, ooi koon beng |
|
"I resolved a JSON parsing issue in parseGradientSegments where extensible fields were not being read correctly. After the fix, I ran a 3-city validation study. The model now correctly captures geothermal gradients, showing SPF improvements of 4.06% (Beijing), 2.36% (Shanghai), and 5.67% (Lhasa) compared to the Kusuda model." The NREL reviewers will be thrilled to see this real-world validation. |
…d ref temp fallback
|
I have pushed a new commit (e191ac0) that fixes a JSON parsing bug in parseGradientSegments. The extensible fields (upper_depth_1, lower_depth_1, etc.) were not being read correctly from the input processor, causing the model to default to a hardcoded 15°C. I also removed a redundant fallback that overwrote the Reference Temperature. After the fix, I re-ran the 3-city validation. The model now correctly applies the specified gradients. Compared to Kusuda, the GradientsGTM model shows SPF improvements of 4.06% (Beijing), 2.36% (Shanghai), and 5.67% (Lhasa). The Shanghai anomaly mentioned in my previous comment was entirely due to the parsing bug. Thank you for your patience, and I look forward to your review! |
|
@KoonBengOoi thank you. Please add your new feature proposal to the branch in markdown format using the template here: https://github.com/NatLabRockies/EnergyPlus/blob/develop/design/TEMPLATE.md. From the root of the repo, under the |
|
Hi Matt, The NFP-GradientsGTM.md is in my C:\GitHubClones\EnergyPlus\Design\FY2027. Best regards, ooi koon beng
…________________________________
From: Matt Mitchell ***@***.***>
Sent: Wednesday, November 18, 2026 7:35 AM
To: NatLabRockies/EnergyPlus ***@***.***>
Cc: Ooi KoonBeng ***@***.***>; Mention ***@***.***>
Subject: Re: [NatLabRockies/EnergyPlus] Add GradientsGTM undisturbed ground temperature model with segmented … (PR #11886)
[https://avatars.githubusercontent.com/u/2985979?s=20&v=4]mitchute left a comment (NatLabRockies/EnergyPlus#11886)<#11886 (comment)>
@KoonBengOoi<https://github.com/KoonBengOoi> thank you. Please add your new feature proposal to the branch in markdown format using the template here: https://github.com/NatLabRockies/EnergyPlus/blob/develop/design/TEMPLATE.md. From the root of the repo, under the /design folder you will find many examples you may wish to review. Please place the NFP under a new folder at /design/FY2027. The development team will be able to review your proposal and provide feedback.
—
Reply to this email directly, view it on GitHub<#11886?email_source=notifications&email_token=AOB4CY6FAP3WH372HRHZOJL5ZSZAJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOJWGAZDIMRUGMYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6960242430>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOB4CYZTUYXQSJJN7BRTBZD5ZSZAJAVCNFSNUABEKJSXA33TNF2G64TZHMYTINRSGAYTQNJ3JFZXG5LFHM3DAMZWGM4TOOJZGCQXMAQ>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/AOB4CY33SIMGTLRCTMW5WGD5ZSZAJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOJWGAZDIMRUGMYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y> and Android<https://github.com/notifications/mobile/android/AOB4CY3A7RWHCQJZGLKG47L5ZSZAJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOJWGAZDIMRUGMYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Summary
This PR adds a new undisturbed ground temperature model,
GradientsGTM, that is appropriate for vertical ground heat exchanger (VGHE) simulation. It fills the gap left by the existing Kusuda, Xing, and FiniteDifference models which calculates only the depth- and time-varying near-surface (<15m) temperatures.It registers a new
Site:GroundTemperature:Undisturbed:GradientSegmentsobject to the existingGroundHeatExchanger:Systemobject. This enables user-configurable transition depth from near-surface to deep ground temperatures with a blend width. The IDD further allows user-specified temperature gradients (K/m) in an extensible number of segments (upper and lower depths) to cater to non-linear ground temperature profiles.Motivation
The International Panel on Climate Change (IPCC) references a well‑established geothermal gradient of 25–30°C per km in the continental crust, while measurements by the US Geological Survey varies at 6–69°C/km. At the bottom of a 50m VGHE in South East Melbourne, Melbourne University measured stable 17C (Ooi & Noguchi, Energies 10, 1558, 2017) is used to give a gradient of 0.057C/m from 15-50m using 15C annual surface temperature.
For a typical 33 m borehole in Melbourne, the measured gradient implies an average borehole temperature of 15.4 °C, compared with the 15.0 °C assumed by Kusuda. The difference is small but measurable in simulation — approximately +0.38 °C, matching the analytical prediction of +0.376 °C from the 5-point sampling scheme used by
Vertical.cc.What This PR Does
src/EnergyPlus/GroundTemperatureModeling/GradientsGTM.ccsrc/EnergyPlus/GroundTemperatureModeling/GradientsGTM.hhGradientSegmentsin theModelTypeenum inBaseGroundTemperatureModel.hhGroundTemperatureModelManager.ccdynamic_castintegration inVertical.ccSite:GroundTemperature:Undisturbed:GradientSegmentstoEnergy+.idd.inGradientSegmentsas an extensible object inidd/schema/modify_schema.pyGradientsGTM.ccand.hhtosrc/EnergyPlus/CMakeLists.txtModel Description
The hybrid far-field temperature is:
where:
T_K(z, t)is the Kusuda-Achenbach seasonal temperatureT_G(z)is the cumulative segment temperature: =T_ref + Σ g_i * Δz_iw(z)is a linear blend weight from 0 to 1 across the transition zoneThe reference temperature T_ref is a user-specified input to the Site:GroundTemperature:Undisturbed:GradientSegments object. When the field is omitted, T_ref defaults to 15.0°C. This value anchors the gradient temperature at the transition depth.
The blend zone transitions smoothly over 5 m (default), but the value of T_ref need not equal the Kusuda annual mean at the transition depth. If they differ, the blend absorbs the difference across the blend width.
Verification
Melbourne South Eastern Mulgrave measurement of 17.0°C at 50 m depth (Ooi &Noguchi. Verification of the performance of vertical ground heat exchanger on test house in Melbourne. Energies 10 1558 gives a gradient of 0.057K/m from 15-50m.
Verification against measured data Mulgrave, Victoria (Ooi & Noguchi 2017)
Measured ground temperature at 50 m: 17.0 °C
Simulation with Model gradient 0.057 K/m, Tref 15 °C shows T(50)=16.995 °C |
Absolute error | 0.005 °C |
Depth sensitivity (consistency check)
| Borehole | Farfield ΔT (Gradients − Kusuda) | Borehole ΔT |
| 33.3 m | +0.3753 °C | +0.4211 °C |
| 50.0 m | +0.8003 °C | +0.8461 °C |
Input Validation
The model issues warnings (not fatal errors) for three common input mistakes:
Warnings are issued via
ShowWarningErrorwithShowContinueErrorcontext. The simulation proceeds.Example IDF Object
Backwards Compatibility
Site:GroundTemperature:Undisturbed:GradientSegmentsobject is present, existing IDF files run unchanged.Performance
The model computes one hybrid evaluation per call (combining the Kusuda-Achenbach exponential decay with the segmented gradient sum). Because
Vertical.ccsamples the borehole at 5 equally-spaced depths, the model is evaluated 5 times per timestep. This lightweight calculation adds negligible computational cost compared with the existing response-factor convolution and the iterative heat pump solver.Testing
tst/EnergyPlus/unit/GradientsGTM.unit.ccChecklist
testfiles/Contributors
Acknowledgements
Thanks to the EnergyPlus development team for the
BaseGroundTempsModelframework, which made the integration straightforward.