Computational fluid dynamics (CFD): what is it about?

Computational fluid dynamics (CFD) uses numerical methods to solve mathematical models (transport equations) that describe fluid flow, heat transfer, mass transfer, chemical reactions, etc. [1, 2]. Such models (the CFD’s mathematical foundation) are represented by systems of partial differential equations (PDEs), usually strongly coupled, and their corresponding initial and boundary conditions. Multidimensional models can be found, ranging from unidimensional to three-dimensional (in space, with a possible additional dimension – time) mathematical representations and even a combination of them. Numerical methods such as finite difference, finite element, and finite volume can be used to solve these systems of PDEs [1, 2].

Nowadays, commercial (e.g., Ansys® Fluent®, Ansys® CFX®, COMSOL® Multiphysics, Simcenter® STAR-CCM+® , etc.) and open-source CFD algorithms (e.g., OpenFOAM or codes developed by the user—typically in a research group in the academic environment) are available. Some advantages of commercial software can be enumerated, e.g., relatively faster learning rate (even lower in codes such as COMSOL® Multiphysics—from the authors’ personal experience teaching and introducing CFD to fresh students in the research group), user-friendly interface, and the professional support and continuous update. Disadvantages of such commercial software are typically the high costs associated with maintenance and the inaccessibility to the source code (i.e., they are typically black boxes). On the other hand, the nowadays widely used open-source code OpenFOAM offers some advantages such as no charges and full access to the source code. However, such software often demands more learning hours to starters to acquire enough expertise to carry out scientific studies. Tailored codes, typically developed by research groups, offer the advantages of open-source codes like OpenFOAM and high flexibility but are sometimes unavailable to the broad scientific community (difficulting the reproducibility of research outcomes).

Such CFD codes can create virtual prototypes of complex domains representing real-world scenarios (e.g., an aircraft turbine, the internals of a distillation column, a baffled reactor, etc.) [1, 2]. These domains are discretized in small elements, creating the computational grid. Using an appropriate numerical method (among the previously enumerated), the continuous PDEs are discretized and solved in these small portions of the computational domain, providing information on velocity components, pressure, temperature, concentration, etc. [1, 2].

Coupling of CFD with optical simulation (using a Monte Carlo method, for instance) allows obtaining local information (on the grid cells) of light intensity as a new variable, which can be associated with the energy or species balance equations, allowing the simulation of light-driven chemical reactions or heating, for instance [3, 4]. Moreover, acoustic models can be solved and coupled with the Navier–Stokes equations, allowing the quantification of the effect of ultrasound waves on the velocity profile developed in the device [5,6,7]. Additional conservation equations can also be solved to describe electron flux [8, 9], magnetic field [10, 11], etc., allowing the fluid flow simulation to be truly multiphysics and, in some cases, multiscale (e.g., detailed information of smaller scales can be passed to higher scales as boundary conditions) [12,13,14,15,16].

All these features can be applied to single-phase or multiphase flows and laminar or turbulent flows [1, 2]. Modeling gas–solid, liquid–solid, gas–liquid, liquid–liquid, gas–liquid-solid, and combinations is frequently carried out in industrial and academic applications of CFD [17,18,19,20,21,22,23,24,25]. Such simulations allow information to be obtained about the distribution of the phases within the domain and phase interactions, i.e., momentum, energy, and mass exchange across the interface [26]. Turbulent flows are generally more challenging to solve, and turbulence models are widely applied to various scenarios where a balance of computational cost and precision is critical [1, 2]. However, direct numerical simulations have become more popular as the computational capacity has increased, allowing the solution of all turbulence scales in space and time [27,28,29].

In addition to pre-processing and processing algorithms (i.e., geometry creation, mesh generation, model selection, and numerical solution), CFD codes, either commercial or open source, are supported with visualization tools, allowing qualitative and quantitative assessment of the results [1, 2]. For instance, vectors, streamlines, and maps can be generated to visually assess the flow direction, temperature distribution, pressure field, etc. [1, 2]. Such information is helpful to identify recirculation zones, hot spots, preferential paths, species depletion regions, and so on [30,31,32,33,34,35]. However, beyond what was for some time known as “color fluid dynamics”, given the visual appeal that this representation acquired and that is frequently associated with CFD as its main feature, quantitative information regarding profiles and fluxes can be estimated and are the core outcomes for decision making on chemical process supported by this technology [1, 2].

A scientist or an engineer wants to use CFD to obtain the concentration, temperature, velocity, and phase distribution profiles across a reactor’s cross-section [14]. The researcher also intends to calculate the position-dependent and time-dependent heat and mass fluxes across an interface, such as a catalyst film deposited on the internal reactor’s walls or forming a fixed bed, as well as a growing bubble in an electrolytic reactor [25, 36, 37]. This information is crucial. This is the critical point for deciding the optimal curvature of the reactor’s channels for relevant passive mixing [38], and arranging a light illumination system (such as an array of LEDs) to minimize energy losses [4, 39], etc. Sometimes, the local profiles and fluxes calculated with CFD cannot be assessed experimentally due to limitations in terms of resolution of the current techniques or due to security reasons. Thus, the model can be verified or validated macroscopically, and the local information is assessed through virtual prototyping to optimize the device or extract information with scientific significance.

These outstanding features have motivated the application of CFD in several fields, including understanding the associated phenomena, designing, and scaling up flow chemistry systems. This perspective initially presents an overview of how CFD has been encountered in flow chemistry over the last two decades, highlighting important advances reached in distinct periods (2003–2007, 2008–2012, 2013–2017, 2018–2023). Moreover, the contributions of our research group to this field over the last decade are presented. A discussion about our major learnings and design guidelines is also introduced. Finally, our vision about CFD's strengths, limitations, and opportunities in flow chemistry is presented and discussed.

At the end of this perspective, the reader, either starting investigating in this field or an expert, will be able to get a big picture of the past, the present, and the future of CFD in flow chemistry– from the authors’ point of view –, being able to identify gaps for further research in this exciting area.

CFD in flow chemistry: an overview of the last two decades

2003 – 2007

CFD has been widely applied in flow chemistry over the last two decades. Back in 2003, Steinfeldt et al. [40] used the commercial CFD code Fluent® to investigate the thermal behavior of multichannel microreactors applied to the oxidative dehydrogenation of propane, showing that microchannels with thick walls and high heat conductivity operate isothermally. Similarly, using ammonia oxidation on a platinum catalyst as a model reaction, Rebrov et al. [41] used a 3D model to simulate the thermal behavior of microchannels, finding an optimal distance reactor-to-cooling channels when a highly conductive material was used. The authors used a supercomputer (CRAY Origin 2000) to run their simulations, taking 20 h of CPU time.

Harries et al. [42] improved the commercial code CFX® through Fortran routines to simulate a bidimensional (2D) fluid flow and mass transfer in segmented flow (Taylor flow) in a microreactor and validated the numerical results. Hardware limitations were clearly a drawback at that time. Two computers (500 MHz processor, 256 MB memory, and 15 GB internal disc; 30 × 400 MHz processors with 6 GB memory) were used for the simulations, and a finer mesh took 50 h of simulation. As indicated by the authors, the CFD model could be used to predict the behavior of important industrial chemical reactions, e.g., the nitration of benzene or toluene, at the expense of a substantial increase in computational effort.

Choe et al. [43] used the mixture model available in the commercial CFD code Fluent to investigate the micromixing in a microreactor applied to synthesizing a pharmaceutical intermediate with controlled exothermal reaction and improved product yield. At that time, including chemical reactions in the mixture model calculations was a limitation. Hence, the authors evaluated the micromixer performance by monitoring the volume fraction of two fluids flowing through the microchannel. The authors carried out an experimental investigation supported by the design of experiments (DoE) and used the CFD outcomes to corroborate their hypotheses about the flow behavior in the intensified reactor.

In the following years, works on flow distribution in multi-channel microreactors [44,45,46], investigation of mixing effects in microreactors [47, 48], simulation of the performance of plasma microreactors [49] and microreactors applied to free-radical polymerization [50] and catalytic reforming [51], investigation of heat and mass transfer in single-phase microreactors [52,53,54], design of multifunctional microreactors [55], simulation of the hydrodynamics and mass transfer of liquid–liquid Taylor flow in microchannels [56,57,58], and gas–liquid mesh microreactors [59] were also conducted using CFD codes. Interestingly, the all-time most cited work (at the time when this article was written) with the keywords “CFD” and “microreactor” is from this period—on the hydrodynamics of liquid–liquid Taylor flow in microreactors [56].

2008 – 2012

This period was marked by interesting works applying CFD on microreactors for production of synthetic fuels and fuel cells. Cordiner, Mariani, and Mulone [60] used a commercial code to investigate the local transport phenomena in microtubular solid oxide fuel cells. Zamaniyan et al. [61] used a bidimensional CFD code to investigate syngas production in a microreactor. Similarly, Mettler et al. [62] used CFD to study the scale-out of microreactors for syngas production, considering the coupling of exothermic and endothermic processes. Moreover, steam reforming [63, 64], autothermal reforming [65], and ethanol steam reforming [66, 67] in microreactors were investigated with CFD techniques. The fluid dynamics and heat transfer in low-temperature Fischer–Tropsch synthesis in a microreactor were also investigated by Arzamendi et al. [68].

This age also marks the start of CFD investigations on microreactors applied to environmental protection. Using the commercial code COMSOL® Multiphysics, Hernández Carucci et al. [69] studied the fluid flow and the radial concentration profiles in a microreactor applied to selective catalytic reduction of NOx. Early investigations on photocatalytic reactions in microreactors were also developed in this period [70].

Moreover, optimization of fluid flow and heat transfer in an enzymatic microreactor [71], investigation of flow oscillation to improve mixing in microbioreactors [72], design of microfluidic reactor for continuous cultivation of yeast (Saccharomyces cerevisiae) [73], polystyrene polymerization [74] and polymeric micelles production [75], and diverse geometric optimization [76, 77] in microfluid reaction systems were explored with support of CFD simulations.

Important fundamental investigations continued to appear in the literature, including the effect of microchannel aspect ratio on residence time distribution and axial dispersion [78], mixing in microreactors [79] (and in microbioreactors [80]), the behavior of turbulence in confined impinging-jets microreactors [81], characteristics of liquid–liquid Taylor flow [82,83,84] and falling film [85, 86] microreactors and optimization of reaction rate [87] and catalyst design [88].

2013 – 2017

The following years marked the consolidation of different applications of CFD in flow chemistry, including investigations on mixing, dispersion and residence time distribution in multichannel microreactors [89, 90], heat transfer [91], mass transfer [92], multiphase flow [93,94,95,96], reforming [97,98,99,100], combustion [101, 102], polymerization [103], photocatalysis (for hydrogen production) [104], and design of microreactors [105,106,107,108,109].

Interesting contributions appeared in this period on multiphysics simulations, including coupling CFD with population balance model for the analysis of nanoparticle synthesis [110, 111], and coupling CFD with ultrasound [112] for microflow applications. Moreover, CFD was combined with the response surface methodology to optimize a microreactor [113].

2018 – 2023

Traditional and novel applications characterize the last period analyzed. Studies on the design of microreactors (including geometric optimization) [114, 115], flow management [116], mixing efficiency [117,118,119,120], combustion [121, 122], reforming [123], polymerization [124], and on photocatalytic/photochemical microreactors [125,126,127] were found.

Additionally, investigations on microbioreactors (enzymatic microreactors) [128] and on environmental protection (pollutant degradation) gained momentum [129, 130]. A wide range of studies about synthesis in flow was also published in this period [130,131,132,133,134,135,136,137,138,139,140,141,142,143,144], including fuels, nanoparticles, and added-value compounds. Exciting applications of CFD on scale-up of flow chemistry systems are also encountered in this age [145,146,147]. This is a remarkable example of the potential of CFD in this field since the codes can be used to predict a variety of scenarios, allowing the rapid translation of milligram scale into kilogram scale systems with low cost. Several virtual prototypes can be testes per day, depending on the complexity of the problem and the computational resources available, even before experimentation. Promising designs can be converted into physical prototypes and tested experimentally, retro-validating the virtual model, and proving the concept. Integration of CFD with 3D printing [148, 149] is outstanding in this context.

Multiphysics studies also gained more space in this period. Maity et al. [150] used CFD to investigate the effect of an external alternating current (AC) electric field on the yield and conversion of a multiphase microreactor. The authors coupled the two-phase flow simulation with multicomponent transport, chemical reaction, and Maxwell’s stresses, reaching a complex CFD model. Xu et al. [151] used a three-dimensional CFD model to investigate ultrasonic oscillation in a microchannel carrying out Taylor flow—an interesting route for process intensification. Dong et al. [152] also presented an exciting study in this field applying CFD to investigate the synthesis of FePO4 particles with ultrasound-intensified turbulence in a T-junction microreactor – a highly complex multiphysics case.

Last but not least, exploring the intensification provided by different flow patterns is a remarkable application of CFD found in this period. For instance, Gaddem et al. [114] investigated Taylor-Dean flow in curved microchannels and evaluated the impact of different scenarios on the mass transfer performance.

CFD in flow chemistry: an overview of our contributions

As we highlighted in Sect. "CFD in Flow Chemistry: An Overview of the Last Two Decades", there is a perfect match in the combination of computational fluid dynamics and flow chemistry. It represents the state-of-the-art procedure for the design, optimization, and scale-up of any flow system and for the description of the phenomena taking place in such equipment – to acquire fundamental knowledge that can be formalized into theoretical postulates –.

Herein, we will present some applications of CFD in flow chemistry developed within our research group, or in collaborative work, created over the past few years to illustrate the potential of this technology. Over a decade ago, Padoin [153] and Dal’Toé [154] implemented algorithms in the commercial code ANSYS® CFD (Fluent®) for calculating interfacial heat and mass transfer fluxes in liquid–vapor systems based on the Maxwell–Stefan theory for species diffusion, considering the Euler-Euler and Euler–Lagrange frameworks. Such an approach is relevant for concentrated systems, where the hypotheses of Fick’s law for diffusion may fail and some anomalous phenomena, e.g., diffusion against concentration gradient and diffusion barrier, can be observed.

The outcomes of these investigations are relevant for micro-separation systems– such as micro-distillation, micro-absorption, and micro-extraction devices –, and for microreactors. One can use such a CFD code to estimate the concentration and temperature distribution in the liquid and the vapor phases throughout the computational domain, considering the Thermodynamics governing the interfacial equilibrium and the effect of the flow on the heat and mass transfer rates.

The computational model was verified with calculations from a commercial process simulation software (i.e., a macroscopic simulator), and a 1D implementation was considered. Therefore, validation with experimental data– always preferred over verification with another computational approach –, and an extension to 2D and 3D domains are a natural pathway. Such a computational model would benefit the most from at least a 2D implementation, allowing the calculation of heat and mass transfer rates in a diversity of gas–liquid flow patterns, such as Taylor flow – commonly encountered in microchannels. However, the numerical stability of such a 2D (and, by extension, 3D) implementation is critical.

This is a crucial point. Implementing algorithms to customize commercial and open-source CFD codes allows the inclusion of volumetric source terms in the conservation equations, the modification of transport properties, the inclusion of new transport equations, the calculation of fluxes through interfaces using specific models, and so on. However, this feature demands substantial expertise, not just in utilizing the software but also in understanding the associated numerical methods. This observation extends to the general use of such codes. Nowadays, CFD codes, especially commercial ones, have a user-friendly graphical interface and various online guiding materials (tutorials). New users tend to focus on software usage in model building, solution strategy, and results analysis. However, the fundamentals regarding the numerical methods and their coding must be deeply known. This is crucial for correct simulation procedures and accurately identifying error sources during the simulation workflow. Focus on the fundamentals behind the CFD code, and it will reward you.

Later, Padoin and Soares [36] used CFD to optimize the film thickness of a photocatalyst (pristine TiO2) deposited on the walls of a flow system (see Fig. 1). This is an example of how CFD can be used in research. Our focus on this investigation was not to predict the equipment performance in terms of conversion or selectivity, allowing design or scale-up – which is undoubtedly a massive benefit of CFD in industry. Instead, our attention was directed to calculations considering the effects of convection, diffusion, reaction, and photon transfer on the optimal photocatalyst film thickness in terms of reaction rate for two distinct configurations: back-side illumination (BSI) and front-side illumination (FSI), i.e., when illumination and flow occur in “counter-current” and “co-current” directions regarding the film itself. The CFD model, previously validated with data from the literature [155], allowed the proposition of two correlations (for BSI and FSI) to calculate the optimal film thickness as a function of relevant operational parameters and physical properties.

Fig. 1
figure 1

CFD applied to optimizing a photocatalyst thin film deposited on a microreactor’s wall. A Generic scheme of a photocatalyst activation under proper illumination. B Back-side illumination mechanism (BSI). C Front-side illumination mechanism (FSI). D Normalized reaction rate as a function of the film thickness for the BSI mechanism. E Normalized reaction rate as a function of the film thickness for the FSI mechanism. F Optimal film thickness as a function of different operation variables for the BSI mechanism. G Optimal film thickness as a function of different operation variables for the FSI mechanism. H-J Concentration maps for flow system with photocatalyst thickness of 1 μm, 5 μm, and 10 μm, respectively. K Optimal film thickness as a function of the inlet velocity. L-N Optimal film thickness as a function of the inlet concentration – 0.5 mg⋅L−1, 1.0 mg⋅L−1 and 1.5 mg⋅L−1, respectively. Adapted from [36]

Further investigations considering BSI and FSI mechanisms were performed by Matiazzo et al. [3], using a Monte Carlo method to simulate light intensity distribution at the surface of a thin film photocatalyst (pristine TiO2) deposited on the walls of the NETmix reactor (see Fig. 2). The code allowed investigating the effect of different configurations of high-power LEDs (arrangement – inline or staggered –, LED-to-LED distance, and LED-to-reactor distance) on the light intensity and homogeneity at the photocatalyst surface. An optimal scenario was found since both variables depend inversely on the LEDs-to-reactor distance. Moreover, Matiazzo et al. [4] coupled the photon transport modeling with a CFD code, investigating the impact of the LEDs arrangement and view angle [39] on the irradiance levels, light absorption efficiency, homogeneity of the field, and overall photonic efficiency, taking n-decane photocatalytic degradation as a benchmark. Again, optimal scenarios were found.

Fig. 2
figure 2

CFD applied to the investigation of gas-phase photocatalytic reactions. A Velocity profile under laminar flow in a straight channel. B Velocity profile under laminar flow in a curved channel. C Qualitative velocity profile at the microreactor’s cross-section as a function of the radius of curvature – the more pronounced the curvature, the higher the shift of the velocity profile regarding the straight channel pattern –. D Qualitative concentration maps of NO at the microreactor’s cross-section as a function of the radius of curvature – the more pronounced the curvature, the higher the mixing induced intensifying the process –. These maps were taken at the center of the curvature region. E Light intensity distribution in the NETmix reactor illuminated by 5 staggered high-power LEDs distant 6 mm to the reactor’s window. F Light intensity distribution in the NETmix reactor illuminated by 28 inline high-power LEDs distant 6 mm to the reactor’s window. G The degradation rate in the NETmix reactor illuminated by 28 inline high-power LEDs distant 6 mm to the reactor’s window. H Pollutant molar fraction in the NETmix reactor illuminated by 28 inline high-power LEDs distant 6 mm to the reactor’s window. Adapted from [4, 38]

CFD was also used by Lira et al. [6,7,8,9] to investigate gas-phase photocatalytic abatement of NOx [38, 156,157,158]. A commercial code was customized to account for multiple complex kinetics at the surface of a thin photocatalyst film deposited on a slit reactor’s wall [158]. Such a model allowed investigating the effect of varying the reactor’s dimensions and the impact of light intensity and moisture content on conversion and selectivity. An optimal operation point was identified in terms of selectivity and reaction rate.

Further investigations were performed in slit and microchannel reactors aiming to achieve a CFD-based optimization strategy. Initially, a design of experiments (DoE) approach was adopted [157]. Based on a well-defined exploratory space, as widely performed in experimental investigations, several CFD simulations were run on the selected points. Then, surface responses for conversion, selectivity, and pressure drop were built. Finally, a desirability function allowed the determination of the optimal operation conditions.

A hybrid optimization method was then performed, combining CFD and artificial intelligence (artificial neural networks and genetic algorithms) [156] A CFD model– considering the effect of residence time, light intensity (solved through the discrete ordinates method), relative humidity, and initial concentration of nitrogen monoxide (NO)– was implemented and run as a numerical experiment, allowing the generation of 256 data points. The artificial neural network was trained to yield the NO consumption rate and the pressure drop as outputs. A multi-objective optimization to maximize the NO consumption rate while minimizing the pressure drop was then run in a genetic algorithm.

A phenomenological investigation of microchannel curvature on the performance of a photocatalytic reactor with TiO2 deposited on an inner wall was also carried out using CFD and light modeling through the discrete ordinates method [38] (see Fig. 2). The authors observed a significant mass transfer intensification as the microchannel's curvature radius was reduced and the velocity was increased. Such a computational model allows the identification of optimal design guidelines and the proposition of efficient scale-up strategies.

In a collaborative work, Oliveira et al. [159] developed a CFD model for the simulation of the luminescent solar concentrator photo-microreactor (LSC-PM) for the [4 + 2] cycloaddition of 9,10-diphenylanthracene considering a kinetic model with a variable constant rate according to the light intensity reaching the microchannels. After a thorough investigation of the reaction kinetics considering the illumination level, the CFD model allowed the prediction of control strategies for the system operating under fluctuating light intensity aiming to keep conversion constant. Moreover, the influence of the channel geometry on the reactor’s performance was also assessed.

This is an exciting example of how a CFD model can tailor a flow system's operation and design. Of course, it relies on a precise kinetic model. Ideally, an intrinsic kinetic expression should be used since it also allows the investigation of mass transfer limitations in the reactor. With robust kinetics, a proper model implementation (choosing pertinent equations based on the given hypotheses, incorporating variable physical properties where applicable, ensuring a cohesive mesh refinement, and employing a comprehensive selection of solvers) allows the scientist and the engineer to test a variety of scenarios regarding design and control – saving time and money during the exploratory phase –. However, the model should be compared with experimental data at specific points within the exploratory space to discern its connectivity with observed reality.

Padoin et al. [160] used a commercial CFD code (Ansys® Fluent®) to simulate gas–liquid flow patterns arising from a T-junction microchannel subjected to different wall contact angles, validating the results with experimental data available in the literature. This parameter strongly influences the flow pattern, ranging from Taylor flow to stratified flow regimes as the wall changes from a superhydrophilic to a superhydrophobic contact angle. The effect of such variation on the process performance is significant since the velocity pattern and pressure drop change and the interfacial area available for heat and mass transfer is greatly affected.

Moreover, Cao et al. studied gas–liquid [9] and liquid–liquid [8] Taylor flow electrochemistry in microchannels based on CFD simulations (see Fig. 3). The CFD code was used to gain insights into the controversial effect of improved mixing (beneficial) and electrical resistance (detrimental) induced by the gas bubbles in the micro-electrochemical reactors, taking the reduction of furfural to furfuryl alcohol as a benchmark [8]. The larger the bubble, the higher the energy losses expected in these reactors. Moreover, the CFD simulations allowed a detailed investigation of the effect of different operation variables (bubble size, gas holdup, interelectrode distance, electrolyte velocity, and species concentration) on the reactor’s performance, providing design guidelines.

Fig. 3
figure 3

CFD applied to the investigation of micro-electrochemical reactors. A The velocity profile in a liquid–liquid electrochemical reactor – indicating the recirculation pattern typically observed in Taylor flow; UD stands for dispersed phase velocity, while UTP is the velocity of the two-phase flow. B Electrolyte current density, electrolyte potential, concentration of the starting material, absolute current density profile at the electrode surface, and concentration profile of starting material for a single-phase micro-electrochemical reactor. Electrolyte current density, electrolyte potential, concentration of the starting material, absolute current density profile at the electrode surface, and concentration profile of starting material for a gas–liquid non-reactive (i.e., with inert gas bubbles) C and reactive D micro-electrochemical reactor. Adapted from [8, 9]

On the other hand, when studying the coupled fluid flow, charge transfer, mass transfer, and chemical reaction in a liquid–liquid micro-electrochemical reactor (taking the electrochemical oxidative coupling of thiophenol and fluoride yielding sulfonyl fluoride as a benchmark), the authors observed a different behavior [8]. Differently from gas–liquid systems, the presence of a secondary phase in liquid–liquid Taylor flow in such reactors can induce a crucial beneficial effect, depending on the ratio of electrical conductivity of the phases, for instance. The CFD simulations allowed identifying limiting current scenarios, providing guidelines for efficient reactor design and scale-up. Moreover, CFD can be used to predict different flow patterns, depending, for instance, on the wall wettability [160]. The association of such a framework with electron and/or photon transfer allows an in-depth investigation of the transport phenomena occurring in the microdevice.

Finally, Raman et al. [25] investigated bubble growth/detachment's fluid dynamics and mass transfer characteristics in an electrolyzer with spatially decoupled electrodes. A DNS approach was adopted in this study, as the gas–liquid interface was resolved with the arbitrary Lagrangian–Eulerian (ALE) method. The bubble radius as a function of time was compared with experimental data for successive bubbles under different current densities applied at the cathode, and a good agreement was observed in all cases. Based on the validated model, mass transfer fluxes and concentration profiles were extracted from the simulations, allowing the observation of relevant phenomena that are challenging to measure experimentally. As the bubble outgrows the supersaturation region, there is an outward hydrogen flux at the apex, limiting the H2 evolution efficiency– a phenomenon less pronounced as the current density increases.

Although the examples provided herein are mostly related to chemical reactors (a focus of our research group), one must consider that CFD has been successfully used in a variety of scenarios in flow chemistry, including the design, optimization, and scale-up of micromixers, micro-heat exchangers and micro separation units.

Major learnings and design guidelines

During the development of the aforementioned studies, significant insights were gained. First, integrating a tailored code with commercial CFD software is not straightforward. Particularly, challenges arose when integrating user-defined functions for calculating interfacial heat and mass fluxes in multicomponent gas–liquid flow using the Euler-Euler and the Euler–Lagrange approach [153, 154] and coupling the light intensity distribution with the reactive flow in the NETmix reactor [3, 4, 39]. Apart from the implementation challenge– especially in the case of interfacial heat and mass transfer in a multicomponent system –-, the numerical stability was compromised.

In the case of the simulation of the NETmix reactor, integrating the light intensity distribution with the kinetics through a specific macro was challenging since the coupling of the two software (for optical simulation and CFD) by Ansys® occurred at the time when the study was carried out. In addition, we observed along the studies of optical simulation coupled with CFD in the NETmix reactor that considering the entire reactor in the investigation was mandatory for precise modeling – instead of cutting the geometry and exploring symmetry or periodicity to save computational resources –. Such an observation is probably valid for simulating every system in which coupling light intensity distribution and CFD is the target.

On the other hand, some geometric simplifications proved to be useful in other simulation studies. When investigating Taylor flow in micro-electrochemical reactors [8, 9] we found that considering a unit cell is representative and it allows huge savings in computational cost (i.e., hardware requirements and time). The bubble is static in this bubble reference frame, and the reactor’s walls move with the bubble velocity in a lab reference frame.

For the gas–liquid study [9], we learned that accounting only for the liquid phase by imposing a slip boundary condition at the interface constructed based on widely available correlations in the literature is accurate. For the liquid–liquid investigation [8], we used a multiphase model – arbitrary Lagrangian–Eulerian (ALE) method – to simulate the droplet morphology. An iterative procedure was adopted, starting from an arbitrary rectangular shape for the internal phase (aqueous droplet) and varying the wall velocity until the droplet shape develops while it remains at the center of the unit cell. We found excellent agreement after comparing relevant metrics with correlations available in the literature (for film thickness, pressure drop, and droplet velocity). Interestingly, we used a multiphase model for simulating liquid–liquid flow since the shear stress at the interface is not usually negligible – so our workflow can be applied to a wide range of velocities. However, for very low velocities (i.e., high residence times), the shear stress at the interface is so low that the same procedure used in the gas–liquid simulations can be adopted without considerable inaccuracies.

When simulating gas–liquid flow with variable wettability [160], we started the investigations with a 3D domain. Nevertheless, we encountered an excessively high computational cost to properly capture the thin liquid film. In fact, at least five mesh elements are recommended in this region to adequately simulate Taylor flow [161]. Changing to a 2D geometry enabledan accurate representation of the thin liquid film at a reasonable computational cost while maintaining a good agreement with the experimental data. From this study, we also learned that spurious currents could adversely impact the simulation outcomes if insufficiently addressed. Using different algorithms apart from the geo-reconstruct (piecewise linear interface construction – PLIC) method – usually applied in the context of the volume of fluid approach – can solve this problem adequately. For more information about multiphase flow algorithms, the reader can find interesting literature elsewhere [26, 162].

In studying bubble growth and departure in electrolytic system [25], we learned the importance of developing a cutting method for handling the topology variation in the moving mesh approach (arbitrary Lagrangian–Eulerian, ALE, method). In COMSOL® Multiphysics, the moving mesh algorithm does not allow topological variations. This limitation could hinder the development of this investigation – since accounting for the growth and detachment of multiple bubbles was essential to reach our goals. However, in most cases, the researcher can implement strategies to overcome the limitations encountered in some CFD simulation projects. Mastering coding in different languages, integrating external codes with the CFD packages, and fluently handling the core algorithm is key to advanced applications. Most of these computer science-related skills can be learned from exhaustive practice and reading relevant literature.

When studying NOx decomposition in microreactors [158], we found that correcting the rate laws provided in the literature to extract intrinsic parameters is mandatory for every CFD investigation. When using a rate law, especially for heterogeneous systems, the reader should check if the parameters do not account for mass transfer limitations. Otherwise, this effect is computed twice.

Moreover, we learned about the importance of considering trade-offs when simulating flow chemistry systems from the NOx degradation studies. Optimizing the reactor’s geometry only based on reaction rate and selectivity is inaccurate since the pressure drop can be quite high in that scenario. Therefore, a multi-objective optimization – using the response surface methodology [157] or artificial intelligence (machine learning and genetic algorithms) [156] – is recommended.

We also learned from the studies mentioned above the importance of properly handling dimensionless numbers in CFD simulations applied to flow chemistry. Dimensionless numbers are fundamental in decision-making on model selection, spatial representation, mesh refinement, etc. Moreover, they are crucial for properly analyzing the outcomes of the CFD simulations –providing in-depth information about the relative importance of the physics involved, as it was the case in some of our investigations [8, 9, 25, 38, 160] –.

A relevant observation from the studies mentioned in Sect. "CFD in Flow Chemistry: An Overview of Our Contributions" of this article is related to the computational resources effectively used. Some of those simulations were run on personal computers (desktops and notebooks). All cases can be successfully run in a 64 GB RAM Intel® Core™ i5-9400F CPU @ 2.90 GHz with Microsoft® Windows® 10 operating system. Considering that most of the studies reported involve solving complex multiphysics problems, this aspect underscores the notable strength of CFD nowadays. The reader should note, however, that our applications usually involve laminar flow –considering turbulence could sensibly impact the computational cost –.

Last but not least, we would like to mention some design guidelines. When investigating flow systems with CFD –especially in the context of photocatalytic and electrocatalytic devices, i.e., the focus of our work –maximizing the surface-to-volume ratio is fundamental. Reducing the diffusion path by decreasing the microchannel diameter can positively impact the reaction rate and the selectivity –but this comes at the disadvantage of a higher pressure drop –. Using CFD combined with optimization techniques –e.g., surface response methodology or artificial intelligence (machine learning and genetic algorithms) – allows for the pursuit of optimal scenarios.

Using static mixers is a well-known solution for improving the performance of such intensified reactors. They have been extensively studied with CFD techniques, but there is still room for investigation in this field. Moreover, taking advantage of the improved mixing arising from Taylor, Dean, and Taylor-Dean flow, for instance, is an interesting process intensification strategy.

In photocatalytic systems with immobilized catalysts, the BSI and FSI configurations reach optimal scenarios under different circumstances – depending on the light intensity reaching the photocatalyst, the material’s optical properties, the reaction rate, and the mass transfer in the catalyst layer –. Moreover, when using LEDs as photon sources (a common strategy nowadays), optimal scenarios can be found depending on the LED-to-LED distance, the LED-to-reactor distance, and the LEDs’ view angle. The optimal conditions are significantly influenced by the reactor geometry, as it can lead to highly exposed or shaded zones.. This case represents a perfect example where scientific computing –CFD coupled with optical simulation – is crucial for the design and scale-up of chemical reactors.

A personal note on strengths, limitations, and opportunities for CFD in flow chemistry

From the authors’ perspective, all things will be simulated in the short or long term. Chemical processes play a central role in this context. Flow systems take a lot of advantage from virtualization. Such systems may be subjected to transport limitations, e.g., non-uniform distribution of photons in photocatalytic systems, limiting current densities due to poor mass transfer in electrochemical reactors, hot spots in catalytic reactors carrying out strongly exothermic reactions, inefficient mixing in laminar flow systems, inhomogeneous phase distributions in multiphase systems, and so on.

Physical experiments can offer insights into the phenomena within such equipment, guiding scientists and engineers toward optimized design and scale-up. Over the years, they have served as the predominant methodology for such purposes. However, they will not stand alone in the era of Industry 4.0. We live in the age of virtualization. The period of automatization of decision-making. The era where artificial intelligence has a central role.

In this context, we bring physics-informed machine learning strategies to the attention, integrating domain knowledge and artificial intelligence. Unlike machine learning models trained purely from experimentally collected datasets that can provide outputs without comprehensive reasoning of the fundamentals relating to the inputs, physics-informed machine learning uses physical laws as the background for the surrogate model formulation. Typically, this strategy is based on numerically solving the balance equations through CFD techniques and generating a dataset (with inputs –e.g., flow rate, reactor geometry, and LEDs arrangement –, and outputs –e.g., liquid film thickness in Taylor flow, bubble length, reaction rate, etc. –) to train the machine learning model (based on neural networks, for instance). Importantly, physical constraints should be included in the training step (e.g., penalizing deviations from the physical model predictions), ensuring the alignment of the machine learning algorithm with the physical limits. Finally, the AI model should be validated (with an independent physically generated dataset) and applied to possibly more accurate and efficient predictions. One should note that such an approach intrinsically depends on comprehensively validated CFD models (otherwise, the dataset does not represent the physical reality). Moreover, this workflow can be iteratively improved as new data points can be simulated and incorporated to enhance accuracy and efficiency. Such guidelines were mostly adopted in our recent publication [156].

In flow chemical systems, progress is achieved through the virtualization of the transport processes taking place within the equipment. CFD is a critical technology for this purpose. Well-established models and state-of-the-art codes are available to represent the equipment's local and instantaneous performance accurately. Physical experiments can be performed under limiting conditions in each exploration space and used as validation platforms for the CFD models. With a validated model, one can propose design and scale-up guidelines much faster and with reduced cost, finding optimal conditions in terms of performance, energy requirements, feedstock consumption, waste generation, etc. The CFD simulations can then create data clouds for training AI algorithms with predictive or classificatory purposes. Such a surrogate model can be used for decision-making regarding design, scale-up, optimization, and control even faster and more accurately.

As we evolve to genuinely multiphysics simulations, the capabilities of combining CFD and AI are exciting. Therefore, we should move in this direction, exploring the integration of CFD with photon transport modeling, acoustics, magnetic fields, etc., to build robust and trustful models. The challenge of associating external physics with multiphase flow is still significant. This is a hot topic with huge potential to be explored. For instance, combining multiphase flow with optics or acoustics is complex, especially in strongly advective and time-dependent problems. Novel simulation strategies and better numerical approaches are demanded to advance this area. Furthermore, it is essential to carefully consider the simulation of clogging phenomena in microchannels. Undoubtedly, it poses a significant challenge, yet the potential rewards are equally exceptional.

In addition, multi-scale approaches are outstanding and form the foundation of the future in this field. The more information we extract from the molecular level and upscale it to the continuous level, the more robust our models will become. For instance, one could start from force field modeling at an adsorbent or catalyst surface level and end in the simulation of an entire fixed-bed microdevice.

Challenges need to be overcome for a comprehensive simulation framework. Nowadays, most of the limitations rely on the simulation of turbulent flows. Direct numerical simulation can be used to solve all spatial and temporal turbulence scales accurately, but the associated computational cost is significantly expensive. They are available in high-level computer facilities worldwide but are not widely used, especially in emerging countries. If we need to rely on turbulence models, our simulations under this scenario will be limited in terms of accuracy and physical representation. By the way, an early transition to turbulence can be found under micro-flow conditions. The conditions for such transitions and their modeling still need systematization, so this field has exciting opportunities for research over the next few years.

Moreover, the reader should be aware of limitations related to artificial mass transfer caused by numerical diffusion and spurious currents or artificial velocities associated with wetting and interfacial tension. These problems can significantly impact the results of a CFD simulation if not adequately handled, deviating it from the real (accurate) values of the variables being solved.

Numerical diffusion emerges during the discretization of balance equations or due to mesh resolution issues, potentially influencing mass conservation across the computational domain. Using higher-order schemes, adaptive mesh refinement, upwind schemes, and implicit methods can be cited as strategies to overcome this problem, all of them usually encountered in CFD codes nowadays.

Additionally, the numerical treatment of wetting and interfacial tension is challenging in the simulation of gas–liquid and liquid–liquid flows. At the same time, it represents an opportunity for further improvement of numerical schemes over the next few years. Some strategies are available to overcome this limitation, such as using immersed boundary methods (decoupling the interface from the mesh), applying level set and phase field methods (available in the commercial software COMSOL® Multiphysics, for instance), and using adaptive mesh refinement and higher-order schemes.

Furthermore, numerical stability and convergence indicators are two factors that should be carefully considered, especially by those starting on CFD (as experienced users should already know it in-depth), since they can significantly impact the simulation outcomes. Numerical stability depends on several factors, such as the method’s consistency, convergence, and order. Using implicit methods with variable time-stepping, associated with an appropriate mesh and boundary conditions, are key to obtain stable numerical solutions. Nowadays, the CFD packages, commercial and open-source, usually offer several numerical schemes that can be efficiently used by advanced users to stabilize the solution (including damping strategies). Hence, a profound comprehension of numerical methods is imperative for individuals engaged in this field. Prior to proficiently utilizing software, it is essential to invest sufficient time in grasping the fundamentals of numerical methods in CFD by studying pertinent textbooks and articles available in the literature.

Judging convergence is also important for accurately solving a problem with CFD. Usually, those starting in this field focus on the residuals for declaring a solution converged. However, it is important to underscore that fluxes (of heat and mass, for instance) and local values of crucial variables at pertinent locations (lines, surfaces, or volumes) should also be used to properly judge convergence. Additionally, one should consider adequate values of the residuals when monitoring convergence. Particularly for species, convergence can be attained with remarkably low residuals (e.g., two to three orders of magnitude lower than the minimum anticipated species value within the computational domain). Ideally, an independency study regarding the convergence criteria based on residuals should be carried out. Best practices should also be considered for mesh independence studies. The authors recommend adopting the grid convergence index proposed by Roache [163] as a standard in this regard.

Regardless of the perspective taken, one certainty remains: prioritize more than just grasping the software itself; strive to establish a solid foundation in mathematics, numerical methods, and computer science. You will only master CFD if you can precisely describe every single hypothesis behind your model, any approximation strategy, the algorithms chosen, etc. Build from the basics; start with more straightforward 1D problems with pure diffusion and operating at a steady state. After deeply understanding it, add complexity – including convection, accumulation, source terms, etc. Then you can move to 2D or 3D problems, work with coupled phenomena, etc.

The flow chemistry community should identify CFD's potential in this area. It is a golden standard. It is the state-of-the-art for design, optimization, scale-up, and control. However, everyone should recognize that such an approach is intrinsically multidisciplinary. For those embarking on their journey in this field, follow the steps outlined in the preceding paragraph, and you will adeptly master this technology. Collaborating with chemical engineers and building truly integrative teams with mind-blowing capabilities is always a good idea.

Finally, some notes on CFD software and other alternatives should be pointed out. As you advance in using CFD to solve flow chemistry problems, try to move through different commercial and non-commercial software based on distinct numerical schemes, for instance. You will benefit a lot from being fluent in a diversity of codes. Adopting this strategy will provide you with the flexibility required to become an expert.

Exciting alternatives to CFD should be considered. Codes based on the Lattice Boltzmann approach, in use since the late 1980’s and early 1990’s (and stablished and widely used since the late 1990’s and early 2000’s), could overcome limitations regarding accuracy in turbulent flows, handling of complex geometries, stability and convergence, computational cost, and applicability in multiphase flows – and be more widely applied in simulating the fundamental phenomena, design, and scale-up of flow chemistry –. Mastering this technique can bring relevant benefits in the middle and long term.

Moreover, the simulation of flow systems using physics-informed neural networks is gaining momentum and should also be considered by the ones involved in the simulation of chemical processes. However, the reader must understand the associated limitations independently of the alternatives considered since this knowledge paves the way for successful implementations regarding physical outcomes and timesaving.

In all scenarios, simulation has a bright future in flow chemistry. Current CFD approaches have reached an advanced stage, capable of delivering impressive solutions, particularly when combined with AI. Over the next few years and decades, significant advances in modeling, solution, and visualization will probably occur, reducing simulation time while increasing accuracy.

Conclusions

Computational fluid dynamics (CFD) and flow chemistry are a perfect match. Combining these two powerful technologies is already a reality. It is part of our present when working on intensified equipment design, optimization, and scale-up. This article initially highlighted important concepts underlying every CFD application. Then, the advances observed in this field over the last two decades (considering different periods, i.e., 2003–2007, 2008–2012, 2013–2017, 2018–2023) were presented. The reader could clearly identify the evolution of problem complexity across the entire analyzed interval, ranging from single-phase flow distribution in microreactors to multiphysics simulations (coupling fluid flow, heat/mass transfer, chemical reactions, and external fields – e.g., photon flux, ultrasound, and electric field).

Investigations on the thermal behavior of multichannel reactors, geometrical optimization of microreactors, single and multiphase flow (with associated heat and mass transfer), mixing performance, polymerization, reforming, Fischer–Tropsch synthesis, multifunctional reactors, environmental protection, photocatalytic and photochemical microreactors, electrochemical microreactors, microbioreactors, scale-up strategies, synthesis of diverse chemicals (including nanoparticles and added-value compounds), among other fields, were typically encountered.

In addition, some investigations conducted in our research group over the past decade, where efforts were mainly dedicated to the simulation of photocatalytic and electrocatalytic microreactors, were presented and discussed. Furthermore, our major learnings and design guidelines were highlighted.

In the sequence, the strengths of combining CFD and flow chemistry were explicitly highlighted, supported by the fast-growing coupling level of the different phenomena involved in the chemical processes analyzed. Moreover, noteworthy critical points for proper CFD simulation were critically discussed in this document, providing foundations to the beginner and a revision of best practices for the experienced user of this technology.

Finally, a discussion about limitations and opportunities was presented, guiding the scientist and the engineer toward the challenges and limiting steps for further developments in this field. We hope this overview will encourage the flow chemistry community to work collaboratively in multidisciplinary teams to spread the word in terms of the potential of CFD for their research (from academic and industrial points of view) and overcome the bottlenecks still found, opening windows for an even brighter future of CFD in this field.