bluebonnet.flow.reservoir ========================= .. py:module:: bluebonnet.flow.reservoir .. autoapi-nested-parse:: reservoir: scaling solutions for hydrofractured wells. This module calculates the scaling curves, using flow properties and finite difference methods. Classes ------- .. autoapisummary:: bluebonnet.flow.reservoir.IdealReservoir bluebonnet.flow.reservoir.SinglePhaseReservoir bluebonnet.flow.reservoir.TwoPhaseReservoir bluebonnet.flow.reservoir.MultiPhaseReservoir Module Contents --------------- .. py:class:: IdealReservoir Class for building scaling solutions of production from hydrofractured wells. This maintains simulation parameters and fluid properties. :param nx: number of spatial nodes :type nx: int :param pressure_fracface: drawdown pressure at x=0 (psi) :type pressure_fracface: float | NDArray :param pressure_initial: reservoir pressure before production (psi) :type pressure_initial: float :param fluid: reservoir fluid PVT/flow properties :type fluid: FlowProperties .. py:attribute:: nx :type: int number of spatial nodes .. py:attribute:: pressure_fracface :type: float | numpy.typing.NDArray drawdown pressure at :math:`x=0` (psi) .. py:attribute:: pressure_initial :type: float reservoir pressure before production (psi) .. py:attribute:: fluid :type: bluebonnet.flow.flowproperties.FlowProperties | None :value: None reservoir fluid PVT/flow properties .. py:method:: __post_init__() Last initialization steps. .. py:method:: simulate(time: numpy.ndarray) Calculate simulation pressure over time. :param time: times to solve for pressure :type time: ndarray .. py:method:: recovery_factor(time: numpy.ndarray | None = None, density=False) -> numpy.ndarray Calculate recovery factor over time. If time has is not specified, requires that `simulate` has been run :param time: times to calculate recovery factor at :type time: ndarray, Optional :returns: **recovery** -- recovery factor over time :rtype: ndarray .. py:method:: recovery_factor_interpolator() -> collections.abc.Callable Generate a function to get recovery factor from time. Requires that `recovery_factor` has been run :rtype: scipy interpolator object that takes in time and spits out recovery factor .. py:method:: alpha_scaled(pseudopressure: numpy.ndarray) -> numpy.ndarray Calculate scaled diffusivity. .. py:method:: fvf_scale() -> float Scaling for formation volume factor. :returns: **FVF** :rtype: float .. py:class:: SinglePhaseReservoir Bases: :py:obj:`IdealReservoir` Single-phase real fluid reservoir. .. py:method:: alpha_scaled(pseudopressure: numpy.ndarray) -> numpy.ndarray Calculate scaled diffusivity. .. py:method:: fvf_scale() -> float Scaling for formation volume factor. :returns: **FVF** :rtype: float .. py:method:: simulate(time: numpy.ndarray[float], pressure_fracface: numpy.ndarray[float] | None = None) Calculate simulation pressure over time. :param time: times to solve for pressure :type time: ndarray :param pressure_fracface: pressure at frac-face over time. Defaults to None, which is no change :type pressure_fracface: Iterable[float] | None, optional :raises ValueError: wrong length changing pressure at frac-face: .. py:class:: TwoPhaseReservoir Bases: :py:obj:`SinglePhaseReservoir` Oil-gas reservoir simulation. .. rubric:: References Ruiz Maraggi, L.M., Lake, L.W. and Walsh, M.P., 2020. "A Two-Phase Non-Linear One- Dimensional Flow Model for Reserves Estimation in Tight Oil and Gas Condensate Reservoirs Using Scaling Principles." In SPE Latin American and Caribbean Petroleum Engineering Conference. OnePetro. https://doi.org/10.2118/199032-MS .. py:attribute:: Sw_init :type: float :value: 0.0 .. py:method:: simulate(time: numpy.ndarray) Calculate simulation pressure over time. :param time: times to solve for pressure :type time: ndarray .. py:class:: MultiPhaseReservoir Bases: :py:obj:`SinglePhaseReservoir` Reservoir with three phases: oil, gas, and water all flowing. :param nx: number of spatial nodes :type nx: int :param pressure_fracface: drawdown pressure at x=0 (psi) :type pressure_fracface: float | NDArray :param pressure_initial: reservoir pressure before production (psi) :type pressure_initial: float :param fluid: reservoir fluid PVT/flow properties :type fluid: FlowProperties :param So_init: oil saturation at the beginning :type So_init: float :param Sw_init: water saturation :type Sw_init: float :param Sg_init: gas saturation :type Sg_init: float .. py:attribute:: So_init :type: float :value: 1.0 Initial oil saturation. .. py:attribute:: Sw_init :type: float :value: 0.0 Initial water saturation. .. py:attribute:: Sg_init :type: float :value: 0.0 Initial gas saturation. .. py:method:: simulate(time: numpy.ndarray) :abstractmethod: Calculate simulation pressure over time. :param time: times to solve for pressure :type time: ndarray .. py:method:: alpha_scaled(pseudopressure: numpy.ndarray, saturation: numpy.ndarray) -> numpy.ndarray Calculate scaled diffusivity given pseudopressure and saturations. :param pseudopressure: scaled pseudopressure :type pseudopressure: ndarray :param saturation: record array with So, Sg, Sw records :type saturation: ndarray :returns: **alpha** -- scaled diffusivity :rtype: ndarray