Page:4SIGHT manual- a computer program for modelling degradation of underground low level waste concrete vaults (IA 4sightmanualcomp5612snyd).pdf/137

From Wikisource
Jump to navigation Jump to search
This page needs to be proofread.
61.ADVANCE SULFATE FRONT
B.28

61. Advance sulfate front.

⟨Function declarations 23)⟩
void advance.sulfate-front()


62.

void advance_sulfate_front ();
{ 
  int i, j, k, new_first_cell;
  sulfate_depth+=sulfate_rate * ;
  if (sulfate_depth>(real) (FIRST_CELL+1) [FIRST_CELL] <0.10) { 
    new_first-cell=(int)(sulfate-depth +0.4);     /* penetration beyond next cell */
      /* copy info from old first cell into new first cell */
    for(k = FIRST_CELL + 1; k  new_first_cell; k++) {
     for(i = 0; i < num_cations; i++) cation[i].c[k] = cation[i].c[FIRST_CELL];
     for(j = 0; j < num_anions; j++) anion[j].c[k] = anion[j].c[FIRST_CELL];
     for (i = 0; i < num_cations; i++)
       for (j = 0; j < num_anions; j++) sol_array[i][j].s[k] = sol_array[i][j].s[FIRST_CELL];
    }
    [new_first_cell]=[FIRST_CELL];
    FIRST_CELL = new_first_cell;
    [FIRST_CELL] = (real) (FIRST_CELL+1)-sulfate_depth;
  }
}