A phase is a part of a chemical system that contains entities and has a separate mass balances for primary entities.

Or more concrete: each primary entity gets an individual  mass balance for each phase in the system: <entityname>.<phasename>

Example commonly used phases are:

  • “diss”  (dissolved),
  • “ads” (adsorbed),
  • “min” (mineral),
  • “tot” (total),
  • “gas” (gaseous)


Phases can be linked hierarchically  and are defined as follows:

@phase(liter, tot, watervolume)
@phase(diss, liter, 1)
@phase(min, liter, 1)

In this case the  “tot” phase is the parent phase for a liter, gas and min phase.

Once we have defined the phases and their hierarchy, we can define entities in these phases

All primary entities get a separate mass balance in each phase.

A species is a special form of entity that is automatically placed in the “.diss” phase.

So defining Ca+2 as a species and primary entity

@species(Ca+2, 2)
@primary_entity(Ca+2, -9.0, tot, 0.01)

We iterate for a given amount Ca+2.tot of 0.01 mol. Start estimation for Ca+2.logact = -9

This definition automatically defines the following variables for Ca+2

Ca+2.tot, (total amount in system, mol, 
 includes amounts in child phase liter x watervolume)

Ca+2.diss (total amount in diss phase, mol/l)

Ca+2.min (total amount in min phase, mol/l)

Ca+2.liter (total amount in liter phase, 
 includes amounts in diss and liter child phases