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 »
  • Reactive transport modelling »
  • Error in using SURFACE_MODIFY
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Error in using SURFACE_MODIFY  (Read 4980 times)

JW

  • Contributor
  • Posts: 5
Error in using SURFACE_MODIFY
« on: 27/05/20 07:57 »
I would like to reduce the amount of surface complexation sites by using SURFACE_MODIFY.

As a preliminary, I tested it with a simple code as follows:
------------------------------
SURFACE_MASTER_SPECIES
      Surf_s      Surf_sOH

SURFACE_SPECIES
Surf_sOH = Surf_sOH
    log_k     0
H+ + Surf_sOH = Surf_sOH2+
    log_k     5.4
Surf_sOH = Surf_sO- + H+
    log_k     -6.7


SOLUTION   1                     
   pH   7
SURFACE   1                     
   -equilibrate   1                  
   -sites_units   density
   Surf_s   2.41   41    2000
END


SURFACE_MODIFY   1
   -component Surf_sOH
   -totals
      Surf_s   1000
   
RUN_CELLS
   -cells 1
   
END
--------------------------------------

Then, I've got the following error message.
--------------------------------------
ERROR: Analytical data entered twice for Surf_sOH.
ERROR: Program terminating due to input errors.
--------------------------------------

What is wrong with the code above?

Thank you in advance.
Logged

Pak

  • Top Contributor
  • Posts: 100
Re: Error in using SURFACE_MODIFY
« Reply #1 on: 27/05/20 14:06 »
Is not sure that you can use Surface_Modify on a Phreeqc script that easy, never tried. I thought it was thought to be used in reactive transport simulations when you make a coupling by using iphreeqc or phreeqcRM.
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4211
Re: Error in using SURFACE_MODIFY
« Reply #2 on: 27/05/20 16:54 »
Below is part of the listing from a DUMP of the surface. The component should be Surf_s, rather than Surf_sOH in your script.

However, note that 1000 moles would be a huge change in the number of surface sites (originally 0.32). Also, there is the problem of the O and H of the surface (see DUMP). By changing just the number of sites, you essentially are adding OH- to solution, which I think will be compensated by generating O2 and H+ with the following reaction:

2H2O -> O2 + 4H+ + 4e-

There is also a charge on the surface that would remain if just Surf_s is changed. This surface is relatively simple; most surfaces would have additional elements as well.

In short, I think you need to be very careful changing the number of sites. It's been a while, but I think when a surface is related to a phase, the surface is changed by adding or removing Surf_sOH, which means when you remove (or add) Surf_s, you must also modify O and H in the surface totals. For surface related to an equilibrium phase, I think you must define the SURFACE with Surf_sOH rather than Surf_s (I think that is how it knows to remove Surf_sOH, rather than just Surf_s. I don't think it would make a difference for SURFACE_MODIFY, but it wouldn't hurt.)

Code: [Select]
SURFACE_RAW                  1
  # SURFACE_MODIFY candidate identifiers #
  -type                      2
  -dl_type                   0
  -only_counter_ions         0
  -thickness                 1e-08
  -debye_lengths             0
  -DDL_viscosity             1
  -DDL_limit                 0.8
  -component                 Surf_s
    # SURFACE_MODIFY candidate identifiers #
    -formula_z               0
    -moles                   0
    -la                      -0.16069185197993
    -charge_balance          -4.1904572422299e-05
    -phase_proportion        0
    -Dw                      0
    -charge_name             Surf
    -master_element          Surf_s
    -totals
      H                      0.32809316295155
      O                      0.32813506752397
      Surf_s                 0.32813506752397
Logged

Pak

  • Top Contributor
  • Posts: 100
Re: Error in using SURFACE_MODIFY
« Reply #3 on: 29/05/20 06:44 »
If I increase the amount of surface by X moles, I should remove this X from the amount of total O and H. And if I reduce the amount of surface by X, I should add this amount of X to the total O and H. If I want to keep the same amount on the system. Is that right?

thanks
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4211
Re: Error in using SURFACE_MODIFY
« Reply #4 on: 29/05/20 14:11 »
Sounds backwards. Assuming SurfOH is uncharged, if you increase the surface, you should increase O and H; if you decrease the surface you should decrease O and H. You need to add and remove SurfOH.

I think you could use REACTION to add SurfOH. Not sure if this suits your application, but you could at least use it to check your logic.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Error in using SURFACE_MODIFY
 

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