Skip to content

Commit ecffdb7

Browse files
Implementing a way to handle overpressure
environments; adding better defaults and new comments where I can. Improved readability
1 parent 6d807d4 commit ecffdb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/geophires_x/WellBores.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def InjectionReservoirPressurePredictor(project_lifetime: int, timesteps_per_yea
4040
# Calculate the initial pressure
4141
pressure[0] = initial_pressure
4242
pressure_change_per_timestep = inflation_rate / timesteps_per_year
43-
for timestep in range(1, project_lifetime * timesteps_per_year, 1):
44-
pressure[timestep] = initial_pressure + (pressure_change_per_timestep * timestep)
43+
for current_timestep in range(1, project_lifetime * timesteps_per_year):
44+
pressure[current_timestep] = initial_pressure + (pressure_change_per_timestep * current_timestep)
4545
return pressure
4646

4747

@@ -78,7 +78,7 @@ def ReservoirPressurePredictor(project_lifetime: int, timesteps_per_year: int, i
7878
delta_pressure = (pressure[0] - initial_pressure)
7979
depletion_timesteps = int((100.0 / depletion_rate) * timesteps_per_year)
8080
pressure_change_per_timestep = delta_pressure / depletion_timesteps
81-
for timestep in range(1, depletion_timesteps, 1):
81+
for timestep in range(1, depletion_timesteps):
8282
pressure[timestep] = pressure[0] - (pressure_change_per_timestep * timestep)
8383
if pressure[timestep] < initial_pressure:
8484
# If the pressure drops below the hydrostatic pressure, set it to the hydrostatic pressure and break out

0 commit comments

Comments
 (0)