pywellgeo.well_tree
pywellgeo.well_tree.well_tree_azim_dip
WellTreeAzimDip
Well Tree for well representation with multiple branches with azim dip notation the branches are the subsequent well bore subsegments, the representation is in x,y,z with curved segments which will be constructed from input yml. They are self explanatory in the sense that that consecutive (x,y,z) and (azim,dip) shooting directions are coplanar
from_input_trajectory
classmethod
from_input_trajectory(
input_trajectory: Dict[
str,
Dict[
str,
Dict[
str,
Union[
str,
Dict[str, int],
float,
Dict[str, Dict[str, int]],
],
],
],
],
wellname: str,
) -> "WellTreeAzimDip"
compute tree branches from input yaml :param input_trajectory dictionary (yaml section of well_trajectories) :param wellname wellname to consider
fromtargetXYZ
classmethod
fromtargetXYZ(
nlast: "WellTreeAzimDip",
xnew: Union[int, int64],
ynew: Union[int, int64],
znew: Union[int, int64],
radius: float,
BUR: float,
sname: Optional[str] = "main",
namesub: Optional[str] = "sub",
) -> "WellTreeAzimDip"
get the plane normal from the self, and KOP to reach xnew, ynew,znew, from the end point to reach :param nlast parent node :param xnew x-coordinate of point to reach :param ynew y-coordinate of point to reach :param znew z-coordinate of point to reach :param radius radius of the well segment :param BUR build up rate of the segment :param sname name of the branch :param namesub name of the segment in the branch :returns WellTreeAzimDip node reprsenting the path
gettangent
classmethod
gettangent(
t2: CoordinateTransformation,
xint: ndarray,
radius: float,
) -> Tuple[ndarray, AzimDip, float64]
this methods - assumes a local coordinate system with x-axis in the direction of ad (dip direction) and y along the strike, stored in t2 - xint is located in that plane - it finds the line tangent to the circle either centered at (0,-radius) or (0,radius) in the local coordinate system of the plane dipping in ad, from xint touching the circle. It is oriented such that shooting from xint, the subsequent arc segment results in the orientation of ad - the tangent location and the abslute azimip of the tangent (adtan) at that location is given, - and the inclination to be used of the plane direction relative to adtan
:param radius: radius of the circle :return: tuple xtan , adtan, inclination
fromAzimDipFromtargetXYZ
classmethod
fromAzimDipFromtargetXYZ(
nlast: "WellTreeAzimDip",
xnew: int,
ynew: int,
znew: int,
azimnew: Optional[int],
dipnew: int,
radius: float,
BUR: float,
sname: Optional[str] = "main",
namesub: Optional[str] = "sub",
) -> "WellTreeAzimDip"
get the plane normal, and KOP to reach xnew, ynew,znew, and either azimnew or dipnew :param nlast parent node :param xnew x-coordinate of point to reach :param ynew y-coordinate of point to reach :param znew z-coordinate of point to reach :param azimnew azimuth (strike) for the wellbore to reach :param dipnew dip for the well bore to reach at x,y,a location :returns WellTreeAzimDip node reprsenting the path
findAzim
classmethod
find azimuth with the correct dip. It only considers a positive y value in the local coordinate system
:param plane: plane containing the entry and exit of the path :param dip: target dip :return: azim azimuth of the exit trajectory
findDip
classmethod
find the dip at the specified direction of the azimuth of the well bore at the exit point in the plane starting from the entry point and azimdip direction
:param tplane: plane containing the entry and exit of the path :param azim: azimuth direction to find dip for the exit :return: dip of vector on the tplane which intersects with vertical plane at azim and of which innerproduct with the azim strike is positive
read_input
classmethod
read_input(
config: str,
) -> Dict[
str,
Union[
str,
Dict[str, Dict[str, Union[float, int]]],
Dict[
str,
Dict[
str,
Dict[
str,
Union[
str,
Dict[str, int],
float,
Dict[str, Dict[str, int]],
],
],
],
],
],
]
Read .yml file with settings
substitute_input
classmethod
substitute items in subdict in inputs, not functioning at present
process_inputs
classmethod
Process all input files
getCoordinateTransformation
getCoordinateTransformation(
doprint: Optional[bool] = False,
) -> Tuple[CoordinateTransformation, AzimDip]
" defines coordinate transformation in such a way that - the local x axis is positive in the direction of the previous azim/dip orientation, - the local x,y plane is spanned by the vector (self.x-xroot.x) and the azim/dip vector - the positive y aligns with the vector (self.x-xroot.x) :returns CoordinateTransformation object and the x,y plane in azim dip notation
getLocalCoordinates
getLocalCoordinates(
md: float64,
blist: List[WellTreeAzimDip],
tlist: List[CoordinateTransformation],
) -> Tuple[int, ndarray, AzimDip, ndarray, AzimDip]
" based on measured depth md (along hole depth)
get_survey_EL
classmethod
save the main branchs of 'well1' and 'well2' trajectory with name sbranch to survey points file :param trj : dictionary with well (branch) surveys :param wname1 first well to start survey data :param wname2 second well to extend survey data in reverse orde (the endpoint of wname1 and wname2 are expected correspond) :param bname branch name of the connected laterals :return: survey as dataframe
getKOP_L
getKOP_L(
bur: float, phi: float64, xoff: float64, zoff: float64
) -> Union[
Tuple[int, int, int, float64, int],
Tuple[float64, float64, float64, float64, float64],
]
Compute KOP and L specification for well in plane entering vertical at 0,0 and exiting at inclination phi at xoff, zoff
:param bur: build up rate for the well, degrees per 30 m :param phi: target inclination (degrees) of the well at xoff, zoff in range (0,180) :param xoff: off axis point of continuation of well trajectory (should be positive) :param yoff: in axis point of continuation of well trajectory (should be positive) :param bur: buildup rate of the well typically 3 degrees (per 30 m) :return: tuple A, xb, zb, KOP, L
notes
- where A is arclength for the buildup,
- xb, zb are the horizontal and vertical spacing for the Buildup,
- KOP is Kickoff point and L Length to reach xoff, zoff (such that xb+Lsin(phi)=xoff and zb+KOP +Lcos(phi)=zoff)
- total MD is equal to KOP + A + L
find_phi_L
Compute KOP, phi and L for well in plane entering and exiting at same orientation (vertical in z direction) to reach coordinates (0.5dx,0.5dz) starting from (0,0) phi is chosen as low possible value, based on dx (KOP close to 0) it also resurns xb and zb which are the horizontal and vertical spacing for the Buildup, and returns the arclength R for the build up
:param dx: off axis shift of continuation of well trajectory (should be positive) :param dz: in axis shift of continuation of well trajectory (should be positive) :param bur: buildup rate of the well typically 3 degrees (per 30 m) :return tuple: phi, R, d1, v2, KOP, L to reach coordinates (0.5dx,0.5dz) starting from 0,0
find_phi
find_phi(
dx: float64, dz: float64, bur: Optional[float] = 3.0
) -> Tuple[
float64, float64, float64, float64, float64, float64
]
Compute phi (pitch) such that with KOP is zero it also resurns xb and zb which are the horizontal and vertical spacing for the Buildup, and returns the arclength R for the build up
:param dx: off axis shift of continuation of well trajectory (should be positive) :param dz: in axis shift of continuation of well trajectory (should be positive) :param bur: buildup rate of the well typically 3 degrees (per 30 m) :return: tuple phi, R, d1, v2, KOP, L to reach coordinates (0.5dx,0.5dz) starting from 0,0