Enum Class DiagramStyle

java.lang.Object
java.lang.Enum<DiagramStyle>
neqsim.process.processmodel.diagram.DiagramStyle
All Implemented Interfaces:
Serializable, Comparable<DiagramStyle>, Constable

public enum DiagramStyle extends Enum<DiagramStyle>
Defines the visual style for process flow diagrams.

Different process simulators have distinct visual conventions for PFDs. This enum allows selecting the desired style when generating diagrams.

Visual conventions are based on:

  • ISO 10628 - Diagrams for the chemical and petrochemical industry
  • ANSI Y32.11 - Graphical Symbols for Process Flow Diagrams
  • Industry-standard simulator appearances (HYSYS, Aspen Plus, PRO/II)

Simulator-specific styling:

  • HYSYS: Cyan/teal icons, dark blue streams, white background, icon-based symbols
  • Aspen Plus: Function-specific colors (red=heat, blue=cool, green=columns), curved streams
  • PRO/II: Black & white technical style, numbered streams, simple geometric shapes
Version:
1.0
Author:
NeqSim
  • Enum Constant Details

    • NEQSIM

      public static final DiagramStyle NEQSIM
      NeqSim default style with colored phase zone clusters.

      Features:

      • Colored background clusters (blue for gas, tan for oil, etc.)
      • Rich equipment symbols with HTML labels
      • Phase-colored stream lines
      • Gravity-based vertical layout
    • HYSYS

      public static final DiagramStyle HYSYS
      HYSYS-style clean process flow diagram.

      AspenTech HYSYS uses a distinctive cyan/teal color scheme with clean professional appearance. Equipment is rendered as compact icons with names displayed below.

      Key visual characteristics:

      • White background with no colored clusters
      • Equipment icons in cyan (#00B8B8) with teal outline (#008080)
      • Material streams in dark blue (#0066CC) with 2.5pt line weight
      • Equipment names displayed below icons in 9pt Arial
      • Stream numbers at connection points
      • Orthogonal (right-angle) stream routing
    • PROII

      public static final DiagramStyle PROII
      PRO/II style diagram (AVEVA/Schneider Electric).

      PRO/II uses a traditional engineering drawing style with minimal color, emphasizing clarity and printability.

      Key visual characteristics:

      • Light gray background (#F5F5F5)
      • White equipment with thin black outlines (1pt)
      • Black stream lines (1.5pt) with numbered labels
      • Simple geometric shapes (circles, rectangles, triangles)
      • Stream numbers prominently displayed
      • Orthogonal routing with minimal curves
    • ASPEN_PLUS

      public static final DiagramStyle ASPEN_PLUS
      Aspen Plus style diagram (AspenTech).

      Aspen Plus uses function-specific colors for different equipment categories, with curved stream routing for a modern appearance.

      Key visual characteristics:

      • White background with subtle grid (optional)
      • Red/orange (#E74C3C) for heaters, furnaces, fired equipment
      • Blue (#3498DB) for coolers, condensers, chillers
      • Green (#27AE60) for columns, reactors, absorbers
      • Gray (#95A5A6) for vessels, drums, separators
      • Purple (#9B59B6) for compressors, expanders
      • Royal blue streams (#2980B9) with curved spline routing
  • Field Details

    • displayName

      private final String displayName
    • backgroundColor

      private final String backgroundColor
    • streamColor

      private final String streamColor
    • showClusters

      private final boolean showClusters
    • useHtmlLabels

      private final boolean useHtmlLabels
  • Constructor Details

    • DiagramStyle

      private DiagramStyle(String displayName, String backgroundColor, String streamColor, boolean showClusters, boolean useHtmlLabels)
      Creates a diagram style.
      Parameters:
      displayName - the display name
      backgroundColor - the background color (hex or name)
      streamColor - the default stream color
      showClusters - whether to show phase zone clusters
      useHtmlLabels - whether to use HTML table labels for equipment
  • Method Details

    • values

      public static DiagramStyle[] 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 DiagramStyle 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
    • getDisplayName

      public String getDisplayName()
      Gets the display name.
      Returns:
      the display name
    • getBackgroundColor

      public String getBackgroundColor()
      Gets the background color.
      Returns:
      the background color (hex or name)
    • getStreamColor

      public String getStreamColor()
      Gets the default stream color.
      Returns:
      the stream color (hex)
    • showClusters

      public boolean showClusters()
      Whether to show phase zone clusters.
      Returns:
      true if clusters should be shown
    • useHtmlLabels

      public boolean useHtmlLabels()
      Whether to use HTML table labels for equipment.
      Returns:
      true if HTML labels should be used
    • getEquipmentFillColor

      public String getEquipmentFillColor(String equipmentType)
      Gets the equipment fill color for this style.

      Colors are matched to actual simulator UI appearances:

      • HYSYS: Consistent cyan/teal theme (#00B8B8 base)
      • Aspen Plus: Function-specific colors matching Aspen palette
      • PRO/II: White fill for all equipment (black outline only)
      Parameters:
      equipmentType - the type of equipment
      Returns:
      the fill color (hex)
    • getEquipmentOutlineColor

      public String getEquipmentOutlineColor()
      Gets the equipment outline color for this style.
      Returns:
      the outline color (hex)
    • getFontColor

      public String getFontColor()
      Gets the font color for equipment labels.
      Returns:
      the font color (hex)
    • getArrowStyle

      public String getArrowStyle()
      Gets the arrow style for stream lines.
      Returns:
      the Graphviz arrowhead style
    • getEdgeStyle

      public String getEdgeStyle()
      Gets the edge (stream) line style.
      Returns:
      the Graphviz style attribute value
    • getSplineType

      public String getSplineType()
      Gets the spline type for edge routing.
      Returns:
      the Graphviz splines attribute value
    • getPenWidth

      public double getPenWidth()
      Gets the pen width (line thickness) for equipment outlines.
      Returns:
      the pen width in points
    • getStreamWidth

      public double getStreamWidth()
      Gets the stream line width.
      Returns:
      the line width in points
    • getFontName

      public String getFontName()
      Gets the font name for equipment labels.
      Returns:
      the font name
    • getFontSize

      public int getFontSize()
      Gets the font size for equipment labels.
      Returns:
      the font size in points
    • useStreamNumbers

      public boolean useStreamNumbers()
      Whether to show stream numbers instead of names.
      Returns:
      true if streams should be numbered
    • getRecycleColor

      public String getRecycleColor()
      Gets the recycle stream color.
      Returns:
      the recycle stream color (hex)
    • getEnergyStreamColor

      public String getEnergyStreamColor()
      Gets the energy stream color.
      Returns:
      the energy stream color (hex)