Page 367 - Handbook Of Multiphase Flow Assurance
P. 367
366 10. Research methods in flow assurance
else
dist:=nr−(k−j);
Checkshort;
if short then
begin
Conti;
{if 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;
end; {end of short circuit check}
if (not short)and closed then {found a new ring * * * * * * * * *}
begin {add nnext to rin}
ntot:=ntot+1; {increase counter of found rings}
rdist[nr]:=rdist[nr]+1; {modify distribution histogram}
for j:=1 to nr do
ring[ntot,j]:=rin[j]; {move rin to ring}
nr:=nr−1; {cut by 1 to avoid short circuits}
closed:=false; {reset closed variable}
found:=false; {reset found variable}
Conti;
{if 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 of found a new ring * * * * *}
end; {end of code starting at label 1:}
if (nr>nmax) or (not found) then
begin
Choice;
nr:=nmax−1;
Conti;
if (not contin)or(nr=1) then goto 2; {no branches left,goto nextlink}
Conti2;
goto 1; {see if this is a new ring}
end;
end {end of repeat-loop}
until (nr>nmax) or (not found); {terminate search not going anywhere}
2:
Output;
end; {end of i-loop}