PhreeqcUsers Discussion Forum

Please email phreeqcusers at gmail.com with your name and affiliation to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • How does the mineral precipitation considered during transport?
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: How does the mineral precipitation considered during transport?  (Read 18063 times)

Yongqiang

  • Top Contributor
  • Posts: 140
How does the mineral precipitation considered during transport?
« on: 10/06/25 04:27 »
Hi David,

When the PHREEQCRM is coupled for reactive transport modelling, the GetConcentration and SetConcentration functions are applied. I wonder how the precipitated mineral is considered in this case. I am confused that the Getconcentration and Setconcentration methods can still retrieve the element in the precipitated minerals.

Thanks,
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4318
Re: How does the mineral precipitation considered during transport?
« Reply #1 on: 10/06/25 05:24 »
GetConcentrations retrieves only the concentrations in the aqueous phase, and SetConcentrations applies only to the aqueous phase. GetConcentrations does not retrieve element moles or concentrations from other reactants: equilibrium phases, exchange, gas phase, solid solutions, surfaces, or kinetics.

If you use SetConcentrations, then RunCells, and say calcite precipitates, then the concentrations of Ca, C, and O will be less when you use GetConcentrations after RunCells.

If you use BMIPhreeqcRM, then you can use GetValue("equilibrium_phases_moles_Calcite") to retrieve the moles (not concentration) of calcite in each cell, and GetValue("equilibrium_phases_delta_moles_Calcite") to retrieve the change in moles of calcite in each cell that occurred in the RunCells calculation. Other strings can be used to retrieve data related to exchange, surface, etc. A list of the data items that can be retrieved by GetValue for a model system can be obtained by the BMI method GetOutputVarNames.

Alternatively, you can write to selected output using SELECTED_OUTPUT and USER_PUNCH definitions. You will need to use the PhreeqcRM methods related to selected output to select and retrieve the selected output information (SetCurrentSelectedOutputUserNumber, GetSelectedOutput, and related methods).
Logged

Yongqiang

  • Top Contributor
  • Posts: 140
Re: How does the mineral precipitation considered during transport?
« Reply #2 on: 10/06/25 05:28 »
Many thanks, David.
May I ask if the method RM_GetSpeciesConcentrations can do a similar job to retrieve the amount of mineral precipitation?
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4318
Re: How does the mineral precipitation considered during transport?
« Reply #3 on: 10/06/25 16:11 »
RM_GetSpeciesConcentrations returns the concentrations of all aqueous species for all cells. It does not return amounts of mineral precipitation.

If you run RM_GetSpeciesConcentrations and sum all of the Ca species, like Ca+2, CaHCO3+, and others, you will get the same value that is returned for calcium for RM_GetConcentrations.
Logged

Yongqiang

  • Top Contributor
  • Posts: 140
Re: How does the mineral precipitation considered during transport?
« Reply #4 on: 11/06/25 01:49 »
Many thanks, David.
This is indeed a new knowledge to me.
Logged

Yongqiang

  • Top Contributor
  • Posts: 140
Re: How does the mineral precipitation considered during transport?
« Reply #5 on: 13/08/25 07:48 »
Hi David,

I found that only the following arguments are available for GetValue() and SetValue() in the BMI version. Could you please provide more information regarding how to use the methods, such as GetValue() and SetValue()? For example, GetValue("equilibrium_phases_moles_Calcite") to retrieve the moles (not concentration) of calcite in each cell.

Code: [Select]
"ComponentCount", dest: int;
"Components", dest: std::vector< std::string >;
"Concentrations", dest: std::vector< double >;
"CurrentSelectedOutputUserNumber", dest: int;
"DensityCalculated", dest: std::vector< double >;
"ErrorString", dest: std::string;
"FilePrefix", dest: std::string;
"Gfw", dest: std::vector< double >;
"GridCellCount", dest: int;
"Porosity", dest: std::vector< double >;
"Pressure", dest: std::vector< double >;
"SaturationCalculated", dest: std::vector< double >;
"SelectedOutput", dest: std::vector< double >;
"SelectedOutputColumnCount", dest: int;
"SelectedOutputCount", dest: int;
"SelectedOutputHeadings", dest: std::vector< std::string >;
"SelectedOutputOn", dest: bool;
"SelectedOutputRowCount", dest: int;
"SolutionVolume", dest: std::vector< double >;
"Temperature", dest: std::vector< double >;
"Time", dest: double;
"TimeStep", dest: double,
"Viscosity", dest: std::vector< double >.

Quote from: dlparkhurst on 10/06/25 05:24
GetConcentrations retrieves only the concentrations in the aqueous phase, and SetConcentrations applies only to the aqueous phase. GetConcentrations does not retrieve element moles or concentrations from other reactants: equilibrium phases, exchange, gas phase, solid solutions, surfaces, or kinetics.

If you use SetConcentrations, then RunCells, and say calcite precipitates, then the concentrations of Ca, C, and O will be less when you use GetConcentrations after RunCells.

If you use BMIPhreeqcRM, then you can use GetValue("equilibrium_phases_moles_Calcite") to retrieve the moles (not concentration) of calcite in each cell, and GetValue("equilibrium_phases_delta_moles_Calcite") to retrieve the change in moles of calcite in each cell that occurred in the RunCells calculation. Other strings can be used to retrieve data related to exchange, surface, etc. A list of the data items that can be retrieved by GetValue for a model system can be obtained by the BMI method GetOutputVarNames.

Alternatively, you can write to selected output using SELECTED_OUTPUT and USER_PUNCH definitions. You will need to use the PhreeqcRM methods related to selected output to select and retrieve the selected output information (SetCurrentSelectedOutputUserNumber, GetSelectedOutput, and related methods).


Regards,
Yongqiang
« Last Edit: 13/08/25 08:04 by Yongqiang »
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4318
Re: How does the mineral precipitation considered during transport?
« Reply #6 on: 14/08/25 00:04 »
Additional variables for GetValue are controlled by the method AddOutputVariables. You can get information about equilibrium phases, exchange, surface, etc. most information is turned on by default, except for solution species concentrations.
You can see variables available for GetValue with the method GetOutputVarNames.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • How does the mineral precipitation considered during transport?
 

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