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 »
  • Charting problems for SCM surface potential
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Charting problems for SCM surface potential  (Read 2614 times)

Yongqiang

  • Top Contributor
  • Posts: 116
Charting problems for SCM surface potential
« on: 18/02/18 23:33 »
Hi All,

I want to know why the following charting function doesn't work.

Code: [Select]
DATABASE c:\phreeqc\database\LLNL.DAT
TITLE Surface complexation for low salinity water EOR
SURFACE_MASTER_SPECIES
     Surf_s Surf_sNH+
     Surf_w Surf_wCOOH
SURFACE_SPECIES
     Surf_sNH+ = Surf_sNH+
     log_k 0     
     Surf_wCOOH = Surf_wCOOH
     log_k 0
     Surf_wCOOH = Surf_wCOO- + H+
     log_k  -5.0
     Surf_sNH+ = Surf_sN + H+
     log_k  -5.0
     Surf_wCOOH + Ca+2 = Surf_wCOOCa+ + H+
     log_k  -5.8     

SURFACE 1
     Surf_sNH+        2.13e-6    0.1.     10
     Surf_wCOOH       3.05e-6

END
########################################
PHASES
                NaNO3
                NaNO3 = Na+ + NO3-
                log_K -20
                Fix_H+
                H+ = H+
                log_K 0
END

#########################################

SOLUTION 2
                -temperature 25
                -units mol/L
                Ca 0.01
                Cl 0.02
END
#####################################
SELECTED_OUTPUT
     -file pest
     #-reset true
     -pH   true
     -molalities Surf_wCOO-  Surf_sNH+  Surf_wCOOCa+
USER_PUNCH
                -headings dle
                -start
10 a = EDL ("psi","Surf")
20 PUNCH a
                -end


USE SOLUTION 2
USE SURFACE 1
EQUILIBRIUM_PHASES
                NaNO3 0 10
                Fix_H+ -2 HNO3 10
END

USE SOLUTION 2
USE SURFACE 1
EQUILIBRIUM_PHASES
                NaNO3 0 10
                Fix_H+ -3 HNO3 10
END
USE SOLUTION 2
USE SURFACE 1
EQUILIBRIUM_PHASES
                NaNO3 0 10
                Fix_H+ -4 HNO3 10
END
USE SOLUTION 2
USE SURFACE 1
EQUILIBRIUM_PHASES
                NaNO3 0 10
                Fix_H+ -5 HNO3 10
END
USE SOLUTION 2
USE SURFACE 1
EQUILIBRIUM_PHASES
                NaNO3 0 10
                Fix_H+ -6 HNO3 10
END
USE SOLUTION 2
USE SURFACE 1
EQUILIBRIUM_PHASES
                NaNO3 0 10
                Fix_H+ -7 HNO3 10
END
USE SOLUTION 2
USE SURFACE 1
EQUILIBRIUM_PHASES
                NaNO3 0 10
                Fix_H+ -8 HNO3 10
END

#####################################

USER_GRAPH 2 10000 ppm solution
     -headings pH pressure
     -chart_title "CaC;"
     -axis_titles pH potential 
     -axis_scale x_axis 2.0 8.0 1 1
     -axis_scale y_axis auto
  -start
  10 GRAPH_X -LA("H+")
  20 GRAPH_Y  EDL ("psi","Surf")
  -end
INCLUDE$ pest
END

Regards.
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4034
Re: Charting problems for SCM surface potential
« Reply #1 on: 19/02/18 00:14 »
First, because you defined USER_GRAPH after all of the calculations were done. User graph is only invoked at the final stage of a calculation. The last calculation was the block of code that preceded the END before USER_GRAPH.

Second, the file that you INCLUDEd did not produce input that PHREEQC can interpret.
It was simply a table of data with headers.

You should define USER_GRAPH at the same simulation where SELECTED_OUTPUT and USER_PUNCH are defined (although the graphs do not require definition of SELECTED_OUTPUT or USER_PUNCH). Each calculation from the point of definition on will produce a point on the graph.

Finally, it is not a good idea to use a definition that has an associated charge (like Surf_sNH+) the SURFACE definition. It can generate some strange redox and pH reactions. You should use uncharged surface species, like Surf_sN. But, since the N is always present on the surface, you could remove the N altogether and assume Surf_s includes the N (rewriting the equations in SURFACE_SPECIES accordingly).
Logged

Yongqiang

  • Top Contributor
  • Posts: 116
Re: Charting problems for SCM surface potential
« Reply #2 on: 19/02/18 00:35 »
Hi David,

Many many thanks for your instruction! I learned a lot.

Regards,
yongqaing
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Surface Complexation »
  • Charting problems for SCM surface potential
 

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