PlantWise Help

Equipment Vicinity Routing Rule Example

Equipment Vicinity Routing rules are illustrated here using the Vertical Box Heater example.

An equipment nozzle takeoff rule starts with an “Equipment Identification” header, followed by vicinity routing (or “takeoff”) rules. A vicinity routing rule is a rule that defines how a single pipe originating or terminating at a nozzle is routed from this nozzle in the immediate vicinity of the equipment. There may be many rules for how a pipeline “takes off” from a nozzle within an equipment type. Each rule applies for a different condition.

Each vicinity routing rule is preceded with an optional condition statement that is typically used to reduce the cases for which this specific vicinity routing rule applies. Because rules are processed in order and pipes will be evaluated for the first rule they qualify for, the more specific case conditions should precede the more general ones. A condition statement starts with the keyword WHEN and combines multiple conditions with the logical key-words AND and OR. (The language is not case sensitive, keywords are capitalized here for clarity.) The VERTICAL_BOX_HEATER is a simple example with the case being based on flow direction and nozzle location. More complex rules can make multiple cases dependant on things such as: direction of the attached nozzle, whether or not the pipeline is a suction line, and the location of the other end of the pipeline. To get this information, the equipment vicinity routing language permits addressing properties of the equipment, the graphic elements of the equipment, the attached nozzle and the line itself.

After the proper case for which this rule applies has been identified, the routing preference is specified as a series of GO statements combined with AND keywords. Each GO statement defines how a segment of the pipeline “takeoff” is preferred to be routed.

There are three conceptually different ways to define the route of a segment:
  • Specifying the direction and the distance of the segment.
    • Direction

      The direction can be specified in relation to the equipment axis, to the plot coordinates, to the nozzle direction or to the direction of the nearest pipeway with the keywords specified in the "Equipment Vicinity Routing Language Syntax" (ref: Appendix C).

    • Distance

      The distance may be specified as an expression or alternately as the minimum distance. If the pipeline segment to be defined is attached to a nozzle, this minimum distance is the thickness of a flange and a long radius 90° elbow plus the lengths of any inline components in that segment. For any other segment the minimum length is twice the dimension of a flange and a long radius 90° elbow plus the length of any inline components in that segment

  • Specifying a target routing plane in the vertical direction.
    The GO statement combines the direction with the target plane ("LEVEL”) using the keyword TO.
    • Direction

      The vertical direction is either up (“UP”) or down (“DOWN”) or it can be determined by the location of the nearest appropriate routing plane (“VERTICALLY”).

    • Routing PlaneLEVEL”)

      As some users may have preferences as to the plane certain pipes route on, they can specify that plane in the vicinity routing rules. The routing plane may be defined by an expression that results in a plane specification (a keyword) or a routing plane (“LEVEL”) specification. When determining the right routing plane, using the vicinity route always ensures that the selected level is at least the minimum distance from a pipeline vertex (bend or endpoint).

      The routing plane keywords are:
      • ANY-LEVEL —is the first level beyond minimum distance in the selected direction.
      • PARALLEL_TO_PIPEWAY_LEVEL —is the first level beyond the minimum distance in the selected direction where the routing direction coincides with the direction of the nearest pipeway.
      • PERPENDICULAR_TO_PIPEWAY_LEVEL —is the first level beyond the minimum distance in the selected direction where the routing direction is perpendicular to the direction of the nearest pipeway.
      • NOZZLE-DIRECTION —is the first level beyond the minimum distance in the selected direction where the routing direction is in the “direction of the nozzle”. The direction of the nozzle here is understood to be the orthogonal direction in the plan view that is parallel with the longer nozzle direction vector component.
      • PERPENDICULAR_TO_NOZZLE-DIRECTION —is the first level beyond the minimum distance in the selected direction where the routing direction is perpendicular to the “direction of the nozzle”. The direction of the nozzle here is understood to be the orthogonal direction in the plan view that is parallel with the longer nozzle direction vector component.
      • LEFT-RIGHT or LEFT or RIGHT —is the first level beyond the minimum distance in the selected direction where the routing direction allows the pipeline to turn left (or right) in relation to the equipment axis.
      • BACK-FRONT or BACK or FRONT —is the first level beyond the minimum distance in the selected direction where the routing direction allows the pipeline to turn towards the front (or back) of the equipment.
      • NORTH-SOUTH or NORTH or SOUTH —is the first level beyond the minimum distance in the selected direction where the routing direction allows the pipeline to turn North (or South).
      • EAST-WEST or EAST or WEST —is the first level beyond the minimum distance in the selected direction where the routing direction allows the pipeline to turn EAST (or WEST).
  • A preference to route to the next available place (“Channel”) in a horizontal or vertical pipeline grouping can be specified.
    • Horizontal Channels

      It is sometimes desirable to run all pipelines originating or terminating at certain equipment together on the same routing plane if the pipelines are to be routed in the same direction – particularly for nozzles that are oriented parallel to the pipeway, i.e., the takeoff routes from the nozzles must go out and then turn toward the pipeway. This is true, e.g., for heat exchangers and horizontal vessels. To advise the router that this is desirable, the vicinity routing rules can specify horizontal channels (“CHANNEL”).

      For all other equipment, the statement GO TO CHANNEL causes the vicinity router first to select the “channel side” to be the side of the equipment on which the other end of the first pipeline routed to the pipeway is located. Any subsequent pipe that goes to the pipeway is placed next to the already placed pipelines on the channel side. Pipelines that do not go to the pipeway do not generally use channels.

    • Vertical Channels

      Pipelines that originate from nozzles that are located above each other result in a pipeline from the higher nozzle that has to route around the lower nozzle. The statement GO TO VERTICAL-CHANNEL causes a pipeline from the higher nozzle to prefer a route that is outside (a vertical channel) the pipeline originating (or terminating) at the lower nozzle. A top nozzle which is advised to GO TO VERTICAL-CHANNEL first looks in the quadrant in the direction of the other end of the pipeline for an unobstructed vertical run down the side of the vessel. If such a run is found, the GO TO VERTICAL-CHANNEL proposes a route to this run from the top nozzle. If an unobstructed run is not found, a route is proposed to the vertical channel in the orthogonal direction nearest to the other end of the pipeline or nearest the pipeway if the pipeline goes to the pipeway.

Distances and logical conditions may be determined by an infix expression. The infix syntax is described in more detail in Appendix C - Language Syntaxes. These expressions may use attribute values from the equipment, from the elements of the equipment, from the connected nozzle and the pipeline itself. The binding to various variables is discussed in the "Equipment Vicinity Routing Language Syntax". The calculations must result in values in the selected unit system.

Important or useful attributes that can be referenced are listed in "Variable Binding" section.

To address an equipment attribute, the variable in the expression is written as:
equipment.<equipment attribute name> 
where equipment identifies that the variable is an equipment attribute and the <equipment attribute name> is the name of one of the main dimension attributes in the equipment. In the VERTICAL_BOX_HEATER there are no references to main dimensions.

The prefix LINE. is used to address attributes in the pipeline.

The prefix NOZZLE. is used to address attributes in the connected nozzle. In the VERTICAL_BOX_HEATER example the rule checks whether or not the nozzle is an inlet
(nozzle.flow_direction is inlet).
To address an equipment element property, the variable in the expression is written as follows:
<element name>.<element property name>
where <element name> is the name of the element in which the desired property value is defined and <element property name> is this property.