From b2a38dce3814c3092c655c0988d8ac72c0233a15 Mon Sep 17 00:00:00 2001 From: Zabamund Date: Mon, 19 Aug 2019 13:19:18 +0200 Subject: [PATCH] update returns statements and high_tan math --- wellpathpy/tan.py | 98 ++++++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 43 deletions(-) diff --git a/wellpathpy/tan.py b/wellpathpy/tan.py index 466dcd5..8f35699 100644 --- a/wellpathpy/tan.py +++ b/wellpathpy/tan.py @@ -3,22 +3,25 @@ from .checkarrays import checkarrays def tan_method(md, inc, azi, choice='avg'): - """ - Calculate TVD using one of the tangential method. + """Calculate TVD using one of the tangential method. Parameters ---------- - md: float, measured depth in m or ft - inc: float, well deviation in degrees - azi: float, well azimuth in degrees - choice: str, choice of tangential method to run + md : float + measured depth + inc : float + well deviation in degrees + azi : float + well azimuth in degrees + choice : str + choice of tangential method to run Returns ------- - Deviation converted to TVD, easting, northing - tvd, - northing, - easting + tvd : array_like of float + true vertical depth + northing : array_like of float + easting : array_like of float """ if choice == 'bal': @@ -61,38 +64,48 @@ def tan_method(md, inc, azi, choice='avg'): return tvd, northing, easting def high_tan(md, inc, azi): - """ - Calculate TVD using high tangential method. + """Calculate TVD using high tangential method. + This method takes the sines and cosines of the inclination and azimuth at the bottom of the survey interval to estimate tvd. This method is not recommended as it can make gross tvd and offset errors in typical deviated wells. - Formula - ------- - northing = sum((md_lower - md_upper) * sin(inc_lower) * cos(azi_lower)) - easting = sum((md_lower - md_upper) * sin(inc_lower) * sin(azi_lower)) - tvd = sum((md_lower - md_upper) * cos(azi_lower)) + Parameters + ---------- + md : float + measured depth + inc : float + well deviation in degrees + azi : float + well azimuth in degrees + + Notes + ----- + Formulae: + .. math:: + northing = \sum (md_l - md_u) \cdot sin(inc_l) \cdot cos(azi_l) + + .. math:: + easting = \sum(md_l - md_u) \cdot sin(inc_l) \cdot sin(azi_l) + + .. math:: + tvd = \sum(md_l - md_u) \cdot cos(azi_l) where: - md_upper: upper survey station depth MD - md_lower: lower survey station depth MD - inc_lower: lower survey station inclination in degrees - azi_lower: lower survey station azimuth in degrees - Parameters - ---------- - md: float, measured depth in m or ft - inc: float, well deviation in degrees - azi: float, well azimuth in degrees + :math:`md_u`: upper survey station depth MD + :math:`md_l`: lower survey station depth MD + :math:`inc_l`: lower survey station inclination in degrees + :math:`azi_l`: lower survey station azimuth in degrees Returns ------- - Deviation converted to TVD, easting, northing - tvd in m or feet, - northing in m or feet, - easting in m or feet + tvd : array_like of float + true vertical depth + northing : array_like of float + easting : array_like of float """ return tan_method(md, inc, azi, choice='high') @@ -125,10 +138,10 @@ def low_tan(md, inc, azi): Returns ------- - Deviation converted to TVD, easting, northing - tvd in m or feet, - northing in m or feet, - easting in m or feet + tvd : array_like of float + true vertical depth + northing : array_like of float + easting : array_like of float """ return tan_method(md, inc, azi, choice='low') @@ -161,10 +174,10 @@ def average_tan(md, inc, azi): Returns ------- - Deviation converted to TVD, easting, northing - tvd in m or feet, - northing in m or feet, - easting in m or feet + tvd : array_like of float + true vertical depth + northing : array_like of float + easting : array_like of float """ return tan_method(md, inc, azi, choice='avg') @@ -200,11 +213,10 @@ def balanced_tan(md, inc, azi): Returns ------- - Deviation converted to TVD, easting, northing - tvd in m or feet, - northing in m or feet, - easting in m or feet - + tvd : array_like of float + true vertical depth + northing : array_like of float + easting : array_like of float """ md, inc, azi = checkarrays(md, inc, azi)