Skip to content

Commit 6a9f4ec

Browse files
Output reservoir impedance with appropriate decimal places for its allowed values
1 parent 7127db0 commit 6a9f4ec

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/geophires_x/Outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ def PrintOutputs(self, model: Model):
17431743
f.write(f' Fracture separation: {model.reserv.fracsepcalc.value:10.2f} ' + model.reserv.fracsep.CurrentUnits.value + NL)
17441744
f.write(f' Reservoir volume: {model.reserv.resvolcalc.value:10.0f} ' + model.reserv.resvol.CurrentUnits.value + NL)
17451745
if model.wellbores.impedancemodelused.value:
1746-
f.write(f' Reservoir impedance: {model.wellbores.impedance.value/1000:10.2f} ' + model.wellbores.impedance.CurrentUnits.value + NL)
1746+
f.write(f' Reservoir impedance: {model.wellbores.impedance.value/1000:10.4f} {model.wellbores.impedance.CurrentUnits.value}\n')
17471747
else:
17481748
if model.wellbores.overpressure_percentage.Provided:
17491749
# write the reservoir pressure as an average in the overpressure case

src/geophires_x/WellBores.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,11 @@ def __init__(self, model: Model):
796796
)
797797
self.impedance = self.ParameterDict[self.impedance.Name] = floatParameter(
798798
"Reservoir Impedance",
799+
800+
# Note default/input value units are converted as a special case in read_parameters; see
801+
# https://github.com/NREL/GEOPHIRES-X/blob/d51eb8d1dc8b21c7a79c4d35f296d740347658e0/src/geophires_x/WellBores.py#L1280-L1282
799802
DefaultValue=1000.0,
803+
800804
Min=1E-4,
801805
Max=1E4,
802806
UnitType=Units.IMPEDANCE,
@@ -1277,7 +1281,8 @@ def read_parameters(self, model: Model) -> None:
12771281
# impedance: impedance per well pair (input as GPa*s/m^3 and converted to KPa/kg/s
12781282
# (assuming 1000 for density; density will be corrected for later))
12791283
elif ParameterToModify.Name == "Reservoir Impedance":
1280-
# shift it by a constant to make the units right, per line 619 of GEOPHIRES 2
1284+
# shift it by a constant to make the units right, per line 619 of GEOPHIRES 2:
1285+
# https://github.com/NREL/GEOPHIRES-v2/blob/08485b98ae02aeb7a5acd972f906b2ea81ae2647/GEOPHIRESv2.py#L610-L619
12811286
self.impedance.value = self.impedance.value * (1E6 / 1E3)
12821287
self.impedancemodelused.value = True
12831288
if self.impedance.Provided is False:

tests/examples/Fervo_Project_Cape-3.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
Simulation Metadata
66
----------------------
7-
GEOPHIRES Version: 3.7.1
8-
Simulation Date: 2025-01-22
9-
Simulation Time: 10:48
10-
Calculation Time: 0.889 sec
7+
GEOPHIRES Version: 3.7.12
8+
Simulation Date: 2025-02-17
9+
Simulation Time: 10:42
10+
Calculation Time: 0.890 sec
1111

1212
***SUMMARY OF RESULTS***
1313

@@ -70,7 +70,7 @@ Simulation Metadata
7070
Number of fractures: 149.00
7171
Fracture separation: 30.00 meter
7272
Reservoir volume: 88800000000 m**3
73-
Reservoir impedance: 0.00 GPa.s/m**3
73+
Reservoir impedance: 0.0010 GPa.s/m**3
7474
Reservoir density: 2800.00 kg/m**3
7575
Reservoir thermal conductivity: 3.05 W/m/K
7676
Reservoir heat capacity: 790.00 J/kg/K

0 commit comments

Comments
 (0)