Package neqsim.process.equipment.pipeline.twophasepipe


package neqsim.process.equipment.pipeline.twophasepipe
Transient multiphase pipe flow models.

This package provides classes for simulating transient two-phase (gas-liquid) flow in pipelines. The models are based on the drift-flux formulation and include:

  • TransientPipe - Main transient simulator using finite volume method with AUSM+ flux splitting
  • PipeSection - Represents a single discretization cell with state variables
  • FlowRegimeDetector - Mechanistic flow pattern detection based on Taitel-Dukler and Barnea models
  • DriftFluxModel - Drift-flux closure relations for slip and holdup
  • LiquidAccumulationTracker - Tracks liquid pooling at terrain low points
  • SlugTracker - Lagrangian slug tracking for terrain-induced slugging

Physical Models

Drift-Flux Model: The core model uses the Zuber-Findlay drift-flux formulation:

v_G = C_0 * v_m + v_d

where C_0 is the distribution coefficient and v_d is the drift velocity. Flow-regime-dependent correlations (Bendiksen, Harmathy) provide closure.

Flow Regime Detection: Uses mechanistic models:

  • Taitel-Dukler (1976) for horizontal and near-horizontal flow
  • Barnea (1987) unified model for inclined flow

Numerical Method: Explicit finite volume with AUSM+ flux splitting, adaptive CFL-based time stepping, and periodic thermodynamic flash updates using NeqSim equations of state.

Example Usage

// Create fluid
SystemInterface fluid = new SystemSrkEos(300, 50);
fluid.addComponent("methane", 0.7);
fluid.addComponent("n-pentane", 0.3);
fluid.setMixingRule("classic");
fluid.setMultiPhaseCheck(true);

Stream inlet = new Stream("inlet", fluid);
inlet.setFlowRate(5, "kg/sec");
inlet.run();

// Create transient pipe with terrain
TransientPipe pipe = new TransientPipe("Pipeline", inlet);
pipe.setLength(1000);
pipe.setDiameter(0.2);
pipe.setNumberOfSections(50);
pipe.setMaxSimulationTime(3600);

double[] elevations = new double[50];
// Set terrain profile...
pipe.setElevationProfile(elevations);

pipe.run();

// Access results
double[] pressures = pipe.getPressureProfile();
double[] holdups = pipe.getLiquidHoldupProfile();

References

  • Taitel, Y. and Dukler, A.E. (1976) - AIChE Journal 22(1)
  • Barnea, D. (1987) - Int. J. Multiphase Flow 13(1)
  • Bendiksen, K.H. (1984) - Int. J. Multiphase Flow 10(4)
  • Zuber, N. and Findlay, J.A. (1965) - J. Heat Transfer 87(4)
Since:
3.0
Author:
Even Solbraa