PhreeqcUsers Discussion Forum

Mixing => Mixing Solutions => Topic started by: nspanoudakis on February 06, 2018, 11:44:02 AM

Title: Unmixing
Post by: nspanoudakis on February 06, 2018, 11:44:02 AM
Hi to all and thank you for accepting me to the community.
I am very new to phreeqc and I have problem to solve which i cannot by myself (yet).
I have a water sample, let's say solution 1, from a sub thermal spring that emerges a few meters from the coast. There is a sea water (let's say solution 2) intrusion to the spring water.
So if I know the composition of these two waters, is there any way to find out what is the composition of the water that mixes with solution 2 (sea water) and results to the final solution 1?
Thank you in advance,
Nikos
Title: Re: Unmixing
Post by: dlparkhurst on February 06, 2018, 05:52:35 PM
No promises, but here is a suggestion. You do not know the composition of the other water nor the mixing fractions of the two waters, so I do not think there is a unique solution to the problem.

You can mix negative amounts in the MIX keyword, so if you had

MIX
1 1.0
2 -0.1
END

you would create a water that when 0.9 L of it were mixed with 0.1 L of seawater, you would produce solution 1. You could do this calculation with varying ratios to get a range of solution compositions for your unknown solution.
Title: Re: Unmixing
Post by: nspanoudakis on February 07, 2018, 08:04:06 AM
Thank you Mr Parkhurst.
I really appreciate your help.
One more question from a beginner. From my experience in the area the Na+ concentration in the waters never exceeds 30ppm, while my mix contains ~3500ppm Na+. Could I use this difference or fraction and if yes how, to limit calculations? Considering that Na+ in my mix originates "exclusively" from the sea water...?
Thank you in adnvance
Nikos
Title: Re: Unmixing
Post by: MichaelZ20 on February 07, 2018, 09:20:14 PM
See also http://phreeqcusers.org/index.php/topic,471.msg1443.html#msg1443
Title: Re: Unmixing
Post by: nspanoudakis on February 09, 2018, 08:25:43 AM
Thank you also Michael.
It seems it is the same problem.
Nikos
Title: Re: Unmixing
Post by: rfembilejr on December 17, 2018, 12:53:26 PM
Putting a negative number under the MIX keyword does not seem to work.
I am getting the following error:
WARNING: Negative moles in solution for (X element), -5.643732e-07. Recovering...
ERROR: Negative concentration in system. Stopping calculation.


No promises, but here is a suggestion. You do not know the composition of the other water nor the mixing fractions of the two waters, so I do not think there is a unique solution to the problem.

You can mix negative amounts in the MIX keyword, so if you had

MIX
1 1.0
2 -0.1
END

you would create a water that when 0.9 L of it were mixed with 0.1 L of seawater, you would produce solution 1. You could do this calculation with varying ratios to get a range of solution compositions for your unknown solution.
Title: Re: Unmixing
Post by: dlparkhurst on December 17, 2018, 04:13:35 PM
Are you taking out more moles of X with -0.1 of solution 2 than exists in solution 1? That would cause the error that you got.
Title: Re: Unmixing
Post by: rfembilejr on December 17, 2018, 09:10:13 PM
I see. If I understand correctly, I should have all the moles for each element in one solution much higher than the other solution in order for the negative value in the MIX to work. But what if some are higher and some are actually lower?

In the following example, I just want to find out the concentration of elements in a solution that was  mixed with Solution 2 in order to achieve Solution 1. From your given example, I want to create a water that when 0.7 L of Solution 1 were mixed with 0.3 L of Solution 2, I would produce Solution 1.

#Let Solution X be the unknown solution.

SOLUTION 1 FINAL SOLUTION
    temp      9
    pH        11
    pe        4
    redox     pe
    units     ug/l
    density   1
    Al        907
    As        10.4
    Ba        30.8
    Ca        428000
    Cd        0.12
    Co        3.7
    Cr        0.25
    Cu        1.62
    Fe        7
    Hg        0.01
    K         33500
    Mg        614
    Mn        0.1
    Mo        104
    Na        124000
    Ni        1.02
    Pb        1.5
    S         440000
    Sb        39.9
    Si        2290
    Sr        573
    U         0.036
    V         1.36
    Zn        9.01
    -water    1 # kg
SAVE Solution 1
END

SOLUTION 2 #Mixed with solution X to achieve SOLUTION 1
    temp      10
    pH        8
    pe        4
    redox     pe
    units     ug/l
    density   1
    Ca        20.3 mg/L
    Fe        0.08 mg/L
    K         42.5 mg/L
    Mg        13.7 mg/L
    Na        61.9 mg/L
    #S         62.7 mg/L
    Si        2.56 mg/L
    Al        173
    As        45.3
    Ba        361
    Cd        1.31
    Co        0.2
    Cr        0.9
    Cu        1.2
    Hg        0.02
    Mn        0.96
    Mo        1980
    Ni        1.52
    Pb        7.41
    Sb        784
    Sr        365
    U         0.03
    V         2.81
    Zn        5.14
    S(6)      198 mg/L charge
    -water    1 # kg

SAVE Solution 2
END

MIX 1

1 1
2 -0.3

SAVE Solution 3
END

#What is the composition of Solution X?
Title: Re: Unmixing
Post by: dlparkhurst on December 18, 2018, 02:20:57 AM
0.3 of solution 2 still has more Mg than solution 1. Without a negative concentration in solution X, there is no answer to your question.
Title: Re: Unmixing
Post by: rfembilejr on December 19, 2018, 07:36:23 AM
I was a bit slow there. I now got your point.

Quick question, would adding a small amount of Cl e.g. 0.1 mg/L in the solution and making it the charge balance species affect the solution speciation results? I noticed that if I run the code, only the Cl value will be affected and not the other species, so I assume it is fine.