In my COMSOL - PHREEQC Coupling using Matlab Interface, how to update solution for next time step??

I'm currently trying to use COMSOL - PHREEQC Coupling using Matlab Interface for reactive transport modeling. I'm trying Wissmeier & Barry (2011) approach for this. Currently, I'm facing the issue of solution from phreeqc is not being updated in comsol and the transport is not evolving in my simulation. I'm trying to simulate example 11 of phreeqc manual (Cation exchange). Can anyone help me with this?

답변 (1개)

Isha
Isha 2026년 3월 20일
Hello,
The Wissmeier & Barry coupling requires you to manually pass PHREEQC results back into COMSOL each time step.
If the LiveLink script does not write updated concentrations back into COMSOL variables, the transport field will stay frozen. The interface is strictly sequential noniterative (SNIA) and depends on this manual update. https://infoscience.epfl.ch/server/api/core/bitstreams/fc290fdf-3638-4cd3-a010-6c0e55a0e59c/content
For Example 11, exchange reactions must be updated consistently. Example11 relies on EXCHANGE blocks; ignoring exchange states or only applying SOLUTION_MODIFY can cause no evolution or oscillations. Some users must also use EXCHANGE_MODIFY depending on how they rebuild each cells state.
Ensure your loop does this every time step:
  • COMSOL; PHREEQC ; read SelectedOutput ; overwrite COMSOL species fields; next step.
  • Explicitly update both SOLUTION and EXCHANGE states for Example11.
  • Reduce time step if results oscillate (known for Example11).
  • Consider using an existing stable interface such as iCP.
Hope this helps.

댓글 수: 1

So, to update the results back to COMSOL, is it better to use solution vector (U) or create a text file and update using interpolation function.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Nonlinear Control에 대해 자세히 알아보기

제품

릴리스

R2024b

질문:

2026년 3월 16일

댓글:

2026년 3월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by