Table of Contents

Table of Contents

Flow Pipe

Flow Pipe

Overview and Key Concepts

The pipe is used to simulate the time required to move material from one object to another. It appears as a straight cylindrical pipe with a single segment (for a multi-segment pipe with the same functionality, consider using a segmented flow pipe).

The pipe carries material from one point in the model to another. It is most often needed when you need to to take into account the time required to move material from one point to another, certainly if different products are involved.

The pipe's behavior is mainly controlled by two properties: the maximum content and the maximum flow rate. The amount of time that it takes material to travel through the pipe is the quotient of these two values. As usual, the actual output rate of the pipe may be lower than the entered maximum: it is based both on the rate of material entering and the rate at which the downstream object(s) can receive the material flowing out. The throughput rate of the pipe will be adjusted, always keeping the inflow and outflow rates equal.

Multi-product pipelines

The flow pipe supports multiple products. Following the FloWorks philosophy, the pipe does not keep track of the products; rather, when you change the FloWorks product type of the pipe, the type of the product entering the pipe will change. The different products in the pipe will be shown as chunks colored with the product's own color moving through the pipe (see the image below). The pipe offers two events, Product In Change and Product Out Change, that allow you to add logic to the pipe whenever the product changes. The former trigger fires every time a new interface is created at the beginning of the pipe, whether that happens because you change the product explicitly yourself or the pipe has an incoming object such as a flow conveyor or another pipe that is passing any product changes downstream. The Product Out Change event happens when an interface reaches the end of the pipe, you can use it to stop the flow, or redirect it elsewhere based on the new product type.

Draining the pipe

Note that the pipe can never become "empty" - like pipes found in reality in many industries, it does not drain on its own when the input is stopped. If you do need to empty the pipe you can do so explicitly as follows. Create a separate product, such as "air" or "water", which you set to an inconspicuous color such as gray or white, and flush the pipe with this product. You can use the Product Out Change trigger to stop the flow when this "flushing product" has completely filled the pipe. When you want to start transporting an actual product again, it will take some time to push out this temporary product again - you may want to connect the pipe to a sink and temporarily redirect the "flushing product" into the sink until the Product Out Change trigger indicates that the actual product is starting to flow out.


The flow pipe uses the standard events that are common to almost all FloWorks objects. See FloWorks Triggers for an explanation of these events.

Note that despite having a maximum content, the pipe is not considered to be a content-holding object and therefore tank-focused triggers such as On Full and On Empty are not available on the pipe.

The flow pipe has the following additional events:

On Product In Change

This event occurs whenever the product entering the pipe changes. It does not fire at the start of the simulation, if the product flowing through the pipe is equal to the initial product.

It has the following parameters:

Event Parameter Explanation
curproducttype The product ID or name of the product type that was entering prior to this event.
newproducttype The product ID or name of the product type that will be entering after this event.

On Product Out Change

This event occurs whenever the product leaving the pipe changes. This event is commonly used to switch output ports or take some other action based on the new product type.

It has the following parameters:

Event Parameter Explanation
curproducttype The product ID or name of the product type that was leaving prior to this event.
newproducttype The product ID or name of the product type that will be leaving after this event.


For statistical purposes, the pipe's FloWorks state profile will be in one of the following states at various points during a simulation run:


The pipe does not have any flow.


Material is flowing at a non-zero flow rate.


The flow sink tracks the following statistics. These can be viewed by clicking on the object and then viewing the Statistics pane in Quick Properties.

Input / Output

The total number amount of flow, measured in fluid units, that has entered or exited the pipe.

Flow rates

The current input and output rate of the pipe, measured in fluid units per time unit.


The ratio of the input volume (total amount of inflow) to the maximal possible value for that statistic.

For example, if you run the model for two hours and the maximum flow rate was 10 for one hour and 20 for the second hour, while the actual flow rate was 10 per hour during the whole run, the utilization will be (20 (total flow)) / (10 + 20 (maximal flow)) × 100% ≈ 67%.


The flow pipe object uses the following properties panels:

Custom coding

You may control the behavior of the flow pipe dynamically by writing FlexScript, for example in a Script window or by changing the code behind one of the options in an object trigger.

The flow pipe is an instance of the FlowObject class, see the class reference for information about its properties.