You are on page 1of 19

European Congress on Computational Methods in Applied Sciences and Engineering ECCOMAS 2000 Barcelona, 11-14 September 2000 c ECCOMAS

EFFICIENT CONTACT SEARCH FOR FINITE ELEMENT ANALYSIS


Ralf Diekmann , Jan Hungershfer , Michael Lux, Lars Taenzer , and o Jens-M. Wierum Hilti Corp., Principality of Liechtenstein, http://www.hilti.com

Paderborn Center for Parallel Computing, Germany, http://www.upb.de/pc2/

Key words: nite elements, contact search, fragmentation Abstract. An ecient and accurate contact algorithm is essential for FE-simulation of several moving bodies or fragmentation processes of brittle material. The calculation time needed to check and correct unphysical penetrations in the case of large displacements is mainly determined by the search phase of the contact algorithm. In this paper, a brief description of a contact formulation used within an explicit, dynamic 2D FE-code is given. The contact algorithm is a modied Lagrangian method, i. e. it ensures non-penetration after each step of the explicit time integration. It combines straight-line and C1 -continuous (smoothed) boundary approximations. A exible dynamic data structure allows dynamically growing surfaces which are needed to simulate fragmentation processes. A new global contact search algorithm based on position codes is investigated. It builds an articial ordering of the nodes resting upon a space lling curve. An analysis shows the theoretical benets of the new algorithm and experimental comparisons with two other global search algorithms show that these benets carry over to the practice as well.

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

INTRODUCTION

In Lagrangian Finite Element (FE) formulations, contact between moving surfaces and/or moving bodies is one of the most crucial parts of the whole simulation. Especially if complex physical events like full-car crash or fragmentation of brittle materials are simulated, contact events occur at non-predictable points in time and at non-predictable places on the various surfaces. This makes it often necessary to search for contact events at all surfaces in every step of the simulation. The non-predictability of contact events together with the large number of special cases for contact correction (ensembles with many moving bodies, sharp corners, large strains and displacements, and dynamically growing numbers of surface segments) makes the contact algorithm one of the most complex pieces of code in a highly engineered FE program. With O(n2 ) time needed for an all-to-all contact check on domains discretized into O(n) surface segments, the contact search quickly dominates the time needed for the whole simulation. Obviously, concepts to reduce the frequency and the costs of contact searches are needed. Contact correction algorithms can be divided into the two classes of Lagrange multiplier methods and penalty methods [10]. The rst ensure non-penetration by determining penetration correction forces and displacements. The method does not need any additional parameters and supports dierent friction models. If the contact situation is complex (several contacting bodies with sharp corners), the penetration detection and correction becomes quite dicult and the dependencies between neighboring parts of penetrating surfaces quickly get very complex [2, 6]. The penalty methods apply penalty forces to penetrating nodes and let the time integration correct penetrations. The penalty parameters are not easy to determine, but as there is just a weak non-penetration condition, there are also no complex dependencies between contacting surfaces. In many applications of numerical simulation in computational mechanics, global measures are of importance, like for example the energy dissipation or global deformations in car crash. In such problems, penalty methods are well suited to resolve unphysical penetrations of moving surfaces. It is not necessary to correct penetrations in each step completely and the contact forces are usually not considered in detail. In contrast to these global questions, there exists special interest in the solution in in the contact zone in some cases. In dynamic problems like penetration and impact, the relevant eecting processes take part in or close to the contact zone. Thus, stresses and wave propagations have to be determined across contact zones at high accuracy. Clearly, Lagrange-multiplier methods are more suited for such kinds of problems [1]. An explicit time integration scheme can be used to resolve wave propagations eciently. Several hundred thousand time steps are performed for applications at hand. The contact forces are calculated each time step solving linear equation systems for adjacent master segments [1, 2, 8]. We use a smooth boundary formulation based on Bzier splines as e proposed by Wriggers and Taylor [9, 11]. Arbitrary combinations of smoothed and nonsmoothed boundaries even within one surface are possible.

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

Most algorithms for a self-acting contact search in FE simulations are split into two phases. The rst phase, called global search or pre-contact, reduces the number of tests for contact between surface segments and potentially penetrating nodes. In this phase, all nodes which are close enough to have contact to a given segment within the next calculation steps are found. This allows the second phase, called local search or postcontact, to apply the exact contact-test only to those segment-node combinations which are close to each other. The three dierent approaches for the global search phase we have examined are: A hierarchical algorithm which groups together neighboring surface segments to higher order contact objects [12], and two methods creating an ordering over a grid of boxes being laid over the FE mesh. The rst ordering is a straightforward line-by-line numbering [5], the second one is more complex using a space lling curve. All algorithms avoid the all-to-all comparison and reduce the time complexity for the contact detection. For the following, we assume a 2D domain of arbitrary shaped moving bodies, discretized with nite elements. The surfaces are discretized by line segments which, in certain regions, are smoothed by Bzier splines to form C1 -continuous contact surfaces e (cf. sec. 2). A body, also called component, contains a closed outer surface and an arbitrary number of closed inner surfaces (holes). The time integration is explicit, i. e. the maximum displacement an arbitrary node can receive per step is known in advance and given by umax vmax t where t is the time increment per step and vmax the largest nodal velocity in that step. If fragmentation occurs, new surfaces are generated and have to be considered by the contact algorithm immediately. The contributions of this paper are as follows: a brief review of Lagrangian (non-penetration) contact in explicit FE-simulations, the combination of smoothed and non-smoothed surface descriptions, a dynamic data structure which supports the implementation of ecient contact algorithms and fragmentation, an ecient global contact search algorithm based on a space lling curve, an advanced local search algorithm for smooth and non-smooth surfaces, and a comparison of experimental results. The next section gives a brief overview about our contact formulation, surface parametrization and contact correction algorithm. The data structures used to implement the dynamic automatic contact search are described in section 3. Following, the approaches for global and local search are described in section 4 and section 5, respectively. Section 6 shows results of experimental comparisons of the three global search algorithms.

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

THE CONTACT FORMULATION

The 2D dynamic explicit FE-simulation investigated here performs a calculation of internal forces and lumped masses, a time integration without contact constraints, possibly causing penetrations, and, nally, a contact search and penetration correction. The contact algorithm consists of the following parts: - global and local contact search including determination of normal penetration and tangential slip vectors, - calculation of nodal contact forces, - time integration update (update of nodal displacements and velocities). The framework is based on the contact formulations described in [1] and [2, 8], respectively. The algorithm is purely geometric within one time step and works for all kinds of materials. The time integration scheme and the time step have to be chosen carefully to avoid stress oscillations in time, to initiate waves inside the bodies in the right way (initial contact) and to transfer waves across boundaries smoothly. The algorithm works for - arbitrary geometries including holes, - fragmentation problems with newly generated surfaces and sharp corners, - curved bodies with smooth surfaces in contact, - combinations of smooth and non-smooth bodies, - self penetration of bodies, - and partially or completely xed boundaries. Smooth and non-smooth surface descriptions are chosen to full these requirements. The surfaces of the bodies are described using polynomial shape functions hi and nodal vectors xi x = hi () xi , 0 < 1. (1) The linear shape function hL = 1 and hL = are applied to model piecewise 1 2 straight surfaces with corners. Following the proposals of Wriggers and Taylor [9, 11] the core of a smooth surface is dened by Bzier shape functions e 1 hB = (2 3 + 3 ), 1 4 1 hB = (2 + 3 3 2 ), 2 4 1 hB = (3 ) 2 3 4 (2)

and two adjacent segments formed by three FE-nodes (cf. g. 1). The smooth surface starts at the halfpoint of the rst segment ( = 0) and ends at the second halfpoint ( = 1). The smooth surface is C1 -continuous and tangential to the segments in the halfpoints. A sucient ne discretization is supposed to make sure that the straight segments and the smooth surface are quite close to each other. Therefore, the smoothing 4

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

2 QP HP QP HP

slave (smooth surface) penetration p


1

=1
3

=0

master (straight line) virtual surface node

Figure 1: Concept of smooth surface circumscribed by the virtual lines of the halfpoints (HP) and the quarterpoints (QP).

Figure 2: Penetration of a virtual slave (smooth surface) into a straight master segment.

can be neglected for the calculation of internal forces. The penetration of surfaces is checked at characteristic surface points only. Possible penetrations of these surface points (plus adjacent segments) are determined comparing the point location and the location of contact surface candidates (master-slave concept). The master surface is a straight segment or the Bzier curve of a smooth surface. The slave nodes are the FE-nodes for e the straight line surface model and the halfpoints, i. e. the segments midpoints, as virtual surface nodes for the smooth surface model (cf. g. 2). Special algorithms for the calculation of the penetration vectors have to be used for self penetration and corners. In all other cases, the penetration vectors p are determined by the vector of smallest distance. Sometimes the exact fulllment of non-penetration requires a double passing with the exchange of master and slave, which entails updating of penetration vectors before performing the second contact force calculations. The normal forces act in the direction of the penetration vectors p. Let M be the local position of the intersection of p and the master surface on the master surface, and S the local position of a virtual surface node on a smooth slave surface. The linearized non-penetration condition ||p|| uS ep + uM (M ) ep = 0 (3) with the slave and master displacement uS , uM can be applied because of the usually small time steps in explicitly solved problems. The master displacement at the intersection of p and the master surface can be derived from uM (M ) = hi (M ) uMi . The nodal displacements follow from Newtons law of motion uS = 1 t2 FS , 2 mS uMi = 1 t2 2 mMi FMi
j

(4)

(5)

with j being the number of corresponding slave nodes. For real surface nodes, the slave displacement is the displacement of the FE node. For virtual surface nodes the displacement can be calculated analogously to the master displacement uS = uS (S ) = hi (S ) uSi . 5 (6)

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

Following the principle of virtual work the (master) reaction forces caused by a slave force FS are FMi = hi (M ) FS . (7) Adding the no-slip condition analogously to the non-penetration condition for sticking nodes and the slip force FR = sgn(xRel ) FS ep (8) S leads to a linear system of equations for the normal and tangential contact forces. The size of the system of equations follows from the number of slave nodes which penetrate adjacent master segments. These adjacent master segments and the corresponding slave nodes are called contact group. If there are just two smoothly shaped surfaces in contact, there may be just one contact group. For fragmentation problems with many surfaces in contact, there can be a large number of groups of very dierent size. 3 THE CONTACT DATA STRUCTURES

For the ecient handling of large FE meshes with changing topologies (fragmentation, adaptive meshing) an advanced code engineering with the use of well suited data structures is an overriding requirement. The combination of several bodies and the demand for high accuracy easily leads to meshes with several thousand elements plus the same number of nodes. Only data structures which are well tailored for their special purpose can give satisfying results here. 3.1 Modeling the surface

The core of the contact data structures are lists which represent the surfaces of a mesh. Every surface is modeled by a cyclic list which can be traversed in both directions. Normally, each list entry represents a segment of the surface of a body. By switching from one entry to the next the surface is traversed in counterclockwise direction. Each surface entry is also connected to the corresponding FE nodes on the components surface and vice versa. Additionally, there is a second data structure which supplements the surface structure mentioned above. For smooth surfaces dierent structures for the contact surfaces and the FE mesh surface are needed. Therefore, we construct a data structure, called virtual surfaces with one entry for each sampling point of the surface curve. For non-smoothed components the virtual surface and the real FE surface are identical. For smooth surfaces the sampling points are located at the halfpoints (cf. g. 3). Of course, there is also a direct connection to nd the corresponding virtual surface entry for a given surface entry and vice versa. A virtual surface entry can play two roles: First, it can represent a surface segment, either straight or smoothed. In this case, we call the surface entry master segment. Secondly, it can act as a single point on the surface which can penetrate a master segment. Then, it is called slave node. 6

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

NODE

QP HP
SURFACE

VIRTUAL SURFACE

Figure 3: Correspondence between the FE mesh surface and the contact data structure (smoothed part of the surface is drawn in green).

Figure 4: Halos around straight line and smoothed surfaces.

3.2

Candidates and actives

To store potential slaves for a master segment, each virtual surface can have a list of other surfaces which are the so-called candidates. Candidates are nodes in the neighborhood of a segment which may penetrate the segment within the next k time steps. The lists of candidates are created during the global search, cf. section 4. The local search procedure, cf. section 5, checks every candidate if it penetrates the segment. In the case of penetration the slave is put into a second local list and scheduled for correction later on. The entries of the second list are called actives. 4 GLOBAL SEARCH

In this section we present an algorithm for the global search phase of the contact algorithm. The task of the global search is to nd all nodes in proximity of each surface segment of the whole FE mesh. A brief description of the algorithm is given, including some hints for an ecient implementation. The complexity of the algorithm is shown in the appendix. The basic idea of the global search algorithm is to build around a surface segment a small space in each direction, called halo (cf. g. 4). Only nodes within this halo may come in contact to the segment within the next k time steps. The nodes are put into a local list, the candidate list (cf. sec. 3.2), and tested for contact against a segment each time step. The size of the halo is calculated depending on the discretization of the surface. To avoid the overlap of three adjacent halos is half the size of the shortest surface segment at maximum. After k = 2umax time steps the next global search has to take place. 4.1 Space lling curve algorithm

The global search algorithm creates an articial ordering of all surface nodes of the FE mesh. For that purpose the search area, i. e. the whole FE mesh plus some space around, is divided into a large quantity of numbered boxes. A position code is assigned to every 7

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o
01 01 11
01 11 01 11

11

00 10

00 10

01 11

01 11

00

10 00

00 10 00 10

10

Figure 5: Recursive construction of the space lling curve according to Lebesgue.

node. It is given by the number of the box the node is located in. Sorting the nodes with respect to their position codes allows to nd nodes in adjacent boxes eciently. The benet of the space lling curve (SPC) algorithm is the way the boxes are numbered. The space lling curve we use is a Lebesgue curve which visits all boxes in some kind of N-like sequence. This preserves high locality and keeps the position code distance between neighboring boxes small [7]. 4.2 Initialization

The space lling curve algorithm divides the search area into quarters, called boxes. These boxes are numbered depending on their position with the binary codes 00 (bottom left), 01 (top left), 10 (bottom right), and 11 (top right). The division is continued recursively up to a certain, pre-dened level, with b being the edge length of the smallest boxes (cf. g. 5). A binary number which is the code of its parents box concatenated with 00, 01, 10, or 11 as dened above is assigned to each child box. This gives a unique key for each box mapping the Lebesgue curve into the search area. Now a position code is assigned to each node. Again, it is the box number the node is located in, and all nodes are sorted according to it. In order to update the position code of a node eciently two additional values Lx , Ly have to be stored for each node. These are the number of boxes of the lowest level, i. e. the smallest boxes, in x- and y-direction which lie left and underneath the nodes box. 4.3 Updating the position code

With the additional information Lx and Ly the position code of a node can be updated quickly. Figure 6 shows the corresponding algorithm. For a given node the new position code can be determined from the old one by testing the x, y-coordinate against Lx,y b and (Lx,y + 1) b. This shows whether the node has moved into an adjacent box since the last position code calculation. The min operation searches the highest order level which is crossed by the node. The new position code can be calculated by applying a bit-mask1 to the old one. This needs only one logical XOR-operation for both directions.
For level L the bit-mask is (10)L+1 for horizontal movement and (01)L+1 for vertical movement. Each bit-mask has to be calculated only once at the beginning of the simulation.
1

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o
/ Testing horizontal movement / if (ax originx ) Lx (a) b then i = min{j | Lx (a) 2j = 0} code(a) = code(a) (10)i+1 Lx (a) / Node moved to left / else if (ax originx ) > (Lx (a) + 1) b then i = min{j | (Lx (a) + 1) 2j = 0} code(a) = code(a) (10)i+1 Lx (a)++ / Node moved to right / end if / Testing vertical movement / if (ay originy ) Ly (a) b then i = min{j | Ly (a) 2j = 0} code(a) = code(a) (01)i+1 Ly (a) / Node moved down / else if (ay originy ) > (Ly (a) + 1) b then i = min{j | (Ly (a) + 1) 2j = 0} code(a) = code(a) (01)i+1 Ly (a)++ / Node moved up / end if

Figure 6: Algorithm for updating the position code code(a) of a node a. and are the logical AND and XOR operators.

4.4

Updating the halo

For updating the halo information of a segment, all boxes have to be found which are touched by the segment of the halo. Therefore an axis-aligned rectangle with distance is put around the segments endpoints. This can lead to four consecutive ranges of the space lling curve at maximum if the halo crosses higher lever boundaries in vertical and horizontal direction (cf. g. 7). The position code of the boxes of the four corners can also be calculated with bit-wise XOR-operations. The rst and last code to be looked at are startcode(e) = code(e) (11)lmax +1i (00)i and stopcode(e) = code(e) (00)lmax +1i (11)i with e being the four corner points of the rectangle. By combining binary with exponential search the nodes can be found quickly. Detected nodes have to be tested whether they are located within the slanted halo of the segment. 4.5 Complexity

An analysis of the algorithm shows a complexity of O(N log N) for the initialization of the position codes. If l is the dimensionless length of the longest segment of the surface, each global search requires O(N l2 ) operations (cf. appendix A).2 This complexity means a noticeable advantage over the linear position code with a complexity of O(N (llog N +l2 )) operations for each global search [3, 5]. In contrast to the linear position code the costs per node are independent of the meshs surface size for the SPC algorithm.
For the analysis we assume a scenario of N = n n position code boxes each containing a single surface node. The maximum level of the space lling curve is Lmax = log n 1.
2

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

non-material side
0

A B

material side
1

Figure 7: Segment (surrounded by rectangle) crossing higher level boundaries in vertical and horizontal direction.

Figure 8: Denition of the outside-ag (true for A, false for B).

LOCAL SEARCH

This section gives a brief description of the applied local search algorithm. The main purpose was a robust, self-acting, and fast contact detection routine especially for bodies with complex surface structures which occur during simulation of fragmentation problems. The special features for this task are illustrated at rst. Afterwards the modications for smooth surfaces are presented. 5.1 Scanning contact candidates

For the local search we introduce an outside-ag for each slave in every candidate list. It represents the relative location of the slave according to the material side of the master segment in the previous time step (cf. g. 8). This ag speeds up the contact phase and avoids counterproductive decisions (cf. sec. 5.2). For a contact situation the outside-inside criterion is essential: A node lies on the material-side of a segment now and was on the non-material-side in the time step before. In a convex surface region it is possible that a node within the halo of a segment stays on the material-side for a long time without having any contact, e. g. node B in gure 8. This necessary condition allows to preclude this node-segment combination from further contact detection very fast. The easy contact check deletes mainly all candidate nodes without penetration at this time step.3 The criterion is used in a rst phase of the local search to build up a rst set of contact groups by examining all candidate groups given by the global search.
3 Only nodes which moved on the material side besides the segment, e. g. moving from A to B in g. 8, are assumed to be active.

10

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

A B B,C A penetrating slave master

Figure 9: Penetration vectors (A,B,C) depending on relative location of previous time step (A, B, C).

5.2

Determination of contact parameters

In the second phase the location of a slave node is used to decide in which direction the correction should take place, implying a determination of the penetration vector (length and direction). At this point the introduced outside-ag allows to get more feasible contact-impact solutions, in particular in case of simulating fragmentation. Without knowledge of the previous position of a slave node we might get an unrealistic correction. For example, a node deeply penetrating a sharp corner of a body might be accelerated (instead of being decelerated) when correcting it to the nearest surface segment. Using the outside-ag we can circumvent this problem, knowing the relative position of the node before the penetration has taken place. Figure 9 shows a sharp corner of a master surface. Without the outside-ag the penetrating slave node will be corrected to the right hand segment. This leads to an acceleration if the previous position was A. A node can only be active with respect to a surface segment if the outside-inside criterion is fullled for this pair. Correcting it in the normal direction of the segment means always a correction against the relative velocity between both surfaces. Except for two special cases, all penetrations are corrected this self-evident way. The rst exception occurs if a node is active regarding to two adjacent segments (case C in g. 9). In this case, the nearest segment is chosen as the actual master segment. Another exception is the penetration near a concave corner. If no orthogonal correction is possible, the node will be corrected to the node at the corner. 5.3 Smooth surfaces

The contact analysis of smoothed surfaces works together with the one for piecewise straight lines in any combination on a single surface and on interacting surfaces. The piecewise straight lines of a surface are examined as described above. A smooth segment of a surface needs no information regarding the relative position of a candidate. Because of the continuous transitions of the splines and the assumed ne discretization, no special 11

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

HP

QP

QP

HP

Figure 10: First quick contact test for smooth surface, done by testing the virtual lines between the halfpoints (HP) or quarterpoints (QP).

cases have to be considered. Nevertheless, we use a scanning phase for a fast preliminary contact detection. The approximate penetration check is done by testing a node against straight lines. In case of a concave surface segment we use an imaginary line through both halfpoints, otherwise a line through both quarterpoints (cf. g. 10). In both cases, a necessary condition for contact is satised if the candidate node is located on the material side of the imaginary line. These informations are used again, to create a preliminary set of contact groups. Note, that these groups might combine piecewise linear with smoothed parts of the surface. Again, the correction takes place in the normal direction of the surface. In contrast to the piecewise straight parts of surfaces this direction always exists and is unique.4 The direction of the penetration vector is determined by a Newton-Raphson iteration [11]. 6 RESULTS

For the experimental evaluation of the presented algorithm for global search we have developed a set of benchmarks. The examples are academic and relatively simple in shape but scalable in size to investigate the algorithms for various problem sizes. For this paper we have selected some meshes with distinct characteristics for discussion. The size of the examples went up to 2 500 surfaces and 9 500 surface segments. To determine the eciency of the algorithm we have counted the average number of comparisons during a global search. As one comparison can count the comparison of two integer values, e. g. two list indices, or the test of two point coordinates. We compare the SPC algorithm with two other global search methods, a linear position code algorithm (LPC) and a hierarchical ordering strategy (HO). In contrast to the SPC the LPC uses a line-by-line numbering of the boxes [5]. The hierarchical ordering is some kind of intuitive algorithm constructing a tree-like data structure over the meshs surface [12]. Starting with the segments as the leafs the meshs surface is grouped into larger units. For all tree nodes an axis-aligned bounding box is calculated to allow simple intersection testing. It is a necessary condition that the bounding boxes of two groups of segments intersect for their contents to have contact. The benchmark squares (g. 11) is a surrounding frame lled with single squares
It is possible to construct a situation, where two normal directions to a spline exist. This presumes, that an sharp angle is smoothed (which leads to a tight arc) and a deep penetration occurs, which can be precluded in this environment.
4

12

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

Figure 11: Benchmark squares.

Figure 12: Benchmark rings.

Figure 13: Benchmark bars.

which are placed regularly in 4 to 48 rows and the same number of columns. At the beginning 25 % of them are randomly selected and moved in stochastical direction with equal velocity. The contact lines are short in this examples, i. e. 4 segments except for the wall, but numerous. The position changes of the elements are quite large since there is a lot of movement in this example. The benchmark rings (g. 12) consists of up to 48 concentric rings. The outer rings have slightly more elements than the inner ones. All rings get an initial velocity in dierent directions. The length of the contact segments and the length of the contact lines are varying throughout the mesh. The position change of the objects is obviously small due to the nested arrangement of the objects. For the bars benchmark (g. 13) elastic bars are compressed by a heavy block and interfolded during the simulation. As before the number of bars is being varied from 4 up to 32. For the benchmark squares the LPC and the SPC algorithm behave quite similar (cf. g. 14, left). The reason for this is the uniform length of the contact segments. We have shown that both methods produce the same costs for this case. The HO algorithm gives not as good results because of the large displacements of the squares. This causes enlargements of the bounding boxes of the hierarchical trees nodes which produce more overlap and therefore more intersection tests. Taking into account that the problem size is increasing quadratically the step-up stays linear as expected from the analysis. The second selected scenario rings shows the dierence between the SPC and the LPC methods (cf. g. 14, middle). The long vertical surface segments in the outer rings require more search and comparison operations for the LPC algorithm. This scenario also

13

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

80 HO LPC SPC 1000 comparisons

400 HO LPC SPC 1000 comparisons

300 HO LPC SPC 200

60 1000 comparisons

300

40

200

100

20

100

0 8x8 16x16 24x24 32x32 number of squares 40x40 48x48

0 8 16 24 32 number of rings 40 48

0 4 8 12 16 20 number of bars 24 28 32

Figure 14: Average number of comparisons for the global search phase for the benchmarks squares, rings and bars (from left to right).
3000 number of surface segments 2500 2000 1500 1000 500 0 0 100 200 1000 time steps 300 400

Figure 15: Impact cylinder (blue) on block of brittle material (green).

disclosures a major drawback of the HO approach. Since all objects are nested all contact areas intersect and need to be inspected further. Due to the small distance between the rings even objects consisting of few surface segments intersect. The bars benchmark shows the behaviour of the three methods in the case of long contact and permanent contact areas (cf. g. 14, right). The position code variants behave comparable as expected due to same complexity of the algorithms for contact segments of equal length. The HO approach needs more comparisons because of the increasing size of the overlapping areas. In order to test the algorithm for even more complex contact situations, it was applied to an academic impact benchmark with fragmentation. Therefore, an elastic cylinder is dropped and hits a block which is xed at the bottom (cf. g. 15). The block is out of brittle material and a lot of fragmentation can be observed. For the chosen discretization, the number of surface segments increases from around 300 up to nearly 3000 (cf. g. 15, right). Applying the data structures described above, the structure update for newly generated surfaces is quite simple. All contacts are eciently detected using the SPC algorithm for global search.

14

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

CONCLUSION

Comparing the measured results for dierent global search algorithms, the SPC position code algorithm shows the highest eciency in most contact congurations. It has no preference for any segment direction or mesh orientation and in most cases the Lebesgue curve shows higher locality than the linear position code numbering. The linear numbering can be accidentally better if many long horizontal active contact segments occur in the mesh. The hierarchical ordering algorithm is well suited for congurations with contact in small parts of the mesh only. Using the described halos with a time changing size for smooth and non-smooth surfaces and the outside ag for the local search, all contact events can be eciently detected for complex problems (cf. g. 15). The SPC position code algorithm and the halo strategy for C1 -continuous smooth surfaces and piecewise straight surfaces form a powerful and ecient method for detecting arbitrary contact events. It is generally recommended for 2D FE applications with several moving bodies and non-predictable contact events due to fragmentation.

15

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

REFERENCES [1] E. Anderheggen, D. Ekchian, K. Heiduschke, and P. Bartelt. A contact algorithm for explicit dynamic FEM-analysis. In M. Aliabadi and C. Brebbia, editors, Contact Mechanics, Computational Techniques, Proc. 1st Intl. Conf., pages 271283, Southampton, 1993. [2] G. Camacho and M. Ortiz. Adaptive Lagrangian modelling of ballistic penetration of metallic targets. Comput. Methods Appl. Mech. Engrg., 147:269301, 1997. [3] R. Diekmann, J. Hungershfer, M. Lux, L. Taenzer, and J.-M. Wierum. Using space o lling curves for ecient contact searching. In Proc. IMACS, 2000. [4] K. Mehlhorn. Data structures and algorithms, Vol. 1: Sorting and searching. Springer, Berlin, 1984. [5] M. Oldenburg and L. Nilsson. The position code algorithm for contact searching. Intl. Journal for Numerical Methods in Engineering, 37:359386, 1994. [6] D. R. J. Owen, D. Peric, E. A. de Souza Neto, A. J. L. Crook, J. Yu, and P. A. Klerk. Computational strategies for discrete systems and multi-fractioning material. In Proc. European Conf. on Comput. Mechanics, M nchen, 1999. u [7] H. Sagan. Space Filling Curves. Springer, 1994. [8] L. Taylor and D. Flanagan. PRONTO 2D: A two-dimensional transient solid dynamics program. Technical Report SAND86-0594, Sandia Natl. Labs, 1987. [9] R. Taylor and P. Wriggers. Smooth discretization for large deformation frictionless contact. SEMM-report, UC Berkeley, 1998. [10] P. Wriggers. Finite element algorithms for contact problems. Archive of Comput. Methods in Engrg., 2:149, 1995. [11] P. Wriggers, L. Krstulovic, and J. Korelc. Development of 2D smooth polynomial frictional contact elements based on a symbolic approach. In W. Wunderlich, editor, Proc. Europ. Conf. Comp. Mechanics, M nchen, 1999. CD-ROM. u [12] Z. Zhong and L. Nilsson. A contact searching algorithm for general contact problems. Comp. & Struct., 33(1):197209, 1989.

16

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

COMPLEXITY

For the complexity analysis of the global search based on the Lebesgue curve we assume a scenario of N = n n position code boxes each containing a single surface node. The maximum level of the space lling curve is Lmax = log n 1. The proof also holds if several nodes in each box are assumed as long as the number of nodes in a single box is bounded by a constant. A.1 Initialization

The calculation of a nodes position code within the space lling curve needs O(log n) comparisons (cf. sec. 4.2). To allow ecient access to the position code list we have to sort it which means O(log N) comparisons per node. Overall, we get a complexity of O(N log N) operations. A.2 List update

The update of the underlying data structure has to take into account all movements of nodes during the explicit time integration. We assume that the maximum movement of a node is smaller than the size of the position boxes. The following proofs can be adapted to larger velocities as long as the movement is bounded by a constant number of boxes. Lemma A.1 The update of the position code within the space lling curve can be done with 8 comparisons on the average. Proof We need four comparisons to check whether a node has left its box (cf. algorithm in gure 6). Additionally, the min function, which determines the level of the crossed boundary, needs t(i) = i + 1 operations for horizontal and vertical direction. The calculation of the new position code for a known boundary level can be done with a single bitwise XOR-operation. This means a total of 4 + 2 t(i) comparisons for the position code update of a node crossing a boundary of level i. The average case analysis takes into account the frequency of the dierent levels of boundaries. One half of the boundaries are of level 0, one quarter are of level 1, and so on. Thus, the probability of crossing a boundary of level i in horizontal or vertical 1 direction is p(i) = 2i+1 . These considerations lead to an average number t of comparisons of t =
Lmax i=0

p(i) t(i)

i=0

p(i) t(i) =

i+1 = i+1 i=0 2

i = 2. i i=1 2

(9)

Lemma A.2 Resorting the updated list of position codes can be done in O(1) per node on the average. 17

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

Figure 16: Distance within a space lling curve. Red boxes: source and destination of a surface node crossing a boundary of level i. Green boxes: distance between the position code of the old and the new position.

Proof On the average an insertion sort based on a balanced binary tree needs in average case c log2 d operations5 to insert a key with distance d from the actual position [4]. A node crossing a boundary of level i has to be moved by less than d(i) = 3 4i entries, because between the old and the new box are 2 i1 4x (vertical boundary) and i 4x x=1 x=1 (horizontal boundary) other boxes on the path of the space lling curve (cf. g. 16). For the average number of comparisons we get with the probability of the level of any boundary
Lmax i=0 Lmax i=0

p(i) c log2 d(i) =

1 2i+1

c log2 3 4i c

1 2i = c 4. i i=1 2

(10)

A.3

Candidate update

We consider the number of operations needed to nd all candidate nodes of a given segment with length l anywhere in the given area. Lemma A.3 The candidate update for SPC can be done in O(l2 + 1) per segment on the average. Proof At rst, the starting indices in the position code array have to be found for all four consecutive index ranges (cf. sec. 4.4). This can be done in constant time on the average: We need 2 log d operations to nd a node with distance d using exponential search. Further analysis of this step follows the average case argumentation of lemma A.2. The number of nodes (or boxes) which have to be checked is bounded by the smallest box level i of the space lling curve which covers the segment. This level depends on the
5

Constant c depends on the implementation.

18

Ralf Diekmann, Jan Hungershfer, Michael Lux, Lars Taenzer, Jens-M. Wierum o

maximum lmax of width and height of the axis-aligned rectangle surrounding the segment. Considering all possible angles according to the axis, we get the average case maximum max of l max l 1 = /2
/2

max(l cos , l sin ) d

0 /4 /2

1 = /2 =

l cos d +
0

l sin d
/4

2 2 1 l+ l /2 2 2 2 2 l = The level i of the boxes is log2 regions is limited by 4 4i 32


2 2 l b 2

(11)

l b + 1 . Therefore, the number of nodes in all four

19

You might also like