The Analysis of OpenFOAM® Scheme
The following article is related to the investigation of numerical discretization schemes available in the OpenFOAM® software. As OpenFOAM® serves more than 30 discretization schemes for the advection term, only a few are mentioned here. The numerical investigation is related to the description gieven in »Equations and Condition«. The presented results are related to the OpenFOAM® version 5. It is worth to mention that the results might be different in newer versions since algorithms, numerics, or C++ coding might be improved.
General Remark for the Upwind Scheme
The Upwind scheme produces so-called diffusive solutions. That means, the gradients of the quantity of interest is smooth and the solution is not accurate regarding sharp gradients - compare J.H. Ferziger and M. Perić, and the book of R. Schwarze. However, this scheme is the only available numerical discretization method that produces physical and valid values. In other words, the value of Φ is always between the real physical range. In our example, it is the interval [0:1]. The analysis of the investigation shows that the Upwind scheme is more diffusive if an angle between the flow direction and the surface-normal vectors exists. If the flow field is parallel to the grid, no numerical diffusion occurs. Using the Taylor series expansion, it can be proven that the Upwind scheme is of the first-order accuracy; more accurate terms are cut off.
The Results of the Upwind Scheme
General Remark for the Linear Scheme
The numerical scheme named Linear gives one the ability to reach an accurate second-order solution. However, this scheme is highly unstable and calculates non-physical values until the solver blows up and crashes. That means the estimated value of the scalar Φ can be outside of the physical range. In the following case, the physical spectrum is fixed and has to be in the range between [0:1]. In the result section, one can see that some points are lower than zero and higher than one. In the case of an unstructured grid, the scheme is unstable and diverges. The values of the scalar grow and blow up (demonstrated in the video). It is well known that the Linear scheme should be avoided, for example, in the convection term. To avoid non-physical values of the quantity of interest other discretization schemes should be used; J.H. Ferziger and M.Perić
The Results of the Linear Scheme
General Remark for the LinearUpwind Scheme
Using the LinearUpwind scheme increases the accuracy compared to the first-order Upwind scheme while being more stable concerning compared to the Linear scheme. This scheme is based on the Upwind algorithm, and that's why the LinearUpwind inherits the Upwind scheme class. The limiter is set to zero for this scheme. Additionally, the weights() functions return the same values as for the Upwind discretization. The difference is related to the explicit correction that is implemented in the LinearUpwind class. The gradient-based correction is used to increase the accuracy of the standard Upwind implementation. If one compares the linear scheme with the LinearUpwind scheme, it is evident that the LinearUpwind discretization is much more stable than the linear scheme. Additionally, the increase in accuracy compared to the Upwind scheme can be seen. Nevertheless, the LinearUpwind scheme can calculate non-physical values.
The Results of the LinearUpwind Scheme
General Remark for the LimitedLinear Scheme
The Results of the LimitedLimitedLinear Scheme
General Remark for the LimitedLimitedLinear Scheme