The main class from “Chemical” package is called "Substance". It has one chemical connector, where molar concentration and molar flow is presented as usually. An amount of a substance ("solute") is accumulated by molar flow inside an instance of this class. In the default setting the volume is set to one liter, so in this setting the concentration at “mol/L” has the same value as the variable solute at “mol”. But in the advanced settings the default volume can be changed with external input. The molar flow at the port can be also negative, which means that the solute leaves the Substance instance.
Having defined amount of all particles in solution as n(solution)
and mass of solvent as m(solvent). It can be expressed mole
fraction x and molality b as follows:
x = Solute / n(solution) = Concentration · Volume /n(solution)
b = Solute / m(solvent) = Concentration · Volume /m(solvent)
The activity (mole fraction based) can be expressed using
mole-fraction-based activity coefficient gamma as:
2009-2015 by Marek Matejak, Charles University, Prague, Czech Republic