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 »
  • Selective SI Values
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Selective SI Values  (Read 9720 times)

davidblevy

  • Top Contributor
  • Posts: 32
Selective SI Values
« on: 16/09/25 17:25 »
In a mixing scenario, is there a way to send all positive SI values for respective minerals to a selected output file?

thank you, David
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4296
Re: Selective SI Values
« Reply #1 on: 22/09/25 05:28 »
I'm not sure exactly what you want. It is difficult to get a set of headings, and if you are running multiple calculations, the set of positive saturation indices could vary among calculations. Here is  a quick way to list positive saturation indices. The mineral is written to one column and the saturation index in the following column. There is no attempt to specify column headings, or keep minerals in specific columns.

Code: [Select]
SOLUTION
pH 7 charge
Na 2
Ca 1
Mg 1
C  3
S(6) 1
SELECTED_OUTPUT 2
USER_PUNCH 2
10 t = SYS("phases", count , name$ , type$ , s_index )
20 for i = 1 to count
30   if s_index(i) < 0 then goto 50
40   PUNCH name$(i), s_index(i)
50 next i
END
Logged

davidblevy

  • Top Contributor
  • Posts: 32
Re: Selective SI Values
« Reply #2 on: 08/10/25 19:03 »
This is what I was after, thanks David!
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • BASIC functions »
  • Selective SI Values
 

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