PhreeqcUsers Discussion Forum

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 »
  • Surface Complexation »
  • Equilibrating identical surfaces with different solutions
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Equilibrating identical surfaces with different solutions  (Read 1632 times)

aleoconn

  • Contributor
  • Posts: 8
Equilibrating identical surfaces with different solutions
« on: 23/12/20 15:55 »
My goal is to equilibrate 20 Hfo surfaces that have the same properties (i.e., mass, site density) each with a different solution. I am able to define the surfaces and solutions, but am unsure how to achieve the equilibration of each surface separately. Is it possible to do the equilibration after the surfaces are defined? Something like the following doesn't seem to work:

Code: [Select]
SURFACE 1-20
    -equil SOLUTION 1-20
    -sites DENSITY
    Hfo_sOH    3.05      600       14
    Hfo_wOH    0

I would like to avoid defining each surface separately, as changing the basic properties would be very error-prone.

Thank you for the help!
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4034
Re: Equilibrating identical surfaces with different solutions
« Reply #1 on: 23/12/20 17:17 »
Probably simplest to cut and paste 20 times and then change the SURFACE number and solution numbers on -equil.

Code: [Select]
SURFACE 1  # change
    -equil 1   # change
    -sites DENSITY
    Hfo_sOH    3.05      600       14
    Hfo_wOH    0

Here is a shortcut, but the approach can be confusing. SELECTED_OUTPUT and USER_PUNCH are used to program additional input which is run with INCLUDE$  (as shown in example 8). For 20 solutions, I suspect this is more difficult than cutting and pasting, but here is how it can be done.

Code: [Select]
SOLUTION 1-20
SELECTED_OUTPUT 2
-file surface_defs.pqi
USER_PUNCH 2
10 FOR i = 1 TO 20
20 input$ = input$ + "SURFACE " + STR$(i) + CHR$(9) + EOL$
30 input$ = input$ + "  -equil " + STR$(i) + EOL$
40 input$ = input$ + "  Hfo_sOH    3.05      600       14" + EOL$
50 input$ = input$ + "  Hfo_wOH    0" + EOL$
60 input$ = input$ + "END" + EOL$
70 next i
80 PUNCH input$
END
SELECTED_OUTPUT 2
-active false
END
INCLUDE$ surface_defs.pqi
END

One other option is to use IPhreeqc with a scripting or programming language. Again, it would be more effort than cutting and pasting unless you are going to need to do a lot of repetitive calculations.
Logged

aleoconn

  • Contributor
  • Posts: 8
Re: Equilibrating identical surfaces with different solutions
« Reply #2 on: 23/12/20 18:46 »
Thanks so much! One day I will get around to learning the Phreeqc for R package and make my own life easier.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Surface Complexation »
  • Equilibrating identical surfaces with different solutions
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2