Page 348 - Handbook Of Multiphase Flow Assurance
P. 348
Computer code (Makogon, 1994, 1997) 347
ring–path is divided by short-circuit into two equal halves, atom
in position 2 of short-circuit must be greater than both #2 and
#-1 in the ring-path.
Example:
^6 A ring-path was found: 1-2-3-4-5-6. It will be
/|\ shortcircuited by path 3786. Here is how: Shortcircuits
1 / 8 \5 are possible between points 3 and 6 in ring. 3 is less
| | | than 6, thus search was started at point 3. Found
| | | possible short-circuit is 3-7-8-6 which doesn't
2 \ 7 /4 belong to the ring and doesn't "backbite" on itself.
\|/ Point #1 in ring-path and in short-circuit is point 3.
v3 Points #-1 and #2 in the ring-path are points 2 and 4.
In order to be a valid short circuit, number of point #2 in short-
circuit must be greater than both #-1 and #2 in the ring-path,
which is true: 7>2, 7>4. Conclusion: ring-path 1-2-3-4-5-6 is short- circuited and
is not counted. Such approach will give 4 good ring-paths: 1-2-3-7-8-6, 1-6-8-7-3-
2, 3-4-5-6-8-7, and 3-7-8-6-5-4. This is a correct answer of 2 rings (counted twice
each).
Another example:
1-----5 A ring-path 1-2-6-4-5 is not short-circuited. Possible
| /\ points are 5 and 6. 5<6, then search from 5. Shorter
| / \ distance in ring-path is 6-4-5 (2 bonds), compared to
| <3 >4 5-1-2-6 (3 bonds). Search for paths between 5 and 6 of
| \ / length 2 at most. Found 5-3-6(2 bonds). Compare point #2
|__\/ in short-circuit(point 3) and #2 in ring-path (point 4).
2 6 Number of #2 in short-circuit is lesser than of #2 in
ring-path (3<4). This doesn't qualify for a short-circuit.
Conclusion:ring-path 1-2-6-4-5 is not short-circuited. Such approach will give 4
good ring-paths: 1-2-6-4-5, 1-5-4-6-2, 3-5-4-6, and 3-6-4-5. This is a correct
answer of one 4-membered and one 5-membered ring (counted twice).}
%CHECK off
label 1,2,3;
const nmax=10; {maximum ring size}
ngrand=3000; {maximum number of bonds to search}
{ nhb2:array[1..12,1..2]of integer=((1,2),(1,3),(1,5),(1,6),(2,4),}
{ (2,5),(2,6),(3,4),(3,5),(3,6),(4,5),(4,6)); }