The simulation of complex multi-component multiphase chemical reaction systems can be carried out by the application of M4Dlib. A thermodynamic database including the necessary information of the system components and the appropriate solution model and parameters is necessary as an input. These databases can be created from publicly available information for pure stoichiometric compounds and the specific knowledge of the solution model of interest. Additional mixing models can be added to the thermodynamic database for properties that are non-linear within the mixture, such as density, thermal conductivity, diffusivity, etc. These properties of the mixture can be called directly from COMSOL by the use of a function defined in the external library. Alternatively, private thermodynamic database files can be requested to M4Dynamics for specific applications based on available literature information.
M4Dlib is available as a dynamic library for Windows or OS X and can be called directly from COMSOL Multiphysics by the use of an “external function”, allowing for maximum calculation speed since no external application has to be called to perform the Gibbs minimization routines. The thermodynamic data necessary to describe the chemical system of interest is loaded by the external library during the initialization of the model, allowing the user to solve for various chemical systems by simply specifying the filename of different thermodynamic databases. In its simplest form of application, M4Dlib can be used as a solution or mixtures material library for thermodynamic and physical properties, for example, heat capacity, enthalpy, entropy, thermal conductivity, density, etc.
M4Dlib can easily be integrated into a custom COMSOL application for specific end-user interfaces, simplifying significantly the simulation of multiphysics problems coupled with solution thermodynamics.