Class ComponentSplitter

All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, ProcessElementInterface, SimulationInterface, NamedInterface

public class ComponentSplitter extends ProcessEquipmentBaseClass

Splitter class.

Version:
$Id: $Id
Author:
Even Solbraa
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • logger

      static org.apache.logging.log4j.Logger logger
      Logger object for class.
    • thermoSystem

      SystemInterface thermoSystem
    • inletStream

      StreamInterface inletStream
    • splitStream

      StreamInterface[] splitStream
    • splitNumber

      protected int splitNumber
    • splitFactor

      double[] splitFactor
  • Constructor Details

    • ComponentSplitter

      public ComponentSplitter(String name)
      Constructor for Splitter.
      Parameters:
      name - name of splitter
    • ComponentSplitter

      public ComponentSplitter(String name, StreamInterface inletStream)

      Constructor for Splitter.

      Parameters:
      name - a String object
      inletStream - a StreamInterface object
  • Method Details

    • getInletStream

      public StreamInterface getInletStream()

      Getter for the field inletStream.

      Returns:
      a StreamInterface object
    • setSplitFactors

      public void setSplitFactors(double[] factors)

      setSplitFactors.

      Parameters:
      factors - an array of type double
    • getSplitFactors

      public double[] getSplitFactors()
      Getter for the field splitFactor.
      Returns:
      an array of type double with the split factors
    • setInletStream

      public void setInletStream(StreamInterface inletStream)

      Setter for the field inletStream.

      Parameters:
      inletStream - a StreamInterface object
    • getSplitStream

      public StreamInterface getSplitStream(int i)

      Getter for the field splitStream.

      Parameters:
      i - a int
      Returns:
      a StreamInterface object
    • getSplitNumber

      public int getSplitNumber()

      Getter for the field splitNumber.

      Returns:
      number of split outlets
    • getInletStreams

      public List<StreamInterface> getInletStreams()
      Returns all inlet streams connected to this equipment. Subclasses override to report their specific inlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology without instanceof checks.
      Returns:
      unmodifiable list of inlet streams (empty by default)
    • getOutletStreams

      public List<StreamInterface> getOutletStreams()
      Returns all outlet streams produced by this equipment. Subclasses override to report their specific outlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology without instanceof checks.
      Returns:
      unmodifiable list of outlet streams (empty by default)
    • run

      public void run(UUID id)

      In this method all thermodynamic and unit operations will be calculated in a steady state calculation.

      Parameters:
      id - UUID
    • getMassBalance

      public double getMassBalance(String unit)

      getMassBalance.

      Specified by:
      getMassBalance in interface ProcessEquipmentInterface
      Overrides:
      getMassBalance in class ProcessEquipmentBaseClass
      Parameters:
      unit - a String object
      Returns:
      a double
    • toJson

      public String toJson()

      Serializes the Process Equipment along with its state to a JSON string.

      Specified by:
      toJson in interface ProcessEquipmentInterface
      Overrides:
      toJson in class ProcessEquipmentBaseClass
      Returns:
      json string.
    • toJson

      public String toJson(ReportConfig cfg)
      Serializes the Process Equipment with configurable level of detail.
      Specified by:
      toJson in interface ProcessEquipmentInterface
      Overrides:
      toJson in class ProcessEquipmentBaseClass
      Parameters:
      cfg - report configuration
      Returns:
      json string
    • displayResult

      public void displayResult()

      displayResult.

      Specified by:
      displayResult in interface ProcessEquipmentInterface
      Overrides:
      displayResult in class ProcessEquipmentBaseClass