<jupyter_start><jupyter_text><jupyter_code>import math
from sympy import *

init_printing(use_unicode=True)
PR1 = 20*10**6 # reservoir pressure for 1st well
PR2 = 20*10**6 # reservoir pressure for 2nd well 
PRw1 = 18*10**6 # downhole pressure for 1st well 
PRw2 = 18*10**6 # downhole pressure for 2nd well
R1 = 300 # contour supplement radius for 1st well 
R2 = 300 # contour supplement radius for 2nd well 
Rw1 = 0.12 # 1st well’s radius 
Rw2 = 0.12 # 2nd well’s radius 
b1 = 140 # vertical distance from 1st well to origin of the coordinates in the intersection area 
b2 = 140 # vertical distance from 2nd well to origin of the coordinates in the intersection area 
h1 = 4 # thickness of the reservoir layer 
h2 = 4 # thickness of the reservoir layer 
k = 0.63*10**-2 # permeability coefficient 
μ = 1*10**-2
r1z1 = 57.4 # radius on edge of zone 1 for well 1 
r1z2 = 262 # radius on edge of zone 2 for well 1 
μz1 = 103.4*10**-4 # viscosity on the boarder of the 1st zone 
μz2 = 141*10**-4 # viscosity on the boarder of the 2nd zone 
μz3 = 206.9*10**-4 # viscosity on the boarder of the 3rd zone (contour supplement) 
P1z1 = PR1-((PR1-PRw1) * math.log(R1/r1z1))/math.log(R1/Rw1)# pressure on edge of zone 1 for well 1 
P1z2 = PR1-((PR1-PRw1) * math.log(R1/r1z2))/math.log(R1/Rw1)# pressure on edge of zone 2 for well 1 
P2z1 = P1z1 # pressure on edge of zone 1 for well 2 
P2z2 = P1z2 # pressure on edge of zone 2 for well 2 
r2z1 = R2 * (R2/Rw2)**(-(PR2-P2z1)/(PR2-PRw2)) # radius on edge of zone 1 for well 2 
r2z2 = R2 * (R2/Rw2)**(-(PR2-P2z2)/(PR2-PRw2)) # radius on edge of zone 2 for well 2 
# Calculate the ratio of the pressure drop over the natural log of the contour
# supplement radius over wells radius for both wells
DP1 = (PR1 - PRw1) / log(R1 / Rw1)
DP2 = (PR2 - PRw2) / log(R2 / Rw2)
# define radius for any given point in the intersection area for the 1st and 
# 2nd well
x, y = symbols('x y')
r1 = sqrt(x**2 + (y+b1)**2)
r2 = sqrt(x**2 + (y-b2)**2)
# define Cos[θ] as a function of the angle between the two pressure vectors
w = (r1**2 +r2**2 - (b1+b2)**2) / (2*r1*r2)
w
#define the Net pressure function for both pressure vectors
P = sqrt(DP1**2 * log((R1/r1)**2)+DP2**2*log((R2/r2)**2)+2*DP1*DP2*log(R2/r2)*log(R1/r1)*w)
P
xintersection = (math.sqrt(-(b1+b2)**4+2*R1**2*(b1+b2)**2+2*R2**2*(b1+b2)**2-(R1-R2)**2))/(2*sqrt(b1**2+2*b1*b2+b2**2))
yintersection = (-b1**2+b2**2+R1**2-R2**2)/(2*(b1+b2))
print(xintersection)
print(yintersection)
yP0 = solve(DP1*log(R1/r1.subs(x, 0))-DP2*log(R2/r2.subs(x, 0)),y) # -4.89639*10**-15
yP0<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14794732765298219, 'fraction_numerical': 0.10689388071262587, 'mean_word_length': 4.104743083003952, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '310965', 'license': 'ECL-2.0', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1082, 'n_words': 338, 'path': 'GAAX.ipynb', 'repo_name': 'ol8vil/thingsboard', 'size': '2582'}