PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Database selection and modification »
  • thermodynamic data input
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: thermodynamic data input  (Read 2774 times)

Jia Yunsheng

  • Contributor
  • Posts: 7
thermodynamic data input
« on: March 14, 2017, 12:51:30 PM »
Hello everyone,

I'm using PHREEQC for manipulating the potential products of phosphate removal by hydrocalumite (1g/L). (temp is 25.0)

And there are several problems in my way:
1) Hydrocalumite may not exist in the database, and I need to define it. Its dissolution reaction is
Ca4Al2(OH)12Cl2 4(H2O) = 4Ca+2 + 2Al(OH)4- + 2Cl- + 4OH- + 4H2O
log_k -27.1
delta G 154.68 kJ/mol
So, how to input this? Actually, I mean the keyword data block and the code. And should  I use SOLUTION_MASTER_SPECIES to define the elements and SOLUTION_SPECIES for species definitions.

2) I want to simulate initial phosphate concentrations range from 2mg/L to 1000mg/L and initial pH values from 2.0 to 14.0 in the meantime, what exactly codes can be used for the input file.

3) After each equilibrium (under certain phosphate concentration and pH value), I want to calculate the saturation indices of brushite, monetite, octacalcium phosphate, tricalcium phosphate, hydroxyapatite, gibbsite, and aluminum phosphate, how to write the input file? Moreover, Some log_k value of these mineral are wrong, and how to correct them with input files?

So many matters need your help. Thanks in advance!

Sincerely,
Yunsheng
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2508
Re: thermodynamic data input
« Reply #1 on: March 14, 2017, 03:14:56 PM »
You should not need to use SOLUTION_MASTER_SPECIES or SOLUTION_SPECIES. Any of the databases phreeqc.dat, wateq4f.dat, llnl.dat, and others will have the elements and species already defined.

You will need to use the PHASES data block to define Hydrocalumite. I would also define all of your other phosphate minerals--brushite, monetite, ...--in the PHASES data block so that you have the reaction and log K that you want.

Here is a start for the rest of the calculation. It will not work for higher pH, and you may be thinking in different concentration units, but you can experiment. Look at example 8 for a more complete example and a way to adjust to both acidic and basic conditions.


PHASES
Fix_H+
    H+ = H+
    log_k     0
SOLUTION 1
REACTION 1
    Na2HPO4    1
    0.032285 moles in 2 steps # 1 g P / kgw
EQUILIBRIUM_PHASES 1
    Fix_H+    -2 HCl       10
END






Logged

Jia Yunsheng

  • Contributor
  • Posts: 7
Re: thermodynamic data input
« Reply #2 on: March 15, 2017, 09:55:04 AM »
Dear dlparkhurst,
Thanks you for your helpful suggestions. I still have troubles with this. In the following partial codes as you suggested:

PHASES
Fix_H+
    H+ = H+
    log_k     0
SOLUTION 1
REACTION 1
    Na2HPO4    1
    0.032285 moles in 2 steps # 1 g P / kgw
EQUILIBRIUM_PHASES 1
    Fix_H+    -2 HCl       10
END

I don't konw how to add hydrocalumite(1g/L or 1mmoles for example) to the model. My system is add hydrocalumite to phosphate aqueous, and simulate the potential precipitates.

Hope to receive your help again.

Warm regards from Nanjing, China
Yunsheng
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2508
Re: thermodynamic data input
« Reply #3 on: March 15, 2017, 03:00:54 PM »
Let me see your PHASES definition for hydrocalumite and also brushite, monetite, octacalcium phosphate, tricalcium phosphate, hydroxyapatite, gibbsite, and aluminum phosphate.
Logged

Jia Yunsheng

  • Contributor
  • Posts: 7
Re: thermodynamic data input
« Reply #4 on: March 16, 2017, 01:59:44 AM »
Hello dlparkhurst,

The attachment is the input file to my knowledge. Please revise it for successful running. And the adsorbent mineral Hydrocalumite isn't been added.

Thanks a lot!

Kind regards,
Yunsheng
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2508
Re: thermodynamic data input
« Reply #5 on: March 16, 2017, 04:03:24 AM »
Here is a simulation that starts with 1 mmol/kgw P in solution, then does a series of reactions that add 1 mmol of Hydrocalumite and adjusts to pH 2, 4, 8, 10, 12. The phase NaCl is not a real phase, but a way to allow HCl or NaOH to be added to reach the desired pH values. The other phases are allowed to precipitate if they become saturated so that the stable phase assemblage (if any) is found at each pH.

Logged

Jia Yunsheng

  • Contributor
  • Posts: 7
Re: thermodynamic data input
« Reply #6 on: March 27, 2017, 09:49:44 AM »
Dear dlparkhurst,

Thanks for your answers. And I have one question for your last codes (see attachment 1), when set pH=8, why the moles of every mineral is 10 moles,  but they are 0 moles at other pH values.

With your codes, I can run the simulation ccorrectly. But I still don't know how to simulate the following purpose:
Initial solution phosphate concentration from 1 to 100 mmol/L in 20 steps, pH=4,hydrocalumite 1 mmol.

Briefly, I want to simulate a range of P concentrations in certain pH value with certain hydrocalumite. And I want to output the SI  and moles of every minerals. The second attached file is my incorrect code which need your revision.

Appreciate for your valuable time.

Sincerely,
Yunsheng
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2508
Re: thermodynamic data input
« Reply #7 on: March 27, 2017, 04:10:26 PM »
The 10 moles for pH 8 was my mistake; all simulations should have had 0 moles for all minerals.

I think your REACTION definition is may not be correct. At the last step, you are adding 200 * 100 mmoles = 20 moles of Na2HPO4. Also, you are adding both Hydrocalumite and Na2HPO4 in a ratio of 1:200. I suspect this is not what you had in mind.

One option is to put an amount of Hydrocalumite in the EQUILIBRIUM_PHASES (0.1 mol in the attached example). Hydrocalumite will then dissolve to equilibrium or dissolve completely with the addition of Na2HPO4 in the REACTION definition. I have done the calculation with one addition of 200 mmol of Na2HPO4 with the result that all of the Hydrocalumite dissolves and forms Hydroxyapatite and Gibbsite.

Logged

Jia Yunsheng

  • Contributor
  • Posts: 7
Re: thermodynamic data input
« Reply #8 on: March 30, 2017, 03:14:22 AM »
Hi dlparkhurst,

With your helpful codes, I could run some simulations correctly now. 

I do these simulations because I want to repeat the results of a article. I attached page 2 of this article within this post and article page 3 in the next post,  owe to the size limitation of every post. )  It has some descriptions about the simulation process. But when I input those data in that article into my codes (attached file 2), my result is different. So, could you spend a few time to read this article, and give me some suggestions.

Some notes:
1. The thermodynamic data of these minerals are same between the article and my input file.

2. Molecular weight per mole of hydrocalumite is 481 g/mol, so 1g/L of hydrocalumite (article data) is 0.0021 mol (my input data).

3. In the input file, I just set pH=7.0, phsophate concentration 24 mmol/L for example. According to the article's result, there will be three potential minerals in page 3, Fig. 2 (B) ( AlPO4(Aluminum-phosphate), DCPD(Brushite) and TCP(Tricalcium-phosphate)). But from my output file, there are two precipitates (AlPO4 and Hydroxyapatite(HAP)). What's the reason caused this difference?

Looking forward to your suggestions!

Kind regards,
Yunsheng
« Last Edit: March 30, 2017, 03:21:32 AM by Jia Yunsheng »
Logged

Jia Yunsheng

  • Contributor
  • Posts: 7
Re: thermodynamic data input
« Reply #9 on: March 30, 2017, 03:16:11 AM »
Here is the page 3 of the article I mentioned before.
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2508
Re: thermodynamic data input
« Reply #10 on: March 30, 2017, 05:10:59 PM »
I don't know why the calculations differ. Could they be using different reactions for the minerals?

I suggest you write to the authors to see if they will give you their PHREEQC files or at least the PHASES definitions.

Logged

Jia Yunsheng

  • Contributor
  • Posts: 7
Re: thermodynamic data input
« Reply #11 on: March 31, 2017, 11:01:00 AM »
Dear dlparkhurst,

Thanks for your advice. And I already asked the authors of that article. But it was so long after their publication that they have lost related simulation files.

I will continue to consult and ask more questions to reach the simulation.

Have a nice working day and happy April's Fool Day! Giggle.

Sincerely,
Yunsheng
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Database selection and modification »
  • thermodynamic data input
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2