Class DexpiEquipmentFactory

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

public final class DexpiEquipmentFactory extends Object
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 Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
  • Constructor Details

    • DexpiEquipmentFactory

      private DexpiEquipmentFactory()
  • Method Details

    • create

      public static ProcessEquipmentInterface create(DexpiProcessUnit unit, StreamInterface inletStream)
      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 placeholder
      inletStream - 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 name
      inletStream - the inlet stream
      unit - 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 name
      inletStream - the inlet stream
      unit - 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 name
      inletStream - the inlet stream
      unit - the DEXPI process unit with sizing data
      Returns:
      the configured Compressor
    • createPump

      private static Pump createPump(String name, StreamInterface inletStream, DexpiProcessUnit unit)
      Creates a Pump and applies sizing attributes.
      Parameters:
      name - the equipment name
      inletStream - the inlet stream
      unit - 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 name
      inletStream - the inlet stream
      unit - the DEXPI process unit with sizing data
      Returns:
      the configured HeatExchanger
    • createHeater

      private static Heater createHeater(String name, StreamInterface inletStream, DexpiProcessUnit unit)
      Creates a Heater and applies sizing attributes.
      Parameters:
      name - the equipment name
      inletStream - the inlet stream
      unit - the DEXPI process unit with sizing data
      Returns:
      the configured Heater
    • createCooler

      private static Cooler createCooler(String name, StreamInterface inletStream, DexpiProcessUnit unit)
      Creates a Cooler and applies sizing attributes.
      Parameters:
      name - the equipment name
      inletStream - the inlet stream
      unit - 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 name
      inletStream - the inlet stream
      unit - 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 name
      inletStream - the inlet stream
      unit - the DEXPI process unit with sizing data
      Returns:
      the configured Expander
    • createMixer

      private static Mixer createMixer(String name, StreamInterface inletStream)
      Creates a Mixer and adds the inlet stream if provided.
      Parameters:
      name - the equipment name
      inletStream - the inlet stream (may be null)
      Returns:
      the configured Mixer
    • createSplitter

      private static Splitter createSplitter(String name, StreamInterface inletStream)
      Creates a Splitter with 2 output streams by default.
      Parameters:
      name - the equipment name
      inletStream - 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 name
      inletStream - the feed stream
      unit - the DEXPI process unit with sizing data
      Returns:
      the configured DistillationColumn
    • createPassThrough

      private static Stream createPassThrough(String name, StreamInterface inletStream)
      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 name
      inletStream - the inlet stream to clone through
      Returns:
      a simple Stream acting as a pass-through