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 »
  • Processes »
  • Inverse modelling »
  • Using Iphreeqc modules for inversion
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Using Iphreeqc modules for inversion  (Read 3434 times)

docla

  • Contributor
  • Posts: 6
Using Iphreeqc modules for inversion
« on: 06/03/15 20:58 »
Hello,

I am now writing a PHREEQC code in vba for the interpretation of an experimental batch test. The phreeqc batch test involve several kinetic equations. I want phreeqc to do inversion on this kinetic test: I want to know which kinetic constant reproduce my experimental pH rise. For that purpose, I am using Iphreeqc modules from Excel, which contains my experimental data. I wrote a loop that tests several values of kinetic constant and performs least square optimisation.

My problem is that the output file does not clear itself before rerunning phreeqc in the file, the output data of the current simulation is added to the data of the last simulation in the loop. Is there a function that would empty the output file at the beggining of the loop?
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4034
Re: Using Iphreeqc modules for inversion
« Reply #1 on: 06/03/15 23:32 »
I think the output (OutputFileOn) and selected output (SelectedOutputFileOn) are reopened each time there is a RunFile or RunString. They should have only the results for the last RunFile and RunString calculations. If you are using the most recent IPhreeqc and that is not the case, we would like to see a simple example.

Similarly GetSelectedOutput retrieves results from the last RunFile or RunString.

Now a single RunFile or RunString may generate multiple lines in the selected output file, or output for multiple simulations in the output file.

A new definition of SELECTED_OUTPUT will close the old file and reopen it for writing, so that previous results are erased.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Inverse modelling »
  • Using Iphreeqc modules for inversion
 

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