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
»
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 5341 times)
petyr
Contributor
Posts: 2
Duplicating IPhreeqcCOM objects in MatLab
«
on:
01/03/17 01:26 »
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: 100
Re: Duplicating IPhreeqcCOM objects in MatLab
«
Reply #1 on:
06/03/17 21:01 »
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: 06/03/17 21:09 by Pak
»
Logged
dlparkhurst
Global Moderator
Posts: 4213
Re: Duplicating IPhreeqcCOM objects in MatLab
«
Reply #2 on:
06/03/17 22:35 »
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