mesh adaption and optimization techniques in magnet design

4
2954 IEEE TRANSACTIONS ON MAGNETICS, VOL 32, NO. 4, JULY 1996 Mesh Adaption and Optimization Techniques in Magnet Design P. Alotto, P. Girdinio, P. Molfino, M. Nervi Dipartimento di Ingegneria Elettrica, Universita’ di Genova lla, Via Opera Pia - 1.16145 Genova, Italy Abstract-In this paper the results obtained in the realization of an automatic procedure for magnet design in ZD, plane and axysimmetric, will be presented. The proposed procedure combines mesh adaption, based on an “a-posteriori” error estimate, and deterministic optimization techniques. The use of an analysis module with mesh adaption capabilities gives the automatic design procedure a more stable behaviour in the evaluation of the objective function. In particular, one of the most important features of this strategy is to allow wide variations in dimensional parameters, with high accuracy. The procedure has been realized with a modified version of the VFIOPERA 2d code, realized by the authors, and an optimization technique, based either on the “Response Surface” or on the “Pattern Search” algorithm, interacting with the analysis code using parametric commands. I. INTRODUCTION The use of optimization techniques, combined with the numerical solution of field equations, has been widely used in electlomagnetic analysis for many years [llj, as a first step towards the solution of inverse problems. The increased availability of computational power has given, in recent years, a great impulse to the subject. In the last decade, also techniques for error estimation and mesh adaption in Finite Element solutions of field problems have been increasingly investigated [2-51. Both these advanced features in Finite Element analysis are calling today a growing attention, particularly in Electromagnetic Analysis, because of their strategic importance in the development of analysis tools providing the user with a powerful and easy to use computational environment. In particular, the joint availability of optimization and mesh adaption procedures allows to obtain reliable Finite Element solutions without specific user skills, a feature in turn essential for automation of design environment, device optimization and inverse problem applications, increasingly requii-ed in designing advanced electromagnetic devices [ 11. Many techniques for the estimation of errors have been proposed, but it has also beeii shown that the efficiency of each technique is significantly dependent on the specific problem to be solved 12-51, The distinctive feature of the f-atnily of error estimators developed at the University of Genova is the representation of the field over the element, that is related to the type of potential, scalar or vector, used to derive the field. This ensures the ability to capture effectively the biggest error contribution, connected to the normal derivative of the Manuscript received June 11, 1995. The authors acknowledge the financial support of the Italian Ministry of University and Research (MUKST), untler the National Projects Programme. potential from which the field is derived. The representation of the error variables is then in teims of “edge” or “facet” elements for solutions derived from vector or scalar potentials, respectively [7,8]. The error estimators defined in this way have then been used to build up an adaptive meshing strategy, based on the subdivision of elements with higher errors, usually termed “h refinement” [4]. All algorithms have been implemented in the two-dimensional VF/OPERA 2d environment [9]. The same environment also provides parametric design features which are essential to set up an automated optimization algorithm. In the present paper deterministic optimization methods have been used to validate the proposed combined strategy, and have proven successful in improving some designs chosen from literature. 11. THE LOCAL FIELD ERROR APPROACH The “Local Field Error Problem” for electrostatic and magnetostatic cases is derived from the proper subset of Maxwell equations, defining a governing set in term of “curl” and “divergence” of the numerical enor [5,7,8]. The basic idea is to obtain an “a-posteriori” error estimate defining a local problem over each element, using as unknowns the errors in the evaluation of field quantities, with “en-oi- sources” derived from the jumps in the normal derivatives of potential applying Ampere’s and Gauss’ laws. The development of an “a-posteriori” ellor estimate based on a “Local Field Error” approach requires the dcfinition of the error estimate unknown in teims of fields, the use of Maxwell equations in differential form and the definition of a closed domain where Diriclielet- like boundaries conditions are applied. This implies that the unknown vector entity is uniquely defined by Helmholtz’s theorem. A. Error pro h lrnz , fo rim latio n For magnetostatic pi-oblems, the evaluation of the estimate of numerical errors in Finite Element solutions can be carried out defining an adjoint problem where the unknowns are the components of the enor vector 2, defined as die difference between the “true” magnetic induction Bt and the computed one E,, The governing equations of the error problem are derived starting from the magnetostatic subset of Maxwell equations applied to the “true” magnetic induction. This leads to the following set of vector equations for the numerical vector eimr Z : VXH, = 5 =3 v x(vE) = 5 -v x (vn,) 0018-9464196$05.00 0 1996 IEEE

Upload: m

Post on 28-Feb-2017

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Mesh adaption and optimization techniques in magnet design

2954 IEEE TRANSACTIONS ON MAGNETICS, VOL 32, NO. 4, JULY 1996

Mesh Adaption and Optimization Techniques in Magnet Design

P. Alotto, P. Girdinio, P. Molfino, M. Nervi Dipartimento di Ingegneria Elettrica, Universita’ di Genova

l l a , Via Opera Pia - 1.16145 Genova, Italy

Abstract-In this paper the results obtained in the realization of an automatic procedure for magnet design in ZD, plane and axysimmetric, will be presented. The proposed procedure combines mesh adaption, based on an “a-posteriori” error estimate, and deterministic optimization techniques. The use of a n analysis module with mesh adaption capabilities gives the automatic design procedure a more stable behaviour in the evaluation of the objective function. In particular, one of the most important features of this strategy is to allow wide variations in dimensional parameters, with high accuracy. The procedure has been realized with a modified version of the VFIOPERA 2d code, realized by the authors, and an optimization technique, based either on the “Response Surface” or on the “Pattern Search” algorithm, interacting with the analysis code using parametric commands.

I. INTRODUCTION

The use of optimization techniques, combined with the numerical solution of field equations, has been widely used in electlomagnetic analysis for many years [llj , as a first step towards the solution of inverse problems. The increased availability of computational power has given, in recent years, a great impulse to the subject. In the last decade, also techniques for error estimation and mesh adaption in Finite Element solutions of field problems have been increasingly investigated [2-51.

Both these advanced features in Finite Element analysis are calling today a growing attention, particularly in Electromagnetic Analysis, because of their strategic importance in the development of analysis tools providing the user with a powerful and easy to use computational environment. In particular, the joint availability of optimization and mesh adaption procedures allows to obtain reliable Finite Element solutions without specific user skills, a feature in turn essential for automation of design environment, device optimization and inverse problem applications, increasingly requii-ed in designing advanced electromagnetic devices [ 11. Many techniques for the estimation of errors have been proposed, but it has also beeii shown that the efficiency of each technique is significantly dependent on the specific problem to be solved 12-51,

The distinctive feature of the f-atnily of error estimators developed at the University of Genova is the representation of the field over the element, that is related to the type of potential, scalar or vector, used to derive the field. This ensures the ability to capture effectively the biggest error contribution, connected to the normal derivative of the

Manuscript received June 11, 1995. The authors acknowledge the financial support of the Italian Ministry

of University and Research (MUKST), untler the National Projects Programme.

potential from which the field is derived. The representation of the error variables is then in teims of “edge” or “facet” elements for solutions derived from vector or scalar potentials, respectively [7,8].

The error estimators defined in this way have then been used to build up an adaptive meshing strategy, based on the subdivision of elements with higher errors, usually termed “h refinement” [4]. All algorithms have been implemented in the two-dimensional VF/OPERA 2d environment [9].

The same environment also provides parametric design features which are essential to set up an automated optimization algorithm. In the present paper deterministic optimization methods have been used to validate the proposed combined strategy, and have proven successful in improving some designs chosen from literature.

11. THE LOCAL FIELD ERROR APPROACH

The “Local Field Error Problem” for electrostatic and magnetostatic cases is derived from the proper subset of Maxwell equations, defining a governing set in term of “curl” and “divergence” of the numerical enor [5,7,8]. The basic idea is to obtain an “a-posteriori” error estimate defining a local problem over each element, using as unknowns the errors in the evaluation of field quantities, with “en-oi- sources” derived from the jumps in the normal derivatives of potential applying Ampere’s and Gauss’ laws. The development of an “a-posteriori” ellor estimate based on a “Local Field Error” approach requires the dcfinition of the error estimate unknown in teims of fields, the use of Maxwell equations in differential form and the definition of a closed domain where Diriclielet- like boundaries conditions are applied. This implies that the unknown vector entity is uniquely defined by Helmholtz’s theorem.

A. Error pro h lrnz , fo r i m latio n

For magnetostatic pi-oblems, the evaluation of the estimate of numerical errors in Finite Element solutions can be carried out defining an adjoint problem where the unknowns are the components of the enor vector 2 , defined as die difference between the “true” magnetic induction Bt

and the computed one E , , The governing equations of the error problem are derived starting from the magnetostatic subset of Maxwell equations applied to the “true” magnetic induction. This leads to the following set of vector equations for the numerical vector eimr Z :

V X H , = 5 =3 v x(vE) = 5 -v x (vn,)

0018-9464196$05.00 0 1996 IEEE

Page 2: Mesh adaption and optimization techniques in magnet design

2955

where v is the reluctivity of materials and J is the applied current density. The RHS term of (2) can be expressed in terms of a fictitious current density Jf by applying Ampere’s law as:

(3)

Those fictitious current densities are the volume sources of the problem in terms of error and must be derived from the numerical solution obtained in terms of magnetic vector ptential [7,8].

B. Error Problem Solution Strategy

Equations (1) and (2) define the sets of vector equations for the error problems over a generic open domain. Different approaches have been used for the solution of the error problem [2-41. In order to cope better with complicate geometries with many interfaces, very likely to be of interest in industrial electromagnetic design, the authors have chosen to work on a single element at a time (single-element “patch”) [4,S]. On each element of the discretized domain the boundary conditions are given on the surface of the element in terms of the jump of the normal derivatives of the potential at inter- element boundaries. It is also assumed that the error related to the normal component of magnetic induction is negligible with respect to the error related to the tangential one. This reduces the goveming set of equations only to (2) as det&xl in [7,8].

At exterior boundaries and interfaces, the conditions on the error are derived by the residual in the evaluation of the relevant condition with respect to the tangeutial component of the field [SI.

The fictitious current densitiy Jf defined by (3), assumed to be constant over each element, can be evaluated applying Ampere’s law to the exterior boundary of each element [8].

The adjoint problem in terms of error, defined by (2) over each element of the discretized mesh can be numerically solved by discretizing the domain (that is, each generic element) into three sub-elements, by adding a node in the centroid of the element.

On each sub-element the unknown error (the tangential component of the error in the evaluation of magnetic field) is represented using a vector interpolation in terms of “edge elements” in a “Whitney forms” description [6,8].

C. Mesh rqfinement

The use of the previously presented error estimates in an automatic procedure for mesh refinement requires the identification of an adaption strategy. As described in a previous paper [SI, the procedure is based on the detinitio~i of a refinement indicator to guide the subdivision of elements and of a convergence parameter to stop the iterative process of mesh refinement, which also provides a final estimate of the local relative error on each elemeiit of the final refined mesh. All quantities are computed on the basis of the evaluation of quadratic norms over each element [7,8]. The iterative

procedure is stopped when the convergence parameter falls below a user defined value of “average desired error”, in relative or percentual terms. The final error estimate is then evaluated with respect to the maximum field value computed over the domain. Mesh refinement is realized using the h- refinement procedure detailed in [SI. The previously defined mesh refinement procedure has been enhanced with the introduction of a weight function applied to selected regions, in order to define areas of m%jor interest for the user (e.g. the uniform field region).

111. THE OPTIMIZATION PROCEDURES

Two different deterministic optimization procedures (“pattern search” and “response surface”) have been used on selected test cases. Both had previously been found to be fairly robust and acceptable from the point of view of the required computational effort. The “response surface method” is a deterministic zero-th order technique, thus not requiring gradient values, based on the “empirical model” building approach [lo]. This strategy is in fact based on low order polynomial fitting, with a least square approach, of the object function and can be used to model locally its behaviour. The problem of finding the minimum possible set of points needed to get a polynomial fitting of a given order, with the best accuracy of its coefficients, has been solved with the approach outlined in [lo]. The use of least square fitting can be very useful, especially when the objective function is evaluated by means of a numerical technique, because it can smooth out “corrugations” of response due to possible numerical errors affecting each function evaluation. The complete second order model can be written as:

where (x) is the vector of design variables, bo is the zero- th order coefficient, (b} is the ‘array of first order coefficients and [B] is the matrix of second order coefficients. A detailed anlysis of the properties of the method and a number of useful speed-up techniques can be found in [12].

As an alternative technique, the “pattern search method”, was also used. This well known direct search strategy [lS] has proven to be robust and usually comparatively fast for the optimization of electromagnetic devices as the ones presented in this paper [16]. The “ridge following” property of the method makes it a good candidate for a rapid solution of problems where the starting point is presumably near to the optimal configuration in parameter space.

By comparing the results of these two different optimization methods, it has been possible to gain confidence in the robustness of the proposed approach and to perform a useful check of the “quasi-optimal” designs obtained.

IV COMBINED ADAPTION AND OETIMIZATION

The combined strategy, generating a mesh suitable for high accuracy computation independently from the geometry generated by the optimization procedure, has been implemented through a cascade of general purpose modules (Fig. 1).

Page 3: Mesh adaption and optimization techniques in magnet design

2956

I Parametricmodel I

Magnetostatic solver

Convergence no

I

Objective function evaluation

I I optimization strategy (update D.o.F.) en-.- Convergence

(stop] Fig.1 Data-flow of the conibined adaptive optimization strategy

In particular a version of the adaptive solver Opera-STA by Vector Fields, modified by the authors, has been used, together with the parametxic design capabilities offered by the pre- and postprocessor of the same company. This modular approach provides a very flexible environment for the testing of different optimization strategies. The computational cost of the combined method is roughly 3 to 4 times greater than an object function evaluation performed without adaption, as the adaptive algorithm tipically requires 3 to 4 iterations to converge.

Iv. IMPLEMENTATION AND TEST CASES

Two different test cases have k e n selected to demonstrate the importance of mesh adaption in the context of constrained optimization. In both problems highly accurate field computation was required, since the objective function (field uniformity) depended entirely on the quality of the solution. The first test problem represents a dipole designed for the European Synchrotron Radiation Source [13], the second one a dipole for a multi purpose spectrometer [14]. In both cases several runs have been performed with the two different optimization algorithms and with a choice of different degrees of freedom. Fig. 2 illustrates the chosen DOF’s for the two test problems, while tables I and I1 summarize some of the obtained results. The first row corrsponds to a standard optimization procedure where mesh density is predefined, and

does not change during the optimization. All other rows refer to optimized solutions obtained with mesh adaption. Details of the optimized solution with the adapted meshes are shown in figs. 3 and 4, while detailed plots of field uniformity under the poles are shown in figs. 5 and 6. Each adaptive solution run required roughly 3 minutes on a DEC Alpha 3000/600 AXP.

The main result to be pointed out is that the use of the adaption procedure always results in the convergence of the optimization algorithm to a lower value of the objective function than the one obtained with dense, non-adapted meshes. This is true for both cases presented, and in fact for several other examples, not reported here for the sake of brevity. Also, the optimization algorithms show their ability to improve significantly on already very good designs obtained manually.

TABLE I RESULTS FOR TEST CASE 1

DOF Optimization Adaption Eval. Optimum Alporythm

2 Response Surface no 65 0.000200 2 Response Surface yes 65 0.000140 2 Patteiii search yes 103 0.000145

4 Pattern search yes 140 0.000161

TABLE I1

4 Response Surface yes 181 0.000199

RESULTS FORTEST CASE 2

DOF Optimization Adaption Eval. Optimum Algorythm

3 Response Surface no - 0.00030 3 Responsesurface yes 102 0.00009 3 Pattern search yes 129 0.00011

Fig. 2. DOF associated with the two test cases

Fig. 3 Test case 1: detail of tlie mesh around the optimized pole shim

Page 4: Mesh adaption and optimization techniques in magnet design

2957

Fig. 4 Test case 2: detail of the mesh around the optimized pole

0.0003

0.0002

0.0001

0

0 6 12 18 24 30 36 42 48 54 60

Fig. 5. Test case 1. Field urufornuty vs position

2.00E-04

1.60E-04

1.20E-04

8.00E-05

4.00E-05

0.00E+00

312 320 328 336 344 352 360 368 376 384 392

Fig. 6. Test case 2: Field uniformity vs. position

V. C~NCLUSJONS

An algorithm combining inehfi adapiion with automatic optimization has been successfully implemented. A number of test cases have sliown that the use of adaption is critical in

obtaining the convergence of the optimization procedure to very low values of the objective function. This is mainly due to the fact that variations of the geometry during the optimization algorithm do not affect the quality of the solution thanks to adaptive meshing. More traditional approaches do not seem to be able to obtain results of matching quality, or at least to do so with reasonable computational effort. In this respect, the ability to specify regions of greater interest is crucial in the case of problems, like the ones presented, where adaptive procedures show their limits in the evaluation of error estimates in uniform field regions. Work is in progress to apply the presented combined strategy to optimization procedures based on accelerated stochastic methods, in order to yield designs nearer to the absolute optimum with acceptable computational cost.

ACKNO WLEDGMEh’T

The authors are indebted to Prof. Maurizio Repetto for his previous developments on the subject and for the useful discussions and suggestions.

REFERENCES

C. Emson, C.W. Trowbridge, P. Girdinio, G . Molinari, M. Repetto: “Towards an environment for the integration of analysis and design” Cump. Integrated MmuJ Systenu, Vol. 3, n. 4, Nov. 1990, pp. 216- 222. I. Babuska, W. C. Rheinboldt: “A-posteriori error estimates for the finite element method”, Int. J. j b r N~ii ier icd Metho& in Engineering, Vol. 12, 1978, pp. 197-1615, R.E. Bank, A. Weiser: “Some a-posteriori enor estimators for elliptic partial differential equations”, Muthenutics of Coniputatiriii , Vol. 44, Apr. 1985, pp. 283-%1. P. Fernandes, P. Girdinio, P. Molfino, M. Repetto: “Local error estimates for adaptive rnesh refinement’’ IEEE Trans on Mugiietics, Vol. 24, n. 1, Jan. 1988, pp. 299-302. G. Drago, P. Molfino, M. Nervi, M. Repetto, “A ‘Local Field Error Problem’ Approach for Error Estimation in Finite Element Analysis”, IEEE Triuis. 011 Mmnetics. vol. 28, n. 2, March 1992, pp. 1743-1746, A. Bossavit: ”Wl&ey firms: a class of finite elements for three- dimensional coInputations in electromagnetism” IEE Proceedings, Vol. 135, Pt. A, n. 8, Nov. 1988, pp.493-500. P. Girdinio, A. Manella, P. Molfino, M. Nervi, “A ‘Facet Element’ Error Estimate for Adaptive Meshing in Electrostatic FEM Solutions”. Proc. of 6th. IGTE Sy i r rpmi” Graz (Austria), Sept.

.I - - 1994, pp. 138-143. P. Girclinio, P. Molfino, G. Molinari, M. Nervi, “Adaptive meshing in two-variable static problems with field based error estimators using edge and facet elements”, Pmc. of CBiriag ‘95, Corzgresso Brasileiro cle Eletroriicrgnetisr~iri, Florianopolis (Brasil), May 1995 “Opera-2d Reference Manual”, Vector Fields Ltd., Oxford, Nokrnher 1992.

surface”. J. Wilev and Sons. New York, 1987. [IO] G.E.P. Box, N.R. Draper: “Empirical model building and response

- , - [ 1 11 A. Gottvald, “Comparative analysis of optimization methods for

niagnetostatics”, IEEE Trcrrzs. on Magnetics, Vol. 24, n 1, Jan. 1988, pp. 411-414.

[121 A. Manella, M. Nervi, M. Repetto, “Response surface” method in rnagnetic optimization”, bit. .I. Appl. E ~ e ~ I r f J ~ ~ ~ ~ ~ ~ 1 e t i c . s in Materials, Vol. 4, 1993, pp 99-106.

[13] N. Marks, M. Lieuvin “Design of the accelerator magnets for the ESRF”, IEEE T r a m W I Mtrgiictics Vol. 24, 11. 2, March 1988, pp. 741- 744.

1141 Bloniqvist, K.I., De Leo, R., Frullani, S., Garibaldi, F., Ghio, F., Jotlice, M., Nervi, M., Repetto, M., Urciuoli, G.M., “A Magnetic Multi .Pumose Snectrorneter”. IEEE Trans. ori Magnetics, Vol. 28, n. I , Jan. 1932, pp.’fix1-584.-~- ’

[lS] R. Hooke, T.A. Jeeves “Direct search solution of nurnerical ant1 statistical prohleriis”, .I. Assnc. Cr,nz]?. Muh., Vol 8, April 1961, pp, 7 1 1 ??‘I LIL-LL7.

1161 G. Drago, G. Molinari, M. Repetto, G. Secontlo, “Optinlization in n o n h e a r rriagnetostatjc problerns”, Pr~~ceedifigr of the 4th IGTE Syiiipri.~zuitr, Graz (Austria), October 1990, pp. 29-34.