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 »
  • Cell_No error of Selected_Output results for Transport
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Cell_No error of Selected_Output results for Transport  (Read 2605 times)

Jeonghwan Hwang

  • Top Contributor
  • Posts: 77
Cell_No error of Selected_Output results for Transport
« on: 14/11/20 03:53 »
Hello, this is Jeonghwan Hwang
Thank you for reading.

I want to make the 1D transport using cation exchange model.
Firstly, I only used ADVECTION, and the model was successfully conducted.
However, when I used TRANSPORT, I got some problems at the results file (.txt)

The problem is written as below;
1. Unnecessary result values were printed at the beginning of the result file (i.e., step -99).
       step          m_Cs+          m_CsZ          m_CsD          m_CsQ            Cst           CsZt           CsDt           CsQt    Pore_volume   
         -99     1.0000e-05     0.0000e+00     0.0000e+00     0.0000e+00     1.0000e-05     1.0000e-99     1.0000e-99     1.0000e-99     0.0000e+00   
         -99     1.0000e-15     0.0000e+00     0.0000e+00     0.0000e+00     1.0000e-15     1.0000e-99     1.0000e-99     1.0000e-99     0.0000e+00   
         -99     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     0.0000e+00   
           1     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     0.0000e+00

2. The results showed unnecessary cell data appears at the beginning and end of results, respectively, at every steps. lt seems like cell_no 0 and 51, but I didn't set these cells in my model. I wrote a punch to get the total amount of Cs inside the column at each step of the result (i.e., Cst, CsQt, etc.) . However, this punch value indicates a significant error, which seems to be due to cell_no 0 and 51.
        step          m_Cs+          m_CsZ          m_CsD          m_CsQ            Cst                 CsZt                 CsDt                 CsQt          Pore_volume   
           0     1.0000e-05     0.0000e+00     0.0000e+00     0.0000e+00     1.0000e-05     7.3012e-15     5.2744e-17     4.1524e-16     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.0001e-15     1.4602e-14     1.0549e-16     8.3048e-16     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.0001e-15     2.1904e-14     1.5823e-16     1.2457e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.0002e-15     2.9205e-14     2.1098e-16     1.6610e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     5.0002e-15     3.6506e-14     2.6372e-16     2.0762e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     6.0003e-15     4.3807e-14     3.1647e-16     2.4915e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     7.0003e-15     5.1109e-14     3.6921e-16     2.9067e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     8.0003e-15     5.8410e-14     4.2195e-16     3.3219e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     9.0004e-15     6.5711e-14     4.7470e-16     3.7372e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.0000e-14     7.3012e-14     5.2744e-16     4.1524e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.1000e-14     8.0314e-14     5.8019e-16     4.5677e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.2001e-14     8.7615e-14     6.3293e-16     4.9829e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.3001e-14     9.4916e-14     6.8568e-16     5.3982e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.4001e-14     1.0222e-13     7.3842e-16     5.8134e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.5001e-14     1.0952e-13     7.9116e-16     6.2286e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.6001e-14     1.1682e-13     8.4391e-16     6.6439e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.7001e-14     1.2412e-13     8.9665e-16     7.0591e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.8001e-14     1.3142e-13     9.4940e-16     7.4744e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     1.9001e-14     1.3872e-13     1.0021e-15     7.8896e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.0001e-14     1.4602e-13     1.0549e-15     8.3048e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.1001e-14     1.5333e-13     1.1076e-15     8.7201e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.2001e-14     1.6063e-13     1.1604e-15     9.1353e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.3001e-14     1.6793e-13     1.2131e-15     9.5506e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.4001e-14     1.7523e-13     1.2659e-15     9.9658e-15     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.5001e-14     1.8253e-13     1.3186e-15     1.0381e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.6001e-14     1.8983e-13     1.3714e-15     1.0796e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.7001e-14     1.9713e-13     1.4241e-15     1.1212e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.8001e-14     2.0443e-13     1.4768e-15     1.1627e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     2.9001e-14     2.1174e-13     1.5296e-15     1.2042e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.0001e-14     2.1904e-13     1.5823e-15     1.2457e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.1001e-14     2.2634e-13     1.6351e-15     1.2873e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.2001e-14     2.3364e-13     1.6878e-15     1.3288e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.3001e-14     2.4094e-13     1.7406e-15     1.3703e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.4001e-14     2.4824e-13     1.7933e-15     1.4118e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.5002e-14     2.5554e-13     1.8460e-15     1.4533e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.6002e-14     2.6284e-13     1.8988e-15     1.4949e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.7002e-14     2.7015e-13     1.9515e-15     1.5364e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.8002e-14     2.7745e-13     2.0043e-15     1.5779e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     3.9002e-14     2.8475e-13     2.0570e-15     1.6194e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.0002e-14     2.9205e-13     2.1098e-15     1.6610e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.1002e-14     2.9935e-13     2.1625e-15     1.7025e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.2002e-14     3.0665e-13     2.2153e-15     1.7440e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.3002e-14     3.1395e-13     2.2680e-15     1.7855e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.4002e-14     3.2125e-13     2.3207e-15     1.8271e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.5002e-14     3.2856e-13     2.3735e-15     1.8686e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.6002e-14     3.3586e-13     2.4262e-15     1.9101e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.7002e-14     3.4316e-13     2.4790e-15     1.9516e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.8002e-14     3.5046e-13     2.5317e-15     1.9932e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     4.9002e-14     3.5776e-13     2.5845e-15     2.0347e-14     0.0000e+00   
           0     1.0000e-15     7.3012e-15     5.2744e-17     4.1524e-16     5.0002e-14     3.6506e-13     2.6372e-15     2.0762e-14     0.0000e+00   
           0     1.0000e-15     0.0000e+00     0.0000e+00     0.0000e+00     5.1002e-14     3.6506e-13     2.6372e-15     2.0762e-14     0.0000e+00   

I would like to ask you how to solve these problem.
When this problem is solved, I want to add the dispersion and diffusion parameters required for the transport.
I will send you my base file.

Thank you.

Sincerely,

Jeonghwan Hwang


Thank you.
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4036
Re: Cell_No error of Selected_Output results for Transport
« Reply #1 on: 14/11/20 04:33 »
SELECTED_OUTPUT and USER_PUNCH will write a line for each calculation that is made during a simulation (between END statements). Your simulation has a calculation for SOLUTION 1, EXCHANGE 1, SOLUTION 0, reaction between SOLUTION 1 and EXCHANGE 1, and TRANSPORT, hence the lines before the TRANSPORT calculation.

Simply put an END statement before TRANSPORT. The SELECTED_OUTPUT will start with the TRANSPORT calculation.

Use -print_cells 1-50 and (or) -punch_cells 1-50 in TRANSPORT to limit the cells that are printed and (or) punched.
Logged

Jeonghwan Hwang

  • Top Contributor
  • Posts: 77
Re: Cell_No error of Selected_Output results for Transport
« Reply #2 on: 15/11/20 06:16 »
Thank you for your help.
I solved almost problems with my model.

Finally, there are two questions.

In the process of flowing the 3 kinds of 'solution 0', a line of '-99 step' appears before the different solution was injected.
I want to get rid of this from the resulting file by using 'Print; -selected_output false', but I don't know where I have to add it.
I have already put it in various parts, in fronts of solution and exchange, but could not solve it.

Secondly, I want to find 1) the concentration change in the 'cell_no 50', and 2) the cesium change in the entire column (cell_no 1-50).
To do this, I set the sentence to calculate and input by adding Cs from 'Cell 1 to 50' in the 'User_punch 1' of the 'Selected_output 1'
and run the model with 'punch_cells 50' in 'Transport'.
But in this result, the amount of total Cs continues to be odd.
If I set 'Punch_cells 1-50', the value I want is found in the 'cell_no 50' of each step.

Please advise on how I can correct this.
My model is written as below;

Thank you...

Sincerely,

Jeonghwan Hwang

==========================================

database c://phreeqc/database/LLNL.dat

EXCHANGE_MASTER_SPECIES
    Z   Z- #FES
    D   D- #TypeII
    Q   Q- #planar
 
EXCHANGE_SPECIES
    Z- = Z- #FES
    log_k 0.0
    -davies
    Na+ + KZ = NaZ + K+  #FES
    log_k -2.5
    -davies
    K+ + Z- = KZ #FES
    log_k 0.0
    -davies
    Ca+2 + 2KZ = CaZ2 + 2K+  #FES
    log_k -10.7
    -davies
 
    D- = D- #TypeII
    log_k 0.0
    -davies
    Na+ + KD = NaD + K+ #TypeII
    log_k -2.1
    -davies
    K+ + D- = KD #TypeII
    log_k 0.0
    -davies
    Ca+2 + 2KD = CaD2 + 2K+  #TypeII
    log_k -4.6
    -davies
 
    Q- = Q- #planar
    log_k 0.0
    -davies
    Na+ + KQ = NaQ + K+ #planar
    log_k -1.0
    -davies
    K+ + Q- = KQ #planar
    log_k 0.0
    -davies
    Ca+2 + 2KQ = CaQ2 + 2K+  #planar
    log_k -3.9
    -davies
 
    Cs+ + KZ = CsZ + K+  #FES
    log_k 4.5
    -davies
    Cs+ + KD = CsD + K+  #TypeII
    log_k 1.4
    -davies
    Cs+ + KQ = CsQ + K+  #planar
    log_k 0.8
    -davies

#======Initial solution for column=====#

SOLUTION 1-50 # initial pore solution
    temp    23.0
    units moles/L # in moles/L case, the cation conc. showed the larger values than 1.00 such as 1.02 or 1.01 at high concentration.
    Cs 1E-15
    K 1.10E-03
end # end can classify the results of (solution, exchange) from transport that we only want to see in the results file.

EXCHANGE 1-50 
      KZ  2.54E-07 # in moles
      KD  2.31E-06
      KQ  7.24E-05
      Equilibrate 1 # initially equalibrate with pore solution
end

PRINT
   -reset false # resets all PRINT identifiers to true/false. Suspends all print output if false.
   -status false # suspends on-screen printout of calculation progress during (here) 5 milliseconds, completely if false

   SELECTED_OUTPUT 1 #Punching to all files can be suspended and resumed with: PRINT; -selected_output false | true
        -file            transport.txt
        -reset           false
        -step      
        -molalities      Cs+ CsZ CsD CsQ # Species for which the concentration (mol/kgw) is printed.

   USER_PUNCH 1 # number should have same value with selected_output
   -heading Cst CsZt CsDt CsQt Pore_volume

   # calculate the total amounts of Cs in the cell 1-50
   20 IF CELL_NO = 1 THEN f = 0 ELSE f = 1 # 누적 총량이 계속 계산이 이상함.
   50 CsZt = GET(4)*f + MOL("CsZ")*TOT("water")
   60 CsQt = GET(5)*f + MOL("CsQ")*TOT("water")
   70 CsDt = GET(6)*f + MOL("CsD")*TOT("water")
   80 Cst = GET(7)*f + MOL("Cs+")*TOT("water")
   150 PUT(CsZt,4)
   160 PUT(CsQt,5)
   170 PUT(CsDt,6)
   180 PUT(Cst,7)
   
   290 IF CELL_NO <> 50 THEN GOTO 300
   300 REM
   
   250 punch GET(7)
   260 punch GET(4)
   270 punch GET(6)
   280 punch GET(5)
   
   # punch the pore_volume
   310 PUNCH TOTAL_TIME / 50   

   
#=====Plot the graph to check the Model result========#    
USER_GRAPH 1 # Plot the cell no.50
    -headings               CsZ CsQ CsD Cs
    -axis_titles            "Pore volume" "Molality" ""
    -chart_title            "Using ADVECTION Data Block"
    -axis_scale x_axis      auto auto auto auto
    -axis_scale y_axis      1.0E-15 1.0E-1 auto auto log
    -initial_solutions      False
    -connect_simulations    true
    -plot_concentration_vs  x   
    -start   
   
5 IF CELL_NO <> 50 THEN GOTO 100
10 x = TOTAL_TIME / 50
50 PLOT_XY x, MOL("CsZ"), symbol = None
60 PLOT_XY x, MOL("CsQ"), symbol = None
70 PLOT_XY x, MOL("CsD"), symbol = None
80 PLOT_XY x, MOL("Cs+"), symbol = None
100 REM end of plot
  -end
-active                 true
#======================================#

SOLUTION 0
    temp    23.0
    units moles/L
    Cs 1E-15
    K 1.10E-03   
end

Transport
   -cells        50
   -shifts           50
        -time_step        1
        -flow_direction   forward
    -Punch_cells      1-50   #Identifier to select "cells" for which results will be written to the "selected-output" file(.txt)
         -punch_frequency  1   #Identifier to select "shifts" for which results will be written to the "selected-output" file(.txt)
end

SOLUTION 0
    temp    23.0
    units moles/L
    Cs 1E-05
    K 1.10E-03   
end

Transport
   -shifts           50
end

SOLUTION 0
    temp    23.0
    units moles/L
    Cs 1E-15
    K 1.10E-03   
end

Transport
   -shifts           500
end
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4036
Re: Cell_No error of Selected_Output results for Transport
« Reply #3 on: 15/11/20 19:07 »
Code: [Select]
END
PRINT
-selected_output false
SOLUTION
END
PRINT
-selected_output true
...

The code of USER_PUNCH will only run for the cells selected by -punch_cells in TRANSPORT. If you do not include cells 1-49, for example, then the Cs will not be summed for those cells. I think you will have to to set -punch_cells to include all cells.

Note that -punch_cells also controls the cells that are submitted to USER_GRAPH, but you can use an if statement to select cells to be graphed.

You may be able to use USER_PRINT to do the accumulation, but USER_PRINT is executed after SELECTED_OUTPUT and USER_PUNCH for a given cell.
Logged

Jeonghwan Hwang

  • Top Contributor
  • Posts: 77
Re: Cell_No error of Selected_Output results for Transport
« Reply #4 on: 16/11/20 01:38 »
Thank you for kind help.
Now I solved almost problem, expect 1 problem.

Although I can express the 50th line correctly,
but I cannot getting rid of the white spaces on line 1-49 before in output file.

Is there a way to print PHREEQC without white space (1-49 lines for each step) itself?
Or is this part to be modified through reprocessing of result data using other tools such as matlab?

Thank you.
Sincerely,

Jeonghwan Hwang.

===================================================================
database c://phreeqc/database/LLNL.dat

EXCHANGE_MASTER_SPECIES
    Z   Z- #FES
    D   D- #TypeII
    Q   Q- #planar
 
EXCHANGE_SPECIES
    Z- = Z- #FES
    log_k 0.0
    -davies
    Na+ + KZ = NaZ + K+  #FES
    log_k -2.5
    -davies
    K+ + Z- = KZ #FES
    log_k 0.0
    -davies
    Ca+2 + 2KZ = CaZ2 + 2K+  #FES
    log_k -10.7
    -davies
 
    D- = D- #TypeII
    log_k 0.0
    -davies
    Na+ + KD = NaD + K+ #TypeII
    log_k -2.1
    -davies
    K+ + D- = KD #TypeII
    log_k 0.0
    -davies
    Ca+2 + 2KD = CaD2 + 2K+  #TypeII
    log_k -4.6
    -davies
 
    Q- = Q- #planar
    log_k 0.0
    -davies
    Na+ + KQ = NaQ + K+ #planar
    log_k -1.0
    -davies
    K+ + Q- = KQ #planar
    log_k 0.0
    -davies
    Ca+2 + 2KQ = CaQ2 + 2K+  #planar
    log_k -3.9
    -davies
 
    Cs+ + KZ = CsZ + K+  #FES
    log_k 4.5
    -davies
    Cs+ + KD = CsD + K+  #TypeII
    log_k 1.4
    -davies
    Cs+ + KQ = CsQ + K+  #planar
    log_k 0.8
    -davies
end

#======Initial solution for column=====#
PRINT
-selected_output false
SOLUTION 1-50 # initial pore solution
    temp    23.0
    units moles/L # in moles/L case, the cation conc. showed the larger values than 1.00 such as 1.02 or 1.01 at high concentration.
    Cs 1E-15
    K 1.10E-03
end # end can classify the results of (solution, exchange) from transport that we only want to see in the results file.

PRINT
-selected_output false
EXCHANGE 1-50 
      KZ  2.54E-07 # in moles
      KD  2.31E-06
      KQ  7.24E-05
      Equilibrate 1 # initially equalibrate with pore solution
end

PRINT
   -reset false # resets all PRINT identifiers to true/false. Suspends all print output if false.
   -status false # suspends on-screen printout of calculation progress during (here) 5 milliseconds, completely if false

   SELECTED_OUTPUT 1 #Punching to all files can be suspended and resumed with: PRINT; -selected_output false | true
        -file            transport.txt
        -reset           false   
#   -molalities      Cs+ CsZ CsD CsQ # Species for which the concentration (mol/kgw) is printed.
   
   USER_PUNCH 1 # number should have same value with selected_output
   
   -heading Csm CsZm CsDm CsQm Cst CsZt CsDt CsQt Pore_volume
   
   # calculate the total amounts of Cs in the cell 1-50
   20 IF CELL_NO = 1 THEN f = 0 ELSE f = 1
   50 CsZt = GET(4)*f + MOL("CsZ")*TOT("water")
   60 CsQt = GET(5)*f + MOL("CsQ")*TOT("water")
   70 CsDt = GET(6)*f + MOL("CsD")*TOT("water")
   80 Cst = GET(7)*f + MOL("Cs+")*TOT("water")
   90 Csm = MOL("Cs+")
   100 CsZm = MOL("CsZ")
   110 CsDm = MOL("CsD")
   120 CsQm = MOL("CsQ")
   130 PUT (Csm, 8)
   140 PUT (CsZm, 9)
   150 PUT (CsDm, 10)
   160 PUT (CsQm, 11)
   170 PUT(CsZt,4)
   180 PUT(CsQt,5)
   190 PUT(CsDt,6)
   200 PUT(Cst,7)
   
   210 IF CELL_NO <> 50 THEN GOTO 320 #Print Cell_no 50, only
   230 punch GET(8)
   240 punch GET(9)
   250 punch GET(10)
   260 punch GET(11)
   270 punch GET(7)
   280 punch GET(4)
   290 punch GET(6)
   300 punch GET(5)
   # punch the pore_volume
   310 PUNCH TOTAL_TIME / 50 #time = step*time
   320 REM
         
#=====Plot the graph to check the Model result========#    
USER_GRAPH 1 # Plot the cell no.50
    -headings               CsZ CsQ CsD Cs
    -axis_titles            "Pore volume" "Molality" ""
    -chart_title            "Using ADVECTION Data Block"
    -axis_scale x_axis      auto auto auto auto
    -axis_scale y_axis      1.0E-15 1.0E-1 auto auto log
    -initial_solutions      False
    -connect_simulations    true
    -plot_concentration_vs  x   
    -start   
   
500 IF CELL_NO <> 50 THEN GOTO 600
510 x = TOTAL_TIME / 50
550 PLOT_XY x, MOL("CsZ"), symbol = None
560 PLOT_XY x, MOL("CsQ"), symbol = None
570 PLOT_XY x, MOL("CsD"), symbol = None
580 PLOT_XY x, MOL("Cs+"), symbol = None
600 REM end of plot
  -end
-active                 true
#======================================#
PRINT
-selected_output false

SOLUTION 0
    temp    23.0
    units moles/L
    Cs 1E-15
    K 1.10E-03   
end

PRINT
-selected_output true
Transport
   -cells        50
   -shifts           50
        -time_step        1
        -flow_direction   forward
   -Punch_cells      1-50   #Identifier to select "cells" for which results will be written to the "selected-output" file(.txt)
        -punch_frequency  1   #Identifier to select "shifts" for which results will be written to the "selected-output" file(.txt)
   -Print_cells      50
   -Print_frequency  1
end

PRINT
-selected_output false
SOLUTION 0
    temp    23.0
    units moles/L
    Cs 1E-05
    K 1.10E-03   
end

PRINT
-selected_output true
Transport
   -shifts           50
end

PRINT
-selected_output false
SOLUTION 0
    temp    23.0
    units moles/L
    Cs 1E-15
    K 1.10E-03   
end

PRINT
-selected_output true
Transport
   -shifts           500
end
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4036
Re: Cell_No error of Selected_Output results for Transport
« Reply #5 on: 16/11/20 15:22 »
Sorry, I think you will just have to deal with it.
Logged

Jeonghwan Hwang

  • Top Contributor
  • Posts: 77
Re: Cell_No error of Selected_Output results for Transport
« Reply #6 on: 12/12/20 03:44 »
Can I ask one more question for breakthrough curve?

I made a 1-D column with 50 cells.
Here, 0.1 mol/kgw of Cs solution was injected as much as 5 Pore volume,
and 1E-20 mol/kgw of Cs solution was continuously flowed to create a breakthrough curve.

In the figure, I found the tendency that the concentration of Cs+ decreases sharply by half near the 6 pore volume
where 1E-20 mol/kgw of Cs solution begins to flow.

What I originally thought was a sharp but curved shape, but my model did not show such results.
Is there anything I need to add or modify to make this result?
Thank you for your help...

Sincerely,

Jeonghwan Hwang

=======================================================

database c://phreeqc/database/LLNL.dat

EXCHANGE_MASTER_SPECIES
    Z   Z- #FES
    D   D- #TypeII
    Q   Q- #planar
 
EXCHANGE_SPECIES
    Z- = Z- #FES
    log_k 0.0
    -davies
    Na+ + KZ = NaZ + K+  #FES
    log_k -2.5
    -davies
    K+ + Z- = KZ #FES
    log_k 0.0
    -davies
    Ca+2 + 2KZ = CaZ2 + 2K+  #FES
    log_k -10.7
    -davies
 
    D- = D- #TypeII
    log_k 0.0
    -davies
    Na+ + KD = NaD + K+ #TypeII
    log_k -2.1
    -davies
    K+ + D- = KD #TypeII
    log_k 0.0
    -davies
    Ca+2 + 2KD = CaD2 + 2K+  #TypeII
    log_k -4.6
    -davies
 
    Q- = Q- #planar
    log_k 0.0
    -davies
    Na+ + KQ = NaQ + K+ #planar
    log_k -1.0
    -davies
    K+ + Q- = KQ #planar
    log_k 0.0
    -davies
    Ca+2 + 2KQ = CaQ2 + 2K+  #planar
    log_k -3.9
    -davies
 
    Cs+ + KZ = CsZ + K+  #FES
    log_k 4.5
    -davies
    Cs+ + KD = CsD + K+  #TypeII
    log_k 1.4
    -davies
    Cs+ + KQ = CsQ + K+  #planar
    log_k 0.8
    -davies
end

#======Initial solution for column=====#
PRINT
-selected_output false
SOLUTION 1-50 # initial pore solution
    temp    23.0
    units moles/kgw # in moles/L case, the cation conc. showed the larger values than 1.00 such as 1.02 or 1.01 at high concentration.
    Cs 1E-20
    K 1E-1
    Water 9.42E-5
end # end can classify the results of (solution, exchange) from transport that we only want to see in the results file.

PRINT
-selected_output false
EXCHANGE 1-50
   Equilibrate 1 # initially equalibrate with pore solution
      KZ  1.82E-08    # in moles (Sc Standard) Calibration
      KD  6.07E-07
      KQ  1.18E-05
end

PRINT
   -reset false # resets all PRINT identifiers to true/false. Suspends all print output if false.
   -status false # suspends on-screen printout of calculation progress during (here) 5 milliseconds, completely if false

   SELECTED_OUTPUT 1 #Punching to all files can be suspended and resumed with: PRINT; -selected_output false | true
        -file            Case__11.txt
        -reset           false   
#   -molalities      Cs+ CsZ CsD CsQ # Species for which the concentration (mol/kgw) is printed.
   
   USER_PUNCH 1 # number should have same value with selected_output
   
   -heading Csm CsZm CsDm CsQm Cst CsZt CsDt CsQt Pore_volume
   
   # calculate the total amounts of Cs in the cell 1-50
   20 IF CELL_NO = 1 THEN f = 0 ELSE f = 1
   50 CsZt = GET(4)*f + MOL("CsZ")*TOT("water")
   60 CsQt = GET(5)*f + MOL("CsQ")*TOT("water")
   70 CsDt = GET(6)*f + MOL("CsD")*TOT("water")
   80 Cst = GET(7)*f + MOL("Cs+")*TOT("water")
   90 Csm = MOL("Cs+")
   100 CsZm = MOL("CsZ")
   110 CsDm = MOL("CsD")
   120 CsQm = MOL("CsQ")
   130 PUT (Csm, 8)
   140 PUT (CsZm, 9)
   150 PUT (CsDm, 10)
   160 PUT (CsQm, 11)
   170 PUT(CsZt,4)
   180 PUT(CsQt,5)
   190 PUT(CsDt,6)
   200 PUT(Cst,7)
   
   210 IF CELL_NO <> 50 THEN GOTO 320 #Print Cell_no 50, only
   230 punch GET(8)
   240 punch GET(9)
   250 punch GET(10)
   260 punch GET(11)
   270 punch GET(7)
   280 punch GET(4)
   290 punch GET(6)
   300 punch GET(5)
   # punch the pore_volume
   310 PUNCH TOTAL_TIME / 9000 #time = step*time
   320 REM
         
#=====Plot the graph to check the Model result========#    
USER_GRAPH 1 # Plot the cell no.50
    -headings               CsZ CsQ CsD Cs
    -axis_titles            "Pore volume" "Molality" ""
    -chart_title            "Using ADVECTION Data Block"
    -axis_scale x_axis      auto auto auto auto
    -axis_scale y_axis      1.0E-15 1.0E-1 auto auto log
    -initial_solutions      False
    -connect_simulations    true
    -plot_concentration_vs  x   
    -start   
   
500 IF CELL_NO <> 50 THEN GOTO 600
510 x = TOTAL_TIME / 9000
550 PLOT_XY x, MOL("CsZ"), symbol = None
560 PLOT_XY x, MOL("CsQ"), symbol = None
570 PLOT_XY x, MOL("CsD"), symbol = None
580 PLOT_XY x, MOL("Cs+"), symbol = None
600 REM end of plot
  -end
-active                 true
#======================================#
PRINT
-selected_output false
SOLUTION 0
    temp    23.0
    units moles/kgw
    Cs 1E-1
    K 1E-1
    Water 9.42E-5
end

PRINT
-selected_output true
Transport
   -cells        50
   -shifts           250
        -time_step        180 # 0.1cm/min = 0.3cm/180sec
   -length        0.003 #0.003*50 = 0.15m
        -flow_direction   forward
        -boundary_cond   flux    flux
        -dispersivity    0.01
        -correct_disp    true
   -Punch_cells      1-50   #Identifier to select "cells" for which results will be written to the "selected-output" file(.txt)
        -punch_frequency  1   #Identifier to select "shifts" for which results will be written to the "selected-output" file(.txt)
end


PRINT
-selected_output false
#pulsed inflow of no contaminated water#
SOLUTION 0
    temp    23.0
    units moles/kgw
    Cs 1E-20
    K 1E-1
    Water 9.42E-5
END
PRINT
-selected_output true
ADVECTION
        -time_step       180
        -initial_time    45000
        -cells           50
        -shifts          250 #time control
END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4036
Re: Cell_No error of Selected_Output results for Transport
« Reply #7 on: 12/12/20 15:18 »
The original solution has 2 mol/kgw cations while the second has 1 mol/kgw. If we add Cl to balance the cations, you can see that there is a square wave concentration decrease in chloride. There is also a square wave concentration decrease in cations.

Here is a simplified file that shows the migration of the square wave at 0.5 pore volumes in a column that is initially set to be in equilibrium with the equimolal solution. Concentrations of K+ decrease and Cs+ increase until they are 0.5 mol/kgw. At that point there is a step increase to the original 2 molal original condition.

Code: [Select]
EXCHANGE_MASTER_SPECIES
    Q   Q- #planar
 
EXCHANGE_SPECIES
    Q- = Q- #planar
    log_k 0.0
    -davies
    Na+ + KQ = NaQ + K+ #planar
    log_k -1.0
    -davies
    K+ + Q- = KQ #planar
    log_k 0.0
    -davies
    Ca+2 + 2KQ = CaQ2 + 2K+  #planar
    log_k -3.9
    -davies
    Cs+ + KQ = CsQ + K+  #planar
    log_k 0.8
    -davies
end

SOLUTION 1-50
    temp    23.0
    units moles/kgw
    Cs 1E-1
    K 1E-1
    Cl 0.2
    Water 9.42E-5
end
EXCHANGE 1-50
   Equilibrate 1 # initially equalibrate with pore solution
      KQ  1.18E-05
end
SOLUTION 0
    temp    23.0
    units moles/kgw
    Cs 1E-20
    K 1E-1
    Cl 0.1
    Water 9.42E-5
END
USER_GRAPH 1
    -headings               Cs+ K+ Cl-
    -axis_titles            "Cell number" "Molality" ""
    -chart_title            "Using ADVECTION Data Block"
    -initial_solutions      false
    -connect_simulations    false
    -plot_concentration_vs  x   
    -start   
510 x = CELL_NO
580 PLOT_XY x, MOL("Cs+"), symbol = None
590 PLOT_XY x, MOL("K+"), symbol = None
595 PLOT_XY x, MOL("Cl-"), symbol = None
600 REM end of plot
  -end
ADVECTION
        -cells           50
        -shifts          25 # 250 #time control
        -punch_frequency 25 # every 0.2 pore volume
END
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Cell_No error of Selected_Output results for Transport
 

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