A worksheet-based tool to implement reactive transport models in COMSOL Multiphysics

Chemosphere. 2021 Mar:266:129176. doi: 10.1016/j.chemosphere.2020.129176. Epub 2020 Dec 3.

Abstract

The increasing needs for modelling of reactive transport phenomena in different areas of environmental modelling have led to the development of many numerical codes. However, many of them suffer from a lack of flexibility, which hinders the adaptation of the codes to new problems. Moreover, in many cases, changes can be done by a very reduced group of people, and often by a single person, the main developer. Implementation platforms based on multiphysics modelling removes these barriers, although until now within that programming environments has been only possible the coupling of geochemical codes to transport equations using operator splitting techniques. This paper presents the EE4MGM tool, a MS Excel worksheet, provided in supplementary material, for the edition and complete implementation of reactive transport models in COMSOL. The tool automatically generates the code needed to solve the desired reactive transport problem by selecting only which species make up the geochemical system. This way, the numerical model will be completely adapted to the idealisation to be applied, being able to choose easily and effortlessly from a wide range of different levels of conceptual complexity. The organization of data input and the equation libraries obtained for the implementation in the multiphysics COMSOL environment are first described. Afterwards, two examples, in one and two-dimensional domains, to check the utility of the tool are presented.

Keywords: COMSOL; Code editor; Geochemical model; MS Excel; Multiphysics simulation; Reactive transport.