Enum Class IEC81346LetterCode

java.lang.Object
java.lang.Enum<IEC81346LetterCode>
neqsim.process.equipment.iec81346.IEC81346LetterCode
All Implemented Interfaces:
Serializable, Comparable<IEC81346LetterCode>, Constable

public enum IEC81346LetterCode extends Enum<IEC81346LetterCode> implements Serializable
IEC 81346-2 letter codes for classification of objects in industrial plants.

IEC 81346-2 defines a set of single-letter codes that classify equipment and objects by their purpose or function. Each letter code represents a broad category such as "converting/separating" (B), "processing/compressing" (K), or "flow controlling" (Q).

This enum maps each IEC 81346-2 letter code to its standardized description and provides a static mapping from NeqSim EquipmentEnum values to the corresponding letter code. This mapping is used by the ReferenceDesignationGenerator to automatically assign reference designations per IEC 81346.

IEC 81346-2 letter code table (selected codes relevant to process industry):

IEC 81346-2 letter codes used in process industry
Code Description Examples
A Two or more purposes or tasks Multi-functional assemblies
B Converting, separating, changing form Heat exchangers, separators, reactors, filters
C Storing, presenting information Tanks, vessels, accumulators
G Generating, providing energy Generators, fuel cells, solar panels, wind turbines
K Processing, compressing, driving Compressors, pumps, expanders, turbines
M Providing mechanical energy Gas turbines, motors, engines
N Processing information Calculators, adjusters, controllers
Q Controlling flow, movement Valves, dampers
S Sensing, detecting, measuring Pressure transmitters, temperature transmitters
T Transporting, moving Pipes, conveyors, pipelines
W Guiding, conducting Piping segments, ducting, cable trays
X Connecting, branching Mixers, splitters, manifolds
Version:
1.0
Author:
Even Solbraa
  • Enum Constant Details

    • A

      public static final IEC81346LetterCode A
      Two or more purposes or tasks (multi-functional assemblies).
    • B

      public static final IEC81346LetterCode B
      Converting, separating, changing form (heat exchangers, separators, reactors, filters).
    • C

      public static final IEC81346LetterCode C
      Storing, presenting information (tanks, vessels, accumulators).
    • G

      public static final IEC81346LetterCode G
      Generating, providing energy (generators, fuel cells, solar panels, wind turbines).
    • K

      public static final IEC81346LetterCode K
      Processing, compressing, driving (compressors, pumps, expanders).
    • M

      public static final IEC81346LetterCode M
      Providing mechanical energy (gas turbines, motors, engines).
    • N

      public static final IEC81346LetterCode N
      Processing information (calculators, adjusters, controllers).
    • Q

      public static final IEC81346LetterCode Q
      Controlling flow and movement (valves, dampers).
    • S

      public static final IEC81346LetterCode S
      Sensing, detecting, measuring (transmitters, analyzers, probes).
    • T

      public static final IEC81346LetterCode T
      Transporting, moving (pipes, conveyors, pipelines).
    • W

      public static final IEC81346LetterCode W
      Guiding, conducting (piping segments, ducting, cable trays).
    • X

      public static final IEC81346LetterCode X
      Connecting, branching (mixers, splitters, manifolds, junctions).
  • Field Details

    • description

      private final String description
    • EQUIPMENT_MAP

      private static final Map<EquipmentEnum, IEC81346LetterCode> EQUIPMENT_MAP
      Unmodifiable mapping from NeqSim EquipmentEnum to IEC 81346-2 letter code.

      This mapping is used by the reference designation generator to automatically classify process equipment per IEC 81346-2.

  • Constructor Details

    • IEC81346LetterCode

      private IEC81346LetterCode(String description)
      Constructs an IEC 81346-2 letter code with its standardized description.
      Parameters:
      description - the standard description of the letter code per IEC 81346-2
  • Method Details

    • values

      public static IEC81346LetterCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IEC81346LetterCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDescription

      public String getDescription()
      Returns the standardized description of this IEC 81346-2 letter code.
      Returns:
      the description string, e.g. "Converting, separating, changing form"
    • fromEquipmentEnum

      public static IEC81346LetterCode fromEquipmentEnum(EquipmentEnum equipmentType)
      Maps a NeqSim EquipmentEnum to its corresponding IEC 81346-2 letter code.
      Parameters:
      equipmentType - the NeqSim equipment type
      Returns:
      the IEC 81346-2 letter code, or A if no specific mapping exists
    • fromEquipment

      public static IEC81346LetterCode fromEquipment(ProcessEquipmentInterface equipment)
      Maps a NeqSim equipment class to its corresponding IEC 81346-2 letter code.

      This method first attempts to resolve the letter code through the canonical EQUIPMENT_MAP by trying to match the equipment's simple class name to an EquipmentEnum value. If that fails, it falls back to instanceof checks for broad base-class detection (e.g. any Separator subclass maps to B).

      Parameters:
      equipment - the process equipment instance
      Returns:
      the IEC 81346-2 letter code, or A if the type is not recognized
    • getEquipmentMapping

      public static Map<EquipmentEnum, IEC81346LetterCode> getEquipmentMapping()
      Returns the unmodifiable mapping from EquipmentEnum to IEC 81346-2 letter codes.
      Returns:
      unmodifiable map of all defined equipment-to-letter-code mappings