Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.9.16
current_version = 3.9.17
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.9.16
version: 3.9.17
version_manager: "bump2version"
website: "https://github.com/NREL"
year_from: "2023"
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,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.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
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 = '2025'
author = 'NREL'
copyright = f'{year}, {author}'
version = release = '3.9.16'
version = release = '3.9.17'

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.9.16',
version='3.9.17',
license='MIT',
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
long_description='{}\n{}'.format(
Expand Down
2 changes: 1 addition & 1 deletion src/geophires_x/Reservoir.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion src/geophires_x/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.9.16'
__version__ = '3.9.17'
2 changes: 1 addition & 1 deletion src/geophires_x_schema_generator/geophires-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
48 changes: 48 additions & 0 deletions tests/geophires_x_tests/test_reservoir.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
import sys
from pathlib import Path
Expand All @@ -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


Expand All @@ -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
Expand All @@ -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)