rodlift.flow.state¶
rodlift.flow.state ¶
Local two-phase flow conditions and pressure-gradient results.
Sign convention
Pressure gradients are reported as pressure loss per unit length in the flow
direction, -dp/dL (Pa/m). A positive elevation term means the flow goes uphill;
a positive friction term always opposes the flow.
FlowRegime ¶
FlowState
dataclass
¶
FlowState(
vsl: float,
vsg: float,
rho_l: float,
rho_g: float,
mu_l: float,
mu_g: float,
sigma: float,
diameter: float,
roughness: float = 0.0,
inclination: float = math.pi / 2,
pressure: float = 101325.0,
temperature: float = math.nan,
vso: float | None = None,
vsw: float | None = None,
gas_sg: float = math.nan,
z: float = math.nan,
gas_liquid_ratio: float = math.nan,
liquid_sg_standard: float = math.nan,
upstream: FlowState | None = None,
downstream: FlowState | None = None,
segment_length: float = math.nan,
)
Gas-liquid flow conditions at one point (or segment mid-point) of a pipe. SI units.
Attributes:
| Name | Type | Description |
|---|---|---|
vsl, vsg |
Superficial liquid and gas velocities, m/s. |
|
rho_l, rho_g |
In-situ liquid and gas densities, kg/m³. |
|
mu_l, mu_g |
Liquid and gas viscosities, Pa·s. |
|
sigma |
float
|
Gas-liquid surface tension, N/m. |
diameter |
float
|
Pipe inside diameter, m. |
roughness |
float
|
Absolute pipe roughness, m. |
inclination |
float
|
Angle from horizontal in the flow direction, rad (+π/2 = vertical upward flow, −π/2 = vertical downward flow). |
pressure |
float
|
Absolute pressure, Pa. |
temperature |
float
|
Temperature, K (needed only by a few correlations). |
vso, vsw |
Superficial oil and water velocities, m/s. Default: all liquid is oil. |
|
gas_sg |
float
|
Free-gas specific gravity (air = 1), for correlations that use the gas law. |
z |
float
|
Gas compressibility factor, for correlations that use the gas law. |
gas_liquid_ratio |
float
|
Producing gas-liquid ratio at standard conditions, m³/m³ (correlations based on the total mass per stock-tank barrel). |
liquid_sg_standard |
float
|
Specific gravity of the stock-tank liquid (oil/water mix, water = 1), for the same correlations. |
upstream, downstream |
States at the two ends of the segment, used by correlations that compute the acceleration term from the change in kinetic energy across a segment. |
|
segment_length |
float
|
Length of that segment, m. |
GradientResult
dataclass
¶
GradientResult(
friction: float,
elevation: float,
acceleration: float,
holdup: float,
regime: FlowRegime = FlowRegime.UNKNOWN,
)
Pressure gradient and holdup returned by a flow correlation.
Attributes:
| Name | Type | Description |
|---|---|---|
friction, elevation, acceleration |
Components of the pressure loss per unit length in the flow direction, Pa/m. |
|
holdup |
float
|
In-situ (slip) liquid volume fraction. |
regime |
FlowRegime
|
Flow regime identified by the correlation. |