Jump to content
Geochemist's Workbench Support Forum
mcma

Simulating the mixing of 2 fluids in React using pickup

Recommended Posts

I apologize in advance: I am far from familiar with GWB.

 

The mix I'm trying to model is supersaturated in several Ca phosphate phases. Fluid A & B seem to equilibrate ok independently, but using pickup>reactants>Fluid A to react with Fluid B is not working for me. The popup-error seems to suggest the components need to be the same on both solutions -not sure if this is the case-.

 

Modeling the solution as a single event is confusing because it looks like I can't choose CO3--, CH3COOH- and H+ simultaneously. (I am also confused by the requirement of equilibration with O2 for only 1 of the 2 fluids above.)

 

Loading the fluid scripts one after the other and then running the equilibration, produces results albeit including several warnings of charge imbalance (which I expect) and the elimination of CO3-- from the basis; I am not sure this represents the mix I want.

 

I haven't considered modifications to the default activities calculation, but this may be important for this example.

 

Input is appreciated!

MC

 

 

FluidA.rea

FluidB.rea

Share this post


Link to post
Share on other sites

Hi MC,

 

In a React model, the fluid defined on the Basis pane is the starting point for your calculation. Any reactant added to the initial fluid must already exist in some non-zero quantity. Imagine a simple experiment in which you add table salt (Halite, or NaCl) to a glass of pure water. If you were to simulate this with a thermodynamic model, the following input:

 

H2O = 1 free kg

react 100 grams Halite

 

would result in an error because neither Na+ nor Cl- exist in the initial system. In a thermodynamic model you can have very small numbers, but no zeroes. Specifying a small amount of Na+ and Cl- in the Basis fixes the problem:

 

H2O = 1 free kg

Na+ = 1 nmolal

Cl- = 1 nmolal

react 100 grams Halite

 

In your example, Fluid A has K+ and HPO4--, which you then pick up to use as a reactant. You then load Fluid B into the Basis. Since Fluid B is the starting point for the calculation, it must include K+ and HPO4- components, even if they're set to very small values.

 

As for HCO3-, CH3COO-, O2(aq), etc., I think you need to think about whether acetate should be in equilibrium with inorganic carbon or whether they need to be decoupled. The Redox disequilibrium section in the Using SpecE8 chapter of the GWB Essentials Guide should be helpful here.

 

Regards,

 

Brian Farrell

Aqueous Solutions

Share this post


Link to post
Share on other sites

Thank you Brian,

I thought about the decouple choice; I"ll try that and will also include the same species in both solutions.

MC

Share this post


Link to post
Share on other sites

As I read and get further familiar with the way the models are made in GWB, I also would like to play with different thermodynamic datasets. Since I did this same model in Visual Minteq, I thought it would be a good idea to use that one first. (One good reason is that I am more interested in the saturation of different forms of tricalcium phosphate (including amorphous) instead of only whitlockite.)

The conversion code was written by Daniel Saalfeld and Craig Bethke and is available from the VM webpage. Running the example in SpecE8 produces an error that reads 'SpecE8 stop:set_basis: lost orig basis', and the program closes.

The only suspicious thing I am doing is reading this VM file from a folder outside the GWB folder, where the default thermo file lives (I had to modify the VM data base to change 'acetate' by CH3COO, but I don't have adm privileges yet in this machine to save this modified file on the GWB folder).

 

MC

Share this post


Link to post
Share on other sites

Well, you can use whichever has acetate among the 2 I sent earlier. The problem arrises when changing the thermodynamics database to be the thermo_minteq. Using the regular thermo works ok.

Share this post


Link to post
Share on other sites

That problem arises because not all thermo datasets use the same set of basis species. Thermo.tdat, for example, writes reactions in terms of HCO3- but themo_minteq.tdat writes them in terms of CO3--. Either format is fine, but the SpecE8 input you prepare needs to be consistent with the contents of the thermo dataset. So when thermo.tdat is loaded, you would add HCO3- to the basis, then swap it out for acetate, if that's what you want. And when thermo_minteq.tdat is loaded, you add CO3-- to the basis, then swap in acetate. Both datasets use many of the same basis species, like H2O, O2(aq), H+, and Ca++, so if you simply delete the HCO3-/CO3--/acetate entry, then change the thermo dataset, then add the carbon back in, you should be ok. If you run into similar issues in the future, though, you might try starting with a clean slate, loading your thermo dataset, then building up the basis.

 

Regards,

Brian

Share this post


Link to post
Share on other sites

Ok- I actually tried that (i.e., start all over with the alternate thermo file) initially, but no menu appeared...maybe there is something wrong with my file. I'll try again. Thanks, Brian!

Share this post


Link to post
Share on other sites

I am experimenting with the same mixing model in v.10 using pickup. In this case, TDS and density are choices in the basis. These remain undefined when AUTO is selected, and this prevents the mixing to occur. I am not sure what happened in v.6 with these variables, but this was not a problem.

Share this post


Link to post
Share on other sites

Without density and TDS defined, attempts to do the mix shows: 'the residual is too large'. These variables are ??? after running the first solution and pickup the fluid as reactant.

If I define density and TDS as 1 and 0 respectively, the mix proceeds ok.

If images would still be useful, I'll switch computers. Let me know. Thanks!!

 

(Also - only if I input TDS and density from the first solution output, I can reproduce the results I get in v.6.)

Share this post


Link to post
Share on other sites

Can you give me the exact scripts that you're using for this calculation? It sounds like thermo data, Basis species, etc. have been changed from the original scripts that you attached and I'd like to make sure I'm looking at the same thing you are. Also, are you picking up the entire system or only the fluid fraction to put in the Reactants pane?

 

Thanks,

Brian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×