**1. Introduction**

The importance of chemical process simulators is well-documented, as they are important tools for modelling chemical plants, while providing opportunities for optimization and debottlenecking of existing processes [1,2]. All commercially available process simulators follow the traditional development method, which in almost 100% of cases hides the source code from the end users thus relying on a closed, black-box approach. Open source code software can be a useful tool for development of an integrated process simulator and related simulation model that would be able to serve industrial users in improving their production operations. One of the interesting cases for application of the open source code software in fertilizer industry is ammonia production as the most energy-intensive process which gives the main raw material for different end products. The main energy consumer in ammonia plants is the steam methane reformer (SMR) furnace. In typical SMR furnace approximately 50% of the heat generated by combustion of natural gas in the burners is transferred through the reformer tubes and absorbed by the process gas. This unit presents the primary focus for the operators to minimize their costs in the whole ammonia plant.

The industrial users of any ammonia plant would like to have the ability to rapidly monitor and evaluate the performance of the SMR in its regular operation life in steady-state and dynamic mode. Many models have been created to describe SMR units with varying levels of details [3–5].

Sophisticated simulators have been used to describe the performance of the units with a high accuracy [6]. Nevertheless, many of these take a long time to converge, however, which is impractical

for regular industrial uses and at the same time does not allow for the continuous prediction of process parameters with possibility for their adjustment and improvement to achieve the best available performance. Besides that, a series of catalyst beds within ammonia plants needs simple and practical on-line monitoring of their performance regarding the activity, selectivity, and lifetime.

The one-dimensional heterogeneous numerical model based on the open source code which replicates some of the work of Xu and Froment is proposed and extended to include main process control parameters in a form that is applicable to the vast majority of commercially available industrial SMR catalysts [7–10]. The developed model has been compared with a real top-fired SMR unit from a stand-alone ammonia plant in Petrokemija fertilizer production complex involving a well-defined SMR catalyst. The developed model takes into account reaction kinetic constants, thermodynamic equations of state, heat fluxes, pressure drop, temperature approach to equilibrium, and catalyst properties. The model can be used in continuous monitoring and optimization of the performance of many different SMR catalysts through the application of predictive simulation as shown in Figure 1.

**Figure 1.** Integrated model for continuous monitoring and optimization of the steam methane reformer (SMR) catalyst.

The communication between a discrete model and any distributed control system (DCS) can be achieved by system-function which is compiled as MEX file using C++ language. This digital thread enables the model to access all specific information on each actual process parameter in the closed-loop system. In this way, the operators can directly and rapidly retrieve the necessary process data from the model at the end of each sampling period, which than can be immediately used as the new boundary condition in the optimization scheme.

The model can help operators to safely and securely optimize performance of the SMR catalyst, providing them with rapid, accurate, and predictive simulations. The simulation presents an exact and complete replica of the SMR catalyst, ensuring that users may interact with a control system interface to adjust better performance. It can be also easily used as a basis for implementation of an automatic advanced process (APC) control tool.

Implementation of the predictive simulation model for continuous monitoring and optimization of main process variables during operation of SMR catalyst will have direct economic benefits to industrial users in the range from 2% to 3% of overall energy consumption in running top-fired SMR. Besides that, the model will present a significant opportunity for digital transformation of existing industrial production units according to the goals of Industry 4.0.
