Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Solubility
»
Dissolution/precipitation
»
Mass balance issues
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Mass balance issues (Read 338 times)
Flopi
Frequent Contributor
Posts: 10
Mass balance issues
«
on:
July 04, 2017, 11:49:01 PM »
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
Top Contributor
Posts: 1188
Re: Mass balance issues
«
Reply #1 on:
July 05, 2017, 01:10:14 AM »
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
»
Solubility
»
Dissolution/precipitation
»
Mass balance issues