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
»
Mineral Equilibrium calculation with various composition
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Mineral Equilibrium calculation with various composition (Read 2923 times)
Sol-Chan Han
Top Contributor
Posts: 25
Mineral Equilibrium calculation with various composition
«
on:
16/08/19 15:46 »
Hello Phreeqc users.
I thank you for all (especially for Dr. Parkhurst) for your comments.
I am trying to calculate precipitated minerals in the cement system.
By using 'Solution', 'equilibrium phases', and 'reaction', I successfully achieved results.
Now I am trying to run simulations in various conditions by changing the composition of reactants.
For example,
For simulation 1, I used
REACTION 10
CaO 6
SiO2 2
Al2O3 0.3
Fe2O3 0.1
MgO 0.2
K2O 0.05
Na2O 0.04
CO2 0.02
SO3 0.1
1
For simulation 2, I used
REACTION 10
CaO 7
SiO2 4
Al2O3 0.6
Fe2O3 0.2
MgO 0.2
K2O 0.05
Na2O 0.05
CO2 0.03
SO3 0.1
1
For each simulation, I made a different phreeqc input file, however, it is too time-consuming.
Is there any suggestion that can I make a single input file to realize my simulation?
Logged
John Mahoney
Top Contributor
Posts: 73
Re: Mineral Equilibrium calculation with various composition
«
Reply #1 on:
16/08/19 16:24 »
You can use the END statement between each simulation and run them down the page in one file. An even more efficient setup is to include the logical line separator (;)
Then you can run simulations out in a single line. assuming you have defined the solutions previously, if not the simulations both use pure water.
SOLUTION 1; REACTION 1; CaO 7.0; Na2O 0.1; END
SOLUTION 2; REACTION 1; CaO 6.0; Na2O 0.2; EQUILIBRIUM_PHASES 2; Calcite 0 0 ; END
The above defines two simulations, if you have lots of simulations you can set the above up in EXCEL.
Use SELECTED_OUTPUT and USER_PUNCH to get you outputs i a tabular form.
Logged
Sol-Chan Han
Top Contributor
Posts: 25
Re: Mineral Equilibrium calculation with various composition
«
Reply #2 on:
16/08/19 16:57 »
Thank you John.
The type of 'Solution' is kept. And I will always use the same 'Equilibirum_Phases'. But only reaction type is different.
If I follow your suggestion, do I have to write the input file as follows? (I will use 400 types of reactions.)
Solution 1; reaction 1; composition of reactants; Equilibirium phases 1; end
Solution 2; reaction 2; composition of reactants; Equilibirium phases 2; end
Solution 3; reaction 3; composition of reactants; Equilibirium phases 3; end
.
.
.
Solution 400; reaction 400; composition of reactants; Equilibirium phases 400; end
Or is there any more convenient way?
Logged
John Mahoney
Top Contributor
Posts: 73
Re: Mineral Equilibrium calculation with various composition
«
Reply #3 on:
16/08/19 17:27 »
In that case Solution 1 and EQUILIBRIUM_PHASES can keep the same numbers. Wherever there is a line break replace with ; Then yes youhad the actual moles after the composition. I missed that in my haste to work this out, with some patience you can make some really big input files.
Logged
dlparkhurst
Global Moderator
Posts: 4036
Re: Mineral Equilibrium calculation with various composition
«
Reply #4 on:
16/08/19 17:56 »
If you are using the same solution and equilibrium_phases, then you would use something like the following with "USE":
USE solution 1; USE equilibrium_phases 1; REACTION 1; ...; END
USE solution 1; USE equilibrium_phases 1; REACTION 1; ...; END
I think people frequently use solid solutions for modeling the phases in cement. You might check out the literature and consider whether you should put some of the phases in a SOLID_SOLUTION definition instead of EQUILIBRIUM_PHASES.
Logged
Sol-Chan Han
Top Contributor
Posts: 25
Re: Mineral Equilibrium calculation with various composition
«
Reply #5 on:
16/08/19 18:01 »
Thank you Dr. Parkhurst.
As you expected, I used 'solid_solution'.
But the problem I encountered is that how can I conveniently use different 'Reaction' block.
Really should I write 400 different lines?
Logged
John Mahoney
Top Contributor
Posts: 73
Re: Mineral Equilibrium calculation with various composition
«
Reply #6 on:
16/08/19 18:10 »
If you really want 400 simulations, you are going to need to write 400 lines. But as I said, if you set it up in EXCEL you can block and copy back into PHREEQC and run it or set it up completely in EXCEL and use IPHREEQC.com. You can get creative in EXCEL to save some typing also.
Start small with one simulation along a single line, and compare to your original version.
Logged
dlparkhurst
Global Moderator
Posts: 4036
Re: Mineral Equilibrium calculation with various composition
«
Reply #7 on:
16/08/19 18:23 »
You can look at example 8 for how to use USER_PUNCH and PHREEQC's Basic capability to write a file (400 lines), and then use INCLUDE$ to run it.
You can use IPhreeqc COM with Visual Basic in Excel, or you can write a program and use the C++, C, or Fortran version of IPhreeqc.
If you are going to do it once, I think John's approach with Excel would be the quickest. If you are going to run a lot of variations, then you may want to figure out example 8 or learn to use IPhreeqc.
Logged
Sol-Chan Han
Top Contributor
Posts: 25
Re: Mineral Equilibrium calculation with various composition
«
Reply #8 on:
16/08/19 18:32 »
Thanks John and Dr. Parkhurst.
I read Example 8 but I cannot fully understand.
I should check it again if I want to use that approach.
Thank you all.
Logged
John Mahoney
Top Contributor
Posts: 73
Re: Mineral Equilibrium calculation with various composition
«
Reply #9 on:
19/08/19 03:43 »
Rather than run 400 simulations I think you should step back and think about your system some more before you dive into all thous models. All that data can be overwhelming. So think about what should happen and estimate the limiting process or compound and see what happens.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Processes
»
Dissolution and precipitation
»
Mineral Equilibrium calculation with various composition