Click here to donate to keep PhreeqcUsers open
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
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 2455 times)
docla
Contributor
Posts: 6
Using Iphreeqc modules for inversion
«
on:
March 06, 2015, 08:58:35 PM »
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
Top Contributor
Posts: 3170
Re: Using Iphreeqc modules for inversion
«
Reply #1 on:
March 06, 2015, 11:32:01 PM »
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