rodlift.pvt.black_oil¶
rodlift.pvt.black_oil ¶
Black-oil fluid model combining the oil, gas and water correlations.
:class:BlackOil describes a produced fluid (stock-tank oil, gas, water and their
ratios) plus the choice of correlations. :meth:BlackOil.properties evaluates every
phase property at given pressures and temperatures and returns a
:class:FluidProperties record, all in SI units.
WATER_DENSITY_STANDARD
module-attribute
¶
WATER_DENSITY_STANDARD: Final = 999.016
Density of pure water at 60 °F and 14.696 psia, kg/m³.
AIR_DENSITY_STANDARD
module-attribute
¶
AIR_DENSITY_STANDARD: Final = (
units.P_STANDARD
* _gas.AIR_MOLAR_MASS
/ (_gas.R_GAS * units.T_STANDARD)
)
Density of air at standard conditions (ideal gas), kg/m³.
Correlations
dataclass
¶
Correlations(
solution_gor: SolutionGORMethod = "standing",
oil_fvf: OilFVFMethod = "standing",
oil_compressibility: OilCompressibilityMethod = "vasquez_beggs",
dead_oil_viscosity: DeadOilViscosityMethod = "beggs_robinson",
live_oil_viscosity: LiveOilViscosityMethod = "beggs_robinson",
undersaturated_oil_viscosity: UndersaturatedViscosityMethod = "vasquez_beggs",
)
Choice of correlation for each black-oil property.
See the corresponding functions in :mod:rodlift.pvt.oil for the options.
PVTTable
dataclass
¶
PVTTable(
pressure: tuple[float, ...],
rs: tuple[float, ...],
bo: tuple[float, ...],
bubble_point: float,
)
Laboratory PVT data used instead of the Rs and Bo correlations.
Values are interpolated linearly in pressure (and extrapolated linearly outside the table).
Attributes:
| Name | Type | Description |
|---|---|---|
pressure |
tuple[float, ...]
|
Absolute pressures, Pa. |
rs |
tuple[float, ...]
|
Solution gas-oil ratio at each pressure, m³/m³. |
bo |
tuple[float, ...]
|
Oil formation volume factor at each pressure, m³/m³. |
bubble_point |
float
|
Saturation pressure of the sample, Pa. |
FluidProperties
dataclass
¶
FluidProperties(
bubble_point: FloatOrArray,
rs: FloatOrArray,
bo: FloatOrArray,
oil_compressibility: FloatOrArray,
dead_oil_viscosity: FloatOrArray,
oil_viscosity: FloatOrArray,
oil_density: FloatOrArray,
rw: FloatOrArray,
bw: FloatOrArray,
water_viscosity: FloatOrArray,
water_density: FloatOrArray,
free_gas_sg: FloatOrArray,
dissolved_gas_sg: FloatOrArray,
z: FloatOrArray,
bg: FloatOrArray,
gas_viscosity: FloatOrArray,
gas_density: FloatOrArray,
)
Phase properties at one or more (pressure, temperature) states. SI units.
Attributes:
| Name | Type | Description |
|---|---|---|
bubble_point |
FloatOrArray
|
Bubble-point pressure of the oil at the producing GOR, Pa. |
rs |
FloatOrArray
|
Solution gas-oil ratio, m³/m³. |
bo |
FloatOrArray
|
Oil formation volume factor, m³/m³. |
oil_compressibility |
FloatOrArray
|
Undersaturated oil compressibility, 1/Pa (NaN where the oil is saturated). |
dead_oil_viscosity, oil_viscosity |
Dead-oil and in-situ oil viscosity, Pa·s. |
|
oil_density |
FloatOrArray
|
In-situ oil density, kg/m³. |
rw |
FloatOrArray
|
Gas solubility in water, m³/m³. |
bw |
FloatOrArray
|
Water formation volume factor, m³/m³. |
water_viscosity |
FloatOrArray
|
Water viscosity, Pa·s. |
water_density |
FloatOrArray
|
In-situ water density, kg/m³. |
free_gas_sg, dissolved_gas_sg |
Specific gravities (air = 1) of the free gas and of the gas dissolved in oil. |
|
z |
FloatOrArray
|
Free-gas compressibility factor. |
bg |
FloatOrArray
|
Gas formation volume factor, m³/m³. |
gas_viscosity |
FloatOrArray
|
Free-gas viscosity, Pa·s. |
gas_density |
FloatOrArray
|
Free-gas density, kg/m³. |
BlackOil
dataclass
¶
BlackOil(
api: float,
gas_sg: float,
gor: float,
water_cut: float = 0.0,
water_sg: float = 1.07,
y_n2: float = 0.0,
y_co2: float = 0.0,
y_h2s: float = 0.0,
separator: Separator = _oil.Separator(),
correlations: Correlations = Correlations(),
pour_point: float | None = None,
viscosity_reference: tuple[tuple[float, float], ...]
| None = None,
viscosity_reference_kinematic: bool = False,
pvt_table: PVTTable | None = None,
)
A produced black-oil fluid.
Attributes:
| Name | Type | Description |
|---|---|---|
api |
float
|
Stock-tank oil gravity, °API. |
gas_sg |
float
|
Specific gravity (air = 1) of the total gas liberated from the oil. |
gor |
float
|
Producing gas-oil ratio, standard m³ of gas per standard m³ of oil. |
water_cut |
float
|
Water fraction of the produced liquid at standard conditions (0-1). |
water_sg |
float
|
Water specific gravity (pure water = 1). |
y_n2, y_co2, y_h2s |
Mole fractions of non-hydrocarbon gases. |
|
separator |
Separator
|
Separator conditions at which |
correlations |
Correlations
|
Correlation choices. |
pour_point |
float | None
|
Oil pour point, K (needed by the |
viscosity_reference |
tuple[tuple[float, float], ...] | None
|
Measured dead-oil viscosities |
viscosity_reference_kinematic |
bool
|
Whether |
pvt_table |
PVTTable | None
|
Laboratory data replacing the Rs/Bo correlations and the bubble point. |
Examples:
>>> from rodlift import units
>>> from rodlift.pvt import BlackOil
>>> fluid = BlackOil(api=30.0, gas_sg=0.75, gor=units.scf_per_stb_to_m3_per_m3(500))
>>> props = fluid.properties(pressure=10e6, temperature=units.degf_to_k(180))
>>> round(props.bo, 3)
1.177
bubble_point ¶
bubble_point(temperature: ArrayLike) -> FloatOrArray
Bubble-point pressure of the oil at the producing GOR, Pa.
Returns standard pressure when the oil carries no gas.
properties ¶
properties(
pressure: ArrayLike, temperature: ArrayLike
) -> FluidProperties
Evaluate all phase properties.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pressure
|
ArrayLike
|
Absolute pressure, Pa. |
required |
temperature
|
ArrayLike
|
Temperature, K. |
required |