Skip to content

Commit d1d05d6

Browse files
Merge pull request NREL#292 from softwareengineerprogrammer/main
Project Cape workshop example; miscellaneous fixes & improvements
2 parents 1ac596c + 8cfdbb9 commit d1d05d6

File tree

13 files changed

+375
-50
lines changed

13 files changed

+375
-50
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.5.3
2+
current_version = 3.5.4
33
commit = True
44
tag = True
55

.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.5.3
57+
version: 3.5.4
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Free software: `MIT license <LICENSE>`__
5151
:alt: Supported implementations
5252
:target: https://pypi.org/project/geophires-x
5353

54-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.5.3.svg
54+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.5.4.svg
5555
:alt: Commits since latest release
56-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.3...main
56+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.4...main
5757

5858
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
5959
:target: https://nrel.github.io/GEOPHIRES-X

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
year = '2024'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.5.3'
21+
version = release = '3.5.4'
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.5.3',
16+
version='3.5.4',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/SurfacePlantDistrictHeating.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,12 @@ def calculate_dh_demand(self, households, census_division, constant_demand, temp
365365
heat_intensity = 1.845
366366
water_intensity = 12.41
367367

368-
demand = np.empty(0) # create an empty np array for daily demand
369-
for day in daily_HDD:
370-
# MWh/day
371-
demand = np.append(demand, households * (heat_intensity * day + water_intensity) / 1000 + constant_demand * 24)
368+
demand = np.empty(0) # create an empty np array for daily demand
369+
for day in daily_HDD:
370+
# MWh/day
371+
demand = np.append(demand, households * (heat_intensity * day + water_intensity) / 1000 + constant_demand * 24)
372372

373-
return demand
373+
return demand
374374

375375
def calc_HDD(self, hourly_temp) -> np.array:
376376
"""

src/geophires_x/TOUGH2Reservoir.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import sys
2-
import os
32
import numpy as np
43
from .Parameter import floatParameter, strParameter
54
from .Units import *
65
import geophires_x.Model as Model
7-
from .Reservoir import Reservoir
6+
from geophires_x.Reservoir import Reservoir
87

98

109
class TOUGH2Reservoir(Reservoir):
1110
"""
1211
This class models the TOUGH2 Reservoir.
1312
"""
14-
def __init__(self, model:Model):
13+
def __init__(self, model: Model):
1514
"""
1615
The __init__ function is called automatically when a class is instantiated.
1716
It initializes the attributes of an object, and sets default values for certain arguments that can be overridden
@@ -33,6 +32,11 @@ def __init__(self, model:Model):
3332
# or used for Output
3433
# This also includes all Parameters that are calculated and then published using the Printouts function.
3534
# specific to this stype of reservoir
35+
self.tough2_executable_path = self.ParameterDict[self.tough2_executable_path.Name] = strParameter(
36+
"TOUGH2 Executable Path",
37+
DefaultValue='xt2_eos1.exe',
38+
UnitType=Units.NONE,
39+
)
3640
self.tough2modelfilename = self.ParameterDict[self.tough2modelfilename.Name] = strParameter(
3741
"TOUGH2 Model/File Name",
3842
value='Doublet',
@@ -126,7 +130,7 @@ def Calculate(self, model:Model):
126130

127131
# GEOPHIRES assumes TOUGH2 executable and input file are in same directory as GEOPHIRESv3.py
128132
# create tough2 input file
129-
path_to_exe = str('xt2_eos1.exe')
133+
path_to_exe = str(self.tough2_executable_path.value)
130134
if not os.path.exists(os.path.join(os.getcwd(), path_to_exe)):
131135
model.logger.critical('TOUGH2 executable file does not exist in current working directory. \
132136
GEOPHIRES will abort simulation.')

src/geophires_x/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.5.3'
1+
__version__ = '3.5.4'

src/geophires_x_schema_generator/hip-ra-x-request.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"type": "number",
2222
"units": "degC",
2323
"category": null,
24-
"default": 0.0,
24+
"default": 150.0,
2525
"minimum": 50,
2626
"maximum": 1000
2727
},
@@ -30,7 +30,7 @@
3030
"type": "number",
3131
"units": "degC",
3232
"category": null,
33-
"default": 0.0,
33+
"default": 25.0,
3434
"minimum": 0.1,
3535
"maximum": 200
3636
},
@@ -39,7 +39,7 @@
3939
"type": "number",
4040
"units": "%",
4141
"category": null,
42-
"default": 0.0,
42+
"default": 18.0,
4343
"minimum": 0.0,
4444
"maximum": 100.0
4545
},
@@ -48,7 +48,7 @@
4848
"type": "number",
4949
"units": "km**2",
5050
"category": null,
51-
"default": 0.0,
51+
"default": 81.0,
5252
"minimum": 0.0,
5353
"maximum": 10000.0
5454
},
@@ -57,7 +57,7 @@
5757
"type": "number",
5858
"units": "kilometer",
5959
"category": null,
60-
"default": 0.0,
60+
"default": 0.286,
6161
"minimum": 0.0,
6262
"maximum": 10000.0
6363
},
@@ -66,7 +66,7 @@
6666
"type": "integer",
6767
"units": "yr",
6868
"category": null,
69-
"default": null,
69+
"default": 30,
7070
"minimum": 1,
7171
"maximum": 100
7272
},
@@ -75,7 +75,7 @@
7575
"type": "number",
7676
"units": "kJ/km**3C",
7777
"category": null,
78-
"default": 0.0,
78+
"default": 2840000000000.0,
7979
"minimum": 0.0,
8080
"maximum": 100000000000000.0
8181
},
@@ -84,7 +84,7 @@
8484
"type": "number",
8585
"units": "kJ/kgC",
8686
"category": null,
87-
"default": 0.0,
87+
"default": -1.0,
8888
"minimum": 3.0,
8989
"maximum": 10.0
9090
},
@@ -93,7 +93,7 @@
9393
"type": "number",
9494
"units": "kg/km**3",
9595
"category": null,
96-
"default": 0.0,
96+
"default": -1.0,
9797
"minimum": 100000000000.0,
9898
"maximum": 10000000000000.0
9999
},
@@ -102,7 +102,7 @@
102102
"type": "number",
103103
"units": "kg/km**3",
104104
"category": null,
105-
"default": 0.0,
105+
"default": 2550000000000.0,
106106
"minimum": 100000000000.0,
107107
"maximum": 10000000000000.0
108108
},
@@ -111,7 +111,7 @@
111111
"type": "number",
112112
"units": "",
113113
"category": null,
114-
"default": 0.0,
114+
"default": -1.0,
115115
"minimum": 0.0,
116116
"maximum": 1.0
117117
},
@@ -120,7 +120,7 @@
120120
"type": "number",
121121
"units": "",
122122
"category": null,
123-
"default": 0.0,
123+
"default": -1.0,
124124
"minimum": 0.0,
125125
"maximum": 1.0
126126
},
@@ -129,7 +129,7 @@
129129
"type": "number",
130130
"units": "",
131131
"category": null,
132-
"default": 0.0,
132+
"default": 0.5,
133133
"minimum": 0.0,
134134
"maximum": 1.0
135135
},
@@ -138,7 +138,7 @@
138138
"type": "number",
139139
"units": "kilometer",
140140
"category": null,
141-
"default": 0.0,
141+
"default": -1.0,
142142
"minimum": 0.001,
143143
"maximum": 15.0
144144
},
@@ -147,7 +147,7 @@
147147
"type": "number",
148148
"units": "mPa",
149149
"category": null,
150-
"default": 0.0,
150+
"default": -1.0,
151151
"minimum": 0.0,
152152
"maximum": 10000.0
153153
},
@@ -156,7 +156,7 @@
156156
"type": "number",
157157
"units": "",
158158
"category": null,
159-
"default": 0.0,
159+
"default": 0.75,
160160
"minimum": 0.0,
161161
"maximum": 1.0
162162
},
@@ -165,7 +165,7 @@
165165
"type": "string",
166166
"units": null,
167167
"category": null,
168-
"default": null,
168+
"default": "HIP.html",
169169
"minimum": null,
170170
"maximum": null
171171
}

0 commit comments

Comments
 (0)