Hello H1D Community!
I am trying to learn about the calculation of osmotic pressure in H1D, especially in the case of using UNSATCHEM for solute transport.
What I don't understand is how the osmotic coefficients are calculated (i.e. the 'phi') in the EQUIL.OUT file.
In the H1D manual (p. 96; Section 6.11), it says that, "We use the semiempirical equation of Pitzer [1973] and coworkers to calculate the
osmotic coefficient φ." but I cannot find the Pitzer equation that details this. I can only find Pitzer[1979] activity coefficients detailed on the previous page.
Once I have φ, it should be straightforward to calculate the osmotic pressure, Pφ, with equation 6.46 in the manual.
My ultimate goal is to understand this well enough to implement it in another model in fortran, so any coding advice on this process is appreciated as well (I couldn't find the pitzer calculations in the public source code).
Can someone please help me with calculating φ and understanding this process?
Thanks.
How Does H1D Calculate Osmotic Coefficients?

 Posts: 4
 Joined: Tue Feb 26, 2019 5:36 pm
 Location: USA
Re: How Does H1D Calculate Osmotic Coefficients?
Since we do not share the source code for the UNSATCHEM module and thus you will need to look into original publications of Pitzer (1973, 1979) for details. J.
Pitzer, K. S., Thermodynamics of electrolytes I: Theoretical basis and general equations, J. Phys. Chem., 77, 268277, 1973.
Pitzer, K. S., Activity Coefficients in Electrolyte Solutions, Chap. 7, CRC Press, Boca Raton, Fl., 1979.
Pitzer, K. S., Thermodynamics of electrolytes I: Theoretical basis and general equations, J. Phys. Chem., 77, 268277, 1973.
Pitzer, K. S., Activity Coefficients in Electrolyte Solutions, Chap. 7, CRC Press, Boca Raton, Fl., 1979.

 Posts: 4
 Joined: Tue Feb 26, 2019 5:36 pm
 Location: USA
Re: How Does H1D Calculate Osmotic Coefficients?
Thank you for the quick reply, Jirka!
I'm reading both of these references today, and I'm discovering how big a task this was for you to code up inside of UNSATCHEM!
Since I'm not actually able to get the code however, maybe you could just clarify the purpose of some files that H1D uses for Pitzer expressions, notably BINARYP.DAT, LAMBDA.DAT, TERNARYP.DAT, and COMP.DAT.
They each appear to be databases that store some of the necessary data for calculating Pitzer expressions and osmotic coefficients. Would you be able to clarify the purpose of each of these files for me so I can understand what I'm looking at?
If you aren't comfortable handing out that information, I understand; you have put countless hours into making this work in H1D and UNSATCHEM and it wouldn't be fair to hand me the answer to use! I'm trying to integrate this into another USDA model you might be familiar with for my PhD dissertation project.
I'm reading both of these references today, and I'm discovering how big a task this was for you to code up inside of UNSATCHEM!
Since I'm not actually able to get the code however, maybe you could just clarify the purpose of some files that H1D uses for Pitzer expressions, notably BINARYP.DAT, LAMBDA.DAT, TERNARYP.DAT, and COMP.DAT.
They each appear to be databases that store some of the necessary data for calculating Pitzer expressions and osmotic coefficients. Would you be able to clarify the purpose of each of these files for me so I can understand what I'm looking at?
If you aren't comfortable handing out that information, I understand; you have put countless hours into making this work in H1D and UNSATCHEM and it wouldn't be fair to hand me the answer to use! I'm trying to integrate this into another USDA model you might be familiar with for my PhD dissertation project.
Last edited by ansleybrown1337 on Tue Jan 28, 2020 4:10 am, edited 1 time in total.
Re: How Does H1D Calculate Osmotic Coefficients?
I have done all this some 25 years ago and thus my recollection does not go much beyond what I report in the HYDRUS1D manual, where there is the following text (page 186):
COMP.DAT  contains the species ID numbers, species names, and species charge.
BINARYP.DAT  contains the ID number of each species in each binary interaction considered (e.g., CaHCO3+) and the Pitzer ion interaction parameters β(0), β(1), β(2), and Cφ for binary systems.
TERNARYP.DAT  contains the Pitzer ioninteraction parameters for the common ion ternary systems, θ, and ψ. The first two columns include the cationcation or anionanion ID numbers associated with the ioninteraction parameter, θ, in column three. Subsequent columns include the anion or cation ID number and the triple ioninteraction parameter, ψ, associated with that triple ion interaction.
LAMBDA.DAT  contains the Pitzer ioninteraction parameters for the neutral species, λ and δ. The first column of this file contains the ID number for the neutral species, and the second column the ID number for the cation or anion involved in the neutralcation or neutralanion interaction parameterized by the Pitzer λ parameter included in the third column. Subsequent columns are for higherorder neutral interactions.
J.
COMP.DAT  contains the species ID numbers, species names, and species charge.
BINARYP.DAT  contains the ID number of each species in each binary interaction considered (e.g., CaHCO3+) and the Pitzer ion interaction parameters β(0), β(1), β(2), and Cφ for binary systems.
TERNARYP.DAT  contains the Pitzer ioninteraction parameters for the common ion ternary systems, θ, and ψ. The first two columns include the cationcation or anionanion ID numbers associated with the ioninteraction parameter, θ, in column three. Subsequent columns include the anion or cation ID number and the triple ioninteraction parameter, ψ, associated with that triple ion interaction.
LAMBDA.DAT  contains the Pitzer ioninteraction parameters for the neutral species, λ and δ. The first column of this file contains the ID number for the neutral species, and the second column the ID number for the cation or anion involved in the neutralcation or neutralanion interaction parameterized by the Pitzer λ parameter included in the third column. Subsequent columns are for higherorder neutral interactions.
J.