Skip to content
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

GHE g-function calculation enhancements #8708

Merged
merged 106 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from 97 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
c127355
Add new feature proposal draft for cpgfunction
Apr 9, 2021
e042488
Refactor NFP mark sample IDF and IDD changes
Apr 10, 2021
a80388a
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Apr 15, 2021
9ef0dc9
Merge remote-tracking branch 'origin/develop' into 6651_cpgfunction_t…
Jun 9, 2021
327bd8b
Merge branch '6651_cpgfunction_thirdparty' of https://github.com/j-c-…
Jun 9, 2021
6ca1152
Merge remote-tracking branch 'upstream/develop' into 6651_cpgfunction…
Jun 9, 2021
49df1a0
Append design documentation to NFP
Jun 9, 2021
30160c1
Document IDD snippets with the diff language marker
Jun 9, 2021
72b63cd
Add diff as markdown language for IDD snippets
Jun 9, 2021
69b797d
Refactor diff Documentation placements
Jun 9, 2021
9b082d9
Document the design document in regards to dependencies
Jun 29, 2021
a416e1a
Modify design document to reflect outlook
Jul 2, 2021
40af248
Update design document to reflect current outlook
Jul 2, 2021
8c9f71a
Refactor design document to only include "bottom line up front"
Jul 2, 2021
063c86c
Add in links to design document
Jul 2, 2021
afa9878
Merge branch 'develop' into 6651_cpgfunction_thirdparty
Jul 8, 2021
a795a7e
Add cpgfunctionEP-0.1 to the third_party folder
Jul 8, 2021
a6779b7
Add cpgfunctionEP subdirectory to E+ CMakeLists for third party
Jul 12, 2021
772f055
Comment out cpgfunctionEP tests temporarily
Jul 12, 2021
58e74a3
Modify GHE.unit.cc GHE:System object for new field
Jul 12, 2021
28257f8
Add copy of GSHPSimgple-GLHE.idf file
Jul 12, 2021
f5e1534
Modify GLHE idf file (copy) to call UBHWT calc
Jul 12, 2021
0537d0d
Add GHE:CalculationModel name paragraph to IO tex
Jul 13, 2021
d958866
Add gFunctionCalcModelName field to IDF listings
Jul 13, 2021
b6eddfd
Add TODO note in EngrRef for docs location
Jul 13, 2021
e2d4830
Add TODO note again
Jul 13, 2021
e8f92b6
Add IDD modifications (memo and A7)
Jul 13, 2021
ebd9590
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Jul 15, 2021
ac62527
Merge branch '6651_cpgfunction_thirdparty' of github.com:j-c-cook/Ene…
mitchute Jul 15, 2021
81c566f
Revert "Add IDD modifications (memo and A7)"
mitchute Jul 15, 2021
912f575
modify ghe inputs for new calc options, add cpgfunction build to alt-…
mitchute Jul 15, 2021
1b23a79
Remove cpgfunctionEP-v0.1
Jul 20, 2021
7d73957
Add cpgfunction-v0.2
Jul 20, 2021
9b1c79f
Merge branch '6651_cpgfunction_thirdparty' of https://github.com/j-c-…
Jul 20, 2021
8140303
integrate new cpgfunction version into E+ which is now generating gfu…
mitchute Jul 21, 2021
dd8bff1
Merge branch 'develop' into 6651_cpgfunction_thirdparty
Jul 21, 2021
4bfc8e5
Increment cpgfunctionEP to version 0.3
Jul 21, 2021
b096148
Modify third party cmakelists to reference cpg0.3
Jul 21, 2021
6f4cca6
Remove unnecessary find Eigen library linker cmake
Jul 21, 2021
d1691cb
Make eigen available for cpgfunctionEP in cmakelists
Jul 21, 2021
b8dfbdc
Add Spitler's first version of engr ref
Jul 22, 2021
341e04b
integrate latest cpgfunction update, update ghe code to properly swit…
mitchute Jul 22, 2021
b2c2902
Merge branch '6651_cpgfunction_thirdparty' of https://github.com/j-c-…
Jul 22, 2021
08100b7
Add adaptively discretized number of segments
Jul 22, 2021
56563a5
Reformat ghe.cc to pass clang-format test
Jul 22, 2021
490aafd
Reformat ghe.cc (again) topass clang format check
Jul 22, 2021
f4075b1
Fix call to adaptive discretization (clang-tidy)
Jul 22, 2021
09d9fb9
Document heat-exchangers.tex about segments
Jul 22, 2021
cf29f98
Document heat-exchangers.tex with new references
Jul 22, 2021
ccc2704
Documentation of ghe
Jul 23, 2021
8726a2e
Modify g-function all UBHWTCalc->UBHWTcalc
Jul 23, 2021
2e9cf84
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Jul 26, 2021
6d36419
add unit test, correct incorrect key in example file, add new methods…
mitchute Jul 26, 2021
84e6826
clang-format
mitchute Jul 26, 2021
a6ce1e4
Add new cpgfunctionEP files
Jul 27, 2021
65c3f0c
Bump cpgfunctionEP to next version
Jul 27, 2021
87c50be
Modify main cmakelists to reference new version
Jul 27, 2021
4a22361
Modify third party cmakelists for new version
Jul 27, 2021
c2a539c
Modify time declaration in E+ for call to cpgEP
Jul 27, 2021
5101b97
Merge branch '6651_cpgfunction_thirdparty' of https://github.com/j-c-…
Jul 27, 2021
397d2e9
Merge branch '6651_cpgfunction_thirdparty' of github.com:j-c-cook/Ene…
mitchute Jul 27, 2021
f5c0722
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Jul 27, 2021
7c16983
Revert "Modify time declaration in E+ for call to cpgEP"
Jul 27, 2021
a36f822
Bump cpgfunctionEP to 0.3.2
Jul 27, 2021
329bc2b
Rename cpgfunctionEP-0.3.1->cpgfunctionEP-0.3.2
Jul 27, 2021
54a4be3
Bump cpgfunction references in cmakelists
Jul 27, 2021
b4f6d93
Merge branch '6651_cpgfunction_thirdparty' of github.com:j-c-cook/Ene…
mitchute Jul 27, 2021
7c50a44
update unit test
mitchute Jul 27, 2021
049bd2e
update docs
mitchute Jul 27, 2021
63476cb
update docs
mitchute Jul 27, 2021
5e1ae38
cleanup eol null chars to eliminate build warnings
mitchute Jul 27, 2021
6fc55ff
remove old build flag
mitchute Jul 27, 2021
5aa5359
Remove Cimmino's references to create diff
Jul 28, 2021
1b36e77
Add Cimmino's references as plain text
Jul 28, 2021
4a1dd8b
Remove CONTRIBUTING.md file
Jul 28, 2021
c3e106e
Remove uneccessary hidden . files from eigen
Jul 28, 2021
ced1bba
Remove .gitignore file from qdt
Jul 28, 2021
b58edcd
Merge branch '6651_cpgfunction_thirdparty' of https://github.com/j-c-…
Jul 28, 2021
b68c587
Fix double qoute issue in Cimmino's references
Jul 28, 2021
699ac1a
Bump cpgfunctionEP folder name to 0.4
Jul 31, 2021
a7f66c0
Bump cpgfunctionEP files to 0.4
Jul 31, 2021
0264cd9
Remove local copy of Eigen library
Jul 31, 2021
68261e1
Make EP cmake link to bumped cpgfunctionEP folder
Jul 31, 2021
4e4c466
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Aug 6, 2021
2056245
Merge branch '6651_cpgfunction_thirdparty' of github.com:j-c-cook/Ene…
mitchute Aug 6, 2021
872260e
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Aug 6, 2021
f6365b4
Merge remote-tracking branch 'upstream/develop' into 6651_cpgfunction…
Myoldmopar Aug 16, 2021
518286a
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Aug 16, 2021
33a28cd
Bump Eigen library to 3.3.9
Aug 16, 2021
b5b304c
Bump cpgfunctionEP to 0.4.1
Aug 16, 2021
32c6dac
Make cmake files link to cpgEP-0.4.1
Aug 16, 2021
ec0190a
Merge branch '6651_cpgfunction_thirdparty' of github.com:j-c-cook/Ene…
mitchute Aug 17, 2021
378a254
add -j CLI option and wire it up to the cpgfunction code. add notes a…
mitchute Aug 17, 2021
326a8e7
Revert "Bump Eigen library to 3.3.9"
Aug 17, 2021
816e4ed
Bump cpgfunctionEP to 0.5
Aug 17, 2021
6440e9d
Make EP's cmake point to cpgfunction-v0.5
Aug 17, 2021
f5bfa7f
Merge branch '6651_cpgfunction_thirdparty' of https://github.com/j-c-…
Aug 17, 2021
376c7f9
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Aug 18, 2021
aa6b665
Merge branch '6651_cpgfunction_thirdparty' of github.com:j-c-cook/Ene…
Myoldmopar Aug 18, 2021
05668db
Merge remote-tracking branch 'upstream/develop' into 6651_cpgfunction…
Myoldmopar Aug 18, 2021
22f3445
Add clarification in cli usage
Myoldmopar Aug 18, 2021
4d0e9a2
Merge branch 'develop' into 6651_cpgfunction_thirdparty
mitchute Aug 19, 2021
b7ff75b
add ghe transition rules
mitchute Aug 19, 2021
fed355b
Merge branch '6651_cpgfunction_thirdparty' of github.com:j-c-cook/Ene…
Myoldmopar Aug 19, 2021
f8caacd
Merge remote-tracking branch 'upstream/develop' into 6651_cpgfunction…
Myoldmopar Aug 19, 2021
4c9f832
Address Windows build warnings
Myoldmopar Aug 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ target_include_directories(project_options SYSTEM INTERFACE "${kiva_SOURCE_DIR}/
add_subdirectory(scripts/dev/generate_embeddable_epJSON_schema)
set_target_properties(generate_embeddedable_epJSON_schema PROPERTIES FOLDER "Internal")

target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP-0.5)
target_include_directories(project_options INTERFACE ${PROJECT_SOURCE_DIR}/third_party/cpgfunctionEP-0.5/include)

if(OPENGL_FOUND)
set(BUILD_PENUMBRA_TESTING
OFF
Expand Down
444 changes: 444 additions & 0 deletions design/FY2021/NFP-Fast_gFunc_Calc_cpgfunction.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,11 @@ \subsubsection{Long Time-Step Response Factors}\label{long-time-step-response-fa

The \emph{g}-functions developed by Eskilson are given only down to values of $\ln t/t_s = -4.5$, which for typical system and soil types can be on the order of 100 days. The values can be extended by the applying a line source model down to a time of $t = 5r_b^2/\alpha$. This time varies from 3-6 hours for a typical borehole field. This is because the analytical line source model, based on which the Eskilson model was developed, does not give a prompt increase in borehole wall temperature at \(r = {r_b}\) . It gives acceptable results only after the non-dimensional times of \(\alpha t/r_b^2 > 5\). But to model short time responses of a borehole we need response factors which can give accurate results down to minutes.

In order to generate the long time-step response factors on the fly, EnergyPlus uses the model developed by Marcotte \& Pasquier(2009) which uses a discretized line source model. The \emph{g}-functions are generated using the following equation. The boreholes are discretized into segments. The temperature response of each segment on all other segments is then used to determine response factor for that particular geometry. The model estimates surface effects by creating ``imaginary" boreholes which are mirrored about the ground surface.
In order to generate the long time-step response functions on the fly, EnergyPlus has two different models that make two different approximations for the calculation of the response functions. The first model uses uniform heat flux boundary conditions (UHFcalc model) – that is, it assumes that all boreholes have the same uniform heat flux. The heat flux may vary over time, but it is always uniform throughout the field. The second model uses uniform borehole wall temperatures (UBHWTcalc model) – the heat flux will vary between boreholes and vary vertically for each borehole.
j-c-cook marked this conversation as resolved.
Show resolved Hide resolved

Calculation of \emph{g}-functions with uniform heat flux boundary conditions is simpler, but accuracy can decrease as the borehole-to-borehole interference increases. Consider a case with a large rectangular borefield, say 9x16 boreholes – if there is a significant annual imbalance in the heat rejection/heat extraction, the interior of the field will become thermally saturated, and the heat flux in the interior of the field will decrease over time. See Spitler, et al. (2020) for an illustration. The accuracy of using this approximation is discussed by Malayappan and Spitler (2013) with application to sizing of ground heat exchangers. As shown there, use of the UHFcalc model tends to overpredict the long-term temperature change for fields with significant borehole-to-borehole interference and significant annual heat rejection/heat extraction. In general, the UBHWTcalc model can be recommended for all applications, even though for a smaller numbers of boreholes the UHFcalc model offers sufficient accuracy.
j-c-cook marked this conversation as resolved.
Show resolved Hide resolved

For the UHFcalc model, EnergyPlus builds the model developed by Marcotte \& Pasquier(2009) which uses a discretized line source model. The \emph{g}-functions are generated using the following equation. The boreholes are discretized into segments. The temperature response of each segment on all other segments is then used to determine response factor for that particular geometry. The model estimates surface effects by creating ``imaginary" boreholes which are mirrored about the ground surface.

\begin{equation}
g = \frac{1}{2 H_T} \sum_{i=1}^N \sum_{j=1}^N \left( \int_{u_1^i}^{u_2^i} \int_{u_1^i}^{u_2^i} \frac{erfc\left( \frac{d(u_i, u_j)}{2\sqrt{\alpha t}}\right)}{d(u_i, u_j)} - \frac{erfc\left( \frac{d(u_i, u_j^{'})}{2\sqrt{\alpha t}}\right)}{d(u_i, u_j^{'})}\right)
Expand All @@ -953,6 +957,11 @@ \subsubsection{Long Time-Step Response Factors}\label{long-time-step-response-fa

\(d(u_i, u_j^{'})\) is the distance between current point and point on other imaginary borehole.

For the UBHWTcalc model, EnergyPlus builds on the model developed by Cimmino (2018a, 2018b, 2019), with improvements (Cook and Spitler 2021) to reduce memory consumption and increase speed. The general approach is similar to that of the UHFcalc model, but the heat flux is adjusted for each segment to enforce the uniform borehole wall temperature model. Additionally, the methodology of Cimmino (UBHWTcalc) is a semi-analytical solution, so the solution is dependent on the number of segments used. The number of segments are adaptively discretized to approximate a uniform inlet fluid temperature (UIFT) \emph{g}-function.
j-c-cook marked this conversation as resolved.
Show resolved Hide resolved

Cimmino (2015) introduced a UIFT \emph{g}-function calculation that most closely matches physical reality. As boreholes are usually plumbed in parallel, the entering fluid temperatures are approximately uniform, and the actual distribution of heat within the field then depends on both the heat transfer outside the borehole and the heat transfer within the borehole. Thus, the g-function calculated with the UIFT boundary conditions depends on the flow rate and borehole thermal resistance in addition to the geometric configuration of the boreholes. Like, the UBHWT \emph{g}-function calculation, the UIFT calculation also depends on the number of segments used – as the number of segments used increases, the solution converges.

So, though it’s possible to find a converged solution for the UIFT \emph{g}-function, it strictly speaking only applies when the borehole thermal resistance and flow rate remain fixed. Both commonly change during the system operation, as changing fluid temperatures affect the fluid properties. Therefore, the UIFT solution might be thought of as having a range of g-functions that change slightly with time. Therefore, in much the same way that radiation heat transfer within a zone is modeled with simplified methods because the occupants are likely to move the furniture, the UBHWT calculation can be used as a reasonable approximation to the UIFT calculation. As shown by Spitler, et al. (2020) the UIFT \emph{g}-function can closely match the UIFT \emph{g}-function, with considerably fewer segments. The number of segments required to closely approximate the UIFT \emph{g}-function varies with the number of boreholes and the borehole depth. Therefore, the UBHWT model uses an adaptive discretization algorithm that uses a smaller number of segments than the UIFT calculation. This provides excellent accuracy while requiring less computational time and memory.

\subsubsection{Short Time-Step Response Factors}\label{short-time-step-response-factors}

Expand Down Expand Up @@ -1129,15 +1138,57 @@ \subsubsection{Summary of Variable Short Time Step Response Factor Model}\label{

\subsubsection{References}\label{references-2-006}

Eskilson, P. 1987. Thermal Analysis of Heat Extraction Boreholes. Ph.D.~Thesis, Department of Mathematical Physics, University of Lund, Lund, Sweden.
j-c-cook marked this conversation as resolved.
Show resolved Hide resolved
\hangindent=2em
\hangafter=1
\noindent Claesson, J., G. Helstr{\"o}m. 2011. Multipole method to calculate borehole thermal resistances in a borehole heat exchanger. HVAC\&R Research. 17(6), 895-911.

\hangindent=2em
\hangafter=1
\noindent Cook, J. C. and J. D. Spitler. 2021. Faster computation of g-functions used for modeling of ground heat exchangers with reduced memory consumption. Building Simulation 2021. Bruges, Belgium, IBPSA.

\hangindent=2em
\hangafter=1
\noindent Cimmino, M. (2015).``The effects of borehole thermal resistances and fluid flow rate on the g-functions of geo-thermal bore fields." International Journal of Heat and Mass Transfer 91: 1119-1127.

\hangindent=2em
\hangafter=1
\noindent Cimmino, M. 2018a. ``Fast calculation of the g-functions of geothermal borehole fields using similarities in the evaluation of the finite line source solution." Journal of Building Performance Simulation 11(6): 655-668.

\hangindent=2em
\hangafter=1
\noindent Cimmino, M. 2018b. pygfunction: an open-source toolbox for the evaluation of thermal. eSim 2018, Montreál, IBPSA Canada.

\hangindent=2em
\hangafter=1
\noindent Cimmino, M. 2019. ``Semi-Analytical Method for g-Function Calculation of bore fields with series- and parallel-connected boreholes." Science and Technology for the Built Environment 25(8): 1007-1022.

\hangindent=2em
\hangafter=1
\noindent Eskilson, P. 1987. Thermal Analysis of Heat Extraction Boreholes. Ph.D.~Thesis, Department of Mathematical Physics, University of Lund, Lund, Sweden.

\hangindent=2em
\hangafter=1
\noindent Malayappan, V. and J. D. Spitler. 2013. Limitations of Using Uniform Heat Flux Assumptions in Sizing Vertical Borehole Heat Exchanger Fields. Clima 2013. Prague (Czech Republic).

\hangindent=2em
\hangafter=1
\noindent Spitler, J. D., J. C. Cook and X. Liu. 2020. A Preliminary Investigation on the Cost Reduction Potential of Optimizing Bore Fields for Commercial Ground Source Heat Pump Systems. Proceedings, 45th Workshop on Geothermal Reservoir Engineering. Stanford, California, Stanford University.

Claesson, J., G. Helstr{\"o}m. 2011. Multipole method to calculate borehole thermal resistances in a borehole heat exchanger. HVAC\&R Research. 17(6), 895-911.
\hangindent=2em
\hangafter=1
\noindent Spitler, J. D., J. C. Cook and X. Liu. 2020. FY20 Second Milestone Report for Advanced Techno-Economic Model-ing for Geothermal Heat Pump Applications in Residential, Commercial, and Industry Building, Oak Ridge Na-tional Laboratory.

Yavuzturk, C. 1999. Modeling of Vertical Ground Loop Heat Exchangers for Ground Source Heat Pump Systems. Ph.D.~Thesis, Department of Mechanical and Aerospace Engineering, Oklahoma State University, Stillwater, Oklahoma.
\hangindent=2em
\hangafter=1
\noindent Xu, X., J.D. Spitler. 2006. Modeling of Vertical Ground Loop Heat Exchangers with Variable Convective and Thermal Mass of Fluid. Proceedings of the 10th International Conference on Thermal Energy Storage-Ecostock 2006, Pomona, NJ.

Yavuzturk, C., J.D. Spitler. 1999. A Short Time Step Response Factor Model for Vertical Ground Loop Heat Exchangers. ASHRAE Transactions. 105(2):475-485.
\hangindent=2em
\hangafter=1
\noindent Yavuzturk, C. 1999. Modeling of Vertical Ground Loop Heat Exchangers for Ground Source Heat Pump Systems. Ph.D.~Thesis, Department of Mechanical and Aerospace Engineering, Oklahoma State University, Stillwater, Oklahoma.

Xu, X., J.D. Spitler. 2006. Modeling of Vertical Ground Loop Heat Exchangers with Variable Convective and Thermal Mass of Fluid. Proceedings of the 10th International Conference on Thermal Energy Storage-Ecostock 2006, Pomona, NJ.
\hangindent=2em
\hangafter=1
\noindent Yavuzturk, C., J.D. Spitler. 1999. A Short Time Step Response Factor Model for Vertical Ground Loop Heat Exchangers. ASHRAE Transactions. 105(2):475-485.

\subsection{GroundHeatExchanger:Slinky}\label{groundheatexchangerslinky}

Expand Down
Loading