Page 352 - Handbook Of Multiphase Flow Assurance
P. 352

Computer code (Makogon, 1994, 1997)              351

                   if nhb[jc,2]=srin[jc2] then
                     begin
                     nothere:=false;
                     goto C1;
                     end;
                  end;
                if (nhb[jc,2]=srin[ic]) then
                  begin                        {other end of bond fits}
                  nothere:=True;
                  for jc2:=1 to ic do
                   if nhb[jc,1]=srin[jc2] then
                    begin
                    nothere:=false;
                    goto C1;
                    end;
                  end;
                if nothere then
                  begin                       {found branch in short circuit path}
                  srinn[ic]:=True;            {Record its position.}
                  srinm[ic]:=jc;
                  goto C2;
                  end;
            C1: end;                          {end of loop on bonds}
            C2:end;                           {end of loop on ring links}
            end;                              {exit from procedure}

            Procedure CleanUp;                {Used to remove useless bonds from list}

            label C2;

            var i,j,k,l,m1,m2:integer;

            begin
                                              {delete all parallel (double) bonds}
            begin
            for i:=1 to ngrand do
              begin
              ring[i,1]:=0;                   {use array ring as tempor. storage}
              end;
            k:=0;                             {reset counter of repeating bonds}
            for i:=1 to n−1 do
              for j:=i+1 to n do              {find repeated bonds}
              if ((nhb[i,1]=nhb[j,1])and(nhb[i,2]=nhb[j,2]))or
                 ((nhb[i,1]=nhb[j,2])and(nhb[i,2]=nhb[j,1])) then
   347   348   349   350   351   352   353   354   355   356   357