You are on page 1of 6

Journal of Materials Processing Technology 161 (2005) 368–373

A common algorithm for various parametric geometric changes


in finite element design sensitivity computation
S. Krishnakumar1 , S.R.H. Hoole∗
Department of Computer Sciences, Faculty of Engineering, University of Peradeniya, Sri Lanka

Abstract

Design sensitivity analysis is mainly applicable to optimization and force computation problems. With the former, geometrical parameters
undergo big changes that require mesh integrity checks and mesh connections need to be preserved for C1 continuity. This is usually addressed
through problem-specific mesh generators that cannot be general purpose. This paper presents a new criterion for changing meshes for design
sensitivity computation while preserving C1 continuity of the object function. It is shown to be applicable to various kinds of linear changes of
multiple parameters that combine to model changes of nodes, lines and objects. This is used to create a powerful general-purpose parameterized
mesh generator for linear and rotary displacement in finite element sensitivity computation. The powerful algorithm developed here for linear
movement is shown through example to work for several types of parameters. This generator allows repeated solutions with iterated meshes
so that it can be employed in a first-order optimization strategy exploiting its faster convergence.
© 2004 Elsevier B.V. All rights reserved.

Keywords: Finite element design; C1 continuity; Optimization; Shape optimization; Programming

1. Introduction it, the connections between nodes must not be altered as the
shapes change [3].
Parameterization renders the finite element mesh gener- A second elastic deformation accompanied by a structural
ation process easy for repeated studies. Thus, to study the mapping has been employed to enforce the required rules
effect of, say, the size of a part, the finite element problem with meshes and this technique was developed using struc-
can be defined by a parametric description of the dimen- tural deformations of a given shape: (i) to achieve shape out-
sions of that part and repeatedly studied for different values lines of the optimized device and (ii) to maintain a constant
of those dimensions. Such a facility is available with many mesh topology throughout the optimization, which elimi-
commercial codes such as flux [1]. These mesh generators nates mesh-induced discontinuities in the object function.
are useful for zeroth-order optimization studies where the This method cyclically solves first a structural problem to
object functions can be computed under post-processing. For find the displacement of nodes and then the desired electro-
higher-order shape optimization purposes, however, parame- magnetic problem. However, the process is time-consuming,
terization must follow certain rules [2] or C1 continuity would involves repeatedly solving a larger structural problem and
be lost and mesh-induced minima will be seen as local min- then the electromagnetic field problem at hand [3]; numer-
ima by the optimization process. With these parameterized ical errors in solving the structural problems accumulate to
mesh generators, points are introduced on a scaled basis on the original electromagnetic problem.
lines defining boundaries but the mesh is recreated from these Alternatively, a problem-specific mesh generator is used.
boundary points. As a result, C1 continuity is lost; to preserve As shown in Fig. 1, if a particular part with a dimension p is
changing during optimization, the special mesh generator ad-
∗ Corresponding author. Present address: Department of Electrical Engi- justs the mesh according to mathematical formula preserving
neering, Faculty of Engineering, University of Peradeniya, Sri Lanka. scales so that C1 continuity is preserved. This has been used
E-mail address: hoole@ee.pdn.ac.lk (S.R.H. Hoole). to study the shape of a pole-face to produce a constant flux
1 On leave from the Department of Physical Science, Vavuniya Campus,

University of Jaffna, Sri Lanka.


density in the air gap [4]. The method has been generalized to

0924-0136/$ – see front matter © 2004 Elsevier B.V. All rights reserved.
doi:10.1016/j.jmatprotec.2004.07.053
S. Krishnakumar, S.R.H. Hoole / Journal of Materials Processing Technology 161 (2005) 368–373 369

Fig. 2. A single dimension moving.

Fig. 1. Special mesh generators with scaled meshes.


To define our method, let R be the region where nodes
split a domain into 10 rectangular parts [5]. But these clearly are allowed to move in the selected moving domain and P
fail for general shapes. be a variable master node in R (Fig. 3). Draw vertical and
To overcome this, in this paper, we have developed a new horizontal lines at the node P that divide the region R into four
scheme that can be used to move a single node, multiple quadrants, say Rrt , Rlt , Rrb and Rlb , the subscripts standing for
nodes or rotate an object of any shape within a selected rect- right-top, left-top, etc. The corresponding areas of the four
angular region in the mesh topology, elastically pulling the regions are denoted by PArt , PAlt , PArb and PAlb . If the node P
nodes while preserving connections. The exact new location moves a desired distance D in the direction Y (using Cartesian
of nodes, except those directly tied to parameters is not crit- coordinates) all other nodes in the region R are to be moved
ical. Using this scheme, gradient optimization methods can elastically with respect to the node P. Suppose Q be a free
be applied for higher-order shape optimization problems. node not tied to any parameter in the region Rrt and say, it
moves by a distance d in the direction Y as P moves. Now
we can find the area, QArt , of the rectangle made by right-top
2. The rules most corner point of the boundary and the point Q. PArt is the
area of rectangle PP1 P2 P3 and QArt of QQ1 P2 Q2 . The ratio
2.1. Crunching and stretching
QArt
Geometric mesh parameters are coordinates, line lengths, C= (1)
PArt
the position (anchor) of a line or object, the angle of a ro-
tating object, etc. Several kinds of movements are possible
with parameters – linear, rotary, etc. Here we will develop is defined as the moving ratio and this is a key ratio in all our
the equations for linear movements and rotations, the two algorithms. We note that PArt is never zero and that this ratio
predominant types in optimization. For linear movement: (i) is 1 when Q coincides with P. Similarly, a moving ratio can
the basic rule is that connectivity between nodes is to be pre- be found if the node Q is in the 2nd, 3rd, or 4th quadrant.
served and (ii) as a master node (that is a node directly tied Accordingly, the algorithm is as follows:
to a parameter) moves, other nodes move elastically within a
moving domain rectangular boundary surrounding the mov- Step 1: The point Q is identified in one of the four quadrants
ing parameter (the outer rectangle of Fig. 3). Where the mas- of the rectangular boundary. Now let the x–y coordinates of
ter nodes move towards the rectangular boundary, nodes be- points P and Q be by Px , Qx , Py and Qy , respectively.
tween the master node and the rectangular boundary move so Step 2: The moving ratio C is determined from the location
as to crunch element edge segments between the master node of nodes. It varies with respect to the moving directions.
and the boundary. Where it moves away, edges are stretched. The moving ratio CY is calculated from the following if the
The actual amount of movement is not directly critical. We
use a scale based on the change of length between the master
node and the boundary as defined below.
We will develop algorithms for the movement of a sin-
gle and multiple nodes directly tied to parameters. The algo-
rithms will compute how other nodes move as these master
nodes move. We will then through examples show how these
can be applied to various types of parameter.

2.2. Single moving master node

A single master node moving in a direction (x or y) com-


monly occurs as shown in Fig. 2 for a vertical dimension.
This is a special case of two-dimensional moving. This may
be easily generalized for movements in the x-direction and
then to any direction. Fig. 3. Moving ratio defined: one moving master node P.
370 S. Krishnakumar, S.R.H. Hoole / Journal of Materials Processing Technology 161 (2005) 368–373

node P is moving in the direction Y: and find displacement, d1 (due to the virtual displacement of
(A2 ) using (3)). By the same procedures, d2 can be found.
(Xr − Qx )(Yt − Qy )

This can be formulated as follows:
(Xr − Px )(Yt − Py ) if Qx ≥ Px and Qy ≥ Py ,








 (Xr − Qx )(Qy − Yb ) {D} = [C]{h} (4a)
 (Xr − Px )(Yt − Py ) if Qx ≥ Px and Qy ≥ Py ,



or
CY =
(Xl − Qx )(Yt − Qy )
     
D1 1 c1,2 h1

 (X − P )(Y − P ) if Qx ≥ Px and Qy ≥ Py ,


 l x t y = = (4b)
D2 c2,1 1 h2




 (Xl − Qx )(Qy − Yb ) if Qx ≥ Px and Qy ≥ Py



(Xl − Px )(Py − Yb ) We solve (5) for h1 and h2 by inversion and move the node A1
(2) and A2 , accordingly. The total movement will be as required.
In real electromagnetic shape optimization problems,
Step 3: Compute the actual y-coordinate by incrementing it however, there will be several nodes between the variable
by nodes A1 and A2 . Since A1 A2 would usually be a boundary,
d = DCY (3) all nodes on the line A1 A2 must remain on the line nodes off
the line may move more freely. The displacement of each
where d can be negative depending on which side of P it node on the line A1 A2 as in Fig. 4 can be found by inter-
is in. That is, the new Y-coordinates of points P and Q are polating from the given two known displacements D1 and
PYnew = PY + D and QYnew =QY + d. D2 .
Step 4: Generalize steps (2) and (3) for movement in the Let M(xm , ym ) be an arbitrary node on the selected line
X-direction. AB and suppose that the actual moving distances of A and
B are Di and Dj in the Y-direction. Then the interpolation of
the new position of M is M1 and its displacement, Dm in the
Y-direction can be found as follows (Fig. 5):
 (xm − x1 )(y2 + D2 ) + (y1 + D1 )

 (x2 − x1 ) − ym if x1 = x2 ,
Dm = D2 − D1 (5)
 (ym − y1 ) 1 +
 + (y1 + D1 ) − ym if x1 = x2
y2 − y1
Similarly we can find the displacement of M in the X-
2.3. Two moving master nodes direction.

Two parametric dimensions moving commonly occur as 2.4. Generalizing to n master nodes moving
shown in Fig. 4 for a vertical dimension. Let D1 , D2 be the
actual displacements of master nodes A1 and A2 , respectively, With the methodology established above, we can easily
as required by the optimization process. But by our algorithm generalize to n master nodes moving. Let vnx1 be the vector
as A1 moves by h1 , A2 will also move as “another node” in of actual displacements of all n variable master nodes (in-
the rectangular boundary by d2 . Similarly A1 will also move cluding the nodes on the line joining master nodes). Now let
by d1 as A2 moves by h2 as a master node. Thus the actual [C]n,m be the matrix of all moving ratios of the m nodes in
movement of A1 is h1 + d1 and this combined total has to be the moving domain with respect to the n master nodes. All
D1 . Similarly D2 = h2 + d2 . Now let c2,1 be the moving ratio these moving ratios can be easily computed. Let hn be the
of node A2 with respect to node A1 . Here c2,1 determines the vector of virtual displacements of all n master nodes (includ-
movement of A2 only due to the movement of A1 . Similarly ing nodes on the line joining master nodes). Hence hn can be
let c1,2 be the moving ratio of node A1 with respect to the node found by solving (upon inverting) the relevant linear system
A2 . Hence, we can form a matrix, [C]2×2 , for moving ratios

Fig. 4. Two master nodes moving. Fig. 5. New position of node on material boundary.
S. Krishnakumar, S.R.H. Hoole / Journal of Materials Processing Technology 161 (2005) 368–373 371

Fig. 6. Object moving.

of equations, generalized from (4). Since in many engineer-


ing designs the number of independent parameters is of the
order of 10 (and rarely more than 50), this inversion involves
little time. Fig. 8. Circled node B moved elastically pulling/crushing.
The displacement of each node in the changing domain R
that is not a master node can be computed from When node B is the only master node, the new shape and
n mesh by our algorithm is shown in Fig. 8. Nodes A, C, and
i i
Ynew = Yold + Ci,j hj for each node i ∈ R (6) D are fixed.
j=0

which involves but a simple summation and includes master 3.2. Line moving
nodes for completeness.
In the same example above, if we select both nodes A
2.5. Object moving and B as the master variable nodes as shown, line AB moves
elastically pulling some parts and crushing others as seen in
Here we may consider a closed shape as an object in the the mesh of Fig. 9. Thus we see that the same algorithm works
moving domain and all its corner nodes are defined as variable for line parameters.
nodes (Fig. 6) and the displacement of each node of the object
is allowed the same displacement. The final displacement of 3.3. Object moving
any node may be found by (6). Thus, the same algorithms
and equations apply. An object of any shape can move elastically without hav-
ing additional algorithms. We select an object of closed shape
as shown in Fig. 7 and select all corner nodes (4 in this case)
3. Examples of linear displacement as master variable nodes with equal variable y-coordinate,
which is the parameter. Our algorithm yields the mesh of
3.1. Single node moving
Fig. 10.
In general, parameters in the shape optimization of electri-
cal devices are line segments. In Fig. 7, the location of nodes
4. Rotary displacement of an object
A, B, C, or D or any combination there of, may be selected as
a parameter from the dialog box. The inner rectangular box
Here again the same object of Fig. 7 is selected for demon-
is the moving domain.
strating rotary displacement. Each corner node of the shape
in Fig. 9(a) is allowed to rotate about any anchor-point (XA ,

Fig. 7. Initial position of shape ABCD and mesh. Fig. 9. Line moved (preserving horizontality and length).
372 S. Krishnakumar, S.R.H. Hoole / Journal of Materials Processing Technology 161 (2005) 368–373

Fig. 12. Pole-face problem and changing mesh for the boxed area by old
mesh generator.
Fig. 10. Quadrilateral object moved preserving its shape.

contain further nodes. The restriction is that if we want more


nodes, then each of those would be a new parameter. The dark
jagged line is a material boundary and defines the shape of
the pole-face.
Fig. 13 gives the mesh by our new algorithm. Fig. 13(b)
shows part of the principle behind the new mesh genera-
tor for nodal coordinate parameters. Each variable circled
point in Fig. 13(a) was modeled by polynomial approxima-
tions (in this case, a sinusoidal function with three parameters
was used). This makes smooth contour lines and allows addi-

Fig. 11. Object rotated elastically.

YA ) which is defined through a dialog box, whether for test-


ing the program or real optimization runs at the data input
stage. The single parameter is the angle of rotation about that
anchor.
Let the coordinates of variable node A be (X, Y). If A is
now rotated about to A1 , its new coordinates may be trivially
obtained from

x = XA + X cos(α) + Y sin(α) (7)

y = YA + X sin(α) + Y cos(α) (8)

The object can be rotated to yield the mesh shown in


Fig. 11.

5. Mesh changes preserving material interface

The same algorithm also applies to shape changes. To


demonstrate this, we take as example the problem of optimiz-
ing a pole-face to accomplish a constant flux density along
specified measuring points shown in Fig. 12 of the symmet-
ric left half of the device. Along with the device is shown
the mesh by a problem-specific mesh generator modeling the
pole-face by the principles of Fig. 1 [4].
The vertical line lengths below the jagged dark contour
are parameters, which are the y-coordinates. We note that
nodes between these parametric vertical line lengths cannot Fig. 13. Pole-face modeled by the new mesh generator.
S. Krishnakumar, S.R.H. Hoole / Journal of Materials Processing Technology 161 (2005) 368–373 373

6. Conclusions

A flexible parameterized mesh generator for optimization


has been demonstrated to model moving (i.e., optimized)
shapes. The single algorithm presented covers various kinds
of movement at once.
The problem area of discontinuous objective functions
was previously identified [2], and elastic deformation ac-
companied by a structural mapping was introduced to en-
force the required rules with meshes, but the process is time-
consuming and involves repeatedly solving a larger struc-
tural problem rather than the immediate electromagnetic field
problem at hand.
The proposed and demonstrated mesh generator allows
repeated solutions with iterated meshes so that it can be em-
ployed in a first-order optimization strategy exploiting its
faster convergence rates. We have given a new algorithm for
computing the movement of mesh nodes as master nodes di-
rectly tied to the parameters that move. The same flexible
algorithm can be employed to model various kinds of param-
eter changes. The computation is simple and does not require
any large matrix inversion. It covers the movement of nodes,
lines and objects while preserving C1 continuity.

Acknowledgements

This project was supported by the National Science Foun-


dation (Sri Lanka) under Award No. RSP/2001/UOP/E/02
and Grant No. RG/2001/E/04. The presentation of this paper
Fig. 14. Mesh of the model of cross-shape before and after movement and at the Jap-Med-03 conference was facilitated by a travel grant
rotation. from NSF.

tional nodes between master nodes. Changing these param-


eters gives the desired shape. The circled nodes (on an opti- References
mized boundary) are moved elastically to their new positions.
Such changes preserve derivative continuity. The derivatives [1] CEDRAT Corporation, Flux User Manuals, France, 2002.
[2] S.R.H. Hoole, Finite elements, in: Electromagnetics and Design, El-
may be computed very easily through readily implemented
sevier, Amsterdam, 1995.
algorithms. As a line length parameter changes, all nodes [3] K. Weeber, S.R.H. Hoole, A structural mapping technique for geo-
on it are moved preserving the ratio of nodal divisions on the metric parameterization in the synthesis of magnetic devices, Int. J.
line while the same automatically happens to the vertical part Num. Meth. Eng. 33 (1992) 2145–2179.
above and below the contour. [4] S. Subramaniam, A.A. Arkadan, S. Ratnajeevan, H. Hoole, Optimiza-
tion of a magnetic pole face using linear constraints to avoid jagged
To show the versatility of the mesh generator, another ex-
contours, IEEE Trans. Magn. 30 (1994) 3455–3458.
ample of moving and rotating at once a cross-shaped object [5] B.R. Brandstatter, W. Ring, Ch. Magele, K.R. Richter, Shape design
(chosen specifically for its complexities with convex and con- for great geometrical deformations using continuously moving finite
cave corners) is shown in Fig. 14. element nodes, IEEE Trans. Magn. 34 (1998) 2877–2880.

You might also like