Skip to content

Commit

Permalink
Implementing a way to handle overpressure
Browse files Browse the repository at this point in the history
environments; adding better defaults and new comments where I can.
Improved readability
  • Loading branch information
malcolm-dsider committed Apr 16, 2024
1 parent 6d807d4 commit ecffdb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/geophires_x/WellBores.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def InjectionReservoirPressurePredictor(project_lifetime: int, timesteps_per_yea
# Calculate the initial pressure
pressure[0] = initial_pressure
pressure_change_per_timestep = inflation_rate / timesteps_per_year
for timestep in range(1, project_lifetime * timesteps_per_year, 1):
pressure[timestep] = initial_pressure + (pressure_change_per_timestep * timestep)
for current_timestep in range(1, project_lifetime * timesteps_per_year):
pressure[current_timestep] = initial_pressure + (pressure_change_per_timestep * current_timestep)
return pressure


Expand Down Expand Up @@ -78,7 +78,7 @@ def ReservoirPressurePredictor(project_lifetime: int, timesteps_per_year: int, i
delta_pressure = (pressure[0] - initial_pressure)
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, 1):
for timestep in range(1, depletion_timesteps):
pressure[timestep] = pressure[0] - (pressure_change_per_timestep * timestep)
if pressure[timestep] < initial_pressure:
# If the pressure drops below the hydrostatic pressure, set it to the hydrostatic pressure and break out
Expand Down

0 comments on commit ecffdb7

Please sign in to comment.