How Does H1D Calculate Osmotic Coefficients?

A discussion forum for Hydrus-1D users.
Post Reply
ansleybrown1337
Posts: 4
Joined: Tue Feb 26, 2019 5:36 pm
Location: USA

How Does H1D Calculate Osmotic Coefficients?

Post by ansleybrown1337 » Thu Jun 06, 2019 8:38 pm

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 co-workers 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.

Jirka
Posts: 5268
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: How Does H1D Calculate Osmotic Coefficients?

Post by Jirka » Fri Jun 07, 2019 1:19 am

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, 268-277, 1973.

Pitzer, K. S., Activity Coefficients in Electrolyte Solutions, Chap. 7, CRC Press, Boca Raton, Fl., 1979.

ansleybrown1337
Posts: 4
Joined: Tue Feb 26, 2019 5:36 pm
Location: USA

Re: How Does H1D Calculate Osmotic Coefficients?

Post by ansleybrown1337 » Fri Jun 07, 2019 5:00 pm

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.
Last edited by ansleybrown1337 on Tue Jan 28, 2020 4:10 am, edited 1 time in total.

Jirka
Posts: 5268
Joined: Sat Mar 16, 2002 3:47 pm
Location: USA
Location: Riverside, CA

Re: How Does H1D Calculate Osmotic Coefficients?

Post by Jirka » Fri Jun 07, 2019 5:33 pm

I have done all this some 25 years ago and thus my recollection does not go much beyond what I report in the HYDRUS-1D 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 ion-interaction parameters for the common ion ternary systems, θ, and ψ. The first two columns include the cation-cation or anion-anion ID numbers associated with the ion-interaction parameter, θ, in column three. Subsequent columns include the anion or cation ID number and the triple ion-interaction parameter, ψ, associated with that triple ion interaction.

LAMBDA.DAT - contains the Pitzer ion-interaction 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 neutral-cation or neutral-anion interaction parameterized by the Pitzer λ parameter included in the third column. Subsequent columns are for higher-order neutral interactions.
J.

Post Reply