WCCM V Fifth World Congress on Computational Mechanics July 7–12, 2002, Vienna, Austria Eds.: H.A. Mang, F.G. Rammerstorfer, J. Eberhardsteiner
An hp-adaptive refinement strategy for the finite element method Philippe R. B. Devloo , Edimar C. Rylo Faculdade de Engenharia Civil UNICAMP, CP 6021 CEP 13084-971 Campinas SP, Brasil e-mail:
[email protected] [email protected] L. Demkowicz Texas Institute for Computational and Applied Mathematics The University of Texas at Austin, Austin - TX 78712, USA e-mail:
[email protected]
Key words: hp-adaptive,finite element hp-Adaptive methods have been available for more than one decade [6]. Thus far, the choice of h, p or hp-refinement has been based on the a-priori knowledge of the regularity of the solution and their corresponding optimal sequence of refinement pattern [4]. The proposed strategy is implemented within the object oriented environment PZ for the development of scientific software. The following capabilities of the PZ environment were either used or added : * Transfer of solution between meshes. A method for computing a transfer matrix between meshes is projection of the interpolation space of the coarse mesh onto the fine mesh implemented based on the * Development of a block diagonal preconditioner for the acceleration Krylov iterative methods * Development of a solution class which implements the multigrid iteration process. *A class which implements a one dimensional optimal hp refinement analysis based on the comparaison of all possible refinement patterns. These interfaces are used to implement and edge-based adaptive hp-refinement strategy. The results show that the adaptive strategy is able to produce hp refined meshes with exponential convergence rates, even for singular problems. Several examples show the generality and aplicability of the strategy for different simulations.
Philippe R. B. Devloo, Edimar C. Rylo, L. Demkowicz
1 Introduction Adaptive methods are a powerful tool for development and design in industry. Its use is very important at initial phases where some analysis aspects may not be known. The goal of adaptive methods is to produce adapted finite element meshes with a minimum number of degrees of freedom (d.o.f.) for a given error. The choice of the auto-adaptive strategy has been a challenge ever since adaptive meshes have been available. Even though it has been shown that for known singularities, adapted meshes can produce exponential convergence in terms of number of d.o.f., few strategies are able to produce these sequences automatically. The refinement strategy is based on an original idea presented in [9] where the optimal mesh is obtained by minimizing the local error projection for a uniformly refined space. This 1D method is also documented in [1] and [10]. The idea presented in this contribution applies the one-dimensional analysis to each linear side of the element which will be refined. The resulting patterns obtained for each linear side are ues to determine the refinement pattern of the element itself. The strategy was implemented within PZ [5], an object oriented finite element programming environment. The PZ environment already implements adaptive mesh refinement applied to 1D, 2D and 3D meshes. The meshes implemented in PZ can mix different types of elements (inclusive 1D, 2D and 3D). The complexity of the adaptive refinement algorithm is hidden by a object oriented interface. As such, the refinement of an element is done by the call of a Divide method (polymorphic) and the refinement is obtained by calling the PRefine method.
2 Process Overview The process consists on the following steps, ilustrated in figure 1: 1. Given a coarse mesh and its uniformly refined mesh (fine mesh); 2. Evaluate the norm of the error between these two meshes elementwise; 3. Sort the elements by their error; 4. Select the elements whose acumulated error acounts for 65% of the total error; 5. Apply the proposed method (documented subsequently) to obtain an optimal refinement pattern for each selected element; 6. Use the coarse mesh and the selected refinement pattern to generates an adapted mesh. This strategy has two main points: the evaluation of the error of the solution between two given meshes and the method to obtain the element refinement pattern.
3 Evaluation of error between the fine and coarse mesh The evaluation of the error between two solutions implies in the availability of a transfer operator of a solution from a coarse space to a refined space. Within the object oriented environment, this process is implemented in two classes:
2
WCCM V, July 7–12, 2002, Vienna, Austria
Figure 1: Auto-adaptive implemented strategy
3
Philippe R. B. Devloo, Edimar C. Rylo, L. Demkowicz
class TPZTransfer; class TPZTransform. 3.1
Classe TPZTransfer
This class implements the transfer of a solution and a residual between hierarchical spaces. The transformation matrix is evaluated through each refinement step matrix transformation. Within the PZ environment TPZTransfer is derived from TPZMatrix and implements a rectangular matrix. The interpolation of the solution of the coarse mesh to a solution on the fine mesh is obtained as
(1)
Similarly the transfer of the residual from the fine mesh to the coarse mesh is given by
The matrix is computed by an elementwise fine mesh solution space. 3.2
(2)
projection of the coarse mesh solution space onto the
Classe TPZTransform
TPZTransform implements a linear space maps from to , where . This class’ methods implement mapping operations. The figure 2 shows how the transformation matrix from a fine element to a coarse element is computed. The element at level returns the transformation between its interior and the interior of the father element. Given a point !#"%$'&()*"%$'& of an element at level +, , 0 " ! " ) "/. "%$'& ! "%$'& ) "%$'&1. is coordinate in master element space of the same point within the father element. Transformation can be composed to obtain the transformation between any meshes.
" " "%$'& "%$ "2'$ &43 %" $
(3)
4 The 1D refinement process 4.1
Overview
The project uses an idea developed by Leszek Demkowicz [2] for implementing an adaptive refinement strategy. The underlying idea of the strategy is to study the behavior of a refined solution along lines in the two or three dimensional mesh and use this information to decide on an or refinement pattern. The significant advantage of the technique is that it requires only a one-dimensional analysis, which can be executed with pre-computed stiffness matrices. It is therefore very efficient. The refined solution used for analysing the refinement pattern is a globally refined finite element solution. This globally refined solution is used both to estimate the error and to as a basis for adaptive refinement strategy. Current research aims at obtaining similar results based on a locally refined solution.
4
WCCM V, July 7–12, 2002, Vienna, Austria
Figure 2: Linear space mapping
A one dimensional analysis tool was developed, which takes polynomial approximations on two subelements and searches for the best approximation using an adapted mesh or refined element. The class which implements this strategy is named the TPZOneDRef. 4.2
One-Dimensional Analysis
The starting point of the one-dimensional analysis is a higher order, refined solution obtained on a - - . . . is a uniform refined-solution with uniformly refined mesh. This solution is denoted - . which has respect to . . The one dimensional analysis searches for the best approximation of - - one degree of freedom more than . . The number of d.o.f. of . is denoted . The best refined - - - - . is denoted . . The best refined approximation of . is denoted . . approximation of The finite element approximation on the refined 1D mesh of order is written as:
-
-
-
.
.
" "
-
"
("
-
. .
where . are the set of shapefunctions on the refined mesh and tions on the refined mesh.
-
(4)
(5)
- .
are the set of shapefunc-
. is the one-dimensional approximation, either or refined which The best approximation of & seminorm and whose number of degrees of freedom is no higher presents the smallest error in the 5
Philippe R. B. Devloo, Edimar C. Rylo, L. Demkowicz
than the order of the original element . This procedure was originally developed by Waldek Rachowicz and further details can be found in [3]. The best refinement pattern is obtained by computing 6 for all d.o.f. are less or equal .
-
-
-
. corresponds to either . or where Dirichlet boundary conditions are applied to
-
.
- -
.
- . .
refined meshes whose number of
(6)
and corresponds to the size of the divided element. . such that . . and . ..
4.2.1 Public Interface
The public interface of the class is given by the function REAL BestPattern (TPZFMatrix &U, TPZVec¡int¿ &id, int &p1, int &p2, int &hp1, int &hp2, REAL &hperror, REAL delx). This method evaluates the error of all possible combinations of and refinement. The returned pattern is that which presented the lowest error. The function parameters are:
: (input) uniform refined mesh solution;
: (input) element node identifiers;
4 , : (input/output) on input the polinomial order of the subelements corresponding to the solution . On output ' and will return the best refinement orders. If the best refinement pattern is then ;
' , : (output) the best orders ' and obtained by the refinement; !" : (output) the aproximation error by the use of order ' and ; $# : (input) the geometric dimension of the shortest element.
5 Refinement pattern based on one-dimensional analysis Given a vector of optimal refinement patterns along the edges of an element, how does one choose the refinement pattern for the element itself? The analysis goes through a sequence of stages : 1. Order the edges of an element by error (from largest to smallest);
% '&
of the total error then 2. If the error associated with an optimal refinement pattern is less than substitute the proposed refinement pattern for a p-enrichment with next higher order of interpolation; 3. If all edges are best refined by a p-enrichment, p-enrichment is applied. If a single edge indicates - refinement, refinement is applied;
6
WCCM V, July 7–12, 2002, Vienna, Austria
4. If the approximation error of the edge is smaller than refinement patterns; for determining
%
'&
of the total error, disconsider the edge
5. If a sub-element along the edge has no order assigned then give it the order proposed by the edge analysis; 6. After analysing all edges, if the subelement has no assigned order of interpolation, give it the order , where is the order of interpolation of the father element. This procedure was obtained by experiment and produces smoothly graded meshes which are similar to their one-dimensional counterparts. In general the meshes increase the polynomial order to a polynomial degree which depends on the strength of the singularity. For the presented example, the polynomial order rises to , after which it breaks up the mesh in an sense to capture the singularity. Once the error of the elements around the singularity are equal to the error of the elements in the rest of the mesh, a global enrichment is applied to the mesh and the error of the elements around the singularity are further diminished by refinement.
6 Results for a model problem 6.1
Poisson Problem
As a model problem, the solution of the Poisson problem:
%
(7)
was modeled on an L-shaped domain (see figure 3). The boundary conditions were applied such that corresponds to the exact solution :
-
.
&
(8)
This problem posesses finite energy, but presents a strong singularity at the origin. Nor adaptive or adaptive solution processes alone will yield optimal convergence rates. adaptive aproximations may yield exponential convergence rates for this singular problems if the proper sequence of and refinements are choosen. The adaptive strategy will, at each refinement step, refine the elements which are acountable for 65 % of the total approximation error. The type of refinement applied to each element is determined by the one-dimensional analysis along the edges of the element described in the previous section. The following behaviour of the implemented adaptive strategy is observed: The elements around the singularity acount alone for 65 % of the error during the first 10 refinement steps. During these steps, the order of approximation of the elements away from the singularity remain linear or quadratic
7
Philippe R. B. Devloo, Edimar C. Rylo, L. Demkowicz
Figure 3: Poisson problem model
When the error level of the elements around the singularity reach the level of the remainder of the elements, the order of polynomial of the elements increases to bring their error norm to a level equivalent to the error of the elements around the singularity. The error measured between the uniformly refined mesh and the original mesh is very acurate. For most elements the effectivity index of the error estimate is above 90 % (see Figure 4). Figure 5 shows the map of p-orders on the h-adapted mesh for varying degrees of zoom. The figure 6 shows the refinement at
corner zoomed .
The Figure 7 shows the results of analysis. 6.2
Elastic analysis of a Hydraulic Fracture
The adaptive procedure was applied to the approximation of a elastic crack as the result of a hydraulic fracturing process. The correct approximation of this problem is relevant for the simulation of hydraulically induced cracks in petroleum wells[8]. This application was choosen to show that the -adaptive procedure applies to any numerical approximation (it depends only on the analysis of the regularity of the solution) and also to demonstrate that the procedure applies to problems of industrial interest. The configuration of the model problem is showed in Figure 8. Simetry conditions are considered around the and axis. Model data are the following: E = 517.1 MPa (Young modulus);
8
WCCM V, July 7–12, 2002, Vienna, Austria
Figure 4: Energy Error Squared
= 0,2 ; & = 0,69 MPa (prestress into the reservoir rock); = 1,69 MPa (prestress into the confine rock); = 68,0m (reservoir rock height); = 1 MPa (injection pressure). The problem has discontinuous data : the confinement stress is different for both layers. The length of the crack was choosen such that the analytical model developed by England and Green [7] predicts zero stress intensity. Rather than computing the stress intensity factor of the crack, the modified hydraulic pressure was computed to yield zero stress intensity. The error between the analytical hydraulic pressure . and computed hydraulic pressure was around
% %
The obtained refined mesh is shown in figure 9. The analysis results are showed in figure 10.
7 Conclusion An adaptive refinement strategy was developed which produces graded finite element meshes based on an a-posteriori analysis of the approximated solution. It is shown that for a poisson model problem, the sequence of meshes produced an exponentially converging sequence of solutions in function of number of degrees of freedom.
9
Philippe R. B. Devloo, Edimar C. Rylo, L. Demkowicz
Figure 5: Refinement patterns
10
WCCM V, July 7–12, 2002, Vienna, Austria
Figure 6: refinement at
internal corner
Figure 7: Results: enitre model and
11
corner zoomed
Philippe R. B. Devloo, Edimar C. Rylo, L. Demkowicz
Figure 8: Finite element model
The refinement strategy is based on the comparaison of the solution with a solution obtained on a uniformly refined mesh. This should be considered as a first result in a research project aimed at developing fully automated refinement strategies. The strategy was implemented with the PZ environment, an object oriented environment for the development of finite element algorithms. As a consequence, the strategy described is available for all simulations implemented within PZ. As an second example, the -adaptive strategy was applied to an elastic crack problem, yielding comparable sequence of meshes. Acknowledgment The authors greatefully acknowledge the support of the financing agencies FAPESP, FAEP, CNPq and FINEP. The support of Petrobras is also acknowledged.
References [1] I. Babuska, T. Strouboulis, and K. Copps. hp optimization of finite element approximations: Analysis of the optimal mesh sequences in one dimension. Computer Methods in Applied Mechanics and Engineering, (150):89–108, 1997. [2] L. Demkowicz and I. Babuska. Optimal p interpolation error estimates for edge finite elements of variable order in 2d. Ticam Report 01-11, 2001.
12
WCCM V, July 7–12, 2002, Vienna, Austria
Figure 9: refinement patterns trough the analysis
Figure 10: Analysis results: full mesh, zoomed crack front and crack front elevation
13
Philippe R. B. Devloo, Edimar C. Rylo, L. Demkowicz
[3] L. Demkowicz, Rachowicz, and Ph. Devloo. A fully automatic hp-adaptivity. In Ticam Report 01-28. Ticam -University of Texas at Austin, 2001. [4] L. Demkowicz, W. Rachowicz, and Ph. Devloo. A fully automatic hp-adaptivity. TICAM Report 01-28, TICAM - University of Texas at Austin, 2001. [5] P. R. B. Devloo. PZ : An object oriented environment for scientific programming. Computer Methods in Applied Mechanics and Engineering, 150:133–153, 1997. [6] P. R. B. Devloo, J. T. Oden, and P. Pattani. An hp-adaptive finite element method for the numerical simulation of compressible flow. Computer Methods in Applied Mechanics and Engineering, 70:203–235, 1988. [7] A. H. England and A. E. Green. Some two-dimensional punch and crack problems in classical elasticity. volume 59. Cambridge Philosophy Society, 1963. [8] Paulo D. Fernandes and Jos´e L. A. de O. Sousa. Modelagem Semi Anal´ıtica Pseudo Tridimensional de Propaga´ca˜ o e Fechamento de Fraturas Induzidas em Rochas. PhD thesis, UNICAMP - FEM DEP, 1998. [9] W. Rachowicz, J. T. Oden, and L. Demcowicz. Toward a universal h-p version of the finite element strategy. Computer Methods in Applied Mechanics and Engineering, (77):181–212, 1989. [10] A. Schmidt and K. G. Siebert. A posteriori estimators for the hp version of the finite element method in 1d. Applied Numerical Mathematics, (35):143–166, 2000.
14