Skip to content

Commit

Permalink
Merge pull request NREL#142 from softwareengineerprogrammer/main
Browse files Browse the repository at this point in the history
Revenue & Cashflow Profile - pair-reviewed with @malcolm-dsider
  • Loading branch information
softwareengineerprogrammer authored Mar 4, 2024
2 parents 37db1ba + 049ad37 commit e94df0e
Show file tree
Hide file tree
Showing 62 changed files with 3,147 additions and 1,065 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.4.12
current_version = 3.4.14
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion .cookiecutterrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ default_context:
sphinx_doctest: "no"
sphinx_theme: "sphinx-py3doc-enhanced-theme"
test_matrix_separate_coverage: "no"
version: 3.4.12
version: 3.4.14
version_manager: "bump2version"
website: "https://github.com/NREL"
year_from: "2023"
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,30 @@ jobs:
python_arch: 'x64'
tox_env: 'py38'
os: 'ubuntu-latest'
- name: 'py38 (macos)'
python: '3.8'
toxpython: 'python3.8'
python_arch: 'x64'
tox_env: 'py38'
os: 'macos-latest'
- name: 'py39 (ubuntu)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'x64'
tox_env: 'py39'
os: 'ubuntu-latest'
- name: 'py39 (macos)'
- name: 'py39 (windows)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'x64'
tox_env: 'py39'
os: 'macos-latest'
os: 'windows-latest'
- name: 'py310 (ubuntu)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'x64'
tox_env: 'py310'
os: 'ubuntu-latest'
- name: 'py310 (macos)'
- name: 'py310 (windows)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'x64'
tox_env: 'py310'
os: 'macos-latest'
os: 'windows-latest'
- name: 'py311 (ubuntu)'
python: '3.11'
toxpython: 'python3.11'
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Free software: `MIT license <LICENSE>`__
:alt: Supported implementations
:target: https://pypi.org/project/geophires-x

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

.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
:target: https://nrel.github.io/GEOPHIRES-X
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
year = '2023'
author = 'NREL'
copyright = f'{year}, {author}'
version = release = '3.4.12'
version = release = '3.4.14'

pygments_style = 'trac'
templates_path = ['./templates']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(*names, **kwargs):

setup(
name='geophires-x',
version='3.4.12',
version='3.4.14',
license='MIT',
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
long_description='{}\n{}'.format(
Expand Down
9 changes: 8 additions & 1 deletion src/geophires_monte_carlo/MC_GeoPHIRES3.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def work_package(pass_list: list):
HipRaInputParameters(from_file_path=Path(tmp_input_file))
)
shutil.copyfile(result.output_file_path, tmp_output_file)
elif args.Code_File.endswith('HIP_RA_x.py'):
hip_ra_x_client: HipRaXClient = HipRaXClient()
result: HipRaResult = hip_ra_x_client.get_hip_ra_result(
HipRaInputParameters(from_file_path=Path(tmp_input_file))
)
shutil.copyfile(result.output_file_path, tmp_output_file)
else:
log.warning(
f'Code file from args ({args.Code_File}) is not a known program, '
Expand Down Expand Up @@ -311,7 +317,7 @@ def main(command_line_args=None):

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

# Now run the executor with the map - that will run it Iterations number of times
Expand All @@ -335,6 +341,7 @@ def main(command_line_args=None):
if len(line) > 3:
# FIXME TODO doesn't work for HIP RA results
line, sep, tail = line.partition(', (') # strip off the Input Variable Values
line = line.replace('(', '').replace(')', '') # strip off the ()
results.append([float(y) for y in line.split(',')])
else:
logger.warning(f'-9999.0 or space found in line {result_count!s}')
Expand Down
2 changes: 1 addition & 1 deletion src/geophires_x/AGSWellBores.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ def Calculate(self, model: Model) -> None:
DowngoingPumpingPower, ppp2, dppw, ppwh = ProdPressureDropAndPumpingPowerUsingIndexes(
model, self.productionwellpumping.value,
self.usebuiltinppwellheadcorrelation,
model.reserv.Trock.value, model.reserv.depth.value,
model.reserv.Trock.value, model.reserv.InputDepth.value,
self.ppwellhead.value, self.PI.value,
self.prodwellflowrate.value, f3, vprod,
self.injwelldiam.value, self.nprod.value, model.surfaceplant.pump_efficiency.value,
Expand Down
6 changes: 3 additions & 3 deletions src/geophires_x/CylindricalReservoir.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
from pint.facets.plain import PlainQuantity

from geophires_x.GeoPHIRESUtils import density_water_kg_per_m3, lithostatic_pressure_MPa, quantity
from geophires_x.GeoPHIRESUtils import density_water_kg_per_m3, static_pressure_MPa, quantity

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

0 comments on commit e94df0e

Please sign in to comment.