PhreeqcUsers Discussion Forum

Please email phreeqcusers at gmail.com with your name and affiliation to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • BASIC functions »
  • USER_GRAPH with Recirculated Solutions in TRANSPORT
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: USER_GRAPH with Recirculated Solutions in TRANSPORT  (Read 11345 times)

davidblevy

  • Top Contributor
  • Posts: 32
USER_GRAPH with Recirculated Solutions in TRANSPORT
« on: 03/03/21 17:37 »
This file recirculates strong HCl through a column of dolomite/calcite/quartz (5 PV at a time). To plot output from the last cell (cell 10) consecutively, I used a separate USER_GRAPH block for each transport step, where the number of PVs from proceeding steps is added to the (STEP_NO.+0.5)/cell_no. Is there an easier way to have a single USER_GRAPH which plots the consecutive PVs from the last cell? This works for me, but I am trying to learn more about USER_GRAPH. Thank you, David.


SOLUTION 0 Pure Water
-units   moles/L

REACTION 1 HCl
HCl 2 #7% HCl
SAVE SOLUTION 0
END

USE SOLUTION 0

SOLUTION 1-10
-water

END

PRINT
-reset   false

END

USER_GRAPH 1
-initial_solutions   false
-chart_title "Dolomite Dissolution/7% HCl/Closed System"
-headings   pH
-axis_titles "Pore Volumes" "pH"
-axis_scale x_axis 0 auto
-axis_scale y_axis -2 11
-start
10 x = (STEP_NO +0.5)/cell_no
20 PLOT_XY x, -LA("H+"), color=Red,symbol=Circle, Symbol_size=6, Line_width=2, y_axis=1
-end

TRANSPORT
-cells   10
-lengths   10*0.00635
-shifts   50
-punch_cells 10

EQUILIBRIUM_PHASES 1-10
Dolomite(ordered)   0.0    10
Calcite      0.0   5
Quartz      0.0   5

COPY cell 10 0

END

USER_GRAPH 1
-initial_solutions   false
-chart_title "Dolomite Dissolution/7% HCl/Closed System"
#-headings   pH
-axis_titles "Pore Volumes" "pH"
-axis_scale x_axis 0 auto
-axis_scale y_axis -2 11
-start
10 x = ((STEP_NO +0.5)/cell_no)+5
20 PLOT_XY x, -LA("H+"), color=Red,symbol=Circle, Symbol_size=6, Line_width=2, y_axis=1
-end

TRANSPORT
-shifts   50   

COPY cell 10 0

END

USER_GRAPH 1
-initial_solutions   false
-chart_title "Dolomite Dissolution/7% HCl/Closed System"
#-headings   pH
-axis_titles "Pore Volumes" "pH"
-axis_scale x_axis 0 20
-axis_scale y_axis -2 11
-start
10 x = ((STEP_NO +0.5)/cell_no)+10
20 PLOT_XY x, -LA("H+"), color=Red,symbol=Circle, Symbol_size=6, Line_width=2, y_axis=1
-end

TRANSPORT
-shifts   50   
END
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4336
Re: USER_GRAPH with Recirculated Solutions in TRANSPORT
« Reply #1 on: 03/03/21 19:00 »
Here is one way to do what I think you want.

In the first TRANSPORT block, define a time step of 0.1 (sec). It is numerically equal to the number of pore volumes per shift (given 10 cells). Then set x = TOTAL_TIME in USER_GRAPH 1. TOTAL_TIME increases monotonically through both TRANSPORT calculations. Eliminate USER_GRAPH 2.

Alternatively, define a realistic time step T, and set x = TOTAL_TIME/T/10 (= PV).
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4336
Re: USER_GRAPH with Recirculated Solutions in TRANSPORT
« Reply #2 on: 03/03/21 20:08 »
I think you need to be careful of a problem. Your REACTION 1 gets added to cell 1 at each TRANSPORT shift. You should probably number it REACTION 100, or some number that does not interfere with your 10 cells.

What should happen in a recirculating system is that calcite and dolomite dissolve to equilibrium. After one pore volume, there should be no change in composition.
Logged

davidblevy

  • Top Contributor
  • Posts: 32
Re: USER_GRAPH with Recirculated Solutions in TRANSPORT
« Reply #3 on: 03/03/21 20:49 »
That is a very important point! I really appreciate your helpful suggestions.

David
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • BASIC functions »
  • USER_GRAPH with Recirculated Solutions in TRANSPORT
 

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