# Bolt-Length Calculation [OPM – 10.07.00.32]

Hello everybody,

I think the algorythm to choose a correct bolt length is not working correctly together with the Increment value “BOLT_INC”. It produces wrong values and does not represent the way a bolt length is picked in reality.

System Setup:

OpenPlant Modeler - Connect Edition Update 7 [10.07.00.32]

Metric WorkSet (It is customized for our company, but there have been no changes to any bolt-related operation.)

Explenation of my concerns:

I am looking into the bolt-length calculation in OpenPlant Modeler, especially the handling of the Bolt-Increment Value.

I imagined the value as a kind of representation in which increments I can get my bolts from the supplier. For example these increments could be as follows.

Until a length of 80 mm you can get them in increments of 5 mm.
From 80 mm until 200 mm increments of 10 mm.
And above 200 mm increments of 20 mm.

So my thought was, that the “BOLT_INC” in the specification will represent theses increment values.
For a test I setup a specification with the possible bolts for a DN100 PN16 Weld-Neck-Flange connection. These are M16 Bolts and my Spec-Values looked like this:

(Please note: The starting point for the first entry is chosen very low with a length of 5 mm. In reality there will be no M16 bolt with 5 mm length, but I chose it to have more flexibility for a first test.)

I then made a flange to flange connection in OPM to look at the bolts it chooses.
The connection has the following values and it should be a calculated Bolt_Length of 61.8 mm.

Now I thought: Allright, let’s see if OPM pics a length of 65 mm.
How do I get on a value of 65?

For me the calculation (in a kind of pseudocode) would look like this:
The calculated length is 61.8 mm. Is there a bolt with that length in the specification?
No it is not there.
Is there a Bolt with a smaller length AND an increment value which could be picked?
Yes it is there. Starting at 5 mm and with an increment value of 5.
Start adding the increment value to that bolt, until the length is bigger than the calculated value of 61.8 mm.

Bolt Length = 5 mm + ( X-Times the Increment Value) = 5 mm + ( 12 x 5) = 65

Otherwise, if there is no smaller Bolt with an increment value, pick a bigger length, which is nearest to the calculated length. In my case this would be a length of 80 mm.

Now what did OPM pick in reality?

A length of 100???

How in the world does he get to a value of 100?

I then had a look back at the wiki-article which explains the bolt-calculation.
( https://communities.bentley.com/products/plant/w/plant_design_and_engineering__wiki/14484/how-are-bolt-lengths-calculated-in-openplant-modeler )

And in the lower part of the article under the point “For General Flange Connection:” I found this sentence: “ If no Bolt of current length is found after processing all the records, then we use the increment value (BOLT_INC) of the LAST RECORD to calculate correct length.”

I tried around with changing the value a bit to find out what it means to take the LAST RECORD.

It seems that OPM really choses the Record with a length of 200 mm and goes from there. And the interesting and dumb thing is: It does a substraction of the increment value. For my example this would be starting at a length of 200 mm and going down in increments of 20.
(Please see the additional example at the bottom of this post, that I idid to verify that behaviour.)

Now there are two main questions (and some additional):

1. Why the hell is it programmed this way that he picks the last record and goes from there?
2. If he goes from 200 mm down in 20 mm Increments, he should at least get to a value of 80 mm (for a calculated length of 61.8 mm, which would be the minimum value for the bolt). Why does he stop at 100 mm?
And also why is this length transferred on all three Bolts of the catalog?

So I would like to propose to change the algorythm behind the bolt calculation.

1. If it does not find an entry with the calculated length directly, it should look for a lower value with an increment. In my case this would be starting at a length of 5 mm.
2. Then he should calculate the value with the increments until it gets bigger than the needed value. 5 mm + 12 times increment of 5 = 65 mm
3. Then he should have a look if this value is still smaller then the next entry in the spec, regarding the length. In my case 65 is still smaller than 80mm, which would be the next entry. If there would be an entry with for example 63 mm, he should pick that one.
So this would be a comparison between the needed length (61.8), the next bigger length in the spec (63 or 80, depending what is in the spec) and the length which was realized with increments (65).

Maybe a question for all of the community here:

How do you realize a correct picking of the bolt length?

Do you have all the available screws as an entry in your specification or do you do it in another way?

EXAMPLE to verify that he goes from the last record and substracts the increment value:

For this test I changed the increment value of the longest of the three bolts to an odd value of 23.8.
The rest of the values stayed the same.

Again I made the DN100 PN16 Weld-Neck-Flange Connection and now the length showed a value of 104.8:

I was confused at first, but noticed that the picked value of 104.8 equals the following calculation:

104.8 = 200 – 4 x 23.8

So what he did is starting from the last record, which seems to be the bolt with a length of 200 mm from the spec and then keeps substracting the corresponding increment value until he reaches a value which is still greater then the other entries (in this case greated than the entry with a length of 80 mm), but bigger than the calculated value of 61.8 mm.

EXAMPLE FILES:

Specification:

(The specification was compressed and only contains necessary parts for the test, to keep the file size small.)

Example-DGN:

Testfile-Bolts.dgn

(The example DGN contains a flange-to-flange connection, with gasket and bolts, DN100, metric WorkSet.)