TITLE Example 19.--Linear, Freundlich and Langmuir isotherms for
      Cd sorption on loamy sand. Calculates Example 7.1
      from Appelo and Postma, 2005. Data from Christensen, 1984.
SURFACE_MASTER_SPECIES
      Linear Linear
      Freundlich Freundlich
      Langmuir Langmuir
SURFACE_SPECIES
  Linear = Linear
  Linear + Cd+2 = LinearCd+2
      -log_k -100.7         # log10(0.2) - 100
      -mole_balance LinearCdCl2
  Freundlich = Freundlich
  Freundlich + 0.722 Cd+2 = FreundlichCd+2
      -log_k -102.61        # log10(0.421) + (0.722 - 1) * log10(112.4e6) - 100
      -no_check
      -mole_balance FreundlichCdCl2
  Langmuir = Langmuir
  Langmuir + Cd+2 = LangmuirCd+2
      -log_k 6.56           # log10(112.4 / 30.9e-6)
      -mole_balance LangmuirCdCl2
SURFACE 1
      Linear 1e100 1 1
      Freundlich 1e100 1 1
      Langmuir 8.45e-8 1 1  # 9.5 / 112.4e6
      -no_edl
SOLUTION 1
      pH  6
      Ca  1
      Cl  2
REACTION 1
      CdCl2 1
      0.7e-6 in 20
USER_GRAPH Example 19
      -headings Linear Freundlich Langmuir
      -chart_title "Sorption Isotherms"
      -axis_titles "Dissolved Cd, in micrograms per kilogram water" \
                    "Sorbed Cd, in micrograms per gram soil"
      -plot_tsv_file ex19_meas.tsv
      -axis_scale x_axis 0 40
      -axis_scale y_axis 0 6
      -initial_solutions true
  -start
10 x = act("Cd+2") * 112.4e6
20 PLOT_XY x, mol("LinearCd+2")*112e6, color = Green, symbol = None, line_width = 2
30 PLOT_XY x, mol("FreundlichCd+2")*112e6, color = Blue, symbol = None, line_width = 2
40 PLOT_XY x, mol("LangmuirCd+2")*112e6, color = Orange, symbol = None, line_width = 2
  -end
PRINT
     -reset false
END