Skip to content

Commit 1545ed1

Browse files
Merge pull request #82 from softwareengineerprogrammer/number-of-doublets-2
Number of Doublets parameter
2 parents b7205d5 + 85ea512 commit 1545ed1

File tree

16 files changed

+204
-54
lines changed

16 files changed

+204
-54
lines changed

.bumpversion.cfg

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
[bumpversion]
2-
current_version = 3.9.27
2+
current_version = 3.9.28-rc.0
33
commit = True
44
tag = True
5+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<prerelease_label>[a-z]+)\.(?P<prerelease>\d+))?
6+
serialize =
7+
{major}.{minor}.{patch}-{prerelease_label}.{prerelease}
8+
{major}.{minor}.{patch}
9+
10+
[bumpversion:part:prerelease]
11+
first_value = 0
12+
13+
[bumpversion:part:prerelease_label]
14+
optional_value = rc
15+
values =
16+
alpha
17+
beta
18+
rc
519

620
[bumpversion:file:setup.py]
721
search = version='{current_version}'

.cookiecutterrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ default_context:
5454
sphinx_doctest: "no"
5555
sphinx_theme: "sphinx-py3doc-enhanced-theme"
5656
test_matrix_separate_coverage: "no"
57-
version: 3.9.27
57+
version: 3.9.28
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Free software: `MIT license <LICENSE>`__
5656
:alt: Supported implementations
5757
:target: https://pypi.org/project/geophires-x
5858

59-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.27.svg
59+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.28.svg
6060
:alt: Commits since latest release
61-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.27...main
61+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.28...main
6262

6363
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
6464
:target: https://nrel.github.io/GEOPHIRES-X
@@ -300,8 +300,8 @@ well drilling, surface plant, etc.) are either provided by the user or calculate
300300
correlations.
301301

302302
For more information on the theoretical basis for GEOPHIRES see
303-
`GEOPHIRES v2.0: updated geothermal techno‐economic simulation tool (Beckers & McCabe, 2019) <https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/GEOPHIRES%20v2.0%20User%20Manual.pdf>`__
304-
and `GEOPHIRES reference materials <References/references.md#geophires>`__.
303+
`GEOPHIRES v2.0: updated geothermal techno‐economic simulation tool (Beckers & McCabe, 2019) <https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202019%20GEOPHIRES%20v2.pdf>`__
304+
and `GEOPHIRES reference materials <References/README.md#geophires>`__.
305305

306306
Parameters
307307
----------
@@ -513,7 +513,7 @@ Extending GEOPHIRES-X
513513
Additional Documentation
514514
------------------------
515515

516-
Additional materials can be found in `/References </References/references.md>`__.
516+
Additional materials can be found in `/References </References/README.md>`__.
517517

518518

519519
Development

References/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# GEOPHIRES
3+
* [GEOPHIRES v2.0 User Manual.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/GEOPHIRES%20v2.0%20User%20Manual.pdf) [![](https://zenodo.org/badge/doi/10.1186/s40517-019-0119-6.svg)](https://doi.org/10.1186/s40517-019-0119-6)
4+
* [Beckers 2019 GEOPHIRES v2.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202019%20GEOPHIRES%20v2.pdf)
5+
* [Beckers 2018 Introducing GEOPHIRES v2.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202018%20Introducing%20GEOPHIRES%20v2.pdf)
6+
* [Beckers 2016 Dissertation.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202016%20Dissertation.pdf) [![](https://zenodo.org/badge/doi/10.7298/X4736NTC.svg)](https://doi.org/10.7298/X4736NTC)
7+
* [Beckers 2013 GEOPHIRES v1.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202013%20GEOPHIRES%20v1.pdf)
8+
9+
# Reference
10+
* [GeoVision report.pdf](https://github.com/NREL/GEOPHIRES-X/blob/ea5c67d43fe77c83a64208d8e2ab92a9abea3742/References/GeoVision%20report.pdf)
11+
* [US-EIA_2013_LCOE-and-LACE-supplement.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/US-EIA_2013_LCOE-and-LACE-supplement.pdf)
12+
* [LACETable.txt](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/LACETable.txt)
13+
* [Drill cost correlation converting to per foot cost.xlsx](https://github.com/NREL/GEOPHIRES-X/blob/aae93f36ca5e01f4b700ddb5a59d0ec600aed3d4/References/Drill%20cost%20correlation%20converting%20to%20per%20foot%20cost.xlsx)
14+
15+
# Fervo
16+
* [fervo_energy_white_paper.pdf](https://github.com/NREL/GEOPHIRES-X/blob/703c967b0b1fe9f6d619b1e786686ba07fb0fe59/References/fervo_energy_white_paper.pdf)
17+
* [fervo_drilling costs.pdf](https://github.com/softwareengineerprogrammer/GEOPHIRES-X/blob/62ecc37385cc89dcac36a3684c258e454bcc0241/References/fervo_drilling%20costs.pdf)
18+
19+
# JEDI
20+
* [JEDI.pdf](https://github.com/NREL/GEOPHIRES-X/blob/a7d1ff2e0d47e957c19c3b6dec28fece16905dcb/References/JEDI.pdf)
21+
* [01d-jedi-geothermal-model-rel-gt12-23-16.xlsm](https://github.com/NREL/GEOPHIRES-X/raw/a7d1ff2e0d47e957c19c3b6dec28fece16905dcb/References/01d-jedi-geothermal-model-rel-gt12-23-16.xlsm)
22+
23+
# HIP-RA
24+
* [Muffler-Cataldi_1978_ HIP-RA.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Muffler-Cataldi_1978_%20HIP-RA.pdf)
25+
* [Garg-Combs_2011_HIP-RA-Reexamination.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Garg-Combs_2011_HIP-RA-Reexamination.pdf)
26+
27+
# CLGS
28+
* [Beckers-et-al_2023_Tabulated-Database-CLGS.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Beckers-et-al_2023_Tabulated-Database-CLGS.pdf)
29+
* [Wanju-et-al_2021_CLGS-Energy-Recovery.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Wanju-et-al_2021_CLGS-Energy-Recovery.pdf)
30+
31+
# S-DAC-GT
32+
* [JPSE2023.pdf](https://github.com/NREL/GEOPHIRES-X/blob/ea5c67d43fe77c83a64208d8e2ab92a9abea3742/References/JPSE2023.pdf)

References/references.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1 @@
1-
2-
# GEOPHIRES
3-
* [GEOPHIRES v2.0 User Manual.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/GEOPHIRES%20v2.0%20User%20Manual.pdf) [![](https://zenodo.org/badge/doi/10.1186/s40517-019-0119-6.svg)](https://doi.org/10.1186/s40517-019-0119-6)
4-
* [Beckers 2019 GEOPHIRES v2.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202019%20GEOPHIRES%20v2.pdf)
5-
* [Beckers 2018 Introducing GEOPHIRES v2.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202018%20Introducing%20GEOPHIRES%20v2.pdf)
6-
* [Beckers 2016 Dissertation.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202016%20Dissertation.pdf) [![](https://zenodo.org/badge/doi/10.7298/X4736NTC.svg)](https://doi.org/10.7298/X4736NTC)
7-
* [Beckers 2013 GEOPHIRES v1.pdf](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/Beckers%202013%20GEOPHIRES%20v1.pdf)
8-
9-
# Reference
10-
* [GeoVision report.pdf](https://github.com/NREL/GEOPHIRES-X/blob/ea5c67d43fe77c83a64208d8e2ab92a9abea3742/References/GeoVision%20report.pdf)
11-
* [US-EIA_2013_LCOE-and-LACE-supplement.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/US-EIA_2013_LCOE-and-LACE-supplement.pdf)
12-
* [LACETable.txt](https://github.com/NREL/GEOPHIRES-X/blob/fb5caadfa419c3bd05de656a33700d085fbc0432/References/LACETable.txt)
13-
* [Drill cost correlation converting to per foot cost.xlsx](https://github.com/NREL/GEOPHIRES-X/blob/aae93f36ca5e01f4b700ddb5a59d0ec600aed3d4/References/Drill%20cost%20correlation%20converting%20to%20per%20foot%20cost.xlsx)
14-
15-
# Fervo
16-
* [fervo_energy_white_paper.pdf](https://github.com/NREL/GEOPHIRES-X/blob/703c967b0b1fe9f6d619b1e786686ba07fb0fe59/References/fervo_energy_white_paper.pdf)
17-
* [fervo_drilling costs.pdf](https://github.com/softwareengineerprogrammer/GEOPHIRES-X/blob/62ecc37385cc89dcac36a3684c258e454bcc0241/References/fervo_drilling%20costs.pdf)
18-
19-
# JEDI
20-
* [JEDI.pdf](https://github.com/NREL/GEOPHIRES-X/blob/a7d1ff2e0d47e957c19c3b6dec28fece16905dcb/References/JEDI.pdf)
21-
* [01d-jedi-geothermal-model-rel-gt12-23-16.xlsm](https://github.com/NREL/GEOPHIRES-X/raw/a7d1ff2e0d47e957c19c3b6dec28fece16905dcb/References/01d-jedi-geothermal-model-rel-gt12-23-16.xlsm)
22-
23-
# HIP-RA
24-
* [Muffler-Cataldi_1978_ HIP-RA.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Muffler-Cataldi_1978_%20HIP-RA.pdf)
25-
* [Garg-Combs_2011_HIP-RA-Reexamination.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Garg-Combs_2011_HIP-RA-Reexamination.pdf)
26-
27-
# CLGS
28-
* [Beckers-et-al_2023_Tabulated-Database-CLGS.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Beckers-et-al_2023_Tabulated-Database-CLGS.pdf)
29-
* [Wanju-et-al_2021_CLGS-Energy-Recovery.pdf](https://github.com/NREL/GEOPHIRES-X/blob/7adc9598944a78487e5071ca23a06bfd17248c16/References/Wanju-et-al_2021_CLGS-Energy-Recovery.pdf)
30-
31-
# S-DAC-GT
32-
* [JPSE2023.pdf](https://github.com/NREL/GEOPHIRES-X/blob/ea5c67d43fe77c83a64208d8e2ab92a9abea3742/References/JPSE2023.pdf)
1+
See [References README](README.md).

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
year = '2025'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.9.27'
21+
version = release = '3.9.28'
2222

2323
pygments_style = 'trac'
2424
templates_path = ['./templates']

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def read(*names, **kwargs):
1313

1414
setup(
1515
name='geophires-x',
16-
version='3.9.27',
16+
version='3.9.28',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/Economics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,8 @@ def __init__(self, model: Model):
16951695
display_name='Water costs',
16961696
UnitType=Units.CURRENCYFREQUENCY,
16971697
PreferredUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
1698-
CurrentUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR
1698+
CurrentUnits=CurrencyFrequencyUnit.MDOLLARSPERYEAR,
1699+
ToolTipText='Assumes $3.5/1,000 gallons of water'
16991700
)
17001701
self.CCap = self.OutputParameterDict[self.CCap.Name] = OutputParameter(
17011702
Name="Total Capital Cost",
@@ -2490,6 +2491,7 @@ def Calculate(self, model: Model) -> None:
24902491
self.Coamwater.value = self.oamwaterfixed.value
24912492
else:
24922493
# here is assumed 1 l per kg maybe correct with real temp. (M$/year) 925$/ML = 3.5$/1,000 gallon
2494+
# TODO parameterize
24932495
self.Coamwater.value = self.oamwateradjfactor.value * (model.wellbores.nprod.value *
24942496
model.wellbores.prodwellflowrate.value *
24952497
model.reserv.waterloss.value * model.surfaceplant.utilization_factor.value *

src/geophires_x/SBTEconomics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ def Calculate(self, model: Model) -> None:
640640
self.Coamwater.value = self.oamwaterfixed.value
641641
else:
642642
# here is assumed 1 l per kg maybe correct with real temp. (M$/year) 925$/ML = 3.5$/1,000 gallon
643+
# TODO parameterize
643644
self.Coamwater.value = self.oamwateradjfactor.value * (model.wellbores.nprod.value *
644645
model.wellbores.prodwellflowrate.value *
645646
model.reserv.waterloss.value * model.surfaceplant.utilization_factor.value *

src/geophires_x/WellBores.py

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,24 +708,36 @@ def __init__(self, model: Model):
708708
self.ParameterDict = {}
709709
self.OutputParameterDict = {}
710710

711+
max_doublets = 200
712+
# noinspection SpellCheckingInspection
711713
self.nprod = self.ParameterDict[self.nprod.Name] = intParameter(
712714
"Number of Production Wells",
713715
DefaultValue=2,
714-
AllowableRange=list(range(1, 201, 1)),
716+
AllowableRange=list(range(1, max_doublets+1, 1)),
715717
UnitType=Units.NONE,
716-
Required=True,
718+
Required=False,
717719
ErrMessage="assume default number of production wells (2)",
718720
ToolTipText="Number of (identical) production wells"
719721
)
722+
# noinspection SpellCheckingInspection
720723
self.ninj = self.ParameterDict[self.ninj.Name] = intParameter(
721724
"Number of Injection Wells",
722725
DefaultValue=2,
723-
AllowableRange=list(range(0, 201, 1)),
726+
AllowableRange=list(range(0, max_doublets+1, 1)),
724727
UnitType=Units.NONE,
725-
Required=True,
728+
Required=False,
726729
ErrMessage="assume default number of injection wells (2)",
727730
ToolTipText="Number of (identical) injection wells"
728731
)
732+
self.doublets_count = self.ParameterDict[self.doublets_count.Name] = intParameter(
733+
"Number of Doublets",
734+
DefaultValue=2,
735+
AllowableRange=list(range(0, max_doublets+1, 1)),
736+
UnitType=Units.NONE,
737+
ToolTipText="Pass this parameter to set the Number of Production Wells and Number of Injection Wells to "
738+
"same value."
739+
)
740+
729741
self.prodwelldiam = self.ParameterDict[self.prodwelldiam.Name] = floatParameter(
730742
"Production Well Diameter",
731743
DefaultValue=8.0,
@@ -1317,6 +1329,19 @@ def read_parameters(self, model: Model) -> None:
13171329

13181330
coerce_int_params_to_enum_values(self.ParameterDict)
13191331

1332+
if self.doublets_count.Provided:
1333+
def _error(num_wells_param_:intParameter):
1334+
msg = f'{num_wells_param_.Name} may not be provided when {self.doublets_count.Name} is provided.'
1335+
model.logger.error(msg)
1336+
raise ValueError(msg)
1337+
1338+
for num_wells_param in [self.ninj, self.nprod]:
1339+
if num_wells_param.Provided:
1340+
_error(num_wells_param)
1341+
1342+
self.ninj.value = self.doublets_count.value
1343+
self.nprod.value = self.doublets_count.value
1344+
13201345
model.logger.info(f"read parameters complete {self.__class__.__name__}: {__name__}")
13211346

13221347
def Calculate(self, model: Model) -> None:

0 commit comments

Comments
 (0)