Basic chemical system definition and equilibrium solver usage example.
int main(int, char *[])
{
chemical_system.
addReaction(
"OH-", -13.997, {
{"OH-", -1},
{"H+", -1},
{"H2O", 1}
});
chemical_system.addReaction("NaCl", -0.3, {
{"NaCl", -1},
{"Na+", AQUEOUS, 1},
{"Cl-", AQUEOUS, 1}
});
chemical_system.addReaction("NaOH", -13.897, {
{"NaOH", -1},
{"H+", -1},
{"Na+", 1},
{"H2O", 1}
});
chemical_system.
addComponent(
"Na+", 0.1*mol/l);
chemical_system.addComponent("Cl-", 0.1*mol/l);
chemical_system.
fixPH(7);
}
void addSolvent(const std::string &name)
void fixPH(double pH, const std::string &h_component_name)
Definition chemmisol.h:31