modelling a stirred tank reactor

```Dear Sir,

i am using the Phreeqc program to model batch dissolution experiments and
speciation of aqueous equilibria. I would appreciate if you could have
either yourself or on of your students
could have a look into the following problem :

My real interest lies in modelling  open stirred tank reactors to simulate
flow through dissolution experiments. I started with the idea to do several
iterations of a loop that would contain both a kinetic rate and a mixing
operation of the solution resulting from the dissolution and a predefined
"inlet" solution which would mix at constant volume ratios. I did not get
this to work as a mixing function (MIX) may not be part of a rate (KINETICS)
function.

Now in theory I could do sequential steps of rate,mixing  rate,mixing
rate,mixing. Now while this does not appeal to me from a programming
viewpoint (it seems akward !) I stumbled into a larger problem. I can
recover the solution compositon by adding several PUT commands for all
necessary ions but how do I then explain PHREEQC to use these to define a
new solution that will subsequently be used in a KINETICS block.
The following schematic script showing two iterations did not
work !

> **************************************************************************
>
> TITLE
> Solution 1
> Solution 2
> MIX Solution 1   0.2
>     Solution 2   0.8
> Save Solution 3
> Use Solution 3
> KINETIC blabla
> RATE blabla
> -start
> .....
> x=MOL("Ca2+")
> PUT(x,1)
> -end
> Solution 4						THIS IS THE CRUCIAL OPERATION !!!
>    Ca   GET(1)
> MIX
>   solution 1    0.2
>   solution 4    0.8
> END
> Save Solution 5
> USER_PUNCH
> ....
> Use Solution 5
> KINETIC blabla
> RATE blabla
> -start
> .....
> x=MOL("Ca2+")
> PUT(x,1)
> -end
> Solution 6
>    Ca   GET(1)				THIS IS THE CRUCIAL OPERATION !!!
> MIX
>   solution 6    0.2
>   solution 3    0.8
> END
> Save Solution 7
> USER_PUNCH
> ....
> END
>
> **************************************************************************

Now are there more elegant ways to do it ?

How can I define a new solution from previously stored parameters OUTSIDE a
rate function ?

Can one make a DO LOOP to group a MIX and RATE function

with kind regards

Stephan Kohler

"""""""""""""""""""""""""""""""""""""""""""""""""""""
Stephan Köhler       LMTG - UMR CNRS n°5563
Observatoire Midi-Pyrénées Université Paul-Sabatier
38, rue des 36-Ponts   31400 Toulouse
TEL + 33(0) 561557611 FAX + 33(0) 561558138
"""""""""""""""""""""""""""""""""""""""""""""""""""""

```

Complete Water Resources Division Software