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

From Wikisource
Jump to navigation Jump to search
This page needs to be proofread.
39.INITIALIZE PARAMETERS
B.21
     [k]=*(1.-(joint_width/joint_spacing));
     [k]=*(1.-(joint_width/joint_spacing));
   }
 }
 [k]=[k]/;


This code is used in section 41.


50. Need to make an initial estimate of the equilibrium concentrations and the pH of each cell.

⟨Initial estimate of pH 50⟩
      /* make a rough guess for concentrations in cases of solids present */
for (k=0;k<NUM_SURFACES; k++) 
  for (i=0;i=<num-cations; i++) {
    for (j=0;j<num-anions; j++) {
      if(sol_array[i][j]..s[&] > 0.0) {
        m = sol_array[i][j].m;
        n = sol_array[i][j].n;
        if (m == 0) printf("m=O \n"); 
          if (n == 0) printf("n=O \n"); 
          printf("\n\tProblem with *%s%s\n",cation[i.name anion [j].name);
          exit( 0);
        }
        moles_cation = pow(sol_array [i][j].ksp,
          1./(m+n))*pow(anion[j],valence/cation[i].valence,n/(n + m));
        moles.anion= moles.cation * * (cation[i].valence/anion[j].valence); 
        cation[i].j[k]=moles-cation
        anion[j].c[k]=moles.anion;
        cation[i].moles[k]=cation[i].j[k] * litre[k;
        anion[j].moles[k]=anion[i].j[k] * litre[k];
      }
    }
  }   /* calculated [OH] and [H] concentrations */
  for (k = 0; k < NUM_SURFACES; k++) {
      charge = 0.0;
      for (j = 1; j < num.amons; j++) charge+= aninon[j].valence * anin [j],c[k];
      for (i = 1; i < num.cation; j++) charge+= catinon[j].valence * cation [i],c[k];
      anion[OH].c[k] =0.5 * (-charge +sqrt(SQR(charge)+4.0 * sol_array[H][OH].ksp));
      cation[H].c[k]=sol_array[H][OH].ksp/anion[OH].c[k];
      anion[OH].moles[k]=anion[OH].c[k] * litre[k];
      cation[H].moles[k]=cation[H].c[k] * litre[k];
  }

This code is used in section 41.

51. Inverse complementary error function. Find x given C such that C = erfc(x).

⟨Function declarations 23⟩
 real inv.erfc( real);