PhreeqcUsers Discussion Forum

Conceptual Models => Incorporation PHREEQC in programming languages => Topic started by: Christinali91 on February 03, 2021, 08:12:41 PM

Title: PhreeqcRM: use RM_RunCells for one element each time
Post by: Christinali91 on February 03, 2021, 08:12:41 PM
Hi David,

In our reactive transport simulation, the domain size is very big with large numbers of grid cells, but the chemical reaction may only occur within a small region which means a few chemistry cells are actually needed for the chemical calculation at each time step. Therefore, I want to perform the Phreeqc calculation for one element each time and do a loop over the needed chemistry cells, which is also more convenient to couple with other modules in the code. I wonder what will be the best way to do it. To me, PhreeqcRM seems to prefer an array input than a single input. Could you give me some hints on this?

Thanks a lot!

Best,
Title: Re: PhreeqcRM: use RM_RunCells for one element each time
Post by: dlparkhurst on February 03, 2021, 09:43:45 PM
I'm not sure what you have in mind. Here are a couple options.

RunCells will not make a calculation for a cell that has saturation of zero. So, you can use SetSaturation to select the set of cells that you want to run at a given time step.

Perhaps you want more than one PhreeqcRM instance, so that you could split the set of cells into multiple groups that could be processed independently.