Class LiquidAccumulationTracker

java.lang.Object
neqsim.process.equipment.pipeline.twophasepipe.LiquidAccumulationTracker
All Implemented Interfaces:
Serializable

public class LiquidAccumulationTracker extends Object implements Serializable
Tracks liquid accumulation in low points and riser bases.

Models liquid pooling at low points, terrain-induced slugging, and riser-base accumulation phenomena. Handles drainage, filling, and surge-out events.

Version:
1.0
Author:
Even Solbraa
See Also:
  • Field Details

  • Constructor Details

    • LiquidAccumulationTracker

      public LiquidAccumulationTracker()
      Constructor.
  • Method Details

    • identifyAccumulationZones

      public void identifyAccumulationZones(PipeSection[] sections)
      Identify low points and potential accumulation zones in the pipeline.
      Parameters:
      sections - Array of pipe sections
    • updateAccumulation

      public void updateAccumulation(PipeSection[] sections, double dt)
      Update liquid accumulation for all zones.
      Parameters:
      sections - Pipe sections
      dt - Time step (s)
    • updateZone

      private void updateZone(LiquidAccumulationTracker.AccumulationZone zone, PipeSection[] sections, double dt)
      Update a single accumulation zone.

      Terrain-induced liquid accumulation occurs when:

      • Liquid flows downhill into the low point (gravity-driven)
      • Liquid velocity slows in uphill sections (slip accumulation)
      • Gas-liquid slip causes liquid to settle in stratified regions
      Parameters:
      zone - the accumulation zone to update
      sections - array of pipe sections
      dt - time step [s]
    • distributeAccumulatedLiquid

      private void distributeAccumulatedLiquid(LiquidAccumulationTracker.AccumulationZone zone, PipeSection[] sections)
      Distribute accumulated liquid among sections in the zone.

      This method now ACTUALLY updates the section holdups, not just a separate tracking variable. This is critical for terrain-induced slug formation.

      Parameters:
      zone - the accumulation zone to process
      sections - the pipe sections array
    • checkForSlugRelease

      Check if terrain-induced slug should be released.

      Slug release occurs when:

      • Accumulated liquid exceeds zone capacity (overflow condition)
      • Gas pressure is sufficient to push liquid out of the low point
      • Minimum time since last slug has elapsed (prevents rapid cycling)
      • Previous slug has cleared the zone exit (prevents immediate merging)
      Parameters:
      zone - Accumulation zone
      sections - Pipe sections
      Returns:
      Slug characteristics if slug released, null otherwise
    • calculateDrainageRate

      public double calculateDrainageRate(LiquidAccumulationTracker.AccumulationZone zone, PipeSection[] sections, double pressureDrop)
      Calculate drainage rate from a zone.
      Parameters:
      zone - Accumulation zone
      sections - Pipe sections
      pressureDrop - Pressure drop across zone (Pa)
      Returns:
      Drainage rate (m³/s)
    • getTotalAccumulatedVolume

      public double getTotalAccumulatedVolume()
      Get total accumulated liquid volume in all zones.
      Returns:
      Total volume (m³)
    • getAccumulationZones

      public List<LiquidAccumulationTracker.AccumulationZone> getAccumulationZones()
      Get list of accumulation zones.
      Returns:
      List of zones
    • getOverflowingZones

      public List<LiquidAccumulationTracker.AccumulationZone> getOverflowingZones()
      Get zones that are currently overflowing (about to slug).
      Returns:
      List of overflowing zones
    • setCriticalHoldup

      public void setCriticalHoldup(double holdup)
      Set critical holdup for slug initiation.
      Parameters:
      holdup - Critical holdup (0-1)
    • getCriticalHoldup

      public double getCriticalHoldup()
      Get critical holdup for slug initiation.
      Returns:
      Critical holdup value (0-1)
    • setDrainageCoefficient

      public void setDrainageCoefficient(double coeff)
      Set drainage coefficient.
      Parameters:
      coeff - Drainage coefficient (0-1)