Skip to content

Commit

Permalink
Fixed index problem in WellBores.py calculation of overpressure and a…
Browse files Browse the repository at this point in the history
…dded edge test case.
  • Loading branch information
malcolm-dsider committed May 2, 2024
1 parent cb29e6f commit 149abb1
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/geophires_x/WellBores.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def ReservoirPressurePredictor(project_lifetime_yr: int, timesteps_per_year: int
delta_pressure = (pressure[0] - initial_pressure_kPa)
depletion_timesteps = int((100.0 / depletion_rate) * timesteps_per_year)
pressure_change_per_timestep = delta_pressure / depletion_timesteps
for timestep in range(1, depletion_timesteps):
for timestep in range(1, project_lifetime_yr * timesteps_per_year):
pressure[timestep] = pressure[0] - (pressure_change_per_timestep * timestep)
if pressure[timestep] < initial_pressure_kPa:
# If the pressure drops below the hydrostatic pressure, set it to the hydrostatic pressure and break out
Expand Down
Loading

0 comments on commit 149abb1

Please sign in to comment.