GoldSim uses the backwards difference (fully implicit) algorithm to integrate the cell matrix equations over time. The resulting matrix equations are solved using an iterative, sparse-matrix solution algorithm (a preconditioned conjugate gradient approach, described further in Appendix B of the Contaminant Transport User's Guide). The backwards difference algorithm has the advantages of being unconditionally stable, conserving mass, and having bounded error levels. GoldSim automatically uses fractional timesteps (based on the user’s ‘solution precision’ selection) in order to control the accuracy of the results. In general, users can rely on GoldSim to compute accurate results, with the accuracy controlled by the ‘solution precision’ choice.
Note, however, that the equations for a cell net change when a species reaches its solubility limit in a Cell. GoldSim monitors concentrations in the Reference Fluid. If the concentration for a species reaches the solubility limit, GoldSim applies a boundary condition, holding the dissolved concentration in the Reference Fluid at the solubility limit, and switches to the solubility-limited (saturated) form for the matrix equations.
After switching to the solubility-limited (saturated) equations, GoldSim monitors the total mass of the element in the Cell. If this ever falls below the amount needed to reach the solubility limit, GoldSim switches the equations back to their standard form.
To carry out these processes with precision, GoldSim automatically uses a search algorithm to find the exact point in time where the governing equations change and then dynamically adjust the timestep to a value which can be much shorter than the user-specified timestep. These substeps (which are determined by the selected Solution Precision) can be as small as 1e-8 times the actual timestep length. Note that the substeps are used only when computing cell nets, and are not applied to elements outside of cell nets.
Using the search algorithm, GoldSim does the following:
1. It attempts to identify the exact point in time at which a species (or element) changes its saturation state to or from saturated. The search succeeds if the “overshoot” across the solubility limit is less than a specified fraction of the limit. If the overshoot exceeds this, the substep is reduced. This is repeated until the overshoot is less than the specified tolerance, or a minimum substep is reached. The overshoot tolerance and the minimum substep are determined by the Solution Precision.
2. It checks that the relative fractions of isotopes of a saturated element do not change excessively during a timestep. Similarly to changing the solubility state, GoldSim carries out a search in time trying to limit the change in isotopic fractions to a specified fraction of the value when the boundary conditions were last calculated. This faction is determined by the Solution Precision. (This check is only carried out for isotopes present in the Cell in quantities greater than 1μg AND representing more than 1% of the total element mass).
3. It checks for a condition where an initially saturated species or element discharges mass at such a high rate that even at the shortest possible substep it calculates a negative remaining mass (of more than 1μg) in the cell at the end of the timestep. If the amount of mass in the Cell is negative at the end of the substep, GoldSim sets it to zero (which has the effect of creating mass in the system, as the "downstream" pathway will still retain the mass it received), and records a warning message in the Run Log.
Note: The cell net solution algorithm (including the values for the various parameters for the different Solution Precision options) is discussed in detail in Appendix B of the Contaminant Transport Module User’s Guide (in a section entitled Solving the Matrix Equations Numerically).
If the internal rates of mass transfer are high and/or the timestep is too large, the search algorithm may fail to converge to within the tolerance limits even using the shortest allowable substep. If this occurs, warning messages are written to the Run Log. The warning will state that "smallest substep failed” along with the time, the Cell involved, the species involved, and the error code. There are four error codes:
• The “unsat - sat” and “sat - unsat” error codes indicate that there was an unacceptable “overshoot” across the solubility limit from below or above, respectively. “sat-unsat” errors are unlikely to have significant impacts on results (since they simply imply that an element was held at the solubility limit for a fraction of a timestep longer than it should have been). An “unsat-sat” error (in which the solubility limit is overshot from below), however, can result in a one timestep “spike” in which the solubility limit is unrealistically exceeded for the specified element. Unless this is for a key species in the simulation, however, in most cases this will not have a large impact on results.
• The “overshoot” error code indicates that the isotopic fractions changed to an unacceptable degree during the timestep. This error is often incurred when isotopes with very short half-lives exist in the system, and unless those isotopes are key species, it is unlikely to have significant impacts on results.
• The “negative inventory” error code is an extreme case of the “sat-unsat” error and indicates that more mass was discharged from the cell than it contained. This results in a negative mass in the cell. GoldSim subsequently resets this to zero, which has the impact of creating mass in the system. This is the most extreme type of error that can occur, and GoldSim therefore warns the user that "erroneous mass was created". GoldSim also sums and reports the total amount of mass that was created.
Note: GoldSim can print additional details that can be useful for evaluating these error messages. To do so, check the Log cell-network details checkbox in the Contaminant Transport tab of the Options dialog.
If any of these errors occur (particularly the “negative inventory” error), and the impact on the simulation is likely to be significant, you should do the following (in this order) until the problem is resolved:
1. Check to see if some mass transfer rates have been specified as being unrealistically large (e.g., a Cell “flushing” mass out very rapidly) and correct this if you find it (i.e., flush mass from Cells more gradually).
2. Repeat the run using a higher precision level.
3. Repeat the run using a smaller value for the GoldSim timestep.
Learn more about: