Class DexpiProcessUnit

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

public class DexpiProcessUnit extends ProcessEquipmentBaseClass
Lightweight placeholder for equipment imported from a DEXPI XML file.

This class records the original DEXPI class together with the mapped EquipmentEnum category and contextual information like line numbers or fluid codes.

Version:
1.0
Author:
NeqSim
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • dexpiClass

      private final String dexpiClass
    • mappedEquipment

      private final EquipmentEnum mappedEquipment
    • lineNumber

      private final String lineNumber
    • fluidCode

      private final String fluidCode
    • sizingAttributes

      private final Map<String,String> sizingAttributes
    • dexpiId

      private String dexpiId
  • Constructor Details

    • DexpiProcessUnit

      public DexpiProcessUnit(String name, String dexpiClass, EquipmentEnum mappedEquipment, String lineNumber, String fluidCode)
      Creates a new DEXPI process unit.
      Parameters:
      name - the equipment tag name
      dexpiClass - the original DEXPI component class
      mappedEquipment - the mapped NeqSim equipment type
      lineNumber - the line number reference (may be null)
      fluidCode - the fluid code reference (may be null)
  • Method Details

    • 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
    • run

      public void run()
    • getDexpiClass

      public String getDexpiClass()
      Gets the original DEXPI component class.
      Returns:
      the DEXPI class name
    • getMappedEquipment

      public EquipmentEnum getMappedEquipment()
      Gets the mapped NeqSim equipment type.
      Returns:
      the equipment enum
    • getLineNumber

      public String getLineNumber()
      Gets the line number reference.
      Returns:
      the line number, or null if not set
    • getFluidCode

      public String getFluidCode()
      Gets the fluid code reference.
      Returns:
      the fluid code, or null if not set
    • getDexpiId

      public String getDexpiId()
      Gets the DEXPI element ID (e.g. "CentrifugalPump-1").
      Returns:
      the DEXPI ID, or null if not set
    • setDexpiId

      public void setDexpiId(String dexpiId)
      Sets the DEXPI element ID.
      Parameters:
      dexpiId - the DEXPI element ID
    • setSizingAttribute

      public void setSizingAttribute(String name, String value)
      Stores a sizing attribute extracted from the DEXPI XML GenericAttributes.
      Parameters:
      name - the attribute name (e.g. DexpiMetadata.INSIDE_DIAMETER)
      value - the attribute value as a string
    • getSizingAttribute

      public String getSizingAttribute(String name)
      Returns the value of a sizing attribute, or null if not set.
      Parameters:
      name - the attribute name
      Returns:
      the attribute value, or null
    • getSizingAttributeAsDouble

      public double getSizingAttributeAsDouble(String name, double defaultValue)
      Returns the value of a sizing attribute as a double, or the given default if not set or not parseable.
      Parameters:
      name - the attribute name
      defaultValue - the default value
      Returns:
      the parsed double or the default
    • getSizingAttributes

      public Map<String,String> getSizingAttributes()
      Returns an unmodifiable view of all sizing attributes.
      Returns:
      map of sizing attribute names to values