PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • USER_PUNCH/USER_GRAPH »
  • BASIC functions »
  • Distribution of alkalinity
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Distribution of alkalinity  (Read 472 times)

khwee

  • Contributor
  • Posts: 2
Distribution of alkalinity
« on: September 28, 2021, 02:17:29 PM »
Dear all,

The keyword PRINT gives an option to show the list of species that contributes to alkalinity, but is there a way to punch the list to a file via USER_PUNCH instead?  If there is no such an option, then is there a Basic function similar to SYS("aq"), that could be used to query and output the list into an array, along with their molarity and Alk/Mol?

Thanks so much for your help!
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2548
Re: Distribution of alkalinity
« Reply #1 on: September 28, 2021, 06:28:47 PM »
Sorry, there is no function to get the alkalinity of a species.

All I could come up with is to make a lookup table between species name and alkalinity in USER_PRINT or USER_PUNCH. The following program uses brute force to allow you to calculate the alkalinity contribution of each species for the phreeqc.dat database.

The code includes a list of all elements in the periodic table as a means of finding all of the species in the database. I ran the code with the phreeqc.dat database and then edited the Alkalinity Distribution output data block to get the names and alkalinities for all alkalinity species. I  then wrote the USER_PRINT data block using a DATA statement in Basic. Not pretty (or efficient), but it will work if you really need the distribution of alkalinity.
Logged

khwee

  • Contributor
  • Posts: 2
Re: Distribution of alkalinity
« Reply #2 on: September 29, 2021, 09:53:45 AM »
Thanks so much for your help dlparkhurst!

Yes, it is not as elegant as a Basic function, but it certainly will work for my use case.  Really appreciate your help putting this together so quickly.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • USER_PUNCH/USER_GRAPH »
  • BASIC functions »
  • Distribution of alkalinity
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2