Abstract
In this work, an adaptive element free Galerkin (EFG) technique is proposed for solving convection diffusion equation. A post-processed gradient is used as a posteriori error estimation to find locations with large contribution of the error. Also, to avoid instabilities, the EFG method is applied on a modified equation instead of the original equation. In the modified equation diffusion coefficient (known as artificial diffusion) depends to the distance between nodal points. The numerical results reveal efficiency of the adaptive technique.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The convection diffusion equation is given by
where \(\epsilon \) is a small positive parameter and \(\Omega \) is an open bounded domain enclosed with \(\partial \Omega =\Gamma _D\cup \Gamma _N.\) Moreover, n is the outward unit normal to the boundary. This type of equations plays an important role in many physical phenomena. For example, scalar convection diffusion equations describe the transport of a scalar quantity, e.g. temperature or concentration. In these equations the operators \(-\epsilon \Delta \) and \(\mathbf{b }.\nabla \) determine what the solution of (1.1) looks like. The first one relates u proportionally to \(\epsilon \) and the second one transports u in the direction of vector \(\mathbf{b }\) (Larson and Bengzon 2013). Hence, these operators model the physical processes of diffusion and convection, respectively. Generally, solutions of the convection diffusion equations have layers, due to this trait there are some small parts of the domain where derivative of the solution is very large (John 2000). In Tang and Trummer (1996) boundary layer resolving pseudospectral methods are presented to overcome this problem. Adaptive techniques are very suitable to this kind of problems. In adaptive techniques a posteriori error estimation is needed to find information about locations for local mesh refinement as well as for estimating the global error. There are several works in implementation and analysis of a posteriori error estimation for solving many classes of partial differential equations in finite element methods (Ainsworth and Oden 1993; Bank and Weiser 1985; Eriksson et al. 1995). A good review of some a posteriori error estimation for convection diffusion equations can be found in John (2000).
The main challenge in convection diffusion problems depends to how large is “Péclet number” which provides a measure of how much the convective term prevails over the diusive one. A problem featuring \(Pe\gg 1\) will be named convection dominated diffusion problem (Quarteroni et al. 2014). In this case behaviour of the numerical solutions is oscillatory. To avoid these solutions, discretization parameters should be chosen sufficiently small which makes the numerical method inconvenient. An approximate solution of the problem does not exhibit oscillations if \(Pe < 1\). A stabilization technique is based on adding an artificial diffusion to make Péclet number as small as possible. Therefore, for smaller values of \(\epsilon \), this stabilization technique is more efficient. This more diffusion should be as little as possible not to sacrifice accuracy, but as much as need to obtain stability (Larson and Bengzon 2013).
The current work presents an adaptive element free Galerkin method for solving convection diffusion equations. The EFG method was introduced by Belytschko et al. (1994), Dolbow and Belytschko (1998). This method is based on the moving least squares (MLS) Yaw (2009) approximation and a background mesh for the integration purpose. The MLS shape functions do not have Kronecker delta property, therefore, the essential boundary condition should be enforced. In Dehghan and Abbaszadeh (2018a, b) the authors have combined the EFG method with the moving Kriging interpolation and radial point interpolation which have Kronecker delta property for solving transport problems, incompressible Navier–Stokes equation and some PDEs with discontinuous solutions. The element free Galerkin method is used for solving real world problems in Jannesari and Tatari (2016, 2017) and Dehghan and Narimani (2018). More about meshfree methods are presented in Liu (2003).
Rest of the paper is organized as follows: Sect. 2 is devoted to explain EFG method and MLS approximation. Section 3 explains the proposed adaptive technique and in Sect. 4, numerical results for some problems are presented to confirm validity of the approach. The last section is conclusion.
2 The EFG method
The element free Galerkin method is based on the weak formulation of the considered problem and MLS approximation. In MLS approximation nodal points are used and does not need any mesh generation. This approximation is not necessarily interpolant, hence enforcement of Dirichlet boundary conditions is not straightforward. There are several ways to impose these boundary conditions such as Lagrange multipliers and penalty method. In this work, the penalty method is used to impose Dirichlet boundary conditions.
2.1 MLS approximation
The MLS approximation which was introduced by Lancaster and Salkauskas (1981) is well-known technique with acceptable accuracy. This approximation is local and at any arbitrary evaluation point \(\mathbf{x}\), only the neighboring nodes in influence domain of point \(\mathbf{x}\) are consequential. The influence of a node \(\mathbf{x}_i\) is governed with a weight function \(w(\mathbf{x}-\mathbf{x}_i)\), which vanishes outside of the influence domain of node \(\mathbf{x}_i\). Let the true solution u be known at some selected points \(\mathbf{x}_i\). To approximate solution \(u_h(\mathbf{x})\) in the problem domain \({\bar{\Omega }}\), by least squares sense, the goal is to find minimum of the expression \((u_h(\mathbf{x}_i) -u(\mathbf{x}_i))^2\) for each i. Let the approximation \(u_h(\mathbf{x})\), be posed as a polynomial of order m with variant coefficients in the following matrix form
where \(\mathbf{p}^{\text {T}}(\mathbf{x})=[p_1(\mathbf{x})~p_2(\mathbf{x})~\cdots ~p_m(\mathbf{x})]\) consists of complete monomial of order m. In two dimensional cases, linear and quadratic basis are defined as:
The vector \(a(\mathbf{x})\) is given by
The unknown parameters \(a_j(\mathbf{x})\), \(j=1,\ldots ,m,\) vary with space coordinates \(\mathbf{x}.\) Therefore, \(\mathbf{a }(\mathbf{x})\) should be determined at any given point \(\mathbf{x}\). In doing so, the least squares functional is written as following:
where \(N_{_t}\) is the total number of points. The coefficient \(\frac{1}{2}\) is added for mathematical convenience. Also, each summation term, is weighted by a weight function \(w(\mathbf{x}-\mathbf{x}_i)\) thus the local solution is influenced by the local nodes that are not far away. To minimize \(\mathcal{J}\) with respect to each \(a_i(\mathbf{x})\), for the sake of simplicity, first write functional \(\mathcal{J}\) in the following matrix form
where
and
Setting \(\frac{\partial \mathcal{J}}{\partial \mathbf{a}}=0\) yields the following:
Transpose the whole Eq. (2.4) gives:
This equation can be rewritten as follows:
Define moment matrices \(\mathbf{A}(\mathbf{x})\) and \(\mathbf{B}(\mathbf{x})\) as follows:
Using these definitions, Eq. (2.6) becomes:
solve for unknown coeffiecints \(\mathbf{a}(\mathbf{x})\) and substituting it into Eq. (2.1):
where
is the vector of shape functions. Moreover, derivatives of shape function can be obtained using the product rule on Eq. (2.11)
with
where
Further details about MLS shape functions can be found in Yaw (2009). In all numerical examples we have used shifted and scaled MLS shape functions that computationally are more efficient. Details about how to construct these shape functions are presented in Belytschko et al. (1996).
2.2 The governing system
Consider Eq. (1.1) as follows:
find \(u \in H^1(\Omega )\) from
where
and
where v is the test function that is chosen as MLS shape function. Applying the integration by parts formula to the above equation and adding the penalty terms to enforce Dirichlet boundary conditions lead to the following system (Dolbow and Belytschko 1999):
where
and
The parameter \(\gamma \) in Eqs. (2.19) and (2.22) is used to penalize difference between Dirichlet boundary conditions and the obtained solution by EFG approximation. Moreover, it should be noted that the EFG method requires the partitioning of the domain into cells, to evaluate all integrals appeared in Eqs. (2.16)–(2.22).
In the point of geometry, these cells should be as simple as possible and usually are rectangle or triangle. In this work, we use a triangular mesh as a partition of the domain. Based on Reference (Belytschko et al. 1994) a proper ratio of Gaussian points to total number of nodes is 4–7. To get this ratio, 3-point Gaussian rule is used, however, the results are acceptable using one point rule. An excellent detail about integration on triangle can be found in Gockenbach (2006).
2.2.1 Stabilization
Based on what is discussed in Larson and Bengzon (2013), when \(\epsilon \) in Eq. (1.1) decreases we lose control of gradients of u, i.e. \(\nabla u\) can grow sharply. In other words, small perturbations of f can lead to a large local values of \(\nabla u\). Indeed, it is common for u to has thin regions called layers where it changes rapidly. Due to large local values of \(\nabla u\) there are great difficulties in handling layers and thus need modification of the numerical method. There are several techniques to do this such as adding an artificial diffusion, least squares stabilization (John 2000) and edge stabilization that is based on least square stabilization of the gradient jumps across the element boundaries (Burman and Hansbo 2004). In this paper \(\frac{h}{2}{} \mathbf{b}\) is added to the diffusion term as an artificial diffusion, where h is mesh size. Therefore, Eqs. (2.16) and (2.21) are replaced by the following equations
and
Although, this work is presented with the aim of implementation of an adaptive EFG technique for convection diffusion problems, stabilization strategy can help us to get better results with less computational effort.
3 The adaptive algorithm
Let \(\mathcal{T}=\{T\}\) be a partition of domain \(\Omega \) and the mesh size \(h_T\) is defined by \(h_T={\text {diam}}(T)\). The following adaptive algorithm generates a sequence of meshes, \(\mathcal{T}_0, \mathcal{T}_1 ,\mathcal{T}_2,\ldots \).
Start with a coarse mesh \(\mathcal{T}_0.\)
Solve the problem to get the discrete solution \(u_h\) on the current mesh.
Compute the error on each element using a suitable a posteriori error estimation.
Mark a fixed \((\theta )\) percentage of those element with largest error contribution.
Refine the marked element with a local mesh refinement technique such as red-green refinement and longest edge bisection, to generate new triangulation \(\mathcal{T}_{k+1}.\) Details of these local refinement techniques can be found in most finite element books such as Gockenbach (2006). If in the previous step we chose \(\theta =1\), then the refinement is global.
Continue this process until get acceptable tolerance, or when the maximum number of elements in the mesh exceeds from a user predefined number.
3.1 A posteriori error control
Let \(e_h=u-u_h\) be the numerical error relates to the exact solution u and numerical solution \(u_h\). Instead of measuring the error of the solution in some applications, it maybe useful to consider the gradient of error, i.e. \( \nabla e_h=\nabla u- \nabla u_h\). In most problems the exact value of the gradient is not known. Here, the main idea is post processing the gradient and to find an estimate for the true error by comparing the post-processed gradient and non post-processed gradient of the numerical solution \(u_h\) (Gratsch and Bathe 2005). Let \(Gu_h\) denote an improved (post-processed) approximation to the gradient. It can be approximated by
where \(n_i\) is number of points in the influence domain of \(\mathbf{x }\). The coefficients \({gu_h}_i\) can be determined by solving the following equation:
or, in the other words, solving the following linear system:
Substituting (3.1) into Eq. (3.3) leads to:
Then using \({gu_h}_i\) to find \(Gu_h\) and applying it instead of the true gradient, yield the following a posteriori error estimation (Gratsch and Bathe 2005)
where \(\Vert . \Vert _E\) shows the energy norm and
This kind of error estimation is known as recovery-based error estimation was introduced by Zienkiewicz and Zhu (1992).
4 Numerical investigation
In this section, the EFG method is applied for some examples to demonstrate efficiency and accuracy of the proposed method. In all of the examples linear basis \((m=3)\) and following cubic spline weight function with rectangular support are used
where \(r=\frac{||x-x_i||_2}{d_i}\), and \(d_i\) is about 1.5h where h is the maximum diameter of the triangles that one of their vertices is \(x_i\). Moreover, all examples are solved in unit square \([0,1]\times [0,1]\) and with \(\gamma =1000\) as the penalty parameter. To show efficiency of the present method, the initial mesh is chosen very coarse. The unit square is only divided into two triangles as the first mesh. Also, we set \(\theta =0.3\), and use the following definition as effectivity index
Besides, in the following tables \(L^2\) error is reported on some level of refinements where adaptive.S and uniform.S are adaptive and uniform methods using stabilization and \(N_t\) is total number of nodes.
4.1 Example 1
As the first numerical experiment consider following example with \(\epsilon =10^{-3}\), \(\mathbf{b }=(2,3)^{\text {T}}\) and \(c=1\) and \(\partial \Omega =\Gamma _D.\) The right hand side f and Dirichlet boundary conditions are chosen such that
In this case, the solution has typical regular boundary layers at \(x=1\) and \(y=1\) (John 2000). In Tables 1 and 2, \(L^2\) error of solutions computed by uniform and adaptive refinements are reported respectively. In each of these tables stabilized and unstabilized cases are investigated. According to these tables stabilization technique is more efficient for adaptive refinement. In Table 3 relative error and CPU time of stabilized adaptive and uniform refinements are compared which shows efficiency of the presented stabilized adaptive method.
The numerical solution and the last mesh of this test are plotted in Fig. 1. Also, Fig. 2 shows the effectivity indices and obtained \(L^2\) error for this example. In this example, the effectivity indices are lower than one. Indeed, the error is underestimated by around a factor between 0.1 and 0.5. We emphasize that an a posteriori error estimator is called efficient, if the effectivity index (EI) and inverse of it \((\frac{1}{EI})\) are bounded for all meshes. Besides, if it does not vary too much with respect to a given mesh. Also, Fig. 3 shows convergence rate for this example.
4.2 Example 2
This example is taken from Burman and Hansbo (2004). Consider (1.1) with \(\epsilon =10^{-5}\), \(\mathbf{b }=(1,0)^{\text {T}}\) and \(c=1\). The exact solution that has an internal boundary layer, is given by
The corresponding f and Dirichlet boundary conditions are obtained by inserting the exact solution into Eq. (1.1). The numerical solution and the final mesh of this test at level 15 of adaptive refinements are shown in Fig. 4. Moreover, the effectivity indices and the obtained \(L^2\) error at this refinement level have shown in Fig. 5. In this case, the effectivity indices for both stabilized and unstabilized are convergent to 1.5. However, \(L^2\) errors are too different in with and without stabilization. In Fig. 6, convergence rates of the solutions obtained by adaptive and uniform refined mesh with stabilization are compared. As in the previous example, Tables 4, 5 and 6 are devoted to the comparison of adaptive and uniform refinements and effect of stabilization technique. Also, in Table 7 results of the current method and finite element method using edge stabilization (FEM-ES) are compared. Results of FEM-ES have extracted from Burman and Hansbo (2004). It should be noted that, the reported CPU time is the total elapsed time, from level 1 to the last level, and it is not the CPU time of last level.
4.3 Example 3
In this case \(\epsilon =10^{-2}\), \(\mathbf{b }=(0,1)^{\text {T}}\) and \(c=0\). The exact solution is as follows:
The right-hand side f and Dirichlet boundary conditions can be computed from the exact solution. The results of this test are shown in Fig. 7. The effectivity indices and \(L^2\) error are gathered in Fig. 8. Also, as Example 2, we have reported the effectivity indices for both stabilized and unstabilized methods. However, here the results of using artificial diffusion (stabilized) and without this term (unstabilized) are not too different. The reason is that in this example \(\epsilon \) can not be too small because even the exact solution is undefined for \(\epsilon =10^{-3}\) in the MATLAB double precision floating point system. Also, Fig. 9 shows convergence rate of presented methods in this example. Comparisons of adaptive and uniform refinements and effect of stabilization are presented in Tables 8, 9 and 10.
4.4 Example 4
As the last example, consider the following example without exact solution, which involves discontinuous boundary conditions and causes not only a sharp layer, but also an internal sharp layer (Lin and Atluri 2000). In this case, \(\epsilon =10^{-3}\), the right hand side f and the reaction coffiecient c are zero. The vector \(\mathbf{b}=[\cos t, \sin t]\) and Dirichlet boundary conditions are as follows:
The numerical solution and last mesh obtained at level 20 of refinements for \(t=\frac{\pi }{4}\) are shown in Fig. 10. A mild oscillation can be observed near the point (0.05,0.2). Results without using stabilization and adaptive technique are not acceptable and are not reported in the paper.
5 Conclusion
In this paper, an adaptive element free Galerkin (EFG) method is suggested for solving convection diffusion type equations. A posteriori error estimation based on the post-processed gradient is used. Also, to get the stability an artificial diffusion is considered. Here, it should be noted that based on the results reported in the tables, use of artificial diffusions has great effect on adaptive refinements, while this effect is insignificant for uniform refinements. To show efficiency of the proposed adaptive technique, some examples are solved numerically and the effectivity indices are computed in the examples with exact solution.
References
Ainsworth M, Oden JT (1993) A unified approach to a posteriori error estimation using element residual methods. Numer Math 65:23–50
Bank RE, Weiser A (1985) Some a posteriori error estimotors for elliptic partial differential equations. Math Comp 44:283–301
Belytschko T, Krongauz Y, Fleming M, Organ D, Liu W (1996) Smoothing and accelerated computations in the element free Galerkin method. J Comput Appl Math 74:111–126
Belytschko T, Lu Y, Gu L (1994) Element free Galerkin methods. Int J Num Meth Eng 37:229–256
Burman E, Hansbo P (2004) Edge stabilization for Galerkin approximations of convection-diffusion-reaction problems. Comput. Methods Appl. Mech. Engrg. 193:1437–1453
Dehghan M, Abbaszadeh M (2018) Variational multiscale element-free Galerkin method combined with the moving Kriging interpolation for solving some partial differential equations with discontinuous solutions. Comp Appl Math 37:3869–3905
Dehghan M, Abbaszadeh M (2018) A reduced proper orthogonal decomposition (POD) element free Galerkin (POD-EFG) method to simulate two dimensional solute transport problems and error estimate. Appl Numer Math 126:92–112
Dehghan M, Narimani N (2018) An element free Galerkin meshless method for simulating the behavior of cancer cell invasion of surrounding tissue. Appl Math Model 59:500–513
Dolbow J, Belytschko T (1999) Numerical integration of the Galerkin weak form in meshfree methods. Comput Mech 23:219–230
Dolbow J, Belytschko T (1998) An introduction to programming the meshless element free Galerkin method. Arch Comput Methods Eng 5:207–241
Eriksson K, Estep D, Hansbo P, Johnson C (1995) Introduction to adaptive methods for differential equations. Acta Numer 105–158
Gockenbach MS (2006) Understanding and implementing the finite element method. SIAM
Gratsch T, Bathe K (2005) A posteriori error estimotion techniques in practical finite element analysis. Comput Struct 83:235–265
Jannesari Z, Tatari M (2017) A meshfree technique for numerical simulation of reaction–diffusion systems in developmental biology. Adv Appl Math Mech 9:1225–1249
Jannesari Z, Tatari M (2016) Element-free Galerkin method to the interface problems with application in electrostatic. Int J Numer Model 1089–1105
John V (2000) A numerical study of a posteriori error estimators for convection–diffusion equations. Comput Methods Appl Mech Eng 190:757–781
Lancaster P, Salkauskas K (1981) Surface generated by moving least squares methods. Math Comput 37:141–158
Larson MG, Bengzon F (2013) The finite element method. Theory, implementation and applications. Springer
Lin H, Atluri SN (2000) Meshless local-Petrov Galerkin (MLPG) methods for convection–diffusion problems. CMES 1:45–60
Liu GR (2003) Mesh free methods-moving beyond the finite element method. CRC Press LLC, London
Quarteroni A, Saleri F, Gervasio P (2014) Scientific Computing with MATLAB and Octave, 4th edn. Springer-Verlag, Berlin Heidelberg
Tang T, Trummer MR (1996) Boundary layer resolving pseudospectral methods for singular perturbation problems. SIAM J Sci Comput 17:430–438
Yaw L (2009) Introduction to moving least squares (MLS) shape functions. Walla Walla University, College Place
Zienkiewicz OC, Zhu JZ (1992) The superconvergent path recovery and a posteriori error estimotion. Part \(1\): the recovery technique. Int J Numer Methods Eng 33:1365–1382
Acknowledgements
The authors are very grateful to reviewers for carefully reading the paper and for their constructive comments and suggestions. This research was in part supported by a grant from IPM (No. 95650422).
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Corina Giurgea.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Jannesari, Z., Tatari, M. An adaptive strategy for solving convection dominated diffusion equation. Comp. Appl. Math. 39, 78 (2020). https://doi.org/10.1007/s40314-020-1081-4
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s40314-020-1081-4
Keywords
- Element free Galerkin (EFG) method
- Moving least squares (MLS) approximation
- Error estimation
- Adaptive technique
- Local refinement