Click here to donate to keep PhreeqcUsers open
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
»
USER_PUNCH/USER_GRAPH
»
BASIC functions
»
Multiple Fix_Ca in EQUILIBRIUM_PHASES produced by USER_PUNCH
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Multiple Fix_Ca in EQUILIBRIUM_PHASES produced by USER_PUNCH (Read 1598 times)
MichaelZ20
Top Contributor
Posts: 151
Multiple Fix_Ca in EQUILIBRIUM_PHASES produced by USER_PUNCH
«
on:
January 04, 2020, 04:55:18 PM »
Can somebody help to modify my code?
In its present form it does not take Ca for Fix_Ca from the SOLUTION_SPREAD.
Thank you in advance!
«
Last Edit: January 04, 2020, 04:56:54 PM by MichaelZ20
»
Logged
dlparkhurst
Top Contributor
Posts: 3668
Re: Multiple Fix_Ca in EQUILIBRIUM_PHASES produced by USER_PUNCH
«
Reply #1 on:
January 04, 2020, 10:22:11 PM »
If you use your Fix_Ca, then you are fixing the activity of the Ca+2 ion. So, it is inconsistent to use TOT("Ca"), which is the total molality of calcium; you are setting the activity of calcium ion to the original total concentration of calcium.
LA("Ca+2") would give the original log activity of Ca+2. Here is a modification of your code to use this value:
Code:
[Select]
40 PUNCH "Fix_Ca ", LA("Ca+2"), " CO2(g)" + EOL$
The attached file Phrqc1.pqi removes the loop on solutions (one simulation is written for each initial solution) and uses log activity of Ca+2.
My guess is that you would prefer to keep the total molality of calcium unchanged, and simply add or remove CO2 to get to calcite equilibrium. The attached file Phrqc3.pqi does this calculation. There are often two solutions to this problem, one that adds CO2 to reduce the pH to calcite equilibrium, and one that removes CO2 to produce a relatively high pH and low carbon concentration. The input file adds CO2 (pH decrease) if SI calcite > 0, otherwise CO2 will be removed (pH increase).
Logged
MichaelZ20
Top Contributor
Posts: 151
Re: Multiple Fix_Ca in EQUILIBRIUM_PHASES produced by USER_PUNCH
«
Reply #2 on:
January 05, 2020, 06:24:02 PM »
Dear David, thank you for your help!
The second file solves my problem.
«
Last Edit: January 05, 2020, 08:56:00 PM by MichaelZ20
»
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
USER_PUNCH/USER_GRAPH
»
BASIC functions
»
Multiple Fix_Ca in EQUILIBRIUM_PHASES produced by USER_PUNCH