Ceat 201700455
Ceat 201700455
Governing equations of flow processes in chemical reactor modelling are often complicated, non-
linear and coupled. For complex geometries, analytical solutions are not possible and numerical
modeling is required to reproduce and analyze the flow. Moreover, the deviations from ideal flow
configuration in chemical reactors may lead to inefficiency of the system and prevent the reactors
from scaling up due to the lack of understanding in the nature of the mixing and flow field.
Computational Fluid Dynamics (CFD), traditionally a design tool in aerospace engineering [1], has
been exploited in the environmental [2] and chemical [3] engineering fields. Considering the central
role played by reactors in chemical process industries, there is a tremendous potential on applying
computational flow-modeling tools to improve reactor engineering.
In this work, the system of partial nonlinear differential equations that describes momentum and
mass transport was solved numerically for an annular reactor using a finite volume method. Aside
from the ANSYS® Inc. package [4], one of the most widely used software in CFD modelling [5], the
open source software OpenFOAM® [6] was evaluated. One example of the scaling up effort using
Received: August 03, 2017; revised: February 06, 2018; accepted: May 16, 2018
This article has been accepted for publication and undergone full peer review but has not
been through the copyediting, typesetting, pagination and proofreading process, which
may lead to differences between this version and the final Version of Record (VOR). This
work is currently citable by using the Digital Object Identifier (DOI) given below. The final
VoR will be published online in Early View as soon as possible and may be different to this
Accepted Article as a result of editing. Readers should obtain the final VoR from the
journal website shown below when it is published to ensure accuracy of information. The
authors are responsible for the content of this Accepted Article.
OpenFOAM® can be found in [7]. Under the license of open source, OpenFOAM® is free for the
general use to study, distribute and modify. It provides an alternative to closed source CFD packages.
Since the source code of OpenFOAM® is open to the public, it is an advantage to not only use the
built-in codes at their full potential, but also to create and modify solvers for customized
applications. On the other hand, ANSYS® Fluent includes a fully developed GUI's (Graphical User
Interface) and support systems to make easier the setting-up of the simulations, especially for first
users. Basic process such as the 3-D CAD geometries design and meshing are more automated in
ANSYS® Fluent than in the basic interface of OpenFOAM®, which decreases the number of
uncertainties for first users who can focus more in learning. OpenFOAM®, can be also installed with
third party GUI such as HELIX [8], and the number of GUI interfaces developed for OpenFOAM® is
increasing quickly [9]. Some other software as SALOME [10] could be also used as a more automated
alternative mesher for OpenFOAM®.
The selected geometry of the annular reactor was typical in many applications of chemical
engineering processes and has been extensively studied especially for photoreactors [11]. Despite its
success and wide applications, mass transport could be limited due to suboptimal kinetics, operating
conditions, and geometrical design.
OpenFOAM® has been used to resolve the fluid dynamics for different applications in chemical
engineering, including the modeling of bubbling fluidized bed [12], continuous gravity settler [13],
electrochemical cells [14] and microreactors [15]. ANSYS® Fluent has also been applied to various
chemical reactors including a series of studies on annular reactors [11,16,17] in which the inlet and
outlet port configurations, and the internal accessories were found important in improving the mass
transport performance of the reactor. Attempts to compare the two CFD codes have been limited,
but include work related to incompressible turbomachinery [18], and industrial aerodynamics
[19,20]. In the chemical engineering field, both software have been evaluated in the heat transfer
modelling of packed-bed reactors [21],for bench-scale anaerobic gas-lift digesters [22] and gas-solid
fluidized bed hydrodynamics [23]. In this work, a comparison of both programs for the modeling of
hydrodynamics in a tubular reactor and in an annular reactor with high turbulent mixing was carried
out. The results were validated against experimental observations, including the residence time
distribution (RTD) curve derived from a pulse-response experiment and a tracer transport
experiment using methylene blue. The discrepancy of the comparison is further analyzed, confirming
the relevance of the CFD modelling and the potential of open source software package for the
chemical reactor engineering field.
2. Computational Modeling
2.1. Geometry
2.1.1. Ideal tubular reactor
For the comparison of both programs, a test was performed for the simplified geometry of a tubular
reactor. The dimensions of the pipe are 0.05 m in diameter and 4.5 m in length. The modelling for
this reactor was performed in both laminar and turbulent regimes. The model is divided in three
zones: inlet, outlet and the wall.
angled at approximately 45 degrees to the main reactor body. The reacting volume is 1.91·10-4 m3.
The model includes a detailed description of the reactor inlet and outlet tubes, as they have a great
impact on the flow pattern. The design of the geometry is generated using an open source software,
FreeCAD [24] along with SALOME [10] in order to refine the definition of surfaces. The model was
imported into OpenFOAM® and ANSYS® meshing.
The model has several parts: fluidCylinder, the annular region and the core of the reactor; fluidInlet,
fluidOutlet: inlet and outlet surfaces and fluidRefinement, inlet and outlet cylinders. The
fluidRefinement patch is used to smoothen the transition from the inlet and outlet cylinders mesh
since the diameter is much smaller than the annulus and therefore different mesh resolutions are
needed. As inlet and outlet surfaces are not part of the wall, those did not require mesh refinement.
A scheme of the model is shown in Figure 1.
2.2. Meshing
2.2.1. Ideal tubular reactor
The tubular body was simulated as an axis-symmetric 2D model, large enough to capture the
developed velocity profile. Since the geometry is simple, blockMesh, a mesh generator of
OpenFOAM® was employed, which allows the creation of structured mesh. Also the patches were
created by blockMesh itself. For OpenFOAM®, a slice of the tubular reactor was generated, with 5000
cells, and a cyclic condition was set for the revolution planes.
In comparison, ANSYS® Fluent only requires a completely flat body and the indication of the axis of
revolution for the 2D simulation. The same number of cells, 5000 was used for ANSYS® Fluent
simulations. Figure 2 shows the generated meshes.
In the central section of the cylinder, x = 39·10-3 m and Rex = 1250 (U = 3.34·10-2 m s-1), the calculated
boundary layer has a thickness of 𝛿 ≈ 5.3 · 10−3 m, which is well captured by our refined mesh. The
range of Y+ recommended for using standard wall functions with 𝑘 − 𝜖 methods is between 30 and
60, leading to an estimation of the boundary layer thickness of 3.3·10-3 to 7·10-3 m, in agreement
with previous calculation.
ANSYS® Fluent uses tetrahedral cells. The surfaces of the model were refined using the Face Sizing
tool, available in ANSYS® Meshing, with the addition of inflation layers for the boundary layer near
the walls.
The final mesh has a size of around 5.1·105 cells, to allow comparison with equivalent mesh in
OpenFOAM.
Both meshes are accepted by the mesh quality checkers on each respective software. In spite of
differences (Figure 3), they constitute the optimal approach for each respective software in order to
provide high quality and mesh-independent results.
where 𝜌, 𝑈, P, 𝜏 and 𝑔 are fluid density, velocity vector, pressure, viscous stress tensor and
gravitational acceleration, respectively. These equations, combined with Newton’s law of viscosity as
a constitutive equation to relate the stress tensor to the motion of the continuous fluid, allow
computing the velocity field within the reactor. The solver simpleFoam, from the OpenFOAM® package
was employed. It is a steady-state solver for incompressible, turbulent flow, but the turbulence type
can be set to off for a laminar modelling. simpleFoam uses the SIMPLE (Semi-Implicit Linked Equations)
algorithm, which is also used by default in ANSYS® Fluent. The algorithm is essentially a guess and
correct procedure for the coupled calculation of pressure and velocity. More details about the
SIMPLE algorithm can be found elsewhere [28,29]..
The model constants specified both in OpenFOAM and ANSYS Fluent are the following: 𝐶μ =
0.09, 𝐴0 = 4, C2 = 1.9, σk = 1 𝑎𝑛𝑑 σε = 1.2. Further details of the realizable 𝑘 − 𝜖 model can be
found elsewhere [32].
There are also several parameters needed in both OpenFOAM® and ANSYS® Fluent. The turbulent
intensity, 𝐼 can be estimated by:
1
𝑈′ −
𝐼= = 0.16Re𝑑 3 [Eq. 7]
𝑈𝑎𝑣𝑔 ℎ
2 2
The turbulent energy k [𝑚 𝑠 ] is defined in [Eq. 8].
3
𝑘 = (𝑈𝐼)2 [Eq. 8]
2
where 𝑈 is the free stream velocity and I is the turbulence intensity. The turbulence dissipation,
𝜖 [𝐽/(𝑘𝑔 𝑠)], is the rate at which turbulence kinetic energy is converted into thermal internal energy.
The equation used in OpenFOAM® is [Eq 9].
3
𝑘2 [Eq. 9]
𝜖 = 𝐶𝜇
𝑙
where 𝑘 is the turbulent energy, 𝑙 is the turbulent length scale and 𝐶𝜇 is a turbulence model
constant, which usually has a value of 0.09. Some other CFD codes, like ANSYS Fluent, Phoenics and
CFD-ACE for example, use a different length-scale definition based on the mixing-length, and the
equation, [Eq. 10], is therefore different
3
3 2
𝑘 [Eq. 10]
𝜖= 𝐶𝜇4
𝑙
where 𝐶𝜇 is a turbulence model constant, which has a value of 0.09. The turbulent length scale can
be estimated for fully developed flows as 𝑙 = 0.038 𝐿 (OpenFOAM®), and when the definition is
based in the mixing length (ANSYS® Fluent) as 𝑙 = 0.07 𝐿, 𝐿 [m], being the relevant dimension, which
in this case is equal to the pipe hydraulic diameter 𝑑ℎ .
Additional parameters set in both software are summarized in Table 1.
The residence time distribution has been calculated from the experimental curve and from the
𝑑 𝐶(𝑡)/𝐶
0
outcomes of the modelling, as 𝐸(𝑡) = , where 𝐶(𝑡) and 𝐶0 are the outlet and inlet
𝑑𝑡
concentrations respectively. The mean residence time can be obtained as the first moment of the
distribution:
∞
𝑡𝑟 = ∫0 𝑡 𝐸(𝑡)𝑑𝑡 [Eq. 13]
The variance is the second central moment:
∞
𝜎 2 = ∫0 (𝑡 − 𝑡𝑟 )2 𝐸(𝑡)𝑑𝑡 [Eq. 14]
Finally, the number of equivalent tanks in series can be calculated as [34]:
𝑡𝑟 2
𝑁= [Eq. 15]
𝜎2
Table 2 lists the numerical schemes used on both software [18]. The procedure to establish the
interpolation methods in both software is different and this step could introduce a significant
uncertainty, especially for novice users. While ANSYS® Fluent has an interface in which first order or
second order interpolation schemes can be easily assigned to the turbulence and momentum
equation, in OpenFOAM® interpolation methods can be assigned to pressure and momentum
gradients, Laplacians, interpolations schemes and divergence operators, procedures which are
accessible to more experienced users.
The computer used for the simulations has two Intel Xeon processors with 2.40 GHz (16 cores each)
and 64 GB of RAM. Preliminary simulations showed that 5 processors are the optimal to run
OpenFOAM®, while in ANSYS® Fluent, 6 processors were found to be optimal. A number of 5
processors is used in both software for comparison.
3. Results
In Table 3 and Table 4, the maximum velocities at outlets are compared, for both laminar and
turbulent flow. The absolute values obtained for the turbulent flow are similar, with less than 3.6%
difference between the two software (instead of the 0.7% obtained with the laminar flow), so both
the simulation results are satisfactory. Compared with theoretical values, for developed flow, all
simulations have a difference lower than a 4.5% (Table 3). Table 4 shows the relative error of the
averaged values in the outlet surface, instead of maximum values, using the theoretical value as a
reference, demonstrating that the discrepancy of the simulation is very small, with a relative error
between 10−4 and 10−7.
other two planes, the flow shows similar behavior of the velocity magnitude with minimal differences
between both software.
To quantify the difference, the velocity profiles along the x axis are plotted in Figure 8 at different
distances from the inlet. The reactor is not symmetrical, as the inlet is located in the left side, and
outlet in the right side (see Figure 1). Therefore, different velocity values are obtained in the z
direction for both sides of the annular geometry as it can also be observed in Figure 7. Due to the
short length of the reactor, fully developed flow is not achieved.
The differences between the plots obtained with both software are attributed to various reasons.
First, the transition area may dominate the computational domain, so the results are highly sensitive
to numerical errors and significant difference can emerge. Second, the addition of the induced
rotation on the inlet and outlet can produce slightly different results due to the error accumulation
through the flow entrance to the main cylinder and internal differences in the solvers
The value of some representative magnitudes obtained from both software were averaged in the
reactor volume and summarized in Table 5.
With the exception of pressure, the differences of the parameters are less than 5%. The larger
differences with pressure may be related to the differences in the mesh resolution and mesh shape
near the wall and inlet. Morover, although the algorithm implemented is the same in both programs,
ANSYS® Fluent calculates explicitly the velocity flux in the cell faces, and the pressure implicitly in the
cell center, while OpenFOAM® solves first explicitly for the velocity in the cell center and the pressure
explicitly in the cell faces. This difference in the calculation procedure explains some differences
found between solvers. As ANSYS® Fluent calculates the velocity fluxes in the cell faces, the
adaptation is better with non-orthogonal meshes, while OpenFOAM® has more problems with non-
orthogonality, as the velocity flux has to be interpolated from cell center to faces. To deal with that,
OpenFOAM® includes a non-orthogonal corrector feature, inside the SIMPLE algorithm. Additionally,
this difference explains the higher memory consumption and also the longer calculation time of
simulation with ANSYS® Fluent, as the 3 velocity equations are solved in cell faces. The OpenFOAM®
numerical scheme reduces calculation time and memory consumption but could experience difficult
with convergence.
The volume is also compared since the meshing uses polyhedral cells, and these are different in the
two meshes.
4. Conclusions
The comparison of fluid mechanics and mass transport model predictions of OpenFOAM® and ANSYS®
Fluent requires not only a deep understanding of the fundaments of the available physical and
mathematical methods, but also of the details of their implementation. A careful analysis of both
software was made in order to make the simulation models as comparable as possible. Predictions of
the flow field in a real annular reactor, with a complex laminar-turbulent regime, showed differences
of less than 12.5% when comparing simulations with experimental data. For the species transport,
both qualitative representations of the distribution of a tracer and quantitative analysis of the RTD
curves show good agreement between the experimental data and the predictions of both software.
The successful implementation of the model on the open source software OpenFOAM® proves that
OpenFOAM® can be a useful tool for simulating chemical reactors, with a predictive power
comparable to that of ANSYS® Fluent.
Acknowledgments
The authors gratefully acknowledge the financial support of the Spanish Ministry of Economy and
Competitiveness (MINECO), in the frame of the collaborative international consortium
WATERJPI2013−MOTREM of the Water Challenges for a Changing World Joint Programming Initiative
(Water JPI) Pilot Call. J. Marugán would like to acknowledge MINECO for the financial support of his
stay at Massachusetts Institute of Technology through the program Salvador de Madariaga
(PRX15/00012). C. Casado also acknowledges MINECO for the FPI PhD grant (BES-2012-056661).
References
[1] H. Xia, P.G. Tucker, W.N. Dawes, Prog. Aerosp. Sci. 2010, 46, 274–283. DOI:
10.1016/j.paerosci.2010.03.001.
[2] R.Q. Wang, A.W.K. Law, E.E. Adams, Int. J. Multiph. Flow. 2014, 67, 65–75. DOI:
10.1016/j.ijmultiphaseflow.2014.08.004.
[3] S. Wang, H. Lu, F. Zhao, G. Liu, Chem. Eng. J. 2014, 236, 121–130. DOI:
10.1016/j.cej.2013.09.033.
[4] ANSYS® Academic Research, Release 14.5.
[5] W. Jeong, J. Seong, Int. J. Mech. Sci. 2014, 78, 19–26. DOI: 10.1016/j.ijmecsci.2013.10.017.
[6] H.G. Weller, G. Tabor, H. Jasak, C. Fureby, Comput. Phys. 1998, 12, 620. DOI:
10.1063/1.168744.
[7] R.-Q. Wang, E.E. Adams, A.W.-K. Law, A.C.H. Lai, J. Hydraul. Eng. 2015, 141, 6015006. DOI:
10.1061/(ASCE)HY.1943-7900.0000993.
[8] HELYX-OS Free Open-Source GUI for OpenFOAM. URL: http://engys.com/products/helyx-os
(accessed July 20, 2017).
[9] Graph. User Interfaces - OpenFOAMWiki. URL https//openfoamwiki.net/index.php/GUI
(Accessed July 20, 2017).
[10] A. Ribes and C. Caremoli. “Salomé platform component model for numerical simulation,”
COMPSAC 07: Proceeding of the 31st Annual International Computer Software and Applications
Conference, pages 553-564, Washington, DC, USA, 2007, IEEE Computer Society.
[11] J.E. Duran, F. Taghipour, M. Mohseni, Int. J. Heat Mass Transf. 2009, 52, 5390–5401.
[12] Y.F. Liu, O. Hinrichsen, Chem. Eng. Technol. 2013, 36, 635–644. DOI:
10.1002/ceat.201200625.
[13] S.K. Panda, K.K. Singh, K.T. Shenoy, V. V. Buwa, Chem. Eng. J. 2017, 310, 120–133. DOI:
10.1016/j.cej.2016.10.102.
[14] J.L.C. Santos, V. Geraldes, S. Velizarov, J.G. Crespo, Chem. Eng. J. 2010, 157, 379–392. DOI:
10.1016/j.cej.2009.11.021.
[15] T. Van Daele, D. Fernandes del Pozo, D. Van Hauwermeiren, K. V. Gernaey, R. Wohlgemuth, I.
Nopens, Chem. Eng. J. 2016, 300, 193–208. DOI: 10.1016/j.cej.2016.04.117.
[16] D.A. Sozzi, F. Taghipour, Int. J. Heat Fluid Flow. 2006, 27, 1043–1053. DOI:
http://dx.doi.org/10.1016/j.ijheatfluidflow.2006.01.006.
[17] F. Jović, V. Kosar, V. Tomašić, Z. Gomzi, Chem. Eng. Res. Des. 2012, 90, 1297–1306. DOI:
http://dx.doi.org/10.1016/j.cherd.2011.12.014.
[18] F. Bothe, C. Friebe, M. Heinrich, R. Schwarze, CFD Simulation of Incompressible
Turbomachinery — A Comparison of Results From ANSYS Fluent and OpenFOAM, in: Vol. 2B
Turbomach., ASME, 2014: p. V02BT39A025. DOI: 10.1115/GT2014-26338.
[19] A. Karvinen, H. Ahlstedt, Proc. Open Source CFD Int. Conf. 2008, 1–17.
[20] M. Balogh, A. Parente, C. Benocci, J. Wind Eng. Ind. Aerodyn. 2012, 104, 360–368. DOI:
10.1016/j.jweia.2012.02.023.
[21] A. Singhal, S. Cloete, S. Radl, R.Q. Ferreira, S. Amini, MAYFEB J. Chem. Eng. 2016, 1, 1–17.
[22] A.R. Coughtrie, D.J. Borman, P.A. Sleigh, Bioresour. Technol. 2013, 138, 297–306. DOI:
10.1016/j.biortech.2013.03.162.
[23] N. Herzog, M. Schreiber, C. Egbers, H.J. Krautz, Comput. Chem. Eng. 2012, 39, 41–46. DOI:
10.1016/j.compchemeng.2011.12.002.
[24] FreeCAD: An open-source parametric 3D CAD modeler URL: https://www.freecadweb.org/
(accessed July 20, 2017).
[25] ANSYS® Academic Research, Release 14.5, Help System, Meshing User Guide, ANSYS, Inc.
[26] I.G. Currie, Fundamental Mechanics of Fluids, Third Edition, CRC Press, 2002.
[27] J.P. Holman, Heat transfer, McGraw-Hill, 1989.
[28] ANSYS® Academic Research, Release 14.5, Help System, Theory Guide, ANSYS, Inc.
[29] J.H. Ferziger, M. Peric, Computational Methods for Fluid Dynamics, 3er Edition (2002),
Springer.
[30] M. Rakai, P. Kristóf, CFD simulation of flow over a mock urban setting, in: 5th OpenFOAM
Work. Chalmers, Gothenburg, Sweden, 2010: pp. 2–5.
[31] V. V. Ranade, Computational Flow Modeling for Chemical Reactor Engineering., Elsevier,
2001. URL: https://books.google.es/books?hl=es&lr=&id=Cv6x-
Ipik3IC&oi=fnd&pg=PP2&dq=Computational+Flow+Modeling+for+Chemical+Reactor+Engineering&ot
s=FU16dCszHP&sig=hWktYam0YJDrUiCdJhOAwKo1eJs#v=onepage&q=Computational Flow Modeling
for Chemical Reactor Engineering&f (accessed January 25, 2018).
[32] T.H. Shih, W.W. Liou, A. Shabbir, Z. Yang, J. Zhu, Comput. Fluids. 1994, 24, 227–238.
[33] E. Sahle-Demessie, S. Bekele, U.R. Pillai, Catal. Today. 2003, 88, 61–72. DOI:
http://dx.doi.org/10.1016/j.cattod.2003.08.009.
[34] O. Levenspiel, Wiley, New York . 1999,. DOI: 10.1021/ie990488g.
[35] C. Casado, J. Marugán, R. Timmers, M. Muñoz, R. van Grieken, Chem. Eng. J. 2017, 310, 368–
380. DOI: 10.1016/j.cej.2016.07.081.
[36] R.B. Bird, Appl. Mech. Rev. 2002, 55, R1–R4.
[37] J. Nikuradse, J. Appl. Phys. 1943, 14, 399. DOI: 10.1063/1.1715007.
[38] N. Miložič, M. Lubej, U. Novak, P. Žnidaršič-Plazl, I. Plazl, Chem. Biochem. Eng. Q. 2014, 28,
215–223.
Table 4. Discrepancies with the theoretical values of the outlet velocity in the ideal tubular reactor
̅ 𝒐𝒖𝒕𝒍𝒆𝒕 − 𝑼
𝑼 ̅ 𝒐𝒖𝒕𝒍𝒆𝒕,𝒕𝒉𝒆𝒐
𝑼̅ 𝒐𝒖𝒕𝒍𝒆𝒕,𝒕𝒉𝒆𝒐
OpenFOAM ® laminar -1.61×10-4
OpenFOAM ® turbulent -5.90×10-4
ANSYS ® Fluent laminar +1.10×10-6
ANSYS ® Fluent turbulent -9.36×10-8
FIGURE CAPTIONS
Figure 2. Discretization of the ideal tubular reactor: A) OpenFOAM ® mesh. B) ANSYS ® Fluent mesh.
Figure 3. Discretization of the real annular reactor: A) OpenFOAM ® mesh. B) ANSYS ® Fluent mesh.
Figure 4. Velocity profiles in the ideal tubular at different distances from the inlet, laminar flow.
Figure 5. Dimensionless turbulent developed profiles in the ideal tubular reactor, turbulent flow.
Figure 6. Maximum velocity along the rotational axis for the ideal tubular reactor and turbulent flow.
Vertical line represents the entrance length value calculated with Eq. 20.
Figure 7. Comparison of velocity contours at different planes of the annular reactor. Left: OpenFOAM
®
; right: ANSYS ® Fluent.
Figure 9. Average concentration of the tracer at the outlet of the laminar case on the ideal tubular
reactor.
Figure 10. Images at time intervals showing the transport of the tracer on the annular reactor. Top:
experimental; middle: ANSYS ® Fluent; bottom: OpenFOAM ®.
Figure 11. Comparison of the predicted and experimental tracer concentration at the outlet of the
real annular reactor.