Class DexpiStreamUtils

java.lang.Object
neqsim.process.processmodel.dexpi.DexpiStreamUtils

public final class DexpiStreamUtils extends Object
Shared utilities for resolving outlet streams from NeqSim process equipment.

This class centralizes the logic for extracting the primary outlet stream from any process equipment instance. It is used by both DexpiSimulationBuilder and DexpiXmlWriter to avoid code duplication.

Version:
1.0
Author:
NeqSim
  • Constructor Details

    • DexpiStreamUtils

      private DexpiStreamUtils()
  • Method Details

    • getGasOutletStream

      public static StreamInterface getGasOutletStream(ProcessEquipmentInterface equipment)
      Gets the primary (gas) outlet stream from a process equipment instance.

      For separators, this returns the gas outlet stream. For splitters, it returns the first split stream. For streams, it returns the stream itself. For all other TwoPortEquipment (compressor, pump, valve, heater, cooler, expander, heat exchanger), it returns the outlet stream directly.

      Parameters:
      equipment - the process equipment
      Returns:
      the primary outlet stream, or null if not available
    • getLiquidOutletStream

      public static StreamInterface getLiquidOutletStream(ProcessEquipmentInterface equipment)
      Gets the liquid outlet stream from a separator. For a ThreePhaseSeparator, this returns the oil outlet. For a standard Separator, this returns the liquid outlet.
      Parameters:
      equipment - the process equipment
      Returns:
      the liquid outlet stream, or null if equipment is not a separator
    • getWaterOutletStream

      public static StreamInterface getWaterOutletStream(ProcessEquipmentInterface equipment)
      Gets the water outlet stream from a ThreePhaseSeparator.
      Parameters:
      equipment - the process equipment
      Returns:
      the water outlet stream, or null if equipment is not a ThreePhaseSeparator
    • isMultiOutlet

      public static boolean isMultiOutlet(ProcessEquipmentInterface equipment)
      Checks whether the given equipment is a multi-outlet type (separator or splitter). Uses the getOutletStreams() API when available, falling back to instanceof checks.
      Parameters:
      equipment - the process equipment
      Returns:
      true if the equipment has multiple outlet streams