A new, free Modelica library for electrochemical processes has been released - accessible as ""Chemical"" at https://www.modelica.org/libraries. It is based on equilibrating the electrochemical potentials of the substances involved, following the modern theories of physical chemistry.
It dynamically solves the chemical equilibration of homogeneous chemical solutions with fully thermodynamic states, supported also through thermal, mechanical, electrical and fluid components of Modelica Standard Library 3.2.1. Even the complex processes can be composed from only a few base components, such as a component for the chemical solution, a component for the chemical substance or a component for the chemical reaction.
Behind these components are fundamental laws of thermodynamics and physical chemistry. The library was designed to be very intuitive and easy to use.
This paper shows how the library can be used to implement the examples of a lead-acid battery, a hydrogen burning and a chloride shift of human red blood cells.