Class DexpiStreamUtils
java.lang.Object
neqsim.process.processmodel.dexpi.DexpiStreamUtils
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StreamInterfacegetGasOutletStream(ProcessEquipmentInterface equipment) Gets the primary (gas) outlet stream from a process equipment instance.static StreamInterfacegetLiquidOutletStream(ProcessEquipmentInterface equipment) Gets the liquid outlet stream from a separator.static StreamInterfacegetWaterOutletStream(ProcessEquipmentInterface equipment) Gets the water outlet stream from a ThreePhaseSeparator.static booleanisMultiOutlet(ProcessEquipmentInterface equipment) Checks whether the given equipment is a multi-outlet type (separator or splitter).
-
Constructor Details
-
DexpiStreamUtils
private DexpiStreamUtils()
-
-
Method Details
-
getGasOutletStream
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
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
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
Checks whether the given equipment is a multi-outlet type (separator or splitter). Uses thegetOutletStreams()API when available, falling back to instanceof checks.- Parameters:
equipment- the process equipment- Returns:
- true if the equipment has multiple outlet streams
-