2. Methodology
This study starts from the conventional heat diffusion equation without source term. The equation is first discretized using an explicit FDM approach, employing a forward difference in time and a central difference in space. The discrete form is then compared with LBM formulation with BGK approximation, to establish a connection between the two methods, a mathematical technique is applied to resemble the LBM with the BGK approximation from the FDM, once this resemblance is achieved, we introduce the new formulation of the equilibrium distribution function based on time averaging.
This approach needs information from a future time step, which we don’t have it directly, to overcome this, the standard BGK model is used to estimate the future state, which is then used to recalculate the time-averaging equilibrium distribution function.
A flow diagram is provided to illustrate the proposed computational process, this approach is first tested on the heat diffusion problem and then extended to Sod shock tube, where specific mathematical transformations are applied to the FVM to transform it into BGK-like relaxation form.
Finally, numerical results are generated and compared against conventional methods to assess the performance of the proposed model. Figures are used to visualize the difference and evaluate the effectiveness of the time-averaged equilibrium approach in both diffusive and compressible regimes.
2.1. Governing Equation
We start with the conventional heat diffusion equation in one dimension, without a source term:
where
is the temperature,
is time,
is the spatial coordinate, and
is the thermal diffusivity. This equation is discretized using an explicit FDM, employing a forward difference in time and a central difference in space:
where
is the spatial node index.
The LBM for heat diffusion equation using BGK approximation can be written as follows:
where
is the distribution function in direction
,
is the lattice velocity,
is the relaxation time,
is the equilibrium distribution function,
is the time step. We rearrange the terms in Eq. (2) to match the structure in Eq. (3) and extract the analogy between the two formulations (Mohamad 2011).
2.2. Resembling Procedure
The Eq. (2) can be written as follows:
Substituting Eq. (5) into Eq. (4) gives:
This mathematical manipulation to compare the FDM with LBM approximation of heat diffusion, the last term in Eq. (5)
represents the spatially averaged temperature around
, because
lies at the mid-distance between
and
, in other word this is the equilibrium value of the
, Eq. (6) can be rewritten as follows:
where
is the equilibrium value of the temperature at specific location and time
. By comparing Eq. (7) and (3) we can assume the
is an average value around
and lies at the mid-distance between
, this analogy is very important for the current study, as it supports the next assumption, which will be the pillar of this work.
2.3. Time-Averaged Equilibrium Distribution function
We propose a new form of the equilibrium distribution function, averaged overtime:
This approach assumes knowledge of future value of , which are not directly available. To resolve this, we first compute the standard BGK solution at , then use the result to reconstruct the time-averaged equilibrium.
2.4. Computational Flow Process
A flow diagram is constructed to summarize the step-by-step process of implementing the time-averaged equilibrium in the BGK model, the process starts with computing the BGK result at , followed by calculating the time-averaged equilibrium, updating the solution and iteration.
Figure 1.
Computational flowchart illustrating the time-averaged BGK procedure used in this study.
Figure 1.
Computational flowchart illustrating the time-averaged BGK procedure used in this study.
2.5. Time-Averaged BGK Formulation for Heat Diffusion
We consider the heat diffusion equation modeled using the LBM with the BGK approximation. The chosen lattice structure is D1Q2, the simulation is conducted in lattice units, where both the spatial and temporal resolutions are normalized to unity. Under this assumption, the discrete velocity set for D1Q2 model is defined as:
Substituting Eq. (9) into Eq. (3) leads to:
where:
The macroscopic temperature is calculated as the sum of two particles populations:
For D1Q2 the equilibrium functions are defined as:
The reformulated LBM with time-averaged can be expressed as follows:
The effective values of
in the reformulated LBM cannot be determined analytically; instead, they serve as numerically determined relaxation parameters that governs the rate of convergence, similar in role to the conventional relaxation time in the standard BGK model. To reflect the structural similarity of the reformulated approach with FDM and LBM, we assume
Since future values of the distribution functions
are not known in advance, we first use Eq. (10) and Eq. (11) to calculate the future values, then, we substitute these values into Eq. (15) and Eq. (16) to rebuild the updated distribution functions
, this sequence is illustrated in the computational flowchart
Figure 1.
The D1Q2 lattice is selected in this study due to its minimal complexity, which allows for isolating and evaluating the effect of the proposed time- averaged equilibrium strategy without the influence of higher-order lattice dynamics. The simulation domain is initialized with a uniform temperature of 0 (in lattice unit). Dirichlet boundary conditions are applied at both ends of the domain: the left boundary is fixed at a temperature of 1, while the right boundary is fixed at a temperature of 0 unity. The thermal diffusivity , the length of bar is and for FDM and 100 lattice nodes for LBM.
2.6. Mathematical Formulation and Finite Volume Discretization of the Sod Shock Tube
The Sod shock tube problem is a classical benchmark for evaluating the performance of numerical methods in compressible flows. It is governed by the Euler equations, which explain the conservation of mass, momentum, and energy in an inviscid fluid. In this study, gravitational force and other body forces are neglected, as the flow is assumed to be driven purely by pressure discontinuity.
For the two-dimensional case, the Euler equations can be written in conservative form as:
where the conserved variable vector
, and the flux vectors
and
, are:
The system consists of four variables:
represents the density,
is the velocity in the x direction,
represents the velocity in y direction,
represents the energy,
represents the pressure. to make it solvable, an additional relation is needed, this is provided by the equation of state.
where
represents the specific heat ratio.
The standard FVM discretization of this equation for cell
is given by:
Where n represents the time step, in this study, the numerical flux at cell interface is evaluated using HLL approximate Riemann solver, combined with a MUSCL scheme, as proposed in previous studies [
14,
15], the resulting flux at the cell interface is expressed as:
where
and
are reconstructed left and right states at the interface and
is the centre of the cell, obtained by MUSCL scheme. Eq. (21) can be approximated using the second-order Runge-Kutta method. First, the slope is calculated at the first-time step using the conservative variable values. This slope is then used to extrapolate the conservative variables forward by one time step. Using the extrapolated values, a second slope is computed at the new conservative variable values, as follows:
Eq. (23) represent the first order Runge-Kutta method, where
represents the slope at the initial time, this equivalent to the explicit Euler method and serves as a basic time integration scheme, to extrapolate the conservative variable at next time step:
The slope at next time step can be obtained by:
Reupdate the conservative variable by averaging the slopes as follows:
Eq. (26) represents the second order Runge-Kutta method, improving the accuracy of the time integration. The second order scheme along with the first order will be used as a base line for comparison, in this study the result from the four approaches will be compared: the analytical solution, the first order finite volume method, the second order Runge-Kutta method and the proposed time-averaged BGK.
2.7. Transformation of FVM-HLL-MUSCL into a BGK-like Relaxation Form
To enable a BGK-style relaxation approach in the context of FVM, we start from the classical 2D explicit finite volume update for the conserved variables. The update equation for a control volume at
is given by:
Sum Eq. (28) with Eq. (21), rearrange it in term of
:
We can repeat the same procedure for
, the resultant equations are:
The same procedure for
:
To construct a BGK-like analogy D2Q4, we define pseudo distribution functions:
The transformation of the LBM with time-averaged formulation can be expressed as follows:
where
and
are numerical coefficients. In this study, we set
and
, to maintain structural consistency. These reconstructed forms of the update equations enable the application of the time-averaged equilibrium formulation, as previously discussed.
2.8. Parallelization Compatibility
The reformulated equations, expressed in a BGK-like relaxation form with a time-averaged equilibrium function, is particularly well-suited for parallel implementation. Since the update at each lattice node relies only on its immediate neighbours and the equilibrium distribution, the method permits efficient domain decomposition and parallel execution. This locality makes it highly compatible with MPI for distributed memory systems and CUDA for GPU acceleration, enabling scalable performance on high-performance computing platforms.
2.9. Sod Shock Tube Configuration and Analytical Reference
The Sod shock tube is initialized with a partition at the centre of the domain. The left state is defined as and the right state is defined as , the ratio of the specific heat is set to , where R and L represent right and left respectively.
The analytical solution for the sod shock tube is available from Riemann problem for the Euler equations, as described by Toro [
16], this solution is used as a benchmark to validate the numerical results presented in this study.