Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome
Guest
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Processes
»
Dissolution and precipitation
»
Mass balance issues
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Mass balance issues (Read 2262 times)
Flopi
Top Contributor
Posts: 26
Mass balance issues
«
on:
04/07/17 23:49 »
Dear All,
We are trying to do some calculations with precipitation and dissolution and we face a weird mass balance issue. We are using the basic command PRINT TOT("Ca") to get the total calcium quantity in solution after calcite reacts.
However, if we do TOT("Ca") + EQUI_DELTA("Calcite") we don't obtain the quantity of calcium initially present (1e-10 instead of 0 in this particular case). After spending an afternoon trying to figure it out, we were wondering if the difference wouldn't come from some rounding loosing some digits here and there ?
Could you confirm that it is the case ?
Below is a minimal working example of what I mean
SOLUTION 1
temp 10
pH 8
pe 4
redox pe
units mol/kgw
density 1
Ca 1e-3
C(4) 1e-3
-water 1 #kg
EQUILIBRIUM_PHASES
Calcite 0 10
USER_PRINT
-start
10 PRINT TOT("Ca") + EQUI_DELTA("Calcite") -1e-3
-end
Logged
dlparkhurst
Global Moderator
Posts: 4062
Re: Mass balance issues
«
Reply #1 on:
05/07/17 01:10 »
In your example, I get a value of 1e-13, instead of zero. That value is within the value for convergence tolerance, which is 1e-8 by default. That means that the calcium mole balance for the initial solution is solved to be 1e-3 * (1 +/- 1e-8), or plus or minus 1e-11 mol/kg. The reaction calculation will also have a convergence within a convergence tolerance of 1e-8.
You can set
KNOBS
-conv 1e-12
and get a value closer to zero than 1e-13. The convergence tolerance cannot be lowered indefinitely. Eventually machine precision plays a role.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Processes
»
Dissolution and precipitation
»
Mass balance issues