Conceptual Models > Kinetics and rate controlling factors

How to add reaction rate, surface area and mass changes to selected_output

(1/1)

OLIVIA_RH:
Hi there, I am currently running a script involving the dissolution of quartz. I am interested in outputting the chemistry of the solution but also the change in reaction rate, surface area, mass of solid throughout the reaction. I am not quite sure how to do this using the selected_output. Any advice to help do this would be greatly appreciated!
--- Code: ---DATABASE C:\phreeqc\database\LLNL.dat

RATES

 Quartz_myrate
-start
2 T = TK
3 terma = 4.03e-4 * (ACT("H+")^(0.3)) * EXP(-45600/(8.314*T))
4 termc = 0.105 * (ACT("H+")^(-0.4)) * EXP(-80000/(8.314*T)) 
5 k = terma + termc
6 sa = PARM(1)
10 rate = k * (1 - SR("Quartz")) * sa
20 save rate * time
-end
     END
    

SOLUTION 0 #boundary water
    temp      25
    pH        7
    pe        4
    redox     pe
    units     mol/kgw
    density   1
    Si        1e-6
    Cl        1e-6
    Na       1e-6
    -water    1 # kg

SOLUTION 1-40
    temp      100
    pH        11.0
    units     mol/kgw
    density   1
    Na        0.1 charge
    Cl        1e-6
    Si       1e-6
    -water    1 # kg
   
KINETICS 1-40

 Quartz_myrate
       -formula SiO2
       #-m     
       -m0     158.8
       -parms  1e4
      
 

TRANSPORT
-cells 40
-length 0.002
-shifts 120
-time_step 720.0
-flow_direction forward
-boundary_cond flux flux
-diffc 0.0e-9
-dispersivity 0.002
-correct_disp true
-punch 40

SELECTED_OUTPUT
  -file                 test_iCP_qtz_diss.out
        -selected_out         true
        -simulation           true
        -solution             true
        -distance             true
        -time                 true
        -step                 true
        -ph                   true
        -pe                   true
        -alkalinity           true
        -ionic_strength       true
        -totals               Si  Cl Na  # name in master_Species
        -molalities           SiO2  Cl Na
        #-equilibrium_phases   Quartz
        -saturation_indices    Quartz
        -kinetic_reactants     Quartz
--- End code ---

dlparkhurst:
The follow calculates the average rate over the time step. Your surface area is constant, but you would need to recalculate the surface area in USER_PUNCH if it varies with time. I limited the calculation to 5 steps for simplicity.

Basic functions are described in the manual in the section Basic Interpreter.


--- Code: ---RATES

 Quartz_myrate
-start
2 T = TK
3 terma = 4.03e-4 * (ACT("H+")^(0.3)) * EXP(-45600/(8.314*T))
4 termc = 0.105 * (ACT("H+")^(-0.4)) * EXP(-80000/(8.314*T))
5 k = terma + termc
6 sa = PARM(1)
      7 PUT(sa, 1)
10 rate = k * (1 - SR("Quartz")) * sa
20 save rate * time
-end
     END
   

SOLUTION 0 #boundary water
    temp      25
    pH        7
    pe        4
    redox     pe
    units     mol/kgw
    density   1
    Si        1e-6
    Cl        1e-6
    Na       1e-6
    -water    1 # kg

SOLUTION 1-40
    temp      100
    pH        11.0
    units     mol/kgw
    density   1
    Na        0.1 charge
    Cl        1e-6
    Si       1e-6
    -water    1 # kg
   
KINETICS 1-40

Quartz_myrate
       -formula SiO2
       #-m     
       -m0     158.8
       -parms  1e4
     
TRANSPORT
-cells 40
-length 0.002
-shifts 5 #120
-time_step 720.0
-flow_direction forward
-boundary_cond flux flux
-diffc 0.0e-9
-dispersivity 0.002
-correct_disp true
-punch 40

SELECTED_OUTPUT 1
  -file                 test_iCP_qtz_diss.sel
        -selected_out         true
        -simulation           true
        -solution             true
        -distance             true
        -time                 true
        -step                 true
        -ph                   true
        -pe                   true
        -alkalinity           true
        -ionic_strength       true
        -totals               Si  Cl Na  # name in master_Species
        -molalities           SiO2  Cl Na
        #-equilibrium_phases   Quartz
        -saturation_indices    Quartz
        -kinetic_reactants     Quartz
USER_PUNCH 1
-heading rate_mol/s surface_area mass_grams
10 PUNCH KIN_DELTA("Quartz_myrate")/KIN_TIME
20 p1 = GET(1)
30 PUNCH p1  # calculate surface area here if not constant
40 PUNCH KIN("Quartz_myrate")*GFW("SiO2")
END

--- End code ---

OLIVIA_RH:
Thank you so much David! I originally thought these were commands that were to be added to selected_output but I see now that user_punch is where they should be defined.

Navigation

[0] Message Index

Go to full version