WorksComputer Science
Effect of turbulent diffusion in modeling anaerobic digestion
Abstract
In this study, the impact of turbulent diffusion on mixing of biochemical reaction models is explored by implementing and validating different models. An original codebase called CHAD (Coupled Hydrodynamics and Anaerobic Digestion) is extended to incorporate turbulent diffusion and validate it against results from OpenFOAM with 2D Rayleigh-Taylor Instability and lid-driven cavity simulations. The models are then tested for the applications with Anaerobic Digestion - a widely used wastewater treatment method. The findings demonstrate that the implemented models accurately capture turbulent diffusion when provided with an accurate flow field. Specifically, a minor effect of chemical turbulent diffusion on biochemical reactions within the anaerobic digestion tank is observed, while thermal turbulent diffusion significantly influences mixing. By successfully implementing turbulent diffusion models in CHAD, its capabilities for more accurate anaerobic digestion simulations are enhanced, aiding in optimizing the design and operation of anaerobic digestion reactors in real-world wastewater treatment applications.
Highlights
Turbulent diffusion models are implemented for both thermal and chemical.
The implementation is validated and shows impact on anaerobic digestion process.
Thermal turbulent diffusion has more significant impact on anaerobic digestion.

Figure graphical abstract.
Introduction
The understanding of chemical and biochemical processes is of paramount importance in modern process industries. Numerical models play a crucial role in providing researchers and engineers with a cost-effective and simplified alternative to experiments. However, the biochemical reaction models typically used in these industries, for example the Anaerobic Digestion Model No.1 (ADMno1) [2], assumes the complete homogeneity of the reactor, akin to an idealized Continuous-Stirred Tank Reactor (CSTR). In real-life1 applications, biochemical reactors often suffer from inadequate mixing, resulting in reduced efficiency and production rates. Harris et al. [13] has shown the positive impact of coupling Eulerian Computational Fluid Dynamics (CFD) with chemical reaction models on the improvements in accuracy. Previous Studies ([8] (Bałdyga and Pohorecki 1995)) emphasized the significance of incorporating CFD in chemical reaction simulations and the effect of mixing. Coughtrie et al. [5] emphasized the importance of turbulent modelling on anaerobic gas-lift digester.
In this study, the aforementioned Anaerobic Digestion (AD) reaction and ADMno1 are selected to be the study case since they are well researched and validated ([2, 26]). The significance of mixing in AD reaction tanks is demonstrated by the work of Lindmark et al. [17]. To address the limitations associated with the assumption of homogeneity, several attempts have been made to couple CFD with ADMno1. Rezavand et al. [24] integrated the Lagrangian CFD method, Smooth Particle Hydrodynamics (SPH) ([19]), with ADMno1 to study a two-dimensional AD reaction tank with passive mixing. Dabiri et al. [6] combined ADMno1 with the Eulerian CFD method to investigate the mixing effects of a recirculation mixing device. Similarly, Tobo et al. [29] employed a compartmental model approach to link Eulerian CFD to ADMno1 and arrived at the same conclusion that assuming homogeneity within the AD reaction tank leads to notable inaccuracies.
During the initial stages of this project (Kumar et al. [16]), an original codebase named CHAD (Coupled Hydrodynamics and Anaerobic Digestion) was developed to incorporate additional details such as thermal and chemical mixing effects by combining data from SPH simulations with ADMno1. The studied case involves a three-dimensional AD reaction tank with an active mixing device (helical rotor), based on a real-life lab-scale model. While CHAD shows significant improvements compared to conventional ADMno1, the current model for mixing effects assumes a constant diffusion coefficient across the computational domain for both thermal and chemical dynamics. This approach is suboptimal for simulating devices where fluids exhibit nontrivial velocity and thermal gradients. The diffusion of scalars, such as chemical concentrations and temperature, is primarily driven by molecular and turbulent diffusion. Molecular diffusion arises from the random thermal motion of molecules or scalar gradients and is known as Brownian or Fickian diffusion, respectively. The diffusion coefficients for molecular diffusion of different substances are at the scale of ([14]), negligible compared with the diffusion caused by the velocity gradient. In anaerobic digestion tanks with passive or active mixing mechanisms, turbulence often plays a dominant role in mixing. Therefore, dynamically calculating the diffusion coefficient based on local turbulence characteristics becomes crucial.
The effect of turbulence on scalar mixing was first studied by Taylor [28], where he statistically analyzed the essential properties of turbulent motion that transport and diffuse scalars. He found that the statistical characteristics of fluid particles are characterized by the variance of the background velocity field and the correlation coefficient. Roberts and Webster [25] proposed a method that utilizes the variance of velocity fluctuations and a defined characteristic length scale to determine turbulent diffusion coefficients. Greif et al. [10], on the other hand, introduced a method that uses velocity dispersion and characteristic length scale to calculate the effective diffusion coefficient, which combines turbulent and laminar diffusion coefficients. Another classic approach for modeling turbulent diffusion coefficients is the application of the Gradient-Diffusion Hypothesis (GDH) (Combest et al., 2011), where it assumes that the turbulent diffusion coefficient is linearly proportional to the turbulent viscosity (eddy viscosity).
This project aims to investigate the modelling methods of turbulent diffusion in the particle-based computational fluid dynamics schemes and the influence of turbulent diffusion on the mixing effect in chemical reactions. It is projected that turbulent diffusion plays a significant role in flows with considerable velocity gradients, and its impact cannot be overlooked. By implementing and validating different turbulent diffusion models in CHAD, it is aimed to enhance the understanding of turbulent diffusion modelling and the turbulent mixing effects in chemical reaction simulations, thereby contributing to a more comprehensive understanding of the topic.

Figure 1.a. The initial condition of the lab-scale reactor. Soluble methane, gaseous methane and operating temperature fields from left to right.

Figure 1.b. The lab-scale reactor with turbulent diffusion (Roberts and Webster, [25]) implemented after 200 s. Soluble methane, gaseous methane and operating temperature fields from left to right.
Methodology
Anaerobic Digestion Model No.1
Anaerobic digestion is a biological process that converts organic waste into biogas and fertilizer. The ADMno1 model was proposed by Batstone et al. [2] and has since become one of the most widely used mathematical models in the industry and academia for AD process. The model takes in factors like inhibition, pH value and temperature, to calculate the reaction rates for the 27 main components and several other intermediate components. For components that could be both gaseous and soluble, carbon dioxide and methane for example, the model also includes the gas transfer process, which takes pressure and temperature as parameters. In this work, the implementation of ADMno1 is based on the work of Rosen and Jeppsson [26]. Since each particle is modeled as a CSTR, the following mass balance equation is established Eq. (1),
where is the volume of the CSTR, or the local particle, and and are the concentration of component in the tank and of inlet respectively, and and are the flow rates of inlet and outlet. The index indicates a certain biochemical process and and are the kinetic rate (the term “reaction rate” is also used for interchangeably) and biochemical rate coefficient for component in that process , respectively. is calculated as the stoichiometry table stated in the work of Rosen and Jeppsson [26]. And the kinetic rate is calculated using reaction rate constants , and inhibition parameters such as , and inhibition factors . In the current implementation of ADMno1 in this work, the pre-defined parameters are set in the beginning of the simulation, based on different operation conditions, such as mesophilic and thermophilic temperature schemes [12, 26]. The constants and parameters used as benchmark by Rosén and Jeppsson [26] are listed in Table 4 and 5 [2].
| Variable | Value | Unit |
| 0 | kg·COD·m⁻³ | |
| 0.044 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0.008 | kmole C·m⁻³ | |
| 0.002 | kmole N·m⁻³ | |
| 0.028 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 3.72 | kg·COD·m⁻³ | |
| 16.9 | kg·COD·m⁻³ | |
| 8.05 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 0 | kg·COD·m⁻³ | |
| 17.0 | kg·COD·m⁻³ | |
| 0 | kmole·m⁻³ | |
| 0.0052 | kmole·m⁻³ | |
| 178 | m³·d⁻¹ | |
| 35 | °C |
Table 4. Concentration of inlet for lab-scale tank simulation.

Figure 2.a. The average temperature profile along y-axis for OF and CHAD simulation, with and without thermal diffusion. , and from left to right.

Figure 2.b. The difference of results between OF and CHAD simulation for average temperature and density along y-axis, with and without thermal diffusion. , and from left to right.
The typical form of the equation for calculating the reaction rate is shown as Eq. (2) below. Note that for different process and different component , the form of the equation might be different. Eq. (2) is shown as an example, in which, is the reaction constant, is the concentration of some soluble component , and is the concentration of the biomass that degrades the component .
The inhibition factors take the form of pH-dependent inhibition and non-pH-dependent inhibition , where indicates the component that is being inhibited. The equations for these 2 factors are shown by Eqs. (3) and (5) below, where is the inhibition parameter of component , and are the lower and upper limit of pH, and is empirical. Such function for calculating is called Hill function,

Figure 3a. The scalar profile, without diffusion for OF (left) and CHAD (right), t = 2s.

Figure 3b. The scalar profile, without diffusion for OF (left) and CHAD (right), t = 4s.
The pH value is a critical parameter in anaerobic digestion, as it affects the activity of microorganisms and the stability of the process. However, accurately modeling the dynamics of pH using differential equations (DEs) can be challenging due to the fast acid-base reaction rates involved. To accurately and stably calculate the pH value with a reasonable time stepping size, a set of differential–algebraic equations (DAEs) are solved iteratively to find the concentration of proton () and soluble hydrogen (). These equations are based on the principles of mass conservation, charge balance, and chemical equilibrium. In this work, the Newton-Raphson method is used to solve the DAEs for obtaining the values of and . The DAEs are shown in Eqs. (6) and (7). [26]
where is the rate of uptake of soluble hydrogen and is the production rate of the gas phase hydrogen.
Smooth particle hydrodynamics
Smooth Particle Hydrodynamics (SPH) is a widely used computational method in fluid mechanics and solid mechanics. It has several advantages over traditional numerical methods like finite volume method (FVM) or finite difference method (FDM). One of the major benefits of SPH is its ability to simulate complex and large-scale problems with moving boundaries, free surfaces, and discontinuities. It is also advantageous that the mass advection is directly modeled by the movement of the particles, therefore avoiding the numerical errors introduced from the discretization schemes. The SPH method is

Figure 4.a. The scalar profile with turbulent diffusion, for OF (left), CHAD with Roberts et al. (mid) and CHAD with SPS (right), s.

Figure 4.b. The scalar profile with turbulent diffusion, for OF (left), CHAD with Roberts et al. (mid) and CHAD with SPS (right), s.

Figure 5.a. The comparison of scalar profile between OF and CHAD with different turbulent diffusion models along x-axis ( m) (left) and along y-axis ( m) (right), s.
Lagrangian in nature, meaning that the particles follow the motion of the fluid or solid they represent. This allows for the simulation of large deformations and movements, such as those seen in fluid dynamics or solid mechanics problems. Additionally, the Lagrangian approach makes it easy to track the motion of specific particles and to study their individual behavior over time. In SPH, the continuum is discretized into a set of particles with a mass, position, velocity, and other relevant physical properties. The physical properties of the said continuum is governed by the Eq. (9), where indicates the local particle, indicates the neighboring particles, is the studied physical property, and is the smooth kernel function and it has 2 arguments, the distance between local particle and its neighboring particle , , and the radius of the smooth kernel , which is also referred to as the smoothing length.

Figure 5.b. The comparison of scalar profile between OF and CHAD with different turbulent diffusion models along x-axis (y = 0.2 m) (left) and along y-axis (x = 0.7 m) (right), t = 2 s.

Figure 6.a. The comparison of methane production of lab-scale reactor over 200 s between Greif et al, and Roberts et al. with different kinematic viscosity. Relative difference shown on the left and absolute mass shown in the right. All simulations are set to exclude the thermal turbulent diffusion.

Figure 6.b. The comparison of methane production of lab-scale reactor over 200 s with different turbulent Schmidt number for different models. Relative difference shown on the left and absolute mass shown in the right. All simulations are set to exclude the thermal turbulent diffusion. The kinematic viscosity (laminar diffusion) is set to 0 m²/s.
it can be written as and with the same principle, is written as . While there are different options for the smooth kernel function the Wendland Quintic ([31]) function is applied in the following.
Applying this scheme to mass and momentum conservation of the continuum, the governing equation can be written as Eq. (10), where is the kinematic viscosity, , and are the velocity, pressure and density of particle . And is a small number to ensure the denominators stay non-zero. The term denotes a source term, gravity for example.
Unlike Eulerian methods, the Lagrangian nature of SPH eliminates the need for the Reynolds Transport Theorem (RTT) in the advection term. This is because mass and momentum transport are inherently carried by the movement of particles. However, this can lead to an underestimation of the dissipative term, namely numerical dissipation, in the governing equations. To overcome this issue, artificial viscosity (Monaghan, [20]) and Sub-Particle Scale (SPS) (Lo and Shao, 2002), are introduced as an additional dissipative term . In this work, only the SPS method is considered, and it will be discussed in the next section.
Turbulence modeling
The Sub-Particle Scale (SPS) turbulence modeling takes inspiration from the classic Large-Eddy Simulation (LES) turbulence modeling in the Eulerian method, where it assumes that the unresolved turbulence and turbulent kinetic energy (TKE) ( for OpenFOAM implementation where SGS denoting Sub-Grid Scale), are modeled by an additional viscous stress tensor and turbulent viscosity (eddy viscosity) and are calculated by Eqs. (12) and (14) (Dalrymple and Rogers, [7]).
where is the Kronecker delta, and denotes an arbitrary spatial filter. A spatial filter in the context of turbulence modeling describes a spatial resolution chosen by the Large-Eddy Simulation (LES) models. Further detailed information of the flow field (velocity fields, pressure field, temperature field, etc.) are “filtered” or averaged. In the standard Smagorinsky model, it indicates the implicit “filter” resulting from the finite resolution when discretizing the computational domain (Eulerian) or continuum (SPH). And denotes a Favre-averaging operation (averaging according to the density field) to incorporate the weakly-compressibility of SPH method, and is the Favre-averaged strain rate tensor. is an empirical constant with a value of 0.0066 (Blin et al., 2003). The eddy viscosity is calculated by the following equations,

Figure 6.c. The comparison of methane production of lab-scale reactor over 200 s with different turbulent Prandtl number for different models. Relative difference shown on the left and absolute mass shown in the right. All simulations are set to exclude the chemical turbulent diffusion (). The kinematic viscosity (laminar diffusion) is set to be 1E−5 m/s.

Figure 6.d. The comparison of methane production of lab-scale reactor over 200 s with different turbulent Schmidt number for different models. All simulations are set to include all thermal and chemical diffusion.

Figure A2. Initial density profile of 2D lid-driven cavity simulation.
where is an empirical constant which varies depending on the application. is the size of the filter. In the standard Smagorinsky model [27] the filter is implicitly chosen to be the size of the cell.
cell. For the SPH method, the radius of the smooth kernel is . And Eq. (15) can be rewritten as Eq. (16),
The implementation of Smagorinsky model is modified based on a similar approach implemented in OpenFOAM (OF) [23, 9], where instead of assuming the anisotropic part of to be approximated by resolved strain rate tensor, it constructs and solves an equation based on the local equilibrium between the unresolved energy production and dissipation. The equation is shown below as Eq. (17), where : denotes a double-inner product operation between tensors. and are empirical constants with a value of 0.094 and 1.048 respectively.
where is the trace of tensor , and is the deviatoric part of the tensor which is calculated as below in Eq. (19). With the solution for , can be found using Eq. (20).
Turbulence diffusion
The diffusion of scalars in the flow fields is defined by Eq. (21) as follows. is the diffused scalar. , also known as the effective diffusion coefficient in some sources, represents the effective diffusivity of the scalar with a dimension of . In the later section, the diffusivity will be expressed differently depending on whether it is for chemical concentrations or temperature of the fluid. Eq. (21) represents a general form for scalar diffusion where is used to indicate the time derivative on the left-hand side (LHS), differentiate from used for the special derivative on the right-hand side (RHS). This distinction arises from whether the equation is formed from a Eulerian or Lagrangian perspective. As mentioned previously in Eulerian methods the conservation laws are applied to a fixed mesh, necessitating the use of the Reynolds Transport Theorem to account for advection between adjacent mesh cells. In Lagrangian method, SPH namely, the advection of the scalars is modeled naturally by the movement of the particles, eliminating the need for additional terms.
Eq. (21) above is rewritten in to Eqs. (22) and (23) for chemical concentrations and temperature of the fluid for SPH convention (Monaghan et al., [21]), where is the specific thermal capacity of the particle with the dimension of , and is the thermal conductivity of the particle with the dimension of .
In this study, the specific thermal capacity of the particles is considered to be constant for all fluid particles of the same type of fluid. For the sake of simplicity, the thermal diffusion equation above and the thermal diffusivity can be rewritten in Eqs. (24) and (25) as follows. is the effective thermal diffusivity and shares the same dimension with .
As shown in Eqs. (26) and (27) below, the effective diffusivity can be modeled as the sum of laminar diffusivity (neglecting molecular diffusivity) and turbulent diffusivity, denoted by subscript T, using an analogy to the SPS turbulence modeling discussed in the previous chapter. One of the commonly used methods to close for the turbulent diffusivity is the Gradient-Diffusion Hypothesis (GDH), which assumes isotropic turbulence and a linear relationship between the unresolved transportation of the mass and the passive scalar (Combet et al., 2011). Non-dimensional numbers like Prandtl number () and Schmidt number () are used, representing the linearity of the said relationship, shown in Eqs. (28) and (29), where is the dynamic viscosity with a dimension of and is the kinematic viscosity with a dimension of . For choosing the appropriate Prandtl and Schmidt number, there are no universal solutions. It depends on the specific flow type and application (Tominaga and Stathopoulos, [30]; Gualtieri et al. [11]).
Roberts and Webster [25] proposed an alternative method where turbulent diffusivity is closed by the characteristic length and velocity of the diffused particle, shown in Eq. (30). The characteristic length for diffusion of particle is the approximation of the distance that the passive scalar can travel within the particle travel time. In the context of SPH scheme, it is chosen to be the kernel size . The characteristic velocity for diffusion of particle is the variance of the velocity fluctuation , shown in Eq. (31). In this work, the variance is weighted using the smoothing kernel to account for the SPH scheme, expressed as Eq. (32).
Another approach to modeling turbulent diffusivity was proposed by Greif et al. [10], who directly modeled the effective diffusivity rather than decomposing it into laminar and turbulent components. Similar to the method of Roberts et al. (Rosén and Jeppsson, [26]), the closure utilizes characteristic length and velocity of the diffused particle. The characteristic length is the same as in Roberts et al. (), while the characteristic velocity is chosen as the velocity dispersion, as shown in Eq. (34), where subscript indicates the local diffused particle and is the number of the neighboring particles within the smoothing kernel. and are the bulk velocity of particle and respectively.
Although Combest et al. (2011) mentioned other methods, such as Algebraic models and scalar-flux models, for modeling the turbulent diffusivity, these methods were not investigated in this study due to the complexity and computational cost involved in solving the additional transport equations for TKE and turbulence dissipation rate. Future studies may explore these models to provide a more comprehensive understanding of turbulent diffusivity in SPH simulations. In this work, the models proposed by Roberts et al. and Greif et al. would be investigated together with the nondimensional number approach (SPS model), and the results are shown in the later chapter.
Case studies
The implementation of the turbulent diffusion models is validated with a gravity-driven 2D Rayleigh-Taylor Instability and a 2D lid driven cavity case. After the validation, a real-life based lab-scale anaerobic digestion tank (Neuner et al., [22]) is tested with CHAD simulation to verify the effectiveness of the turbulent diffusion modeling. The initial states of all the cases are graphically presented in the appendix.
Rayleigh-Taylor Instability
In this case, a 2D Rayleigh-Taylor Instability (RTI) simulation is conducted, where two fluids with different densities and temperatures are considered. The simulation is gravity-driven, with the force of gravity acting in the direction. The obtained results are compared with the outcomes from the OpenFOAM simulations. The simulation parameters are provided in Table 1. To focus on the effect of turbulent diffusion, the thermal conductivity is deliberately kept small to minimize the influence of resolved thermal diffusion. Additionally, a small turbulent Prandtl number is chosen to enhance the impact of turbulent diffusion.
| Parameter Name | Value |
| Height (transversal) | 0.12 m |
| Width (longitudinal) | 0.04 m |
| Density (heavy) | 1500 kg/m³ |
| Density (light) | 1000 kg/m³ |
| Temperature (warm) | 300 K |
| Temperature (cold) | 298 K |
| Thermal conductivity | 1E−8 W/(m*K) |
| Specific heat capacity | 4180 J/(kg*K) |
| Turbulent Prandtl number | 0.01 |
Table 1. Parameters for the RTI simulation.
Lid-driven cavity
To validate the implementation of turbulent diffusion models, a 2D lid-driven cavity case is employed. The parameters for this study case are listed in Table 2. In this scenario, instead of examining the thermal properties, a passive scalar tracer “s” is used to investigate the diffusion characteristics of the flow field. Similar to the previous case, the laminar part of diffusion is neglected by setting a high Schmidt number. A turbulent Schmidt number of 0.1 is selected to emphasize the influence of turbulent diffusion.
| Parameter Name | Value |
| Height (transversal) | 1.0 m |
| Width (longitudinal) | 1.0 m |
| Density | 1000 kg/m³ |
| Kinematic viscosity | 1E−4 m²/s |
| Driving velocity | 1 m/s |
| Schmidt number | 1.0E20 |
| Turbulent Schmidt number | 0.1 |
| Scalar (high concentration) | 1.1E−3 kg/m³ |
| Scalar (low concentration) | 1.0E−3 kg/m³ |
Table 2. Parameters for the lid-driven cavity simulation.
Lab-scale AD tank
Another test case is based on the geometry of a real-world lab-scale digester (Neuner et al., [22]). The simulation is initialized with two layers of sludge, each having different initial temperatures of 308.15 K and 309.15 K, along with different concentrations of chemical components following the ADM1 model. The reactor is designed to operate under thermal conditions appropriate for anaerobic digestion reactions. It is configured as a batch reactor, representing a closed system in terms of mass exchange. A helical mixer is employed to stir the fluid at a constant rotational speed, while the reactor walls and mixer have distinct constant temperatures. All the relevant parameters for this case are listed in Table 3 below. The initial condition of the tank is presented in Fig. 1a.
| Parameter Name | Value |
| Volume of tank | 8E−3 m³ |
| Mixer velocity | 12 rpm |
| Sludge temperature (warm) | 309.15 K |
| Sludge temperature (cold) | 308.15 K |
| wall temperature (mixer) | 310.15 K |
| wall temperature (wall) | 303.15 K |
| Volume of particle | 6.4E−8 m³ |
| Number of Particles | 128,726 |
| Simulation Duration | 200 s |
Table 3. Parameters for the lab-scale tank simulation.
Results and discussion
Rayleigh-Taylor Instability
The results of 2D RTI simulations of OF and CHAD are presented in Fig. 2a. and 2b.. Despite the best efforts spent tweaking the parameters to have comparable flow development, Eulerian method and Lagrangian method are too different handling multiphase simulations. The temperature and density profile are averaged along x-axis and plotted along y-axis. As can be seen from Fig. 2a., the temperature profile has a relatively good agreement between OF and CHAD results in the earlier stage of the dynamic. However, the profile diverges gradually as time progresses. To validate how much of the divergence is stemming from the disagreement from the interface between the 2 layers of fluid, in Fig. 2b., the relative difference between average density and temperature profile along y-axis are compared. It is clear from Fig. 2b. that most of the disagreement in temperature between OF and CHAD simulation is resulting from the difference in density. In Fig. 5 the differences of temperature profile with and without turbulent diffusion in OF and CHAD are compared. As the movement of 2 layers of fluid diverges and the interface between the two develop differently, the profile of the 2 cases do not follow each other exactly, but for the bulk part within the same range. To validate the implementation of the turbulent diffusion models with a better matching flow development, another validation case based on 2D lid-driven cavity simulation is created and the results are shown in § 1.3.2.
Lid-driven cavity
The results of 2D lid-driven cavity cases are shown in Figs. 3–5. The velocity field is comparable between OF and CHAD simulation once the flow fields are fully developed. The velocity profile of x and y-axis plotted against y and x-axis respectively, and with these flow fields the implementation of the models can be validated better than the 2D RTI cases, shown by figures in Appendix.
Figs. 3.a. and 3.b. show the comparison of the concentration fields of and chad simulation without diffusion at s and s. The discrete separation of concentrations of CHAD simulations is visible. With a comparable velocity field between OF and CHAD simulations, a better agreement of concentration profile development, shown in Fig. 4.a. and 4.b., between OF and CHAD can be observed. Figs. 5.a. and 5.b. show the concentration profiles of the cases with 2 different turbulent diffusion models, plotted and compared along x and y-axis shown by the redlines in Figs. 4.a. and 4.b.. Visually the results of CHAD and OF agrees quite nicely.
Lab-scale reactor
After the implementations being validated, a lab-scale AD reactor tank based on a real-life model (Neuner et al., [22]) is tested. The study case is simulated in 3D the results are presented as below. Fig. 1.b. shows the concentration fields of soluble and gaseous methane and temperature field after 200 s of simulation, with both thermal and chemical turbulent diffusion model implemented. The inhomogeneity within the tank is obvious, even with an active mixing device. A relatively poorly mixed region can be spotted at the bottom of the tank, and the region near the mixing device has better mixing due to the turbulence created by the mixer, highlighting the importance of including CFD and turbulent diffusion models into such simulations.
In Fig. 6.a., the results in terms of methane production with different turbulent diffusion models and no thermal turbulent diffusion are compared. On the left is the relative differences (RD) of CHAD between the results with only biochemical, and the results with turbulent diffusion model proposed by Greif and Roberts. In Fig. 6, the blue line and marks are the RD of the total amount of methane (soluble plus gaseous) within the tank while the red show the RD of the amount of gaseous methane released from the tank due to pressure balance with the atmosphere pressure. The plot on the right is the mass of methane stored within the tank (blue) and release as gas (red). With kinematic viscosity set to be , the model proposed by Roberts and Webster [25] gives comparable results as the model proposed by Greif et al. [10]. As shown by the plot on the right of Fig. 6.a., the difference between the results with only reaction and with diffusion is noticeable, while the different values of kinematic viscosity leave trivial impact on the results.
To compare the impact of the turbulent Schmidt number , the simulations are set to have no kinematic viscosity and no thermal diffusion. Since the model proposed by Roberts and Webster [25] is independent of , it is selected to be the calibration for finding the best value for this case. It is found that when the results of SPS turbulent diffusion model are comparable with Roberts and Webster [25] as indicated by Fig. 6.b., which is aligned with the values proposed by Gualtieri et al. [11]. From the RD plot of Fig. 6.b., it can be seen that with higher , meaning less chemical turbulent diffusion, the result is closer to the result where only biochemical reaction is applied, showing the effect of chemical mixing on the efficiency of the reaction tank (see Table 5).
| Parameter | Value | Unit |
| 1E−5 | kg·COD·m | |
| 5E−6 | kg·COD·m | |
| 3.5E−6 | kg·COD·m | |
| 0.0018 | M | |
| 7E−6 | kg·COD·m | |
| 1E−4 | M | |
| 0.3 | kg·COD·m | |
| 0.15 | kg·COD·m | |
| 0.2 | kg·COD·m | |
| 0.4 | kg·COD·m | |
| 0.1 | kg·COD·m | |
| 0.5 | kg·COD·m | |
| 10 | d | |
| 10 | d | |
| 10 | d | |
| 0.02 | d | |
| 0.02 | d | |
| 0.02 | d | |
| 0.02 | d | |
| 0.02 | d | |
| 0.02 | d | |
| 0.02 | d | |
| 0.5 | d | |
| 35 | d | |
| 50 | d | |
| 8 | d | |
| 20 | d | |
| 6 | d | |
| 13 | d | |
| 30 | d | |
| 5 | – | |
| 4 | – | |
| 6 | – | |
| 6 | – | |
| 5.5 | – | |
| 7 | – |
Table 5. Biochemical parameter values for lab-scale tank simulation.
For the following simulations, different choices of turbulent Prandtl number are tested and the results are shown in Fig. 6.c.. The effect chemical turbulent diffusion is excluded by setting . From the finding shown in Fig. 6.a., the kinematic viscosity (laminar diffusion) is set to be . As can be observed, the thermal turbulent diffusion has much higher impact on the biochemical reactions within the reaction tank compared to the chemical turbulent diffusion. With higher , meaning less thermal turbulent diffusion, the result diverges less compared to the result where only biochemical reaction is applied, showing the effect of thermal mixing on the efficiency of the reaction tank.
With the findings from Figs. 6.a., 6.b. and 6.c., the kinematic viscosity is set to be and turbulent Prandtl number is set to be 0.85 for the other simulations. The simulations are made for Roberts model and SPS model with different turbulent Schmidt number . The results are shown in Fig. 6.d.. Now with both thermal and chemical turbulent diffusion implemented, the 2 turbulent diffusion models show different impact on the reaction, as shown by the RD plot of Fig. 6.d.. However, no meaningful difference between the models is spotted on the absolute mass of the methane production, which is expected since chemical turbulent diffusion has less impact on the reaction compared to thermal turbulent diffusion and all simulations have the same .
Computational cost
The pre-processing of data (computational fluid dynamic simulations) is one limitation that cannot be overlooked, however it is not within the scope of this study. A thorough study conducted by Kumar et al. [15] had covered this topic. In the current implementation of CHAD, simulating the 3D lab-scale reaction tank in the study case on an AMD Ryzen 7 5800X CPU (parallelized among 12 computational threads), excluding the thermal and chemical diffusion, takes around 2800 s for a 200-second reaction. With the constant thermal and chemical diffusion included, the same simulation is roughly 75 % slower, finishing around 4900 s. Adding the turbulent diffusion models results in an extra 0.3–0.5 % time increase.
Conclusion
Two turbulent diffusion models implemented and validated for CHAD produce comparable results, with the best agreement achieved at set to 0.2 for this specific setup. Within a 200-second batch reactor, mixing has minimal impact on biochemical reactions, while thermal turbulent diffusion exerts a greater influence than chemical turbulent diffusion. These findings highlight the effectiveness of turbulent diffusion models for coupling CFD with biochemical reactions, especially in scenarios with rapid dynamics. As reaction dynamics accelerate, turbulent diffusion models become increasingly crucial. Further investigations are needed for scenarios involving multiphase flows.
CRediT authorship contribution statement
Jeremy Z. Yan: . Prashant Kumar: Conceptualization, Methodology, Software, Writing – review & editing. Wolfgang Rauch: Conceptualization, Funding acquisition, Methodology, Project administration, Resources, Supervision, Writing – review & editing.
Declaration of Competing Interest
The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Jeremy Yan reports financial support was provided by European Commission.
Data availability
Data will be made available on request.
Acknowledgments
This work is supported by the funding from the European Union’s Horizon 2020 research and innovation program under the Marie
Skłodowska-Curie grant agreement No. 847476. The contents of this publication do not necessarily reflect the position or opinion of the European Commission.
Appendix

Figure A1. Initial density profile of 2D Rayleigh-Taylor Instability simulation.

Figure A3. Velocity profile of 2D lid-driven cavity simulation plotted along the center of the domain on y and x-axis.
References
References
- [2]Batstone, D.J., et al., 2002. The IWA Anaerobic Digestion Model No 1 (ADM1). Water Sci. Technol. J. Int. Assoc. Water Pollut. Res. 45 (10), 65–73.pubmed.ncbi.nlm.nih.gov/12188579
- [5]Coughtrie, A., Borman, D., Sleigh, P., 2013. Effects of turbulence modelling on prediction of flow characteristics in a bench-scale anaerobic gas-lift digester. Bioresour. Technol. 138, 297–306.
- [6]Dabiri, S., Kumar, P., Rauch, W., 2023. Integrating biokinetics with computational fluid dynamics for energy performance analysis in anaerobic digestion. Bioresour. Technol. 373, 128728.
- [7]Dalrymple, R., Rogers, B., 2006. Numerical modeling of water waves with the SPH method. Coast. Eng. 53, 141–147.DOI
- [8]Dapelo, D., Bridgeman, J., 2018. Assessment of mixing quality in full-scale, biogas-mixed anaerobic digestion using CFD. Bioresour. Technol. 265, 480–489.DOI
- [9]ESI Group, OpenFOAM developers, 2016. OpenFOAM documentation. [Online]. Available at: https://www.openfoam.com/documentation/guides/latest/doc/guide-turbulence-les-smagorinsky.html [Accessed 2 2023].
- [10]Greif, T.H., Glover, S.C.O., Bromm, V., Klassen, R.S., 2009. Chemical mixing in smoothed particle hydrodynamics simulations. Monthly Notices of the Royal Astronomical Society, January, Volume 392, pp. 1381-1387.DOI
- [11]Gualtieri, C., et al., 2017. On the values for the turbulent Schmidt number in environmental flows. Fluids 2.DOI
- [12]Hansruedi Siegrist, D. V. J. L. G.-H. W. G., 2002. Mathematical model for meso- and thermophilic anaerobic sewage sludge digestion. Environ. Sci. Technol., 1113–1123.pubmed.ncbi.nlm.nih.gov/11917999
- [13]Harris, C.K., et al., 1996. Computational fluid dynamics for chemical reactor engineering. Chem. Eng. Sci. 51, 1569–1594.DOI
- [14]Holz, M., Heil, S.R., Sacco, A., 2000. Temperature-dependent self-diffusion coefficients of water and six selected molecular liquids for calibration in accurate 1H NMR PFG measurements. PCCP 2, 4740–4742.DOI
- [15]Kumar, P., Dabiri, S., Wolfgang, R., 2022. 2D Simulation of a anaerobic digester. Comput. Fluid. Mech. 4.DOI
- [16]Kumar, P. et al., 2023. Introducing CHAD – An ADM1 Solver for Direct Linking to Lagrangian CFD Software. [Online]. Available at: https://doi.org/10.48550/arXiv.2311.08927.
- [17]Lindmark, J., Eriksson, P., Thorin, E., 2014. The effects of different mixing intensities during anaerobic digestion of the organic fraction of municipal solid waste. Waste Manage. (New York, N.Y.) 34 (8), 1391–1397.DOI
- [19]Monaghan, J.J., 1988. An introduction to SPH. Comput. Phys. Commun. 48, 89–96.
- [20]Monaghan, J.J., 1992. Smoothed particle hydrodynamics. Ann. Rev. Astron. Astrophys. 30, 543–574.
- [21]Monaghan, J., Huppert, H., Worster, M., 2005. Solidification using smoothed particle hydrodynamics. J. Comput. Phys. 206, 684–705.
- [22]Neuner, T., et al., 2022. Numerical and experimental flow investigation using ultrasonic PIV for optimizing mechanically agitated lab-scale anaerobic digesters. Chem. Eng. Sci. 264, 118129.DOI
- [23]Nozaki, F., 2019. CFD WITH A MISSION. [Online]. Available at: https://caefn.com/openfoam/smagorinsky-sgs-model [Accessed 2 2023].
- [24]Rezavand, M. et al., 2019. A fully Lagrangian computational model for the integration of mixing and biochemical reactions in anaerobic digestion. Comput. Fluids 181.DOI
- [25]Roberts, P., Webster, D., 2003. Turbulent diffusion. Theories Appl. Environ. Fluid Mech.
- [26]Rosén, C. & Jeppsson, U., 2006. Aspects of ADM1 Implementation within the BSM2 Framework. January.
- [27]Smagorinsky, J., 1963. General circulation experiments with the primitive equations: I the basic experiment. Mon. Weather Rev. 91, 99–164.
- [28]Taylor, G.I., 1922. Diffusion by continuous movements. Proc. London Math. Soc. s2–20, 196–212.
- [29]Tobo, Y.M., Bartek, J., Nopens, I., 2020. Linking CFD and kinetic models in anaerobic digestion using a compartmental model approach. Process 8.DOI
- [30]Tominaga, Y., Spalart, P., 2007. Turbulent Schmidt numbers for CFD analysis with various types of flowfield. Atmos. Environ. 41, 8091–8099.DOI
- [31]Wendland, H., 1995. Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree. Adv. Comput. Math. 4, 389–396.DOI