Page 357 - Handbook Of Multiphase Flow Assurance
P. 357
356 10. Research methods in flow assurance
proceed:=false;
if ((nr mod 2)=0)and(dist=(nr/2)) then
begin {dist is same as equal halves of ring}
if (snext>start1)and(snext>start2) then
proceed:=true; {snext can start a good short circuit}
end
else
begin {different halves of ring}
if ps<pf then
begin
if (rin[ps+dist]=finish)then
begin {shorter half is increasing positions}
if rin[ps+1]=start2 then
begin {shorter half must start with start1}
js:=start1;
start1:=start2;
start2:=js;
end;
end
else
begin {shorter half is decreasing positions}
if rin[ps+1]=start1 then
begin {shorter half must start with start1}
js:=start1;
start1:=start2;
start2:=js;
end;
end;
end
else
begin
if (rin[ps–dist]=finish)then
begin {shorter half is increasing positions}
if rin[ps−1]=start2 then
begin {shorter half must start with start1}
js:=start1;
start1:=start2;
start2:=js;
end;
end
else
begin {shorter half is decreasing positions}
if rin[ps−1]=start1 then
begin {shorter half must start with start1}