Skip to content

Instantly share code, notes, and snippets.

@kperry2215
Created July 4, 2019 22:33
Show Gist options
  • Save kperry2215/1964b8d598f9801dad7bf23a234cd96a to your computer and use it in GitHub Desktop.
Save kperry2215/1964b8d598f9801dad7bf23a234cd96a to your computer and use it in GitHub Desktop.
def hyperbolic_equation(t, qi, b, di):
"""
Hyperbolic decline curve equation
Arguments:
t: Float. Time since the well first came online, can be in various units
(days, months, etc) so long as they are consistent.
qi: Float. Initial production rate when well first came online.
b: Float. Hyperbolic decline constant
di: Float. Nominal decline rate at time t=0
Output:
Returns q, or the expected production rate at time t. Float.
"""
return qi/((1.0+b*di*t)**(1.0/b))
def exponential_equation(t, qi, di):
"""
Exponential decline curve equation
Arguments:
t: Float. Time since the well first came online, can be in various units
(days, months, etc) so long as they are consistent.
qi: Float. Initial production rate when well first came online.
di: Float. Nominal decline rate (constant)
Output:
Returns q, or the expected production rate at time t. Float.
"""
return qi*np.exp(-di*t)
@kperry2215
Copy link
Author

Created exponential and hyperbolic equation section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment