Skip to content

Commit 243e1fa

Browse files
Merge pull request #76 from softwareengineerprogrammer/increase-number-of-fractures
Increase number of fractures
2 parents c013f43 + 1fbaeed commit 243e1fa

File tree

9 files changed

+57
-9
lines changed

9 files changed

+57
-9
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.9.16
2+
current_version = 3.9.17
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.9.16
57+
version: 3.9.17
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
@@ -56,9 +56,9 @@ Free software: `MIT license <LICENSE>`__
5656
:alt: Supported implementations
5757
:target: https://pypi.org/project/geophires-x
5858

59-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.16.svg
59+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.17.svg
6060
:alt: Commits since latest release
61-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.16...main
61+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.17...main
6262

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

src/geophires_x/Reservoir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def __init__(self, model: Model):
287287
self.fracnumb = self.ParameterDict[self.fracnumb.Name] = intParameter(
288288
"Number of Fractures",
289289
DefaultValue=10,
290-
AllowableRange=list(range(1, 150, 1)),
290+
AllowableRange=list(range(1, 100_000, 1)),
291291
UnitType=Units.NONE,
292292
ErrMessage="assume default number of fractures (10)",
293293
ToolTipText="Number of identical parallel fractures in EGS fracture-based reservoir model."

src/geophires_x/__init__.py

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

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
"category": "Reservoir",
322322
"default": 10,
323323
"minimum": 1,
324-
"maximum": 149
324+
"maximum": 99999
325325
},
326326
"Fracture Separation": {
327327
"description": "Separation of identical parallel fractures with uniform spatial distribution in EGS fracture-based reservoir",

tests/geophires_x_tests/test_reservoir.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os
24
import sys
35
from pathlib import Path
@@ -7,6 +9,9 @@
79
from geophires_x.GeoPHIRESUtils import static_pressure_MPa
810
from geophires_x.Model import Model
911
from geophires_x.Reservoir import Reservoir
12+
from geophires_x_client import GeophiresInputParameters
13+
from geophires_x_client import GeophiresXClient
14+
from geophires_x_client import GeophiresXResult
1015
from tests.base_test_case import BaseTestCase
1116

1217

@@ -27,6 +32,7 @@ def test_reservoir_lithostatic_pressure(self):
2732
self.assertAlmostEqual(79.433865, p.magnitude, places=3)
2833
self.assertEqual('megapascal', p.units)
2934

35+
# noinspection PyMethodMayBeStatic
3036
def _new_model(self, input_file=None) -> Model:
3137
stash_cwd = Path.cwd()
3238
stash_sys_argv = sys.argv
@@ -45,3 +51,45 @@ def _new_model(self, input_file=None) -> Model:
4551
os.chdir(stash_cwd)
4652

4753
return m
54+
55+
def test_number_of_fractures(self):
56+
def _get_result(num_fractures: int) -> GeophiresXResult:
57+
return GeophiresXClient().get_geophires_result(
58+
GeophiresInputParameters(
59+
from_file_path=self._get_test_file_path('generic-egs-case.txt'),
60+
params={
61+
'Reservoir Volume Option': '1, -- FRAC_NUM_SEP',
62+
'Fracture Shape': '3, -- Square',
63+
'Fracture Height': 165,
64+
'Number of Fractures': num_fractures,
65+
},
66+
)
67+
)
68+
69+
def _fractures_lcoe_net(r: GeophiresXResult) -> tuple[int, float, float]:
70+
return (
71+
r.result['RESERVOIR PARAMETERS']['Number of fractures']['value'],
72+
r.result['SUMMARY OF RESULTS']['Electricity breakeven price']['value'],
73+
r.result['SUMMARY OF RESULTS']['Average Net Electricity Production']['value'],
74+
)
75+
76+
fractures, lcoe, net_production = _fractures_lcoe_net(_get_result(10_000))
77+
78+
self.assertEqual(10_000, fractures)
79+
80+
self.assertGreater(lcoe, 0)
81+
self.assertLess(lcoe, 400)
82+
83+
self.assertGreater(net_production, 0)
84+
self.assertLess(net_production, 500)
85+
86+
max_fractures = 99_999
87+
fractures, lcoe, net_production = _fractures_lcoe_net(_get_result(max_fractures))
88+
89+
self.assertEqual(max_fractures, fractures)
90+
91+
self.assertGreater(lcoe, 0)
92+
self.assertLess(lcoe, 400)
93+
94+
self.assertGreater(net_production, 0)
95+
self.assertLess(net_production, 500)

0 commit comments

Comments
 (0)