Ejemplo n.º 1
0
    def hydrostatic(self):
        """
        Hydrostatic Pressure

        Returns
        -------
        numpy.ndarray
        """
        try:
            # temp_log = self.get_log('Overburden_Pressure')
            return hydrostatic_pressure(self.depth,
                                        kelly_bushing=self.kelly_bushing,
                                        depth_w=self.water_depth)
        except Exception as ex:
            print(ex.message)
Ejemplo n.º 2
0
    def hydrostatic(self):
        """
        Hydrostatic Pressure

        Returns
        -------
        numpy.ndarray
        """
        try:
            # temp_log = self.get_log('Overburden_Pressure')
            return hydrostatic_pressure(
                self.depth,
                kelly_bushing=self.kelly_bushing,
                depth_w=self.water_depth)
        except Exception as ex:
            print(ex.message)
Ejemplo n.º 3
0
    def get_pressure_normal(self):
        """
        return pressure points within normally pressured zone.

        Returns
        -------
        Log
            Log object containing normally pressured measurements
        """
        # obp_log = self.get_log("Overburden_Pressure")
        hydro = hydrostatic_pressure(self.depth,
                                     kelly_bushing=self.kelly_bushing,
                                     depth_w=self.water_depth)
        depth = self.params["MP"]
        obp_depth = self.depth
        pres_data = list()
        for dp in depth:
            idx = np.searchsorted(obp_depth, dp)
            pres_data.append(hydro[idx])

        log = Log()
        log.depth = depth
        log.data = pres_data
        return log
Ejemplo n.º 4
0
    def get_pressure_normal(self):
        """
        return pressure points within normally pressured zone.

        Returns
        -------
        Log
            Log object containing normally pressured measurements
        """
        # obp_log = self.get_log("Overburden_Pressure")
        hydro = hydrostatic_pressure(self.depth,
                                     kelly_bushing=self.kelly_bushing,
                                     depth_w=self.water_depth)
        depth = self.params["MP"]
        obp_depth = self.depth
        pres_data = list()
        for dp in depth:
            idx = np.searchsorted(obp_depth, dp)
            pres_data.append(hydro[idx])

        log = Log()
        log.depth = depth
        log.data = pres_data
        return log
Ejemplo n.º 5
0
    def get_pressure(self, pres_key, ref=None, hydrodynamic=0, coef=False):
        """
        Get Pressure Values or Pressure Coefficients

        Parameters
        ----------
        pres_key : str
            Pressure data name
        ref : {'sea', 'kb'}
            depth reference, 'sea' references to sea level, 'kb' references
            to Kelly Bushing
        hydrodynamic : float
            return Pressure at depth deeper than this value
        coef : bool
            True - get pressure coefficient else get pressure value

        Returns
        -------
        Log
            Log object containing Pressure or Pressure coefficients
        """
        pres_to_get = None
        try:
            pres_to_get = self.params[pres_key]
        except KeyError:
            print("{}: Cannot find {}".format(self.well_name, pres_key))
            return Log()
        hydro = hydrostatic_pressure(self.depth,
                                     kelly_bushing=self.kelly_bushing,
                                     depth_w=self.water_depth)
        depth = pres_to_get["depth"]
        coefficients = pres_to_get["coef"]
        pres = pres_to_get["data"]

        obp_depth = self.depth  # obp_log.depth

        output_depth = np.array(depth)

        if coef is True:
            if not coefficients:
                # get pressure coefficients but no coefficients stored
                output_data = list()
                for dp, pr in zip(depth, pres):
                    idx = np.searchsorted(self.depth, dp)
                    output_data.append(pr / hydro[idx])
                output_data = np.array(output_data)
            else:
                output_data = np.array(coefficients)
        elif coef is False:
            if pres:
                # get pressure values and values stored
                coefficients = pres
                hydro = np.ones(hydro.shape)

            output_data = list()
            # ouput_depth = list()
            for dp, co in zip(depth, coefficients):
                idx = np.searchsorted(obp_depth, dp)
                output_data.append(hydro[idx] * co)
                # ouput_depth.append(dp)
            output_data = np.array(output_data)
        else:
            raise Exception()

        mask = output_depth > hydrodynamic
        output_depth = output_depth[mask]
        output_data = output_data[mask]

        log = Log()
        if ref == 'sea':
            log.depth = output_depth - self.kelly_bushing
        else:
            log.depth = output_depth
        log.data = np.round(output_data, 4)

        return log
Ejemplo n.º 6
0
    def get_pressure(self, pres_key, ref=None, hydrodynamic=0, coef=False):
        """
        Get Pressure Values or Pressure Coefficients

        Parameters
        ----------
        pres_key : str
            Pressure data name
        ref : {'sea', 'kb'}
            depth reference, 'sea' references to sea level, 'kb' references
            to Kelly Bushing
        hydrodynamic : float
            return Pressure at depth deeper than this value
        coef : bool
            True - get pressure coefficient else get pressure value

        Returns
        -------
        Log
            Log object containing Pressure or Pressure coefficients
        """
        pres_to_get = None
        try:
            pres_to_get = self.params[pres_key]
        except KeyError:
            print("{}: Cannot find {}".format(self.well_name, pres_key))
            return Log()
        hydro = hydrostatic_pressure(self.depth,
                                     kelly_bushing=self.kelly_bushing,
                                     depth_w=self.water_depth)
        depth = pres_to_get["depth"]
        coefficients = pres_to_get["coef"]
        pres = pres_to_get["data"]

        obp_depth = self.depth # obp_log.depth

        output_depth = np.array(depth)

        if coef is True:
            if not coefficients:
                # get pressure coefficients but no coefficients stored
                output_data = list()
                for dp, pr in zip(depth, pres):
                    idx = np.searchsorted(self.depth, dp)
                    output_data.append(pr / hydro[idx])
                output_data = np.array(output_data)
            else:
                output_data = np.array(coefficients)
        elif coef is False:
            if pres:
                # get pressure values and values stored
                coefficients = pres
                hydro = np.ones(hydro.shape)

            output_data = list()
            # ouput_depth = list()
            for dp, co in zip(depth, coefficients):
                idx = np.searchsorted(obp_depth, dp)
                output_data.append(hydro[idx] * co)
                # ouput_depth.append(dp)
            output_data = np.array(output_data)
        else:
            raise Exception()

        mask = output_depth > hydrodynamic
        output_depth = output_depth[mask]
        output_data = output_data[mask]

        log = Log()
        if ref == 'sea':
            log.depth = output_depth - self.kelly_bushing
        else:
            log.depth = output_depth
        log.data = np.round(output_data, 4)

        return log