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
»
Beginners
»
PHREEQC basics
»
Matlab/PhreeqC
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Matlab/PhreeqC (Read 907 times)
IliasBouchkira
Top Contributor
Posts: 40
Matlab/PhreeqC
«
on:
August 16, 2019, 12:00:01 PM »
Dear all,
I'm trying to run the following solution from matlab :
SOLUTION 1
temp 25
pH 7
pe 4
redox pe
units mmol/kgw
density 1
F 0.1
S(6) 1
P 3
Ca 1
-water 1 # kg
the purpose being to find the optimal molality of S(6)from 0 to 10 moles/Kgw that maximize the Saturation index of gypsum and minimize the saturation index of Florite (two minerals that precipitate during the reaction);
i would like to know how to run this solution from matlab and how to stock the saturation index of each iteration;
thank you in advance,
Logged
dlparkhurst
Top Contributor
Posts: 3171
Re: Matlab/PhreeqC
«
Reply #1 on:
August 16, 2019, 06:07:05 PM »
You will have to look at other posts for the Matlab part.
I am not clear on how you want to do your simulation. You have a solution, but how do you want to vary the sulfate concentration. It is not a good idea simply to put 10 mol of SO4-2 in solution, without considering the cation. Perhaps you want to add 0 to 10 mol of CaSO4:2H2O with REACTION, and include EQUILIBRIUM_PHASES with gypsum. However, gypsym will begin to precipitate after about 0.015 mol of reaction, and your solution will be unchanged thereafter. If you add Na2SO4 as the reaction, you will precipitate Ca+2 in gypsum and never approach fluorite solubility. In any case, you need to consider the conceptual model for your simulation.
You can write the saturation indices to a SELECTED_OUTPUT file using SELECTED_OUTPUT; -si, or SELECTED_OUTPUT and USER_PUNCH with the function SI.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Beginners
»
PHREEQC basics
»
Matlab/PhreeqC