A Computer Vision Approach toward Verifying CFD Models of Stirred Tank Reactors

Mixing is one of the most important nonchemical considerations in the design of scalable processes. While noninvasive imaging approaches to deliver a quantifiable understanding of mixing dynamics are well-known, the use of imaging to verify computational fluid dynamics (CFD) models remains in its infancy. Herein, we use colorimetric reactions and our kinetic imaging software, Kineticolor, to explore (i) the correlation of imaging kinetics with pH probe measurements, (ii) feed point sensitivity for Villermaux–Dushman-type competing parallel reactions, and (iii) the use of experimental imaging kinetic data to qualitatively assess CFD models. We report further evidence that the influences of the stirring rate, baffle presence, and feed position on mixing in a tank reactor can be informatively captured with a camcorder and help experimentally verify CFD models. Overall, this work advances scarce little precedent in demonstrating the use of computer vision to verify CFD models of fluid flow in tank reactors.


Reactor Setup
All experiments were conducted in a two-litre jacketed Asynt reactor with a four-pitch blade stirrer employed at a height of 2.5 cm above the bottom of the reactor.A variable speed overhead stirrer (Velp Scientifica, OHS 60 Digital) was employed.BaVled experiments used a four flat plate radially spaced at 90 degrees baVle insert.
Phenolphthalein Indicated Neutralisations (Figures 5 -7) 1.8 L of water followed by 200 mL 0.1 M NaOH (aq.) and 5 mL of phenolphthalein indicator solution was pipetted into the reactor.
Mixing was commenced for to ensure homogeneous solution.Once a uniform fuchsia/pink solution had developed, recording was started, using a Microsoft LifeCam Studio webcam and Windows 11 camera app.20 mL of 1 M HCl was then added to the reactor in one rapid charge from a beaker to minimise the influence of addition rate.
For Figure 5 experiments were conducted at 200 RPM and 400 RPM, baVled and unbaVled.
For Figure 6 and 7 experiments were conducted at 200 RPM baVled and unbaVled, acid was added as fast as possible by squeezing the pipette bulb.The radial position of the HCl addition was approximately half the vessel depth from the vessel wall inward towards the impeller shaft.
A Thermo Scientific Orion Star A100 Series Benchtop pH/mV/Temperature Meter was used to record the pH.The pH probe was secured to the reactor lid, due to the limited length of the probe, the probe could only be used to measure the pH close to the surface.pH recording was commenced at the same time as video recording.
Villermaux-Dushman Reaction (Figure 8, 13 and 14) A 200 mL aqueous solution of potassium iodide (5.312 g), potassium iodate (1.284 g), and sodium hydroxide (3.6 g) was prepared and transferred to the reactor and made up with 1.8L water.Stirring (RPM) was started and left for at least a minute to ensure flow had reached a steady state.Recording started and an aqueous hydrochloric acid solution (1 M, 20 mL) was added via pipette and recording continued until no visual change was evident.
For Figure 8 experiments were conducted at 120 and 360 RPM.Recorded using a Microsoft LifeCam Studio webcam and Windows 11 laptop camera app.For Figures 13 and 14, experiments were conducted at 120 RPM with subsurface and impeller zone addition and the hydrochloric acid was added as fast as possible by squeezing the pipette bulb.Recordings for all figures (8, 13 and 14) were made using an iPhone 14 Pro, with fixed focus.

Iron Chloride Displacement Reactions (Figure 10 -12)
A 2 L aqueous solution of iron(III) chloride (0.2703 g, 1 eq) was prepared and transferred to the reactor.Stirring was commenced and recording started, iPhone 14 pro.Ammonium thiocyanate aqueous solution (0.2283 g, 1 eq, 20 mL) was added after one minute and recording continued for at least 30 seconds.Experiments were conduct at 200 RPM and 400 RPM, baVled and unbaVled.

Figure 4 -CFD models
Computational Fluid Dynamics Modelling with Ansys R17.1 Ansys Workbench was used to manage all required steps for a model and subsequent postprocessing (geometry, mesh, setup, solution, and results):

Geometry
Reactor geometry was built in the Design modeler, a computer aided design (CAD) software within Ansys for building virtual models of the system of interest.
Using a combination of basic shapes (primitives) and lines, it is simple to create 2D systems.Naturally, 3D systems are more involved, using 3D primitives and more complex shapes from 2D sketches 3D objects can created with the extrude tool.

Meshing
To perform calculations on the geometries, a 2-or 3-dimensional grid (or 'mesh') must be generated.It sets the discretization of the domain.Meshing is required for the finite element analysis which Ansys uses to numerically solve the Navier-Stokes diVerential equations.Typically, the more elements, the more accurate the solution, but this is at the expense of computational time.A good mesh reduces the time until an accurate solution is converged upon.Beyond setting the typical element length Ansys meshing is generally reliable at generating a good mesh.Once a mesh has been generated it is important to check the mesh statistics.In this work, three statistics where focused on: aspect ratio (< 5), skewness (< 0.7), and orthogonal quality (> 0.3):

Setup
The first step is to change the precision and number of computer cores allocated to the problem.CFD is computational expensive.All simulations used double precision and at least 12 processing cores to reduce runtime: All models used the material properties of water.Two viscosities were used, 0.001003 and 0.0009 kg/m/s: Additional setup details:

Table 1 -CFD DiKerence Maps
Table 1 of the manuscript shows CFD diVerence maps for visualising the velocity changes between any two CFD models, with the same mesh, along the same plane in each model.
First, the variables of interest from the two models were consolidated in one spreadsheet, from Ansys output data labelled "outer domain".
The variables that were used were: • Y [ m ], • Z [ m ], and The data sets were filtered to include only the coordinates that were within ± 0.001 m along the X-axis.
The reduced data set bisected the reactor creating a YZ plane that matches the YZ velocity contour plot generated during model postprocessing.
The two data sets coordinates were matched, and the velocity diVerence and unsigned diVerence calculated.
The mean and median velocity changes were calculated from the velocity diVerence.The unsigned velocity diVerence along with the YZ coordinates were used to create a bubble plot to show the magnitude of the change across the plane.
For any data to be displayed on these plots, there had to be a positive influence on the velocity on moving from 200 to 400 RPM stirring rate.
All machine-readable spreadsheet files and exemplar Python scripts for processing these data and generating CFD diVerence plots are available in the zipped folder uploaded as part of the supporting information: https://figshare.com/articles/dataset/Supporting_Information_zip/26405800

Table 2 -DynoChem Calculations
DynoChem calculations were based on the geometry and material properties used in the CFD calculations.Summary of the calculations shown in the below Table S1:
The underlying principle of the plateau detection method is plateau is a region of little or no change; the 1st order diVerential will be approximately zero.Employing numerical diVerentiation, interpreted as calculating the gradient between two adjacent points, noise is amplified when values and associated error are of similar magnitude.This is often the case at a plateau when changes in the y-axis values are small.Data smoothing via rolling averages was employed to minimise the impact of noise.When the rolling average of the gradient is below a defined threshold value, it may be in a plateau region.A plateau region was formally defined if a user-defined number of consecutive points were below the threshold rate-of-change value.
The user defined values are summarised in Table S2:

Table S2 :
User defined values used in the plateau analysis for endpoint times report.