Page 366 - Handbook Of Multiphase Flow Assurance
P. 366
Computer code (Makogon, 1994, 1997) 365
npass1:=pass[bonds[j]];
end;
if npass1<>npass2 then short:=true;
end;
if short then
begin
Conti;
{if no branches left go to next link}
if (not contin)or(nr=1) then goto 2;
Conti2;
goto 1; {see if this is a new ring}
end;
for j:=1 to nr−1 do {between positions j and k of ring}
begin {where k>j, shorted by one bond}
if j=1 then
m1:=nr−1
else
m1:=nr;
for k:=j+2 to m1 do
if (order[rin[k]] >2) and (order[rin[j]] >2) then
begin
for m2:=1 to n do {seek one-bond short circuits}
if ((nhb[m2,1]=rin[j])and(nhb[m2,2]=rin[k])) or
((nhb[m2,2]=rin[j])and(nhb[m2,1]=rin[k])) then
begin
short:=true;
Conti;
{no branches left goto next link}
if (not contin)or(nr=1) then goto 2;
Conti2;
goto 1; {see if this is a new ring}
end;
end;
end;
for j:=1 to nr−1 do {between positions j and k of ring}
begin {where k>j}
if j=1 then
m1:=nr−1
else
m1:=nr;
for k:=j+2 to m1 do
if (order[rin[k]] >2) and (order[rin[j]] >2) then
begin
if (k−j)<(nr/2)then
dist:=k−j