Skip to content

Commit 6a7bec7

Browse files
Small changes to make Economics calculation cleaer and more correct; fixed bug in HTML output
1 parent fc58cfe commit 6a7bec7

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/geophires_x/Economics.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,20 +2332,21 @@ def Calculate(self, model: Model) -> None:
23322332
vert_depth_km = model.reserv.InputDepth.quantity().to('km').magnitude
23332333
model.wellbores.injection_reservoir_depth.value = vert_depth_km
23342334

2335-
tot, vert, horiz = calculate_total_drilling_lengths_m(model.wellbores.Configuration.value,
2335+
tot_m, tot_vert_m, tot_horiz_m = calculate_total_drilling_lengths_m(model.wellbores.Configuration.value,
23362336
model.wellbores.numnonverticalsections.value,
23372337
model.wellbores.Nonvertical_length.value / 1000.0,
23382338
vert_depth_km,
23392339
model.wellbores.nprod.value,
23402340
model.wellbores.ninj.value)
23412341

23422342
else:
2343-
tot = vert = model.reserv.depth.quantity().to('km').magnitude
2344-
horiz = 0.0
2343+
tot_m = tot_vert_m = model.reserv.depth.quantity().to('km').magnitude
2344+
tot_horiz_m = 0.0
23452345
if not model.wellbores.injection_reservoir_depth.Provided:
23462346
model.wellbores.injection_reservoir_depth.value = model.reserv.depth.quantity().to('km').magnitude
23472347
else:
23482348
model.wellbores.injection_reservoir_depth.value = model.wellbores.injection_reservoir_depth.quantity().to('km').magnitude
2349+
23492350
self.cost_one_production_well.value = calculate_cost_of_one_vertical_well(model, model.reserv.depth.quantity().to('m').magnitude,
23502351
self.wellcorrelation.value,
23512352
self.Vertical_drilling_cost_per_m.value,
@@ -2362,12 +2363,13 @@ def Calculate(self, model: Model) -> None:
23622363
self.injection_well_cost_adjustment_factor.value)
23632364

23642365
if hasattr(model.wellbores, 'numnonverticalsections') and model.wellbores.numnonverticalsections.Provided:
2365-
cost_nonvertical_section = calculate_cost_of_non_vertical_section(model, horiz, self.wellcorrelation.value,
2366+
cost_nonvertical_section = calculate_cost_of_non_vertical_section(model, tot_horiz_m,
2367+
self.wellcorrelation.value,
23662368
self.Nonvertical_drilling_cost_per_m.value,
23672369
model.wellbores.numnonverticalsections.value,
23682370
self.per_injection_well_cost.Name,
23692371
model.wellbores.NonverticalsCased.value,
2370-
1.0)
2372+
self.production_well_cost_adjustment_factor.value)
23712373
else:
23722374
cost_nonvertical_section = 0.0
23732375
# cost of the well field

src/geophires_x/GeoPHIRESUtils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def InsertImagesIntoHTML(html_path: str, short_names: set, full_names: set) -> N
101101
insert_string = ''
102102
for _ in range(len(full_names)):
103103
name_to_use = short_names.pop()
104-
insert_string = insert_string + f'<img src="{name_to_use}.png" alt="{name_to_use}">\n<br>'
104+
insert_string = insert_string + f'<img src="{name_to_use}" alt="{name_to_use}">\n<br>'
105105

106106
match_string = '</body>'
107107
with open(html_path, 'r+', encoding='UTF-8') as html_file:

0 commit comments

Comments
 (0)