Calculate FlowData (complex) with PlantLink

<< Click to Display Table of Contents >>

Navigation:  PlantExpressTools > How to use > Calculations >

Calculate FlowData (complex) with PlantLink

Previous pageReturn to chapter overviewNext page

Please make sure you read through the Calculate simple Example chapter, because we will keep the explanations shorter and you may miss some details.

In this more elaborate example we see a combination of calculations and PlantLink configurations.

This is the order of steps:

1.The user types in Design Flow Speed and Flow Rate

2.Based on those two values the "Calculated Size" will be calculated

3.Next PlantLink will retrieve the next larger Size, Outside Diameter and Wall Thickness where the inside diameter is larger than the Calculated Size

4.The Inside Diameter will be calculated

5.The Pipe Area will be calculated

6.The Operational Flow Speed will be calculated

Calculations 41

For Pipe Line Segments we created all the necessary properties.

Calculations 42

For the calculation of the pipe size we use this simple calculation:

Calculations 62

Qw        = Flow Rate m³/h
v        = Velocity (m/s)

The formula is represented through this expression.

Sqr([Flow Rate (m³/h)] / [Design Flow Speed (m/s)] / 3600 * 4 / 3.1415)

Since the size is calculated in meters we need to multiply with 1000 to get mm.

The Round function then rounds the value to two decimal point.

Round(...... * 1000, 2)

The whole expression looks like this:

Round(Sqr([Flow Rate (m³/h)] / [Design Flow Speed (m/s)] / 3600 * 4 / 3.1415) * 1000, 2)

This is how it looks in the configuration dialog.

Calculations 43

Next we have a SQLite database for PlantLink in out project.

Calculations 45

We have one table with 5 columns.

1.NominalDiameter        = Size

2.ODMax                        = Outside Diameter for the Size

3.WTMax                        = Wall Thickness for the Size

4.ODMin                        = Outside Diameter for the next smaller Size

5.WTMin                        = Wall Thickness for the next smaller Size

Calculations 46

The next steps show the configuration for PlantLink. We will not cover all the details of PlantLink at this point. Please have a look under How to use Videos.

We start PlantLink.

Calculations 44

We select the database we want to use.

Calculations 47

We select the "Update" link type.

Calculations 48

We select the class for which we want to bring in the data from the database table.

Calculations 49

We select the table OD from out database.

Calculations 50

With the following expression PlantLink finds the size where it chooses the Size where ODMax - 2 x WTMax is greater than the Calculated Size AND ODMin - 2 x WTMin is less than the Calculated Size. This effectively means to get the Size which is the next larger Size than the Calculated Size.

[ODMax] - 2 * [WTMax] >= ?CalculatedSize(mm) And [ODMin] - 2 * [WTMin] <= ?CalculatedSize(mm)

Calculations 51

Then the required fields are mapped.

Calculations 52

And we give the link a name.

Calculations 53

The new Link is active and no error appear.

Calculations 54

Next we calculate the Inside Diameter from the values coming from PlantLink.

[Outside Diameter (mm)] - 2 * [Wall Thickness (mm)]

Calculations 55

Then we calculate the Pipe Area in m². Therefore we need to divide by 1000000.

[Inside Diameter (mm)] * [Inside Diameter (mm)] * 3.1415 / 4 / 1000000

Calculations 56

Last we calculate the Operational Flow Speed based in the same formula as at the beginning. An we round again for two decimal points.

Calculations 62

Round([Flow Rate (m³/h)] / [Pipe Area (m²)] / 3600, 2)

Calculations 57

As soon as we type in the values 2 and 10 all the calculations and link configurations are triggered.

Calculations 58