Skip to content

Commit e94df0e

Browse files
Merge pull request NREL#142 from softwareengineerprogrammer/main
Revenue & Cashflow Profile - pair-reviewed with @malcolm-dsider
2 parents 37db1ba + 049ad37 commit e94df0e

File tree

62 files changed

+3147
-1065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3147
-1065
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.4.12
2+
current_version = 3.4.14
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.4.12
57+
version: 3.4.14
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

.github/workflows/github-actions.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,36 +32,30 @@ jobs:
3232
python_arch: 'x64'
3333
tox_env: 'py38'
3434
os: 'ubuntu-latest'
35-
- name: 'py38 (macos)'
36-
python: '3.8'
37-
toxpython: 'python3.8'
38-
python_arch: 'x64'
39-
tox_env: 'py38'
40-
os: 'macos-latest'
4135
- name: 'py39 (ubuntu)'
4236
python: '3.9'
4337
toxpython: 'python3.9'
4438
python_arch: 'x64'
4539
tox_env: 'py39'
4640
os: 'ubuntu-latest'
47-
- name: 'py39 (macos)'
41+
- name: 'py39 (windows)'
4842
python: '3.9'
4943
toxpython: 'python3.9'
5044
python_arch: 'x64'
5145
tox_env: 'py39'
52-
os: 'macos-latest'
46+
os: 'windows-latest'
5347
- name: 'py310 (ubuntu)'
5448
python: '3.10'
5549
toxpython: 'python3.10'
5650
python_arch: 'x64'
5751
tox_env: 'py310'
5852
os: 'ubuntu-latest'
59-
- name: 'py310 (macos)'
53+
- name: 'py310 (windows)'
6054
python: '3.10'
6155
toxpython: 'python3.10'
6256
python_arch: 'x64'
6357
tox_env: 'py310'
64-
os: 'macos-latest'
58+
os: 'windows-latest'
6559
- name: 'py311 (ubuntu)'
6660
python: '3.11'
6761
toxpython: 'python3.11'

README.rst

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

50-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.4.12.svg
50+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.4.14.svg
5151
:alt: Commits since latest release
52-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.4.12...main
52+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.4.14...main
5353

5454
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
5555
: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 = '2023'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.4.12'
21+
version = release = '3.4.14'
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.4.12',
16+
version='3.4.14',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_monte_carlo/MC_GeoPHIRES3.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ def work_package(pass_list: list):
130130
HipRaInputParameters(from_file_path=Path(tmp_input_file))
131131
)
132132
shutil.copyfile(result.output_file_path, tmp_output_file)
133+
elif args.Code_File.endswith('HIP_RA_x.py'):
134+
hip_ra_x_client: HipRaXClient = HipRaXClient()
135+
result: HipRaResult = hip_ra_x_client.get_hip_ra_result(
136+
HipRaInputParameters(from_file_path=Path(tmp_input_file))
137+
)
138+
shutil.copyfile(result.output_file_path, tmp_output_file)
133139
else:
134140
log.warning(
135141
f'Code file from args ({args.Code_File}) is not a known program, '
@@ -311,7 +317,7 @@ def main(command_line_args=None):
311317

312318
args = []
313319
for _ in range(iterations):
314-
args.append(pass_list) # we need to make Iterations number of copies of this list fr the map
320+
args.append(pass_list) # we need to make Iterations number of copies of this list for the map
315321
args = tuple(args) # convert to a tuple
316322

317323
# Now run the executor with the map - that will run it Iterations number of times
@@ -335,6 +341,7 @@ def main(command_line_args=None):
335341
if len(line) > 3:
336342
# FIXME TODO doesn't work for HIP RA results
337343
line, sep, tail = line.partition(', (') # strip off the Input Variable Values
344+
line = line.replace('(', '').replace(')', '') # strip off the ()
338345
results.append([float(y) for y in line.split(',')])
339346
else:
340347
logger.warning(f'-9999.0 or space found in line {result_count!s}')

src/geophires_x/AGSWellBores.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ def Calculate(self, model: Model) -> None:
10541054
DowngoingPumpingPower, ppp2, dppw, ppwh = ProdPressureDropAndPumpingPowerUsingIndexes(
10551055
model, self.productionwellpumping.value,
10561056
self.usebuiltinppwellheadcorrelation,
1057-
model.reserv.Trock.value, model.reserv.depth.value,
1057+
model.reserv.Trock.value, model.reserv.InputDepth.value,
10581058
self.ppwellhead.value, self.PI.value,
10591059
self.prodwellflowrate.value, f3, vprod,
10601060
self.injwelldiam.value, self.nprod.value, model.surfaceplant.pump_efficiency.value,

src/geophires_x/CylindricalReservoir.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import numpy as np
77
from pint.facets.plain import PlainQuantity
88

9-
from geophires_x.GeoPHIRESUtils import density_water_kg_per_m3, lithostatic_pressure_MPa, quantity
9+
from geophires_x.GeoPHIRESUtils import density_water_kg_per_m3, static_pressure_MPa, quantity
1010

1111
from geophires_x.GeoPHIRESUtils import heat_capacity_water_J_per_kg_per_K
1212
import geophires_x.Model as Model
@@ -266,5 +266,5 @@ def lithostatic_pressure(self) -> PlainQuantity:
266266
267267
Standard reservoir implementation uses depth but CylindricalReservoir sets depth to total drilled length
268268
"""
269-
return quantity(lithostatic_pressure_MPa(self.rhorock.quantity().to('kg/m**3').magnitude,
270-
self.InputDepth.quantity().to('m').magnitude), 'MPa')
269+
return quantity(static_pressure_MPa(self.rhorock.quantity().to('kg/m**3').magnitude,
270+
self.InputDepth.quantity().to('m').magnitude), 'MPa')

0 commit comments

Comments
 (0)