Development of an open-source tool for equation-oriented process simulation in Python computational language

  • H.F.S. de Freitas Federal Institute of Education, Science and Technology of Rio Grande do Norte
  • P.H. Soares Federal Technological University of Paraná (UTFPR)
  • J.E. Olivo State University of Maringá (UEM)
  • C.M.G. Andrade
Keywords: Modeling, Simulation, Equation-oriented simulation, Python, open-source

Abstract

Nowadays, the process modeling and simulation exhibit notable importance, allowing the experimentation between different
process designs and control configurations, as well as quality assurance and process optimization studies. In this sense, the
equation-oriented approach, in which all the equations describing each subprocess are compiled into a single equation set,
stands out as an advantageous approach. The current work focuses on the discussion of a developed tool, SLOTH, that is open-
source and developed in Python computational language. The tool was applied in three different cases of study of industrial
relevance, and the results obtained shown that the tool was able to solve the problems, obtaining values coherent with those
presented in the literature, although some tasks required high computational times. Those aspects will be optimized in future
versions of the tool, which is built collaboratively through the open-source nature of the project.

References

Abel, J. H., Drawert, B., Hellander, A., & Petzold, L. R. (2016). Gillespy: A python package for stochastic model building and simulation. IEEE life sciences letters, 2(3), 35–38. dx . doi . org / 10 . 1109 / LLS . 2017 .

Andersson, C., Führer, C., & Åkesson, J. (2015). Assimulo: A unified framework for ODE solvers. Mathematics and Computers in Simulation, 116(0), 26–43. https://doi.org/ 10.1016/j.matcom.2015.04.007

Azar, A. T., & Vaidyanathan, S. (2015). Chaos modeling and control systems design (Vol. 581). Springer.

Bilke, L., Flemisch, B., Kalbacher, T., Kolditz, O., Helmig, R., & Nagel, T. (2019). Development of open-source porous media simulators: Principles and experiences. Transport in porous media, 130(1), 337–361. dx.doi.org/10.1007/s11242-019-01310-1

Biscani, F., Izzo, D., Jakob, W., Märtens, M., Mereta, A., Kaldemeyer, C., Lyskov, S., Corlay, S., Pritchard, B., Manani, K., Mabille, J., Mia˛sko, T., Huebl, A., jakirkham, hulucc, polygon, Fu, Z., Badger, T. G., Nimier-David, M., . . . Mambrini, A. (2019).

Esa/pagmo2: Pagmo 2.10. https://doi.org/10. 5281/zenodo.2529931

Bomze, I. M. (1995). Lotka-volterra equation and replicator dynamics: New issues in classification. Biological cybernetics, 72(5), 447–453. dx.doi.org/10.1007/BF00201420

Capocchi, L., Santucci, J. F., Poggi, B., & Nicolai, C. (2011). Devsimpy: A collaborative python software for modeling and simulation of devs systems. 2011 IEEE 20th International Workshops on Enabling Technologies: Infrastructure for Collaborative Enterprises, 170–175. dx . doi . org / 10 . 1109 / WETICE .

31

Dahlgren, B. (2018). Pyneqsys: Solve symbolically defined systems of non-linear equations numerically. J. Open Source Software, 3(21), 531. dx.doi.org/10.21105/joss.00531

Dias, M. L., da Silva, L. P., Crossetti, G. L., Galland, G. B., Filgueiras, C. A., & Ziglio, C. M. (2006). Propylene polymerization with nickel–diimine complexes containing pseudohalides. Journal of Polymer Science Part A: Polymer Chemistry, 44(1), 458–466. dx. doi. org/ 10 . 1002/pola.21013

Dowling, A. W., & Biegler, L. T. (2015). A framework for efficient large scale equation- oriented flowsheet optimization. Computers & Chemical Engineering, 72, 3–20. dx. doi. org/10.1016/j.compchemeng.2014.05.013

Ferro, V., De Riva, J., Sanchez, D., Ruiz, E., & Palomar, J. (2015). Conceptual design of unit operations to separate aromatic hydrocarbons from naphtha using ionic liquids. cosmo-based process simulations with multi-component “real” mixture feed. Chemical Engineering Research and Design, 94, 632–647. dx. doi. org/ 10 . 1016 / j . cherd. 2014.10.001

Gowers, R. J., Linke, M., Barnoud, J., Reddy, T. J. E.,

Melo, M. N., Seyler, S. L., Domanski, J.,

Dotson, D. L., Buchoux, S., Kenney, I. M., et al. (2019). Mdanalysis: A python package for the rapid analysis of molecular dynamics simulations (tech. rep.). Los Alamos National Lab.(LANL), Los Alamos, NM (United States). dx . doi . org / 10 . 25080 / Majora - 629e541a-00e

Gunter, D. K., Agarwal, D. A., Beattie, K. S.,

Boverhof, J. R., Cholia, S., Cheah, Y.-W., Elgammal, H., Sahinidis, N. V., Miller, D.,

Siirola, J., et al. (2018). Institute for the design of advanced energy systems process systems engineering framework (idaes pse framework) (tech. rep.). Lawrence Berkeley National Lab.(LBNL), Berkeley, CA (United States).

Hazan, H., Saunders, D. J., Khan, H., Sanghavi, D. T., Siegelmann, H. T., & Kozma, R. (2018). Bindsnet: A machine learning-oriented spiking neural networks library in python. Frontiers in neuroinformatics, 12, 89. dx.doi. org/10.3389/fninf.2018.00089

Hernández-Díaz, W., Hernández-Campos, F., Vargas- Galarza, Z., Rodríguez-Jimenes, G., & García-Alvarado, M. (2020). Coffee grain rotary drying optimization. Revista mexicana de ingeniería química, 12(2), 315–325. http:

/ / www. rmiq . org / ojs311 / index . php / rmiq /

article/view/1475

Hiremath, S., & Tavade, C. (2016). Review paper on inheritance and issues in object oriented languages. International Journal of Advancement in Engineering Technology, Management & Applied Sciences, 2349–3224. dx. doi. org/ 10 . 2139 / ssrn.3451083

Inei-Shizukawa, G., Velasco-Bedrán, H., Gutiérrez- López, G., & Hernández-Sánchez, H. (2020). Statistical approach to optimization of ethanol fermentation by saccharomyces cerevisiae in the presence of valfor® 100 zeolite naa. Revista mexicana de ingeniería química, 8(3), 265–270. http : / / www. rmiq . org/ojs311/index.php/rmiq/article/view/1755

Ingham, J., Dunn, I. J., Heinzle, E., Prenosil, J. E., & Snape, J. B. (2008). Chemical engineering dynamics: An introduction to modelling and computer simulation (Vol. 3). John Wiley & Sons.

Jones, E., Oliphant, T., Peterson, P., et al. (2001). SciPy: Open source scientific tools for Python. http://www.scipy.org/

Keilegavlen, E., Berge, R., Fumagalli, A., Starnoni, M., Stefansson, I., Varela, J., & Berre, I. (2021). Porepy: An open-source software for simulation of multiphysics processes in fractured porous media. Computational Geosciences, 25(1), 243–265. https://doi.org/0.1007/s10596-020-10002-5

Kister, H. Z., Haas, J. R., Hart, D. R., & Gill, D. R. (1992). Distillation design (Vol. 1). McGraw- Hill New York.

Larsen, A. H., Mortensen, J. J., Blomqvist, J., Castelli, I. E., Christensen, R., Dułak, M., Friis, J., Groves, M. N., Hammer, B., Hargus, C., et al. (2017). The atomic simulation environment—a python library for working with atoms. Journal of Physics: Condensed Matter, 29(27), 273002. dx. doi. org/10.1088/1361-648X/aa680e

Lee, J., & Ramirez, W. F. (1994). Optimal fed-batch control of induced foreign protein production by recombinant bacteria. AIChE Journal, 40(5), 899–907. dx . doi . org / 10 . 1002 / aic .

Luyben, W. L. (1989). Process modeling, simulation and control for chemical engineers. McGraw-Hill Higher Education.

Medina-Leaños, R., Segovia-Hernandez, J., & Felix- Flores, M. (2020). Dynamic behavior of thermally coupled reactive distillation sequences for different operating conditions. Revista mexicana de ingeniería química, 10(1), 147–160. http://www.rmiq.org/ojs311/ index.php/rmiq/article/view/1640

Mendoza, D., & Riascos, C. (2020). Methodology for design, analysis and thermodynamic optimization of distillation columns with internal heat exchangers. Revista mexicana de ingeniería química, 14(2), 523–542. http:

/ / www. rmiq . org / ojs311 / index . php / rmiq /

article/view/1285

Meurer, A., Smith, C. P., Paprocki, M., Cˇ ertík, O., Kirpichev, S. B., Rocklin, M., Kumar, A., Ivanov, S., Moore, J. K., Singh, S., Rathnayake, T., Vig, S., Granger, B. E., Muller, R. P., Bonazzi, F., Gupta, H., Vats, S., Johansson, F., Pedregosa, F., . . . Scopatz, A. (2017). Sympy: Symbolic computing in python. PeerJ Computer Science, 3, e103. https://doi.org/10.7717/peerj-cs.103

Johansson, F. et al. (2013). Mpmath: A Python library for arbitrary-precision floating-point arithmetic (version 0.18) [http://mpmath.org/].

Nikolic´, D. D. (2016). Dae tools: Equation-based

object-oriented modelling, simulation and optimisation software. PeerJ Computer Science, 2, e54. dx. doi. org/ 10. 7717 / peerj- cs.54

Ochoa, S. (2016). A new approach for finding smooth optimal feeding profiles in fed-batch fermentations. Biochemical engineering

journal, 105, 177–188. dx.doi.org/10.1016/j. bej.2015.09.004

Ogunnaike, B. A., & Ray, W. H. (1994). Process dynamics, modeling, and control (Vol. 1). Oxford University Press New York.

Pfenninger, S., DeCarolis, J., Hirth, L., Quoilin, S., & Staffell, I. (2017). The importance of open data and software: Is energy research lagging behind? Energy Policy, 101, 211–215. https:

//doi.org/dx.doi.org/10.1016/j.enpol.2016. 11.046

Rocha, M., Mendes, R., Rocha, O., Rocha, I., & Ferreira, E. C. (2014). Optimization of fed-batch fermentation processes with bio- inspired algorithms. Expert Systems with Applications, 41(5), 2186–2195. dx.doi.org/ 10.1016/j.eswa.2013.09.017

Sánchez-Vargas, J., & Valdés-Parada, F. (2021). Multiscale modeling of a membrane bioreactor for the treatment of oil and grease rendering wastewaters. Revista Mexicana de Ingeniería Química, 20(2), 911–940. dx.doi. org/https://doi.org/10.24275/rmiq/Fen2368

Schwaab, M., Biscaia Jr, E. C., Monteiro, J. L., & Pinto, J. C. (2008). Nonlinear parameter estimation through particle swarm optimization. Chemical Engineering Science, 63(6), 1542–1552. dx.doi.org/10.1016/j.ces.

11.024

Shacham, M., & Brauner, N. (2017). Solving a system of nonlinear algebraic equations you only get error messages—what to do next? Chemical Engineering Education, 51(2), 75–82.

Soares, R. d. P., & Secchi, A. (2003). Emso: A new environment for modelling, simulation

and optimisation. Computer aided chemical engineering (pp. 947–952). Elsevier. dx.doi. org/10.1016/S1570-7946(03)80239-0

Tian, Y., Demirel, S. E., Hasan, M. F., & Pistikopoulos, E. N. (2018). An overview of process systems engineering approaches for process intensification: State of the art. Chemical Engineering and Processing- Process Intensification, 133, 160–210. dx . doi.org/10.1016/j.cep.2018.07.014

Tsay, C., Pattison, R. C., & Baldea, M. (2017). Equation-oriented simulation and optimization of process flowsheets incorporating detailed spiral-wound multistream heat exchanger models. AIChE Journal, 63(9), 3778–3789.

Tulsyan, A., & Barton, P. I. (2016). Perks: Software for parameter estimation in reaction kinetic systems. Computer aided chemical engineering (pp. 25–30). Elsevier. dx . doi . org/10.1016/B978-0-444-63428-3.50009-6

Tummers, B. (2006). Datathief iii. https : / / datathief . org/

Westerberg, A. W., Abbott, K., Allan, B., et al. (1994). Plans for ascend iv: Our next generation equational-based modeling environment. Carnegie Mellon University, Engineering Design Research Center.

Wu, W., Henao, C. A., & Maravelias, C. T. (2016). A superstructure representation, generation, and modeling framework for chemical process synthesis. AIChE Journal, 62(9), 3199–3214. dx.doi.org/10.1002/aic.15300

Published
2021-08-12
How to Cite
de Freitas, H., Soares, P., Olivo, J., & Andrade, C. (2021). Development of an open-source tool for equation-oriented process simulation in Python computational language. Revista Mexicana De Ingeniería Química, 20(3), Sim2338. https://doi.org/10.24275/rmiq/Sim2338
Section
Simulation and control