Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Pipeline Operations for Liquids

GetFlowNetwork Business Logic Tier (BLT)

  • Last UpdatedApr 24, 2025
  • 5 minute read

You can use the GetFlowNetwork BLT to obtain the details of a pipeline. For example, consider a mega flow network model containing two interconnected pipelines named A and B. Each pipeline contains a number of stations. To use this BLT, you need to pass "A" or "B" into the FlowNetworkName parameter. You cannot pass the name of an individual station within the pipeline. You also cannot use this BLT to return results for both pipelines in the mega flow network all at once.

The BLT queries the Realtime Database tables related to Flow Network (fnet and fnet_devices) and presents them in a tabulated format using the following result sets:

  • Flow Networks: includes Pipeline and Station details.

  • Nodes: includes details of the nodes used in the model to separate segments or attach some device types such as transmitters and Points of Interest.

  • Segments: includes details of the segments used in the model to connect nodes or attach some device types such as pumps and valves.

  • Devices: includes details of devices used in the model such as pumps, valves and Points of Interest.

Parameters

The following table details the parameters for the GetFlowNetwork BLT.

Name

Type

Optional

Output

Description

FlowNetworkName

string

False

False

This input parameter specifies the name of the Flow Network.

Success

Boolean

False

True

This parameter indicates the execution result. It will return True for success or False if an error occurs.

Message

string

False

True

This output parameter will provide a result message after execution.

Results

FlowNetworks Set

Name

Type

Field

Description

RecordNumber

String

fnet.RecordNumber

The FlowNetwork record number.

Name

String

fnet.Name

The name of the FlowNetwork.

Dataset

Int

fnet.Dataset.Number

The FlowNetwork dataset number.

Description

String

fnet.Description

The FlowNetwork description.

Debug

Boolean

fnet.Debug

Is the FlowNetwork in Debug mode?

MessageSlot

Int

fnet.Flag.BaseMessage.Number

The FlowNetwork Base message number.

AlarmType

Int

fnet.AlarmingType

The FlowNetwork alarming type value:

0. Device Based Alarming

1. Model Based Alarming

Group

Int

fnet.Group.Number

The FlowNetwork Group number.

OffNormalEventsInhibited

Boolean

fnet.Flag.OffNormalEventsInhibited

Are Off Normal Events inhibited on the FlowNetwork?

Station

Int

fnet.Station.Number

The station record number to which the Flow Network is attached.

If no station is attached, the value is 0.

HintOrder

Int

fnet.HintOrder

The order of the Flow Network within the context of the pipeline (parent Flow Network).

If the Flow Network is a parent, the value is 0.

ParentNetwork

Int

fnet.ParentNetwork

The record number of the parent Flow Network.

If the Flow Network is a parent, the value is 0.

LastKrunchTimeHigh

Int

fnet.LastKrunchTime.High

The Last Krunch Time in the Epoch Format.

LastKrunchTimeLow

Int

fnet.LasttKrunchTime.Low

The additional milliseconds to the Last Krunch Time.

Segments Set

Name

Type

Field

Description

FlowNetwork

Int

fnet.RecordNumber

The FlowNetwork record number.

Id

String

fnet.Segments[*].Id

The name of the FlowNetwork Segment.

CheckValve

Int

fnet.Segments[*].CheckValve

The Check Valve Type attached to the segment:

0. No Check Valve

1. Flow Left Only

2. Flow Right Only

Capacity

Int

fnet.Segments[*].Capacity

The segment capacity size.

LeftNode

String

fnet.Nodes[Index].Id

where

Index = fnet.Segments[*].LeftNo

de.Id

The node attached to the left of the segment.

RightNode

String

fnet.Nodes[Index].Id

where

Index = fnet.Segments[*].RightNo

de.Id

The node attached to the right of the segment.

Flowdirection

Int

fnet.Segments[*].State.Flowdirection

The segment flow direction:

0. None

1. Left

2. Right

3. Unknown

Flowing

Int

fnet.Segments[*].State.Flowing

The segment flow state:

0. Flow Closed

1. Flow Open

2. Flow Opening

3. Flow Closing

Flowpath

Int

fnet.Segments[*].State.Flowpath

The segment flowpath state:

0. Closed

1. Pending Closed

2. Shutin

3. Pending Shutin

4. Blocked

5. Pending Blocked

6. Blocked Downstream

7. Pending Blocked Downstream

8. Blocked Upstream

9. Pending Blocked Upstream

10. Open

11. Pending Open

Product

Int

fnet.Segments[*].State.Product.Number

The record number of the product flowing in the segment.

Pumping

Int

fnet.Segments[*].State.Pumping

The segment pumping state:

0. No Pumping

1. Actively pumping

Terminal

Int

fnet.Segments[*].State.Terminal

The segment Flow Terminal state:

0. No Node Type

1. Receipt Node

2. Delivery Node

3. Generic Termination Node

Nodes Set

Name

Type

Field

Description

FlowNetwork

Int

fnet.RecordNumber

The FlowNetwork Record Number.

Id

String

fnet.Nodes[*].Id

The name of Flow Network Node.

Flowing

Int

fnet.Nodes[*].State.Flowing

The Node flow state:

0. Flow Closed

1. Flow Open

2. Flow Opening

3. Flow Closing

FlowPath

Int

fnet.Nodes[*].State.Flowpath

The Node flowpath state:

0. Closed

1. Pending Closed

2. Shutin

3. Pending Shutin

4. Blocked

5. Pending Blocked

6. Blocked Downstream

7. Pending Blocked Downstream

8. Blocked Upstream

9. Pending Blocked Upstream

10. Open

11. Pending Open

Product

Int

fnet.Nodes[*].State.Product.Number

The record number of the product flowing in the node.

Pumping

Int

fnet.Nodes[*].State.Pumping

The node pumping state:

0. No Pumping

1. Actively pumping

Terminal

Int

fnet.Nodes[*].State.Terminal

The Node Flow Terminal state:

0. No Node Type

1. Receipt Node

2. Delivery Node

3. Generic Termination Node

FlowNetworkDevices Set

Name

Type

Field

Description

FlowNetwork

Int

fnet_device.FlowNetwork.Number

The FlowNetwork Record Number.

RecordNumber

Int

fnet_device.RecordNumber

The Device Record Number.

Flowing

Int

fnet_device.State.Flowing

The device flow state:

0. Flow Closed

1. Flow Open

2. Flow Opening

3. Flow Closing

Name

String

fnet_device.Name

The Device name.

Product

Int

fnet_device.State.Product.Number

The record number of the product flowing in the device.

Pumping

Int

fnet_device.State.Pumping

The device pumping state:

0. No Pumping

1. Actively pumping

Terminal

Int

fnet_device.State.Terminal

The device Flow Terminal state:

0. No Node Type

1. Receipt Node

2. Delivery Node

3. Generic Termination Node

Parent

String

If device type is Valve or Pump

Use fnet.Segments[fnet_device. ItemKey].Id

Otherwise,

Use fnet.Nodes[fnet_device.
ItemKey].Id

Retrieve the parent Segment ID for devices of type Pump or Valve and the parent Node ID for the other types.

DeviceType

Int

fnet_device.DeviceType

The Device type:

0. Block Valve

1. Pump

2. Tank

3. Meter

4. Nested Network

5. Network Outlet

6. Rate

7. DRAInjector

8. Temperature

9. Pressure

10. Interconnection

11. Level

12. Concentration

13. Detector

14. Differential Pressure

15. Flow

16. Misc

17. Point of Interest

PathTableNumber

Int

fnet_device.DevicePath.TableNumber

The device path table number (example, pump or valve).

PathRecordNumber

Int

fnet_device.DevicePath.RecordNumber

The device path record number.

Debug

Boolean

fnet_device.Debug

Is the Device in Debug mode?

Data

String

fnet_device.Data

The Device additional data.

ArrayKey

Int

fnet_device.ItemKey

The Parent Segment/Node (depending on the type) index of the device.

GetFlowNetwork BLT Programming Example

The following example shows how you can program using the GetFlowNetwork BLT.

String flowNetworkName = "PipelineX";

using (IBLTClient client = new BLTClientFactory().Create("GetFlowNetwork", "RealTime"))

{

//Input parameter

client.AddParameter(flowNetworkName);

//Output parameters

client.AddParameter(out BLTParameterValueAccessor success);

client.AddParameter(out BLTParameterValueAccessor message);

client.Execute();

//Check if the execution failed

if (success.Value is Boolean s && !s)

{

Console.WriteLine("GetFlowNetwork failed, error:" + message.Value);

return;

}

//Load the multiple result sets in collections

var results = client.GetResults();

var fnetRecords = results.GetRecords("FlowNetworks");

var nodeRecords = results.GetRecords("Nodes");

var segmentRecords = results.GetRecords("Segments");

var deviceRecords = results.GetRecords("FlowNetworkDevices");

//Read the FlowNetworks result set

foreach (var fnet in fnetRecords)

{

var name = fnet.GetValue<String>("Name");

var recordNumber = fnet.GetValue<Int32>("RecordNumber");

//Read other fields here

}

//Read the Nodes result set

foreach (var node in nodeRecords)

{

var id = node.GetValue<String>("Id");

var fnetNumber = node.GetValue<Int32>("FlowNetwork");

//Read other fields here

}

//Read the Segments result set

foreach (var segment in segmentRecords)

{

var id = segment.GetValue<String>("Id");

var fnetNumber = segment.GetValue<Int32>("FlowNetwork");

//Read other fields here

}

//Read the FlowNetwork result set

foreach (var device in deviceRecords)

{

var name = device.GetValue<String>("Name");

var fnetNumber = device.GetValue<Int32>("RecordNumber");

//Read other fields here

}

}

In This Topic