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 »
  • Beginners »
  • BASIC functions »
  • USER_GRAPH -active...
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: USER_GRAPH -active...  (Read 1372 times)

Chemistry

  • Contributor
  • Posts: 7
USER_GRAPH -active...
« on: 05/05/24 05:30 »
I don't understand that why the graphs are different...

The default of -active identifier is true.

But, if I include the -active identifier in the USER_GRAPH data block, the graph is different from not including the identifier.

Please explain why...

Exclude -active identifier:
Code: [Select]
SOLUTION 1
    temp      25
    pH        7
    pe        4
    redox     pe
    units     mmol/kgw
    density   1
    -water    1 # kg

EQUILIBRIUM_PHASES 1
    Calcite   0 10

REACTION 1
    CO2(g)     1
    0.0035 moles in 30 steps

USER_GRAPH 1
    -headings               CO2 equilibrium
    -axis_titles            "CO2 / vol%" "Ca / mM" ""
    -chart_title            "Calcite Equilibrium"
    -axis_scale x_axis      0 3 1 auto
    -axis_scale y_axis      0 3 1 auto
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 X = 100 * SR("CO2(g)")
20 Y = 1e3 * TOT("Ca")
30 GRAPH_X X
40 GRAPH_Y Y
  -end

END

SOLUTION 2
    temp      25
    pH        7 charge
    pe        4
    redox     pe
    units     mmol/kgw
    density   1
    Ca        1 Calcite    0
    C(4)      1 CO2(g)     -1.7
    -water    1 # kg

USER_GRAPH 1
    -headings               mixing_line
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
40 IF STEP_NO = 0 THEN PLOT_XY 100 * SR("CO2(g)"), 1e3 * TOT("Ca"), symbol = Circle, y-axis = 1, line_width = 1, color = Green
  -end

END


Include -active identifier
Code: [Select]
SOLUTION 1
    temp      25
    pH        7
    pe        4
    redox     pe
    units     mmol/kgw
    density   1
    -water    1 # kg

EQUILIBRIUM_PHASES 1
    Calcite   0 10

REACTION 1
    CO2(g)     1
    0.0035 moles in 30 steps

USER_GRAPH 1
    -headings               CO2 equilibrium
    -axis_titles            "CO2 / vol%" "Ca / mM" ""
    -chart_title            "Calcite Equilibrium"
    -axis_scale x_axis      0 3 1 auto
    -axis_scale y_axis      0 3 1 auto
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
10 X = 100 * SR("CO2(g)")
20 Y = 1e3 * TOT("Ca")
30 GRAPH_X X
40 GRAPH_Y Y
  -end
    -active

END

SOLUTION 2
    temp      25
    pH        7 charge
    pe        4
    redox     pe
    units     mmol/kgw
    density   1
    Ca        1 Calcite    0
    C(4)      1 CO2(g)     -1.7
    -water    1 # kg

USER_GRAPH 1
    -headings               mixing_line
    -initial_solutions      true
    -connect_simulations    true
    -plot_concentration_vs  x
  -start
40 IF STEP_NO = 0 THEN PLOT_XY 100 * SR("CO2(g)"), 1e3 * TOT("Ca"), symbol = Circle, y-axis = 1, line_width = 1, color = Green
  -end
    -active

END

« Last Edit: 05/05/24 05:40 by Chemistry »
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4034
Re: USER_GRAPH -active...
« Reply #1 on: 05/05/24 21:39 »
I'm not sure why it was written this way, but I will simply say how it works.

If you define both -active and -connect_simulations, then new points for the curve(s) continue from the previous definition.

If either -active or -connect_simulations is false, then  the new points are plotted on new curve(s).
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4034
Re: USER_GRAPH -active...
« Reply #2 on: 06/05/24 00:48 »
I should rephrase my reply.

If there was a previous USER_GRAPH block, and you define -active in the current USER_GRAPH block, then: If -connect_simulations is true (whether defined in the current or the previous USER_GRAPH block),  then new points for the curve(s) continue from the previous USER_GRAPH curves. If -connect_simulations is false, then new points are plotted on new curves.

If -active is defined to be false, then no curves are plotted.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • BASIC functions »
  • USER_GRAPH -active...
 

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