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
»
Conceptual Models
»
Design of conceptual models
»
Duplicating IPhreeqcCOM objects in MatLab
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Duplicating IPhreeqcCOM objects in MatLab (Read 1689 times)
petyr
Contributor
Posts: 2
Duplicating IPhreeqcCOM objects in MatLab
«
on:
March 01, 2017, 01:26:07 AM »
Hello All:
I use iPhreeqc extensively in MatLab and use either MatLabs ODE solvers or COMSOL (ala Wissmeier) to solve time dependent chemistry problems. In my most recent effort, I need to create a separate independent "deep" copy of the IPhreeqcCOM object. Per MatLab copying or equating handles is the equivalent of creating a new pointer to the object. I believe that a 'copy' method has to be written into the object class. Perhaps the 'move' method can achieve this? Thanks in advance if you have any suggestions
Petyr
Logged
Pak
Top Contributor
Posts: 98
Re: Duplicating IPhreeqcCOM objects in MatLab
«
Reply #1 on:
March 06, 2017, 09:01:00 PM »
Hi,
I am not sure if I get your question, but I am not really sure if it is possible to duplicate iPhreeqc objects so I cannot answer.
Anyway, if you want to do a copy of a geochemical state in order to do e.g. a sequential iterative approach, so you can keep values of previous iterations in an iPhreeqc file, you might dump a file before running iPhreeqc and after you can reuse it.
I know that is not the most practical idea, but it might be helpful if you try, I have not had the time to tried but I see it pretty possible. I hope it is helpful.
«
Last Edit: March 06, 2017, 09:09:02 PM by Pak
»
Logged
dlparkhurst
Top Contributor
Posts: 2508
Re: Duplicating IPhreeqcCOM objects in MatLab
«
Reply #2 on:
March 06, 2017, 10:35:16 PM »
In another post I stated that there is no copy operator for an IPhreeqc or a phreeqc object. There are pieces for a phreeqc object, but it is not complete.
But Pak is right, you should be able to use the PHREEQC keyword DUMP (and RunString) to write out the state of an IPhreeqc instance, and then process the dump file or string with a new IPhreeqc instance. It should give the same state provided the same database file is used in creating the new instance.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Design of conceptual models
»
Duplicating IPhreeqcCOM objects in MatLab