PhreeqcUsers Discussion Forum

Conceptual Models => Incorporation PHREEQC in programming languages => Topic started by: Zhaoyang on April 06, 2022, 03:14:37 PM

Title: Concentration Unit in PhreeqcRM
Post by: Zhaoyang on April 06, 2022, 03:14:37 PM
Dear all,

I am a little confused about units when coupling PhreeqcRM with a transport model. The unit of PHREEQC is moles of element in the representative volume. In my transport model, the concentration unit is mass fraction. Therefore, I should set option 3 in RM_SetUnitsSolution. When using RM_SetConcentrations(id, c), the unit of transport model is converted to that of PHREEQC automatically. In opposite, when using RM_GetConcentrations(id, c), the unit of PHREEQC is converted to that of the transport model. This means that the unit of c is always mass fraction (indicated by RM_SetUnitsSolution). In addition, setting tf in RM_UseSolutionDensityVolume as 1 (true) means the unit of c in RM_GetConcentrations(id, c) is converted according to the volume and mass of solution calculated by PHREEQC. Do I understand correctly?
Thanks for your help in advance.

Best regards,
Zhaoyang

Title: Re: Concentration Unit in PhreeqcRM
Post by: dlparkhurst on April 06, 2022, 07:03:08 PM
Yes, you understand correctly.

For mass fraction, the mass of solution is calculated by the product density * solution volume. Again, there are two ways that the density and solution volume are calculated, depending on the value used in the call to RM_UseSolutionDensityVolume.

The mass fraction of each element is calculated by the mass of the element divided by the mass of solution.