DATABLOCK




Global_variable Experiment$ "Exp01"


Datablock


ExperimentalConditions

-headings ExpNr pH gClay IS mCd

-rowid ExpNr

-start

Exp01        8.5        10        -2        1E-4

Exp02        9.5        10        -2        1E-4

Exp03   8.5        5        -3        1E-5

-end


global_variable ExchangeSiteDensity 0.01 "Site of the exchange site / g clay"

global_variable GramClay @!@<"ExperimentalConditions:gClay:"//@Experiment$>!

global_variable IonicStrength @!@<"ExperimentalConditions:IS:"//@Experiment$>!


END


SOLUTION 1

-pH @!@<"ExperimentalConditions:pH:"//@Experiment$>!

-units mol/kgw

Na @<10^@IonicStrength> charge

Cl @<10^@IonicStrength> 

Cd @!@<"ExperimentalConditions:mCd:"//@Experiment$>!


Exchange 1

 X @<@ExchangeSiteDensity*@GramClay>

 -equilibrate with solution 1








COUNTER

Counter linked to a file


Assume a file saved as 'Input.dat' in the simulation case directory:


       Na                 Cl                CEC

       0.1                0.1                0.5

       0.1                0.1                0.7

       0.01                0.01                0.5

       0.01                0.01                0.7


The counter definition is


       COUNTER file ParVal "Input.dat"


and inline variables could be used as


       solution 1

       -units mol/kgw

       Na @=ParVal:Na

       Cl @=ParVal:Cl


       EXCHANGE 1

       X @ParVal:CEC

       -equilibrate with solution 1



The first inline variable (@=ParVal:Na) includes the value for from the Na column without changing the line number (equal sign). Note that the line counting follows a zero-based index. Thus second line has a line number 1 and the inline variable has the value 0.1. The second inline variable (@=ParVal:Cl) includes the value from the Cl column without changing the line number, i.e. the inline variable has value 0.1 and the line number remains 1. The third inline variable (@ParVal:CEC) includes the value from the CEC column (i.e., 0.7) and change the line number to 2. If the same solution - EXCHANGE block is repeated, the inline variables will be replaced with the values from the third line.