PhreeqcUsers Discussion Forum

Reactive Transport => Reactive Transport Modelling => Topic started by: cyprien on November 06, 2017, 07:16:56 PM

Title: About the representative volume RV in PhreeqcRM
Post by: cyprien on November 06, 2017, 07:16:56 PM
Hi,

I am coupling PhreeqcRM with a finite volume transport solver. I am not sure to well understand what is the representative volume RV we have to specify. Is it the cell volume or is it something different that has to be equal to 1L?

Any light will be appreciated!
Thank you,
Cyprien
Title: Re: About the representative volume RV in PhreeqcRM
Post by: dlparkhurst on November 06, 2017, 07:39:01 PM
PHREEQC works best if the mass of water is within an order of magnitude or two of 1 kg. PHAST uses one liter of aquifer as the representative volume, which results in a saturated water volume equal to the porosity. I think that is the simplest approach, but you can increase the representative volume, perhaps if the porosity is very small and conditions are unsaturated.

PhreeqcRM returns concentrations, so the extent of the representative volume is only important on the chemistry side for determining the amount of reactants (minerals, surfaces, exchangers, etc) available to react with the water in the representative volume.
Title: Re: About the representative volume RV in PhreeqcRM
Post by: cyprien on November 06, 2017, 07:50:19 PM
Thank you for your prompt response.

In my case, I am interested in very fine grid block (in the order of cubic-micrometers), is it still correct to have RV = 1L ?
Title: Re: About the representative volume RV in PhreeqcRM
Post by: dlparkhurst on November 06, 2017, 09:25:16 PM
Think so. Just get the right amounts of reactants.
Title: Re: About the representative volume RV in PhreeqcRM
Post by: Pak on June 13, 2018, 09:17:03 AM
I am going to ask hre my question. Since I think that it is related somehow to this post. If somebody is against, please let me know and I will open a new thread and delete this post.

Does somebody know if the use of RM_SetPoreVolume, RM_SetSaturation, and RM_SetPorosity, has some effect if RM_UseSolutionDensityVolume has not been set?

So far, I have not found any change in using RM_SetPoreVolume, RM_SetSaturation, and RM_SetPorosity with different values (or even not setting RM_SetPoreVolume, RM_SetSaturation, and RM_SetPorosity), if RM_UseSolutionDensityVolume has not also been set.

There is a modification in the values of RM_GetSaturation, but it seem to me that is the only thing that is modified. The calculated concentrations are the same, and the RM_GetDensity and RM_GetSolutionVolume keep giving the same results.


Thank you for your help.
Title: Re: About the representative volume RV in PhreeqcRM
Post by: dlparkhurst on June 13, 2018, 04:21:35 PM
"The volume of water in a reaction cell is the product of porosity, saturation (SetSaturation), and representative volume (SetRepresentativeVolume)."

RV is expected to be set at the beginning of the run and not changed, but if you change the porosity (because of pressure-storage relations) or saturation (for unsaturated systems) you change the volume of water in a cell; so, you also change the ratio of water to other reactants.

The ratio of water to solids may not affect the solution composition when using EQUILIBRIUM_PHASES, but it will affect the amount of the equilibrium phases that dissolve and precipitate. The ratio will have an  effect on the solution when using SURFACE, EXCHANGE, GAS_PHASE,  and perhaps KINETICS (depending on the RATES definition). These latter reactions will attain different solution compositions depending on the amount of water relative to reactants.

I believe the the values from SetSaturation and SetPorosity are used to convert from transport units (often mol/L or mass fraction) to PHREEQC units (mol/kgw). After reaction, the choice set by RM_UseSolutionDensityVolume is used to convert from mol/kgw back to transport units.



Title: Re: About the representative volume RV in PhreeqcRM
Post by: Pak on June 14, 2018, 01:06:36 PM
Indeed, thank you, I have been slow to remember that the solution composition is determined by the solids (so long as there is not disappearence of phases or apperance of new phases). I fully agree that the amount of dissolved or formed solid should change with the amount of water.

How can I see these changes in the amount of dissolution/precipitation?

I have run the attached Phreeqcfile with PhreeqcRM, I have changed the porosity/rv/saturation with the proper methods of RM_interface_C.h:
RM_SetSaturation, RM_SetPorosity,RM_SetRepresentativeVolume

Then after rm_runfile and rm_runcells, I use the command to draw the matrix of selected output: RM_GetSelectedOutput

but independently of the porosity/liquid saturation or representative element volume, I get the same final amount of Calcite : 0.189952482e-3 mol, and Dolomite: 0.004436993e-3 mol.


Thank you
Title: Re: About the representative volume RV in PhreeqcRM
Post by: dlparkhurst on June 14, 2018, 04:21:36 PM
The moles of equilibrium phases should vary with volume of water.

I know of one bug that has not been fixed.

The second is unfortunately a bug. InitialPhreeqc2Module does not multiply by the rv factor as it should. So, until we put out a new release, you should use this method only with rv=1.0. InitialPhreeqcCell2Module works correctly with nonunity rv.

It is possible there are other bugs, but I don't know of any. If you use phreeqc.dat for the database, you should be able to print the function SOLN_VOL, which would tell you the volume of water in a cell.

Title: Re: About the representative volume RV in PhreeqcRM
Post by: Pak on June 15, 2018, 08:14:47 AM
I think there might be a bug.
I can send you the matlab file, libraries and files that I have used if you want.

But I have played setting different porosity, RV and liquid saturation before running the file and the results that I get from SOLN_VOL for the example I am using is always 1.003 L.

Thanks
Title: Re: About the representative volume RV in PhreeqcRM
Post by: dlparkhurst on June 15, 2018, 10:34:56 AM
Sorry, I am not a Matlab user.

There are tests that are distributed with PhreeqcRM that are compiled and run as part of the compilation process for the PhreeqcRM library. There are C++, C, and Fortran versions of a simple advection example. I made modifications to the C++ version of advection to change saturation and porosity and found the resulting solution volume to change accordingly. So, I do not know why you are seeing no changes in solution volume. (I used 12704 that I had already compiled, latest PhreeqcRM is 12927).

Perhaps it is the order that you are making the calls. You should set the rv, saturation, and porosity before you call InitialPhreeqc2Module.

I use the porosity feature in PHAST, and I think the saturation must work because my coauthor Laurin Wissmeier implemented PhreeqcRM in FEFlow. I suppose I could look at your Matlab code and make suggestions for you to run to try to figure out what is going on.