diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9e93be67..9f7d6b1d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 3.9.16 +current_version = 3.9.17 commit = True tag = True diff --git a/.cookiecutterrc b/.cookiecutterrc index bec01aee..4755fac3 100644 --- a/.cookiecutterrc +++ b/.cookiecutterrc @@ -54,7 +54,7 @@ default_context: sphinx_doctest: "no" sphinx_theme: "sphinx-py3doc-enhanced-theme" test_matrix_separate_coverage: "no" - version: 3.9.16 + version: 3.9.17 version_manager: "bump2version" website: "https://github.com/NREL" year_from: "2023" diff --git a/README.rst b/README.rst index 3e34b486..d61c7b0e 100644 --- a/README.rst +++ b/README.rst @@ -56,9 +56,9 @@ Free software: `MIT 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.9.16.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.17.svg :alt: Commits since latest release - :target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.16...main + :target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.17...main .. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat :target: https://nrel.github.io/GEOPHIRES-X diff --git a/docs/conf.py b/docs/conf.py index b2f1bed5..329e7f9f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,7 +18,7 @@ year = '2025' author = 'NREL' copyright = f'{year}, {author}' -version = release = '3.9.16' +version = release = '3.9.17' pygments_style = 'trac' templates_path = ['./templates'] diff --git a/setup.py b/setup.py index 281b4ade..6239e30d 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ def read(*names, **kwargs): setup( name='geophires-x', - version='3.9.16', + version='3.9.17', license='MIT', description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.', long_description='{}\n{}'.format( diff --git a/src/geophires_x/Reservoir.py b/src/geophires_x/Reservoir.py index 0f8bce5b..c8013941 100644 --- a/src/geophires_x/Reservoir.py +++ b/src/geophires_x/Reservoir.py @@ -287,7 +287,7 @@ def __init__(self, model: Model): self.fracnumb = self.ParameterDict[self.fracnumb.Name] = intParameter( "Number of Fractures", DefaultValue=10, - AllowableRange=list(range(1, 150, 1)), + AllowableRange=list(range(1, 100_000, 1)), UnitType=Units.NONE, ErrMessage="assume default number of fractures (10)", ToolTipText="Number of identical parallel fractures in EGS fracture-based reservoir model." diff --git a/src/geophires_x/__init__.py b/src/geophires_x/__init__.py index 007aa1eb..7126d4ba 100644 --- a/src/geophires_x/__init__.py +++ b/src/geophires_x/__init__.py @@ -1 +1 @@ -__version__ = '3.9.16' +__version__ = '3.9.17' diff --git a/src/geophires_x_schema_generator/geophires-request.json b/src/geophires_x_schema_generator/geophires-request.json index 011c39f5..af6967e6 100644 --- a/src/geophires_x_schema_generator/geophires-request.json +++ b/src/geophires_x_schema_generator/geophires-request.json @@ -321,7 +321,7 @@ "category": "Reservoir", "default": 10, "minimum": 1, - "maximum": 149 + "maximum": 99999 }, "Fracture Separation": { "description": "Separation of identical parallel fractures with uniform spatial distribution in EGS fracture-based reservoir", diff --git a/tests/geophires_x_tests/test_reservoir.py b/tests/geophires_x_tests/test_reservoir.py index 119e73f6..98985cb6 100644 --- a/tests/geophires_x_tests/test_reservoir.py +++ b/tests/geophires_x_tests/test_reservoir.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import sys from pathlib import Path @@ -7,6 +9,9 @@ from geophires_x.GeoPHIRESUtils import static_pressure_MPa from geophires_x.Model import Model from geophires_x.Reservoir import Reservoir +from geophires_x_client import GeophiresInputParameters +from geophires_x_client import GeophiresXClient +from geophires_x_client import GeophiresXResult from tests.base_test_case import BaseTestCase @@ -27,6 +32,7 @@ def test_reservoir_lithostatic_pressure(self): self.assertAlmostEqual(79.433865, p.magnitude, places=3) self.assertEqual('megapascal', p.units) + # noinspection PyMethodMayBeStatic def _new_model(self, input_file=None) -> Model: stash_cwd = Path.cwd() stash_sys_argv = sys.argv @@ -45,3 +51,45 @@ def _new_model(self, input_file=None) -> Model: os.chdir(stash_cwd) return m + + def test_number_of_fractures(self): + def _get_result(num_fractures: int) -> GeophiresXResult: + return GeophiresXClient().get_geophires_result( + GeophiresInputParameters( + from_file_path=self._get_test_file_path('generic-egs-case.txt'), + params={ + 'Reservoir Volume Option': '1, -- FRAC_NUM_SEP', + 'Fracture Shape': '3, -- Square', + 'Fracture Height': 165, + 'Number of Fractures': num_fractures, + }, + ) + ) + + def _fractures_lcoe_net(r: GeophiresXResult) -> tuple[int, float, float]: + return ( + r.result['RESERVOIR PARAMETERS']['Number of fractures']['value'], + r.result['SUMMARY OF RESULTS']['Electricity breakeven price']['value'], + r.result['SUMMARY OF RESULTS']['Average Net Electricity Production']['value'], + ) + + fractures, lcoe, net_production = _fractures_lcoe_net(_get_result(10_000)) + + self.assertEqual(10_000, fractures) + + self.assertGreater(lcoe, 0) + self.assertLess(lcoe, 400) + + self.assertGreater(net_production, 0) + self.assertLess(net_production, 500) + + max_fractures = 99_999 + fractures, lcoe, net_production = _fractures_lcoe_net(_get_result(max_fractures)) + + self.assertEqual(max_fractures, fractures) + + self.assertGreater(lcoe, 0) + self.assertLess(lcoe, 400) + + self.assertGreater(net_production, 0) + self.assertLess(net_production, 500)