PhreeqcUsers Discussion Forum

Processes => Reactive transport modelling => Topic started by: eeftekhari on October 02, 2016, 10:38:51 AM

Title: Initial condition in PhreeqcRM
Post by: eeftekhari on October 02, 2016, 10:38:51 AM
Dear all,

I guess I have some problems understanding the initialization of a phreeqcRM model.

I'm trying to set-up a surface complexation model in PhreeqcRM, with a specific representative volume for each cell. I first create the following string and run it using the RunString function (in the C interface). Then I run the following sequence to get the initial condition:
Code: [Select]
RM_SetRepresentativeVolume, set porosity, etc
RM_RunString
RM_InitialPhreeqc2Module
RM_SetTime (zero)
RM_SetTimeStep (zero)
RM_RunCells
RM_GetConcentrations

Now the problem is that the initial conditions calculated by phreeqcrm is too large for each cell. When I multiply the calculated concentrations by the representative volume, I get the correct values.
The other issue is the amount of solid in gram (m_solid_in_g). I calculate the amount of solid in each finite volume cell as:
m_solid_in_g = (1-porosity)*(representative volume)*(solid_density in g/L)
But the amount of solid I get from phreeqcrm after running the RunString command is very small, and this time I have to multiply it by a large number to get the right numbers from my simulation. To clarify, I run the same simulation using IPhreeqc and I get the right numbers there.

This is the initial concentrations I get from phreeqcRM:
"H"  "O"  "Charge"  "Ca"  "Cl"  "Mg"  "Na"
2.98038e5  1.49019e5  -0.00041489  0.0  1361.16  0.0  1361.16

and the representative volume is 0.000368155 L, so after multiplying I get the following correct numbers (not sure about charge)
"H"  "O"  "Charge"  "Ca"  "Cl"  "Mg"  "Na"
109.724  54.8621  -1.52744e-7  0.0  0.501119  0.0  0.501119

Fortunately, the RM_InitialPhreeqc2Concentrations command works fine for the "SOLUTION 0" defined below.

I appreciate any hints for solving this issue.

Thanks in advance.

Ehsan

Code: [Select]
SOLUTION 0 injection brine
  temp  25
  pressure  10.0
  -units mol/kgw
  #pH     8.4
  Ba     0.0
  Ca     0.013
  Mg     0.013
  Na     0.527
  K      0.0
  Cl     0.533
  S      0.0
  C(4)   0.0
END

SOLUTION 1-200 initial solution
   temp  25
   pressure  10.0
   -units mol/kgw
   #pH     8.4
   Ba     0.0
   Ca     0.0
   Mg     0.0
   Na     0.507
   K      0.0
   Cl     0.507
   S      0.0
   C(4)   0.0
END

SURFACE 1-200
   #-equilibrate 1
   -sites_units density
   MySolid      2.0      3.0    m_solid_in_g
   #-donnan # uncomment, and see the effect on Charge Balance...
END

Title: Re: Initial condition in PhreeqcRM
Post by: eeftekhari on October 02, 2016, 01:11:14 PM
I just realized that the amount of surface in the phreeqc input string must be in mol surface per liter (RV, water, or rock). So the problem is solved now to some extent! I should have read the documents more carefully.