Research Article  Open Access
Luis Gavete, Francisco Ureña, Juan Jose Benito, Miguel Ureña, Maria Lucia Gavete, "Solving Elliptical Equations in 3D by Means of an Adaptive Refinement in Generalized Finite Differences", Mathematical Problems in Engineering, vol. 2018, Article ID 9678473, 14 pages, 2018. https://doi.org/10.1155/2018/9678473
Solving Elliptical Equations in 3D by Means of an Adaptive Refinement in Generalized Finite Differences
Abstract
We apply a 3D adaptive refinement procedure using meshless generalized finite difference method for solving elliptic partial differential equations. This adaptive refinement, based on an octree structure, allows adding nodes in a regular way in order to obtain smooth transitions with different nodal densities in the model. For this purpose, we define an error indicator as stop condition of the refinement, a criterion for choosing nodes with the highest errors, and a limit for the number of nodes to be added in each adaptive stage. This kind of equations often appears in engineering problems such as simulation of heat conduction, electrical potential, seepage through porous media, or irrotational flow of fluids. The numerical results show the high accuracy obtained.
1. Introduction
The generalized finite difference method, hereafter GFDM, is a meshless method that allows the linearization of the partial derivatives in a partial differential equation. Among the first works of the method, the works of Jensen [1], Perrone and Kao [2], Liszka and Orkisz [3], and Orkisz [4] are highlighted. Later, Benito et al. [5] provided explicit formulae of the GFDM and Ureña et al. [6] provided a compact matrix formulation of the method. Gavete et al. [7] reported improvements of the GFDM and comparison with other meshless methods. Various applications and implementations of the GFDM have been developed for solving different inverse problems by Fan et al. [8, 9]. Hosseini [10, 11] has applied the GFDM for natural frequency analysis of nanocomposite cylinders and for shockinduced twodimensional coupled nonFickian diffusionelasticity analysis.
Clark et al. [12] have investigated the problem of optimizing and adapting a surface mesh with highorder accurate nodal positions using the GFDM. The GFDM has been also used for solving 3D partial differential equations by Izadian et al. [13], Gavete et al. [14], and Hua et al. [15]. The GFDM was also applied for different practical tasks as in Chan et al. [16] for solving twodimensional nonlinear obstacle problems, in Zhang et al. [17, 18] for simulating twodimensional sloshing phenomena and for propagation of nonlinear water waves, in Mochnacki and Majchrzak [19] for modelling of casting solidification, and in Li and Fan [20] for solving twodimensional shallow water equations.
In 2D, two adaptive methods have been described in Benito et al. [21–23] using a posteriori error indicator. In 3D, an adaptive method has been described in Benito et al. [24]. These adaptive methods add nodes as midpoints between the central node and the furthest nodes in the star or in the barycentre of triangles formed in the star.
Both in 2D and in 3D, Ureña et al. [25] have developed an improved adaptive method based on previous ones and with the ability of moving and removing nodes. This improved adaptive method allows greater reductions of the error using even fewer nodes.
An advantage of increasing few nodes in a domain is to avoid the increasing in the calculation time. However, if the calculation time is not a problem and it is possible to add much more nodes, then it is better to use an adaptive method that places nodes in a more regular way than the improved adaptive method given in [25]. With this in mind, Gavete et al. [26] developed an adaptive method using a quadtree algorithm in 2D obtaining satisfactory results. The improved adaptive method and the proposed adaptive method using quadtree structure are not incompatible; in fact, they complement each other.
It is more difficult to deal with adaptivity in 3D cases because the appearing of degenerated solutions is possible and it is also necessary to keep the number of nodes that are added in the refinement stages limited.
In this paper, an octree data structure for avoiding the possibility of obtaining degenerated solutions in the adaptive process is shown. Because of the local behaviour of the refinement procedure and after successive refinement iterations, a cloud of nodes with different nodal densities is obtained. The octree split is controlled by an error indicator and a constraint that limit the possibility of adding too many nodes in each refinement stage, in order to obtain smooth transitions between the different nodal densities in the model.
In the developed adaptive algorithm, the following characteristics are included: the use of a background octree structure, a criterion of selection of cells based on the variations of the gradient, an error indicator that works as a stop condition, and a limit for the addition of new nodes in each refinement stage. Moreover, different 3D elliptic partial differentials equations are solved for cases with sharp gradients. A practical application to the electric potential problem with unknown solution is also included.
The remainder of the paper is organized as follows. In Section 2, the GFDM for solving 3D elliptic equations is reviewed. Section 3 describes the use of the octree structure, the error indicator, and the implemented 3D adaptive procedure. Several examples are given in Section 4 where the application of the method to reduce the error is analyzed for different elliptic PDEs including cases with singularities in the solution. Finally, conclusions are given in Section 5.
2. Generalized Finite Differences
Let and be a domain and a point of such domain and let us consider the following 3D elliptical partial differential equation:with Dirichlet boundary conditionwhere is the unknown function and and are known functions.
Since generalized finite differences method is a meshless method, a discretization of the domain, , is performed. Given a star , the Taylor series is developed for each node in the star and the resulting Taylor series are summed. Then the function given by the sum of the weighted quadratics errors in Taylor series for terms up to second order is defined:where is the weighting function, and are the approximations of and , respectively, and is the number of nodes of the star without the central node. In 3D, the vectors and areIn order to minimize the error, the function defined in (3) is minimized and the following system is obtained:where Solving (5) for , the approximated values of the partial derivatives are obtained and, substituting these values in the original equation (1), the equation of the star is achieved:The numerical values in each inner node are obtained by solving the linear system of equations formed by each equation of the star. For more details about this matrix formulation see [6].
Theorem 1. is a positive definite matrix if and only if the set contains a base of .
Proof. As , it is followed that is a positive definite matrix if and only if, satisfying , contains a base of .
Consistency, Order, and Convergence. In order to obtain the truncation error, Taylor series expansion including higher order derivatives is used and therefore a higher order function is obtained. The expression of is similar to the one given in (3). If is minimized with respect to the partial derivatives down to the second order, the following system is obtained:The new term corresponds to the new higher order derivatives incorporated in the Taylor series expansion to extend the function to . Thenand the truncation error of derivatives isBy considering bounded derivatives, the truncation error shows the consistency of the approximation for the equation given in (1).
Let be the error between the approximate and exact solution at the node and let us consider (1) for and :Taking into account the fact that it is followedand, appealing to the maximum principle [27], we find that Therefore both the local truncation error and the error are and the numerical solution converges to the exact solution as .
Further details about consistency, order, and convergence are given in [28].
Numerical Convergence. In order to study the rate of convergence numerically, a sequence of uniform discretizations is considered. As in [29], the parameter is defined and it was proven that , where represents the different discretizations, is the rate of convergence, and The considered domain is the unit cube and the considered partial differential equation is the following with exact solutionThe considered sequence of discretizations with the same step in the three axes isTable 1 shows the values of , , and . Figure 1 displays the numerical convergence.

As it can be appreciated, the rate of convergence is close to quadratic convergence.
3. An Adaptive Method Using Octree Algorithm
With the aim of improving the accuracy of the obtained approximation in a particular problem, it is possible to increase the number of nodes in the considered cloud of nodes. Since the GFDM allows using irregular clouds of nodes, the position of the added nodes can be selective and so it is possible to add more nodes in regions with higher errors. An important case of regions with higher errors gives rise when there are sharp variations of the gradient. In those cases, it is important to account for an adaptive algorithm that allows adding nodes as regular as possible.
An octree algorithm is a tree data structure based on a cell with eight children. Each cell of an octree represents a cube in the physical space and each child represents an octant of its parent. In the first step, the octree algorithm uses the initial nodes and, hereafter, the process is realized recursively; that is, each cell in turn can be split into eight children that have a higher level than their parent. Figures 2(a) and 2(b) display both the initial structure and the first stage of the refinement.
(a) Initial structure
(b) First step of the refinement. The cell in the corner has been divided into eight octants
In spite of the fact that the GFDM is a meshless method and the application of the octree structure requires the computation of a mesh, it is important to note that there is not a loss of applicability in the method as the structure is just needed for the discretization of the domain, but not for the selection of the nodes of the star. Moreover, the use of the octree structure in the adaptive refinement places nodes in a favourable way in order to avoid illconditioned stars.
As error indicator, we use an algorithm based on the computing of the variations of the gradient between the nodes of an octree cell.
Firstly, the firstorder derivatives are calculated by solving (5) and the gradient in each node is calculated as follows:Secondly, for each cell, we calculate the mean value of the absolute variations of the gradient in the nodes of the cell divided by the distances and then this mean value is multiplied by the volume of the cell.Finally, the criterion of selection of cells is given bywhere , is the set of cells formed in the domain, andwith and is the number of adaptive stages.
As stop condition, we calculate the following error between two successive adaptive stages:where is the solution at the node at the adaptive stage and is the number of inner nodes at the adaptive stage .
In order to achieve better results, the following consideration should be taken into account. The refined cells should be less than 15% of the number of cells in the domain in each stage due to the amount of nodes generated by the octree method, 8 new cells and 19 new nodes by cell. This situation can provoke an unnecessary increase of nodes in the same stage and because of that it is better to increase the number of nodes in several stages.
4. Numerical Results
We solve five elliptic problems corresponding to partial differential equations with singularities or sharp variations of the gradients. In addition, we solve a practical case of potential electric where the exact solution is unknown.
In the following examples, we use stars with 16 nodes formed by the octant criterion and we use the potential weighting function where is the Euclidean norm.
The global error is calculated in each stage as follows:where is the solution at the node at the adaptive stage , is the exact solution at the node , and is the number of inner nodes at the adaptive stage .
In order to clarify the visualization of the figures, we only show the background octree structure in the boundaries.
4.1. Example 1
Let us consider the following heat transmission problem:with exact solutionNote that in (27) there is a singular point in (0,0,0), outside the domain. Figures 3 and 4 show the initial and final discretization of the domain. The initial discretization has 125 nodes; see Table 2. The final discretization has 1776 nodes (8 stages). The initial global error is 18596% and the final global error is 0.3% after applying the proposed adaptive refinement and Figure 5 shows the successive reductions of the global error in logarithmic scale.

4.2. Example 2
Let us consider the following Poisson problem:with exact solutionNote that in (29) there is a singular point in , outside the domain. Figures 6 and 7 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:The final discretization has 608 nodes (8 stages). The initial global error is 69% and the final global error is 0.7% after applying the proposed adaptive refinement and Figure 8 shows the successive reductions of the global error in logarithmic scale.
4.3. Example 3
Let us consider the problem governed by the following partial differential equation:with exact solutionNote that in (32) there is a singular point in , outside the domain. Figures 9 and 10 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:The final discretization has 863 nodes (7 stages). The initial global error is 78% and the final global error is 0.7% after applying the proposed adaptive refinement and Figure 11 shows the successive reductions of the global error in logarithmic scale.
4.4. Example 4
Let us consider the problem governed by the following partial differential equation:with exact solution and is the function obtained by applying left hand side in (34) to the exact function.
Figures 12 and 13 show the initial and final discretization of the domain. The initial discretization has 125 nodes; see Table 3. The final discretization has 1449 nodes (7 stages). The initial global error is 188418% and the final global error is 0.15% after applying the proposed adaptive refinement and Figure 14 shows the successive reductions of the global error in logarithmic scale.

4.5. Example 5
Let us consider the problem governed by the partial differential equation (34) and with exact solution (35) in a different domain. Figures 15 and 16 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:The final discretization has 3629 nodes (8 stages). The initial global error is 188935% and the final global error is 3% after applying the proposed adaptive refinement and Figure 17 shows the successive reductions of the global error in logarithmic scale.
The initial global errors in the examples are too high because we have generated starting clouds of few nodes to show the extreme conditions of the solutions involved. As it can be seen, the refinement gets large reductions of the global error in a few stages.
The efficiency of the algorithm adding progressively new nodes shows the reduction in the solution error. The refinement procedure creates new nodes in the neighborhood of areas with higher gradients; furthermore these nodes have a more balanced distribution and it is not necessary further constraints to control illconditioned stars. Moreover, as the number of new nodes is limited in each adaptive stage, the transition between areas with different density of nodes is smooth.
The method can be also applied to the case of Neumann boundary conditions. In this case the procedure described in [14] for the treatment of Neumann boundary conditions can be used.
4.6. Example 6
Electric fields are used for designing high voltage equipment. In these cases, it is necessary to know the distribution of the electrical potential. In electrical power distribution, a busbar is a metallic strip for local high current power distribution. We consider the case of a busbar box at potential 220 volts. The considered domain is and the busbar is located at . The boundary of the domain has potential 0 volts except on the busbar where potential is 220 volts. The problem is governed by the Laplace equation and the exact solution is unknown. Note that this case is very different regarding the previous ones. The solution is smooth and the variations of the gradient are more widespread in the domain.
Figures 18 and 19 show the initial and final discretization of the domain. The initial discretization has 125 nodes and the final discretization has 399 nodes (8 refinement stages).
In the octree refinement, the new interior nodes of each stage are incorporated in the next adaptive stages as nodes with unknown potential. As the exact error is unknown, the results obtained in the last adaptive step have been considered as the best approximation to the solution; then formula (25) has been used to compute the global error approximation in the initial and successive adaptive stages by comparing the obtained values with that best approximation. The initial global error approximation obtained by using (25) is 29.09% and the final global error approximation is 1.91%. Note that the global error (23) between two successive adaptive stages has been also used as stop condition of the refinement procedure with limit 2% in this case.
Figure 20 shows the successive reductions of the global error approximation in logarithmic scale.
5. Conclusions
A fully automatic 3D adaptive refinement procedure using GFDM for solving elliptic equations has been developed and implemented. An octree background structure has been used to guide the refinement of the clouds of nodes.
An error indicator has been used as a stop condition. This indicator is based on the differences between the gradients of the nodes in the same cell. In each adaptive stage, the number of new nodes is limited in order to obtain smooth transition areas between regions with different gradients. The efficiency of the algorithm is shown by means of the progressive decrease of the error. It is important to note that this adaptive method allows considering a coarse starting cloud of nodes and making it finer in several stages. This allows having a more suitable cloud of nodes adapted to the considered problem.
Simulation of heat conduction, electric potential, seepage through porous media, and irrotational flow of fluids are some problems where it is necessary to solve elliptical partial differential equations. The adaptive procedure refines the regions with high gradients and obtains very accurate results in different types of domain. All has been shown in the considered examples which is why the proposed refinement procedure will help to improve future applications of the GFDM for solving threedimensional problems in complex domains.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
The authors acknowledge the support of the Technical University of Madrid (Research Group) and the UNED of Spain, Project 2017IFC02.
References
 P. S. Jensen, “Finite difference technique for variable grids,” Computer & Structures, vol. 2, pp. 17–29, 1972. View at: Google Scholar
 N. Perrone and R. Kao, “A general finite difference method for arbitrary meshes,” Computer & Structures, vol. 5, pp. 45–58, 1975. View at: Google Scholar
 T. Liszka and J. Orkisz, “The Finite Difference Method at Arbitrary Irregular Grids and its Application in Applied Mechanics,” Computer & Structures, vol. 11, pp. 83–95, 1980. View at: Google Scholar
 J. Orkisz, “Finite Difference Method (Part, III),” in handbook of Computational Solid Mechanics, M. Kleiber, Ed., SprigerVerlag, Berlin, Germany, 1998. View at: Google Scholar
 J. J. Benito, F. Ureña, and L. Gavete, “Influence of several factors in the generalized finite difference method,” Applied Mathematical Modelling, vol. 25, no. 12, pp. 1039–1053, 2001. View at: Publisher Site  Google Scholar
 M. Ureña, J. J. Benito, F. Ureña, E. Salete, and L. Gavete, “Application of generalised finite differences method to reflection and transmission problems in seismic SH waves propagation,” Mathematical Methods in the Applied Sciences, vol. 41, no. 6, pp. 2328–2339, 2018. View at: Google Scholar
 L. Gavete, M. L. Gavete, and J. J. Benito, “Improvements of generalized finite difference method and comparison with other meshless method,” Applied Mathematical Modelling, vol. 27, no. 10, pp. 831–847, 2003. View at: Publisher Site  Google Scholar
 C.M. Fan, Y.K. Huang, P.W. Li, and C.L. Chiu, “Application of the generalized finitedifference method to inverse biharmonic boundaryvalue problems,” Numerical Heat Transfer, Part B: Fundamentals, vol. 65, no. 2, pp. 129–154, 2014. View at: Publisher Site  Google Scholar
 C.M. Fan, P.W. Li, and W. Yeih, “Generalized finite difference method for solving twodimensional inverse Cauchy problems,” Inverse Problems in Science and Engineering, vol. 23, no. 5, pp. 737–759, 2015. View at: Publisher Site  Google Scholar  MathSciNet
 S. M. Hosseini, “Application of a hybrid meshfree method based on generalized finite difference (GFD) method for natural frequency analysis of functionally graded nanocomposite cylinders reinforced by carbon nanotubes,” CMESComputer Modelling Engineering Science, vol. 95, pp. 1–29, 2013. View at: Google Scholar
 S. M. Hosseini, “Shockinduced two dimensional coupled nonFickian diffusionelasticity analysis using meshless generalized finite difference ({GFD}) method,” Engineering Analysis with Boundary Elements, vol. 61, pp. 232–240, 2015. View at: Publisher Site  Google Scholar  MathSciNet
 B. Clark, N. Ray, and X. Jiao, “Surface mesh optimization, adaption, and untangling with highorder accuracy,” in Proceedings of the 21st International Meshing Roundtable, Weill Jiao, Ed., pp. 385–402, Springer, Berlin, Germany, 2013. View at: Google Scholar
 J. Izadian, N. Ranjbar, and M. Jalili, “The generalized finite difference method for solving elliptic equation on irregular mesh,” World Appl. Sci. J. (ISSN, vol. 18184952) 21, pp. 95–100, 2013. View at: Google Scholar
 L. Gavete, J. J. Benito, and F. Ureña, “Generalized finite differences for solving 3D elliptic and parabolic equations,” Applied Mathematical Modelling, vol. 40, no. 2, pp. 955–965, 2016. View at: Publisher Site  Google Scholar
 Q. Hua, Y. Gu, W. Qu, W. Chen, and C. Zhang, “A meshless generalized finite difference method for inverse Cauchy problems associated with threedimensional inhomogeneous Helmholtztype equations,” Engineering Analysis with Boundary Elements, vol. 82, pp. 162–171, 2017. View at: Publisher Site  Google Scholar  MathSciNet
 H.F. Chan, C.M. Fan, and C.W. Kuo, “Generalized finite difference method for solving twodimensional nonlinear obstacle problems,” Engineering Analysis with Boundary Elements, vol. 37, no. 9, pp. 1189–1196, 2013. View at: Publisher Site  Google Scholar  MathSciNet
 T. Zhang, Y.F. Ren, C.M. Fan, and P.W. Li, “Simulation of twodimensional sloshing phenomenon by generalized finite difference method,” Engineering Analysis with Boundary Elements, vol. 63, pp. 82–91, 2016. View at: Publisher Site  Google Scholar  MathSciNet
 T. Zhang, Y.F. Ren, Z.Q. Yang, C.M. Fan, and P.W. Li, “Application of generalized finite difference method to propagation of nonlinear water waves in numerical wave flume,” Ocean Engineering, vol. 123, pp. 278–290, 2016. View at: Publisher Site  Google Scholar
 B. Mochnacki and E. Majchrzak, “Numerical modeling of casting solidification using generalized finite difference method,” Materials Science Forum, vol. 638642, pp. 2676–2681, 2010. View at: Publisher Site  Google Scholar
 P.W. Li and C.M. Fan, “Generalized finite difference method for twodimensional shallow water equations,” Engineering Analysis with Boundary Elements, vol. 80, pp. 58–71, 2017. View at: Publisher Site  Google Scholar  MathSciNet
 J. J. Benito, F. Urena, L. Gavete, and R. Alvarez, “An hadaptive method in the generalized finite differences,” Computer Methods Applied Mechanics and Engineering, vol. 192, no. 56, pp. 735–759, 2003. View at: Publisher Site  Google Scholar
 J. J. Benito, F. Urena, L. Gavete, and B. Alonso, “A posteriori error estimator and indicator in generalized finite differences. Application to improve the approximated solution of elliptic {PDE}s,” International Journal of Computer Mathematics, vol. 85, no. 34, pp. 359–370, 2008. View at: Publisher Site  Google Scholar  MathSciNet
 J. J. Benito, F. Ureña, L. Gavete, and B. Alonso, “Application of the Generalized Finite Difference Method to improve the approximated solution of pdes,” Computer Modelling in Engineering & Sciences, vol. 38, no. 1, pp. 39–58, 2008. View at: Google Scholar
 J. J. Benito, F. Ureña, R. Alvarez, and L. Gavete, “Computational error approximation and HAdaptive Algorithm for the 3D Generalized Finite Differences Method,” International Journal for Computational Methods in Engineering Science and Mechanics, vol. 6, pp. 31–39, 2005. View at: Google Scholar
 M. Ureña, J. J. Benito, F. Ureña, A. García, L. Gavete, and L. Benito, “Adaptive strategies to improve the application of the generalized finite differences method in 2D and 3D,” Mathematical Methods in the Applied Sciences, 2017. View at: Publisher Site  Google Scholar
 L. Gavete, M. L. Gavete, F. Ureña, and J. J. Benito, “An approach to refinement of irregular clouds of points using generalized finite differences,” Mathematical Problems in Engineering, vol. 2015, Article ID 283757, 2015. View at: Publisher Site  Google Scholar
 A. R. Mitchell and D. F. Griffiths, The Finite Difference Method in Partial Differential Equations, John Wiley & Sons, New York, NY, USA, 1980.
 J. J. Benito, F. Ureña, and L. Gavete, “Solving parabolic and hyperbolic equations by the generalized finite difference method,” Journal of Computational and Applied Mathematics, vol. 209, pp. 208–233, 2007. View at: Google Scholar
 D. Vishnevsky, V. Lisitsa, V. Tcheverda, and G. Reshetova, “Numerical study of the interface errors of finitedifference simulations of seismic waves,” Geophysics, vol. 79, pp. T219–T232, 2014. View at: Google Scholar
Copyright
Copyright © 2018 Luis Gavete et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.