PhreeqcUsers Discussion Forum

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 »
  • Processes »
  • Reactive transport modelling »
  • COMSOL/IPhreeqc Reactive Transport Modeling - PHREEQC Example 11 Exchange
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: COMSOL/IPhreeqc Reactive Transport Modeling - PHREEQC Example 11 Exchange  (Read 4172 times)

inhee

  • Frequent Contributor
  • Posts: 14
COMSOL/IPhreeqc Reactive Transport Modeling - PHREEQC Example 11 Exchange
« on: 29/11/23 02:06 »
Hello.
I'm modeling PHREEQC Example 11. Tranport and Cation Exchange by COMSOL/IPhreeqc. But I have a problem that there is no exchange influence in my model. (My result is same with no exchange case.)
I found the cause of my problem. I didn't save the molarities of exchange solid each cell, for example KX, NaX, and CaX2. In Phreeqc (code in Example 11), to save molarities of solid privately isn't needed due to auto-mated save in each cell. But, in my model, I calculated chemical reaction each cell separately. So, I need to input molarities of solid component in the cells (KX, NaX, and CaX2).
I don't know how to save these molarities in each cell. I will thank if anyone gives me a solutions. Below code is Phreeqc Example 11 code in IPhreeqc.
Code: [Select]
"SOLUTION 0  CaCl2"
        "units            mmol/kgw"
        "temp             25.0"
        "pH               7.0     charge"
        "pe               12.5    O2(g)   -0.68"
        "Ca               0.6"
        "Cl               1.2"
"SOLUTION 1-40  Initial solution for column"
        "units            mmol/kgw"
        "temp             25.0"
        "pH               7.0     charge"
        "pe               12.5    O2(g)   -0.68"
        "Na               1.0"
        "K                0.2"
        "N(5)             1.2"

"EXCHANGE 1-40"
        "-equilibrate 1"
         "X 0.0011"
"ADVECTION"
        "-cells           40"
        "-shifts          100"
        "-punch_cells     40"
        "-punch_frequency 1"
        "-print_cells     40"
        "-print_frequency 20"   
"SELECTED_OUTPUT"
        "-reset           false"
        "-step"
        "-totals          Na Cl K Ca N(5)"
        "-molalities    KX NaX CaX2 X-"
        "-high_precision true"
        "-distance  true"

Thanks
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4211
Re: COMSOL/IPhreeqc Reactive Transport Modeling - PHREEQC Example 11 Exchange
« Reply #1 on: 29/11/23 05:32 »
First, you should use PhreeqcRM, rather than IPhreeqc. PhreeqcRM is designed to be a geochemical module for a many-celled transport model. Whatever your state of development, you should switch to PhreeqcRM.

In IPhreeqc, the easiest approach is to use the keyword data block RUN_CELLS to run either one cell or a series of cells.

RUN_CELLS is a shorthand for a set of USE and SAVE statements.
Logged

inhee

  • Frequent Contributor
  • Posts: 14
Re: COMSOL/IPhreeqc Reactive Transport Modeling - PHREEQC Example 11 Exchange
« Reply #2 on: 29/11/23 07:22 »
Thank you for replying my question!

I understood that I need to use PhreeqcRM. I didn't know exactly about PhreeqcRM. I am finding how to deal with PhreeqcRM in Matlab.

It may help me to do reactive transport model coupling with COMSOL. I'll try to apply it to my model!

Thank you very much.
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4211
Re: COMSOL/IPhreeqc Reactive Transport Modeling - PHREEQC Example 11 Exchange
« Reply #3 on: 29/11/23 08:30 »
If you use PhreeqcRM and need shared libraries, there is a bug in the CMake files for the version on the web.

As noted in the post https://phreeqcusers.org/index.php/topic,2166.msg7960.html#msg7960,

The cmake build was missing a preprocessor definition (IPhreeqc_EXPORTS) when (BUILD_SHARED_LIBS=ON) was set on Windows builds.

Please use the following hotfix:

https://github.com/usgs-coupled/phreeqcrm/releases/tag/v3.7.3-hotfix
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • COMSOL/IPhreeqc Reactive Transport Modeling - PHREEQC Example 11 Exchange
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2