Skip to content

Commit

Permalink
Merge pull request #67 from j-c-cook/issue66_ReduceSize
Browse files Browse the repository at this point in the history
Issue66 reduce size
  • Loading branch information
j-c-cook authored Jan 14, 2022
2 parents faf2f53 + 63de5bf commit 144748a
Show file tree
Hide file tree
Showing 36 changed files with 134 additions and 75 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-tests-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python package
name: Test on Linux

on: [push]

Expand All @@ -19,8 +19,8 @@ jobs:
# Run python commands
- name: Display CWD
run: python -c "import os; print(os.getcwd())"
- name: Submodules
run: git submodule update --init --recursive
# - name: Submodules
# run: git submodule update --init --recursive
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@

[submodule "ghedt/pygfunction"]
path = ghedt/pygfunction
url = https://github.com/j-c-cook/pygfunction
[submodule "ghedt/ghedt-examples"]
path = ghedt/ghedt-examples
url = https://github.com/j-c-cook/ghedt-examples
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@
* [Issue 15](https://github.com/j-c-cook/ghedt/issues/15) - A file is added for testing the sizing of a GHE using live-time g-function calculations that utilize the equivalent solver method and 8 unequal segment lengths along the borehole for Single U-tube, Double U-tube and Coaxial tube BHEs.
* [Issue 5](https://github.com/j-c-cook/ghedt/issues/5) - A Ubuntu 20.04.03 LTS virtual machine (via VirtualBox) has been created to provide support for running tests when the project goes public.

### Other changes

[Issue 66](https://github.com/j-c-cook/ghedt/issues/66) - `pyfunction` is removed as a submodule and moved to the list of requirements.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ shows examples for how to create a branch from the command line.
```angular2html
git checkout -b $branchName &&
git push -u origin $branchName &&
git branch --set-upstream-to=origin/$branchName $branchName &&
git branch --set-upstream-to=origin/$branchName $branchName
```
To list all the branches, run the following command.
```angular2html
Expand Down
59 changes: 50 additions & 9 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# Installation
# INSTALLATION

## Install from source
Clone the repository.
```angular2html
git clone https://github.com/j-c-cook/ghedt
```
Recursively update the submodules.
## Installation from source

This section is for developers who wish to modify and contribute to `ghedt`.

### Install git

Version control of this repository is maintained via [git][#git]. To install
`git`, see [git-downloads][#git-downloads]. For information about git not
provided later in this section, refer to the free online [book][#git-book].

### Clone the repository

Clone and then change directories into the repository.
```angular2html
git submodule update --init --recursive
git clone https://github.com/j-c-cook/ghedt && cd ghedt
```

### Create a Virtual Environment for ghedt

Python [Virtual Environments][#VirtualEnvironments] are how packages are
accessed.

Create environment that GHEDT can be installed to.
```angular2html
conda create -n ENV python=3.7
Expand All @@ -25,4 +38,32 @@ pip install .
or if the package is zipped.
```angular2html
pip install ghedt.zip
```
```

## Project Overview

```angular2html
├── ghedt
│   ├── __init__.py
│   ├── coordinates.py
│   ├── design.py
│   ├── domains.py
│   ├── feature_recognition.py
│   ├── gfunction.py
│   ├── ground_heat_exchangers.py
│   ├── media.py
│   ├── search_routines.py
│   └── utilities.py
│   ├── peak_load_analysis_tool
│   │   ├── ...
├── LICENSE
├── README.md
├── requirements.txt
├── setup.py
```

[#git]: https://en.wikipedia.org/wiki/Git
[#git-downloads]: https://git-scm.com/downloads
[#git-book]: https://git-scm.com/book/en/v2
[#VirtualEnvironments]: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/
[#pyg-branch]: https://github.com/j-c-cook/pygfunction/tree/ghedt
46 changes: 33 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# Ground Heat Exchanger Design Toolbox

The Ground Heat Exchanger Design Toolbox is a Python package that can quantify
the short- and long-term thermal interaction in a ground heat exchanger (GHE).
The long-term thermal response g-functions are computed live-time with
[pygfunction](https://github.com/MassimoCimmino/pygfunction).
The GHEDT contains a fast monthly hybrid time step simulation for prediction of
heat pump entering fluid temperatures over a design life. GHEDT can vary the
size (or borehole height) of a specified borehole field to ensure the heat pump
entering fluid temperature remains within specified bounds. GHEDT contains a
novel borehole configuration selection algorithm.
A package with the novel capability of automatically selecting ground heat
exchanger configurations based on polygonal land constraints. This package
contains advanced methods that are the first of their kind. The results are
validated against the world renowned `GLHEPRO` (Cook 2021).

The Ground Heat Exchanger Design Toolbox (GHEDT) is a Python package that can
quantify the short- and long-term thermal interaction in a ground heat exchanger
(GHE). The long-term thermal response g-functions are computed live-time with
[pygfunction][#pygfunction]. The GHEDT contains a fast monthly hybrid time step
simulation for prediction of heat pump entering fluid temperatures over a design
life. GHEDT can vary the size (or borehole height) of a specified borehole field
to ensure the heat pump entering fluid temperature remains within specified
bounds. GHEDT contains a novel borehole configuration selection algorithm.

## Novel Design Algorithms

GHEDT contains a novel design methodology for automated selection of borehole
fields. The advanced methodology performs optimization based on a target
drilling depth. An integer bisection routine is utilized to quickly search
over a unimodal domain of boreholes. GHEDT can consider available drilling and
no-drilling zones defined as polygons. For more information, refer to
`Cook (2021)`.
no-drilling zones defined as polygons.

The selection process shown below is performed in less than half a minute on an
11th Gen Intel Core i9-11900K @ 3.50GHz. Refer to `Cook (2021)` for more
information.

![polygonal](images/find_bi_alternative_03.gif)

Expand All @@ -36,8 +43,7 @@ is dependent on the following packages:

## Quick Start

**Users** - Install `ghedt` via the package installer for Python
([pip](https://pip.pypa.io/en/latest/)):
**Users** - Install `ghedt` via the package installer for Python ([pip][#pip]):
```angular2html
pip install ghedt
```
Expand Down Expand Up @@ -72,6 +78,12 @@ and Automated Ground Heat Exchanger Design}",
year = {2021},
}
```

## Questions?

If there are any questions, comments or concerns please [create][#create] an
issue, comment on an [open][#issue] issue, comment on a [closed][#closed] issue,
or [start][#start] a [discussion][#discussion].


## Acknowledgements
Expand All @@ -81,3 +93,11 @@ Laboratory and the National Renewable Energy Laboratory, and by OSU through the
Center for Integrated Building Systems, the OG&E Energy Technology Chair, and
Oklahoma State University via return of indirect costs to Dr. Jeffrey D.
Spitler.

[#pygfunction]: https://github.com/MassimoCimmino/pygfunction
[#pip]: https://pip.pypa.io/en/latest/
[#create]: https://github.com/j-c-cook/ghedt/issues/new
[#issue]: https://github.com/j-c-cook/ghedt/issues
[#closed]: https://github.com/j-c-cook/ghedt/issues?q=is%3Aissue+is%3Aclosed
[#start]: https://github.com/j-c-cook/ghedt/discussions/new
[#discussion]: https://github.com/j-c-cook/ghedt/discussions
1 change: 0 additions & 1 deletion ghedt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from . import pygfunction
from . import peak_load_analysis_tool
from . import gfunction
from . import ground_heat_exchangers
Expand Down
2 changes: 1 addition & 1 deletion ghedt/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt


# Common design interface
Expand Down
2 changes: 1 addition & 1 deletion ghedt/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import ghedt
import numpy as np
import ghedt.pygfunction as gt
import pygfunction as gt
import matplotlib.pyplot as plt


Expand Down
2 changes: 1 addition & 1 deletion ghedt/examples/BHE/BoreholeResistance/Coaxial.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Jack C. Cook
# Monday, August 16, 2021

import ghedt.pygfunction as gt
import pygfunction as gt
import ghedt.peak_load_analysis_tool as plat
import matplotlib.pyplot as plt

Expand Down
2 changes: 1 addition & 1 deletion ghedt/examples/BHE/BoreholeResistance/DoubleUTube.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Jack C. Cook
# Monday, August 16, 2021

import ghedt.pygfunction as gt
import pygfunction as gt
import ghedt.peak_load_analysis_tool as plat


Expand Down
2 changes: 1 addition & 1 deletion ghedt/examples/BHE/BoreholeResistance/SingleUTube.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Jack C. Cook
# Monday, August 16, 2021

import ghedt.pygfunction as gt
import pygfunction as gt
import ghedt.peak_load_analysis_tool as plat


Expand Down
2 changes: 1 addition & 1 deletion ghedt/examples/BHE/BoreholeResistance/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Monday, August 16, 2021

import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import matplotlib.pyplot as plt
import pandas as pd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Saturday, August 21, 2021

import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt


def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Saturday, August 21, 2021

import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt


def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import pandas as pd


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import pandas as pd


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import pandas as pd


Expand Down
16 changes: 7 additions & 9 deletions ghedt/examples/Design/FromFile/design_from_ornl_json_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import pandas as pd
from time import time as clock

Expand Down Expand Up @@ -77,8 +77,10 @@ def main():
fluid = gt.media.Fluid(mixer=mixer, percent=percent)

# Fluid properties
# Borehole volumetric flow rate (L/s)
V_flow_borehole = ornl_param_file_data['design_flow_rate'] * 1000.
# Volumetric flow rate (L/s)
V_flow = ornl_param_file_data['design_flow_rate'] * 1000.
# Note: The flow parameter can be borehole or system.
flow = 'system'

# Define a borehole
borehole = gt.boreholes.Borehole(H, D, r_b, x=0., y=0.)
Expand Down Expand Up @@ -111,16 +113,12 @@ def main():
# Geometric constraints for the `near-square` routine
geometric_constraints = dt.media.GeometricConstraints(B=B)

# Note: Flow functionality is currently only on a borehole basis. Future
# development will include the ability to change the flow rate to be on a
# system flow rate basis.

# Single U-tube
# -------------
design_single_u_tube = dt.design.Design(
V_flow_borehole, borehole, single_u_tube, fluid, pipe_single, grout,
V_flow, borehole, single_u_tube, fluid, pipe_single, grout,
soil, sim_params, geometric_constraints, hourly_extraction_ground_loads,
routine='near-square')
routine='near-square', flow=flow)

# Find the near-square design for a single U-tube and size it.
bisection_search = design_single_u_tube.find_design()
Expand Down
2 changes: 1 addition & 1 deletion ghedt/examples/Design/FromFile/ornl_params.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"design_flow_rate": 0.0002,
"design_flow_rate": 0.0312,
"bore_hole_radius": 0.075,
"ground_thermal_conductivity": 2.0,
"ground_thermal_heat_capacity": 2343493.0,
Expand Down
5 changes: 3 additions & 2 deletions ghedt/examples/Design/find_bi_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import pandas as pd
from time import time as clock

Expand Down Expand Up @@ -89,7 +89,8 @@ def main():
fluid = gt.media.Fluid(mixer=mixer, percent=percent)

# Fluid properties
V_flow = 0.2 # Borehole volumetric flow rate (L/s)
V_flow = 0.2 # Volumetric flow rate (L/s)
# Note: The flow parameter can be borehole or system.
flow = 'borehole'

# Define a borehole
Expand Down
5 changes: 3 additions & 2 deletions ghedt/examples/Design/find_near_square.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import pandas as pd
from time import time as clock

Expand Down Expand Up @@ -88,7 +88,8 @@ def main():
fluid = gt.media.Fluid(mixer=mixer, percent=percent)

# Fluid properties
V_flow = 0.2 # Borehole volumetric flow rate (L/s)
V_flow = 0.2 # Volumetric flow rate (L/s)
# Note: The flow parameter can be borehole or system.
flow = 'borehole'

# Define a borehole
Expand Down
5 changes: 3 additions & 2 deletions ghedt/examples/Design/find_rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import ghedt as dt
import ghedt.peak_load_analysis_tool as plat
import ghedt.pygfunction as gt
import pygfunction as gt
import pandas as pd
from time import time as clock

Expand Down Expand Up @@ -89,7 +89,8 @@ def main():
fluid = gt.media.Fluid(mixer=mixer, percent=percent)

# Fluid properties
V_flow = 0.2 # Borehole volumetric flow rate (L/s)
V_flow = 0.2 # Volumetric flow rate (L/s)
# Note: The flow parameter can be borehole or system.
flow = 'borehole'

# Define a borehole
Expand Down
Loading

0 comments on commit 144748a

Please sign in to comment.