Class DexpiEquipmentFactory
java.lang.Object
neqsim.process.processmodel.dexpi.DexpiEquipmentFactory
Factory that converts
DexpiProcessUnit placeholders into runnable NeqSim process
equipment by matching the EquipmentEnum type and applying sizing
attributes from DEXPI GenericAttributes.
This factory is used by DexpiSimulationBuilder during the topology walk to instantiate
real equipment objects (Separator, Compressor, Valve, etc.) from the DEXPI import placeholders.
- Version:
- 1.0
- Author:
- NeqSim
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcessEquipmentInterfacecreate(DexpiProcessUnit unit, StreamInterface inletStream) Creates a runnable NeqSim equipment instance from a DEXPI process unit and its inlet stream.private static DistillationColumncreateColumn(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a DistillationColumn using tray count and feed tray from sizing attributes.private static CompressorcreateCompressor(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a Compressor and applies sizing attributes.private static CoolercreateCooler(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a Cooler and applies sizing attributes.private static ExpandercreateExpander(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates an Expander.private static HeatercreateHeater(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a Heater and applies sizing attributes.private static HeatExchangercreateHeatExchanger(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a HeatExchanger and applies sizing attributes.private static MixercreateMixer(String name, StreamInterface inletStream) Creates a Mixer and adds the inlet stream if provided.private static StreamcreatePassThrough(String name, StreamInterface inletStream) Creates a pass-through Stream for unsupported equipment types (Column, Reactor, Tank, etc.).private static PumpcreatePump(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a Pump and applies sizing attributes.private static SeparatorcreateSeparator(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a Separator and applies sizing attributes.private static SplittercreateSplitter(String name, StreamInterface inletStream) Creates a Splitter with 2 output streams by default.private static ThreePhaseSeparatorcreateThreePhaseSeparator(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a ThreePhaseSeparator and applies sizing attributes.private static ThrottlingValvecreateValve(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a ThrottlingValve and applies Cv and pressure attributes.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
DexpiEquipmentFactory
private DexpiEquipmentFactory()
-
-
Method Details
-
create
Creates a runnable NeqSim equipment instance from a DEXPI process unit and its inlet stream.The method selects the correct NeqSim equipment class based on
DexpiProcessUnit.getMappedEquipment(), wires the inlet stream, and applies any sizing attributes (diameter, length, Cv, etc.) extracted from the DEXPI XML.- Parameters:
unit- the DEXPI process unit placeholderinletStream- the inlet stream to wire to the equipment (may be null for Mixer)- Returns:
- a fully configured NeqSim process equipment instance, or a pass-through Stream if the equipment type is not supported
-
createSeparator
private static Separator createSeparator(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a Separator and applies sizing attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured Separator
-
createThreePhaseSeparator
private static ThreePhaseSeparator createThreePhaseSeparator(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a ThreePhaseSeparator and applies sizing attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured ThreePhaseSeparator
-
createCompressor
private static Compressor createCompressor(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a Compressor and applies sizing attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured Compressor
-
createPump
Creates a Pump and applies sizing attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured Pump
-
createHeatExchanger
private static HeatExchanger createHeatExchanger(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a HeatExchanger and applies sizing attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured HeatExchanger
-
createHeater
Creates a Heater and applies sizing attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured Heater
-
createCooler
Creates a Cooler and applies sizing attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured Cooler
-
createValve
private static ThrottlingValve createValve(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a ThrottlingValve and applies Cv and pressure attributes.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured ThrottlingValve
-
createExpander
private static Expander createExpander(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates an Expander.- Parameters:
name- the equipment nameinletStream- the inlet streamunit- the DEXPI process unit with sizing data- Returns:
- the configured Expander
-
createMixer
Creates a Mixer and adds the inlet stream if provided.- Parameters:
name- the equipment nameinletStream- the inlet stream (may be null)- Returns:
- the configured Mixer
-
createSplitter
Creates a Splitter with 2 output streams by default.- Parameters:
name- the equipment nameinletStream- the inlet stream- Returns:
- the configured Splitter
-
createColumn
private static DistillationColumn createColumn(String name, StreamInterface inletStream, DexpiProcessUnit unit) Creates a DistillationColumn using tray count and feed tray from sizing attributes.- Parameters:
name- the equipment nameinletStream- the feed streamunit- the DEXPI process unit with sizing data- Returns:
- the configured DistillationColumn
-
createPassThrough
Creates a pass-through Stream for unsupported equipment types (Column, Reactor, Tank, etc.). This preserves the unit in the process flowsheet even if it cannot be simulated.- Parameters:
name- the equipment nameinletStream- the inlet stream to clone through- Returns:
- a simple Stream acting as a pass-through
-