def F_b2_k_1(p, m, S, yd, ywd, yed, xd, xwd, xed, zd, zwd, zed, Ld, xbound, ybound, subtract_inf): if subtract_inf: sbtr_inf = 0 else: sbtr_inf = 1 k = m n = p if xbound == "n": part__1 = cos(k * pi * xd / xed) * cos(k * pi * xwd / xed) elif xbound == "c": part__1 = sin(k * pi * xd / xed) * sin(k * pi * xwd / xed) else: part__1 = 0 if ybound == "n": sign = 1 elif ybound == "c": sign = -1 else: sign = 1 e_n_k = sqrt(S + (n * pi * Ld)**2 + k**2 * pi**2 / xed**2) F_b2_k_1 = sin(pi * k / xed) * part__1 / e_n_k / k * ( (sign * exp(-e_n_k * (yd + ywd)) + sign * exp(-e_n_k * (2 * yed - yd - ywd)) + exp(-e_n_k * (2 * yed - abs(yd - ywd)))) * (1 + sumexp(e_n_k, yed)) + exp(-e_n_k * abs(yd - ywd)) * (sbtr_inf + sumexp(e_n_k, yed))) return F_b2_k_1
def pd_b1(S, yd, ywd, yed, xed, xbound, ybound, subtract_inf=True): if xbound == "c": pd_b1 = 0 return pd_b1 if ybound == "n": # no flow boundary parallel to fracture signum = 1 elif ybound == "c": # constant pressure parallel to fracture signum = -1 else: signum = 1 if subtract_inf: sbtr_inf = 0 else: sbtr_inf = 1 if S < small / yed**2: # this is long time approximation - large t_DA - boundary dominated flow # It seems that in in SPE-18616-PA formula (51) is an error # That is their expression works only yd > yw # pd_b1 = 1 / (u ^ 2 * yed * xed) + yed / xed * (1 / 3 - yd / yed + (yd ^ 2 + ywd ^ 2) / (2 * yed ^ 2)) # should be: # no flow y boundary: 1 / (u ^ 2 * yed * xed) + yed / xed * (1 / 3 - 1 / 2 * (abs(yd - ywd) + (yd + ywd))/ yed + (yd ^ 2 + ywd ^ 2) / (2 * yed ^ 2)) # constant pressure: yed / xed * (1 / 2 ((yd + ywd) - abs(yd - ywd))/ yed - (yd ywd) / (yed ^ 2)) # if ybound == "n": Pd = yed / xed * (1 / 3 - 1 / 2 * (abs(yd - ywd) + (yd + ywd)) / yed + (yd**2 + ywd**2) / (2 * yed**2)) if S > 0: # if S is positive we add 2 * PI * tdA material balance pressure decline # Negative S indicates that long time approximation (real space) should be applied Pd = Pd + 1 / (S * yed * xed) else: # this is constant pressure south and north (yd = 0 and yd=yed) Pd = yed / xed * (1 / 2 * ((yd + ywd) - abs(yd - ywd)) / yed - (yd * ywd) / yed**2) else: # small time - not using boundary dominated formulas u = sqrt(S) summ = sumexp(u, yed) yd1 = yed - abs(yd - ywd) yd2 = yed - (yd + ywd) Pd = 1 / 2 / u / xed * (exp(-u * abs(yd - ywd)) * (sbtr_inf + summ) + (signum * exp(-u * (yd + ywd)) + signum * exp(-u * (yed + yd2)) + exp(-u * (yed + yd1))) * (1 + summ)) pd_b1 = Pd return pd_b1
def F_b1_k(k, S, xed, yd, ywd, yed, zd, zwd, zed, Ld, xbound, ybound, subtract_inf): if subtract_inf: sbtr_inf = 0 else: sbtr_inf = 1 n = k part__1 = cos(n * pi * zd / zed) * cos(n * pi * zwd / zed) if ybound == "n": sign = 1 elif ybound == "c": sign = -1 else: sign = 1 e_n = sqrt(S + (n * pi * Ld)**2) F_b1_k = part__1 / e_n * ( (sign * exp(-e_n * (yd + ywd)) + sign * exp(-e_n * (2 * yed - yd - ywd)) + exp(-e_n * (2 * yed - abs(yd - ywd)))) * (1 + sumexp(e_n, yed)) + exp(-e_n * abs(yd - ywd)) * (sbtr_inf + sumexp(e_n, yed))) return F_b1_k
def pd_b2_k(k, S, xd, xwd, xed, yd, ywd, yed, xbound, ybound, compl_type, subtract_inf): if xbound == 'n': part__1 = 2 / xed * cos(k * pi * xd / xed) * cos(k * pi * xwd / xed) elif xbound == "c": part__1 = 2 / xed * sin(k * pi * xd / xed) * sin(k * pi * xwd / xed) else: part__1 = 0 if compl_type == "frac": #'coefficient like 2/2 are remained to remember where they come from part__1 = 2 / 2 * xed / pi / k * sin(k * pi / xed) * part__1 elif compl_type == "vert": part__1 = part__1 else: pd_b2_k = 0 return pd_b2_k if ybound == "n": signum = 1 elif ybound == "c": signum = -1 else: signum = 1 if subtract_inf: sbtr_inf = 0 else: sbtr_inf = 1 ek = sqrt(S + k**2 * pi**2 / xed**2) smexp = sumexp(ek, yed) part__2 = exp( (-1) * ek * abs(yd - ywd)) * (sbtr_inf + smexp) + (signum * exp( (-1) * ek * (yd + ywd)) + exp( (-1) * ek * (2 * yed - abs(yd - ywd))) + signum * exp( (-1) * ek * (2 * yed - (yd + ywd)))) * (1 + smexp) part__2 = 1 / (2 * ek) * part__2 pd_b2_k = part__1 * part__2 return pd_b2_k
def pd_b1(S, yd, ywd, yed, xed, xbound, ybound, subtract_inf=True): if xbound == "c": pd_b1 = 0 return pd_b1 if ybound == "n": #'no flow boundary parallel to fracture signum = 1 elif ybound == "c": #'constant pressure parallel to fracture signum = -1 else: signum = 1 if subtract_inf: sbtr_inf = 0 else: sbtr_inf = 1 if S < small / yed**2: if ybound == "n": Pd = yed / xed * (1 / 3 - 1 / 2 * (abs(yd - ywd) + (yd + ywd)) / yed + (yd**2 + ywd**2) / (2 * yed**2)) if S > 0: #'if S is positive we add 2 * PI * tdA material balance pressure decline #'Negative S indicates that long time approximation (real space) should be applied Pd = Pd + 1 / (S * yed * xed) else: #'this is constant pressure south and north (yd = 0 and yd=yed) Pd = yed / xed * (1 / 2 * ((yd + ywd) - abs(yd - ywd)) / yed - (yd * ywd) / yed**2) else: #'small time - not using boundary dominated formulas u = sqrt(S) summ = sumexp(u, yed) yd1 = yed - abs(yd - ywd) yd2 = yed - (yd + ywd) Pd = 1 / 2 / u / xed * (exp(-u * abs(yd - ywd)) * (sbtr_inf + summ) + (signum * exp(-u * (yd + ywd)) + signum * exp(-u * (yed + yd2)) + exp(-u * (yed + yd1))) * (1 + summ)) pd_b1 = Pd return pd_b1