Authors:
(1) Pavan L. Veluvali, Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg;
(2) Jan Heiland, Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg;
(3) Peter Benner, Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg.
Table of Links
Spinodal decomposition in a binary A-B alloy
Summary and Outlook, Acknowledgments, Data Availability, and References
Minimum working examples
In the present section, we present some use cases as minimum working examples to illustrate in detail the working prototype of MaRDIFlow.
Methanization Reactor
As a working example within the MaRDIFlow framework, a forward solution that converts CO2 to CH4 as a result of methanization [BHBS21] is illustrated. In general, reactor models are crucial for converting renewable electricity into chemical energy carriers, specifically through carbon dioxide methanation [BHBS21]. In this study, a reactor model was examined through a set of nonlinear partial differential equations (PDEs) for mass and energy balances. The schematic representation of the workflow is provided in Fig. 6, and we write the governing PDEs as
Here, we express the reactor model as a system of ordinary differential equations (ODEs), obtained through the finite volume method applied to the PDE system. Additionally, on states and control we incorporate inequality constraints. Further initialization and model specific details can be found in Ref. [BHBS21]. Workflow description for the methanization reactor model is defined as given below:
• Initialize the system with the given set of governing equations
• Perform a forward simulation with temperature as the input parameter
• Calculate the conversion rates via calculating the change in CO2 mass fraction with time via post-processing
Spinodal decomposition in a binary A-B alloy
As a second example, let us consider a two-dimensional simulation of the Cahn-Hilliard equation [CH58] for an A-B alloy. During spinodal decomposition, when a homogeneous binary alloy is rapidly cooled from a given temperature, the resulting domain consists of a fine-grained structure of two phases, and over time, the fine-grained structure coarsens at the expense of smaller particles. The development of a fine-grained structure from a homogeneous state is referred to as spinodal decomposition, while the coarsening mechanism is often defined as Ostwald ripening.
The schematic representation of the workflow is provided in Fig. 7, and the set of governing equations required to simulate the phase-separation behavior between A-B alloy is given below. At first, we define an order parameter c as the concentration of B atom, and the bulk free energy of the system is defined by
In the above equation, the parameters DA and DB are the the diffusion coefficients of the respective A and B atoms in the system. Lastly, herein, the Cahn-Hilliard equation is discretized by simple finite difference method, 1st-order Euler method is used for time-integration, and for spatial derivatives the 2nd-order central finite difference method is implemented. The workflow for the present use-case is carried out as given below:
• Initialize the bulk free energy and initial local concentration through an inputs object JSON file.
• The initial configuration of the simulation domain as shown in Fig. 7.
• Pass the required simulation parameters to the workflow component.
• Time evolution of local concentration as well as the phase-separation process is captured as an output through simulation images.
• Alongside, concentration for various timesteps is collected as an output as well.
The above workflow can be performed by using MaRDIFlow --config config CH 2D.ini in the root directory terminal, and the resulting output shall be displayed on the screen, similar to Fig. 7. At the end of the workflow, the phase-separated simulation screenshots along with the corresponding equilibrium concentration are collected in the user-defined output directory.
This paper is available on arxiv under CC BY 4.0 DEED license.