PhreeqcUsers Discussion Forum

Beginners => PHREEQC Basics => Topic started by: CharlesAshes on May 29, 2018, 02:28:22 PM

Title: Fixing_pe at several values using User_Punch
Post by: CharlesAshes on May 29, 2018, 02:28:22 PM
Dear PHREEQC users,

I have been trying to use user_punch to calculate the effect of pe on my solution.
I have done this by analogy to Example 8 (Zinc adsorption). When I look at the output file I do see the right input for my for loop but it does not trigger the amount of simulations as does happen in example 8. I would be very grateful if someone were to be able to help me with this problem.
GAS_PHASE
-fixed_pressure
-pressure 1
-volume 1
-temperature 25
N2(g)     0.78
O2(g)     0.21
SOLUTION 1
temp      25
pH        8.2
pe     -5
redox     pe
units     mmol/kgw
density   1
Alkalinity 0.21 eq/kgw
Ca        8.8
Cu        0.024
Fe        3.5
K         2.6
Mg        4.2
Mn        0.13
Na        9.7
P         13.9
S         5.9
Zn        0.22
-water    1 # kg
PHASES
Fix_pe
e- = e-
log_K 0.0
END

SELECTED_OUTPUT
-file                 selected_output_1.sel
-reset                false
-state                true
-solution             true
-pH                   true
-pe                   true
-charge_balance       true
-totals               P  S(6)  S  Fe  Fe(2)
-molalities           Hfo_wH2PO4  Hfo_wHPO4-
-equilibrium_phases   Vivianite  Pyrite  MnHPO4   Hydroxyapatite
-active               true

USER_PUNCH
-start
10 For i= -7 to 5 STEP 1
20 a\$=EOL\$+"USE solution 1"+CHR\$(59)+"USE GAS_PHASE"+EOL\$
30 a\$=a\$+"EQUILIBRIUM_PHASES 1"+EOL\$
40 a\$=a\$+"Fe(OH)3(a) 0 0 precipitate_only"+EOL\$
60 a\$=a\$+"Mn3(PO4)2 0 0 precipitate_only"+EOL\$
70 a\$=a\$+"MnHPO4 0 0 precipitate_only"+EOL\$
80 a\$=a\$+"Pyrite 0 0 precipitate_only"+EOL\$
90 a\$=a\$+"Vivianite 0 0 precipitate_only"+EOL\$
100 a\$=a\$+"Fix_pe"+ STR\$(i)+CHR\$(32)+"O2"+EOL\$
110 a\$=a\$+"SURFACE"+ EOL\$
120 a\$=a\$+"Hfo_sOH Fe(OH)3(a)      equilibrium_phase 0.000795 600"+EOL\$
130 a\$=a\$+"Hfo_wOH Fe(OH)3(a)      equilibrium_phase 0.00318"+EOL\$
140 a\$=a\$+"END"+EOL\$
150 PUNCH a\$
160 NEXT i
-end
END

Charles
Title: Re: Fixing_pe at several values using User_Punch
Post by: dlparkhurst on May 29, 2018, 10:28:31 PM