Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
IPhreeqc error on MATLAB function
Posted Oct 2, 2022, 11:37 p.m. EDT LiveLink for MATLAB Version 6.0 5 Replies
Please login with a confirmed email address before reporting spam
Hi
I'm currently working on COMSOL model which uses MATLAB function node to call IPhreeqc (Phreeqc that can be opened with MATLAB code).
The concept of model is simple, the MATLAB function takes the concentration of various ions from the COMSOL model, and returns fixed concentration calculated by IPhreeqc.
In MATLAB, I wrote a Phreeqc code based on the given information from COMSOL and saved the Phreeqc code as char variable, 'Full_text' in MATLAB. I attached the Full_text.txt, which was created by my code.
Actually, this 'Full_text' works really well if I ran it on MATLAB solely. However, when I tried to use MATLAB function in COMSOL, this 'Full_text' did not worked with error. I captured the error message and attached it.
The error message said that it was unable to open the dump file. The dump file is a kind of data-saving method of IPhreeqc, which saves the information about the result. It is necessary for solving next step calculation.
As you can see on the error message, this error was occurred when IPhreeqc was running (RunString), however, Phreeqc code (Full_text) works really well on MATLAB solely as I mentioned.
Therefore, I guess this problem is originated from COMSOL, but I don''t know how to fix this problem. Please help me with this problem.
I attached the database file for Phreeqc running, too.
Thanks for reading. If you need any more information, please leave me a comment.