Differences between Mechanical and Electromagnetic Structures
Regarding TO, the main dissimilarity is that in mechanical structures, it is often desired to have lighter designs while respecting the given mechanical constraints like tensile stress and strain, whereas in electromagnetic structures, it is rather required to have magnetically optimal structures w.r.t the magnetic force, magnetic flux density, EMF and so on.
Another essential difference is that in electromagnetism, the nonlinearity of the ferromagnetic materials constituting the majority of the devices must be taken into account. Since we are dealing with the permeability of materials, we must take into account the saturation effect. This implies a limitation of the material to allow flow of more magnetic flux at some point due to their saturation. After this point, there is also a change in the material’s behaviour. These effects do not have to be considered in mechanical structures, but can be a turning point in electromagnetism.
We can also evoke the importance of the movement of electromagnetic devices such as in motors and generators to produce the expected output, while in mechanical devices such as beams, bridges, frames or housings, they are usually required to be stationary and withstand the prescribed load.
The above factors alone represent a substantial hindrance to TO as they largely increase the computation time for the resolution of the models. Computation time usually varies from model to model, and can take several hours to several days. It could be a good practice to keep a step-wise procedure of finding the optimal topology of electromagnetic structures by gradually increasing the difficulty. For instance, a TO using linear materials is usually the stepping stone due to its relative rapidity. Once the correct problem formulation is found, and the solution obtained corresponds to a suitable one, a TO using nonlinear materials can afterwards be envisaged. Subsequently, if the electromagnetic device involves movements (such as in electric machines), the latter can also be added to the TO calculations for a closer consideration of real conditions.
Before getting into these details, it is fair to first introduce the various existing TO methods to later narrow down our choice for this work.
Topology Optimisation Methods
Since the introduction of TO, various authors have proposed diverse methods of tackling the problem. This section reviews the most popular methods in literature. The Homogenisation Method (HM) is covered first, introducing its different variants. Thereafter, the Density Method is presented and its clear relation with the HM is evoked. Subsequently, the ON/OFF Method is discussed, and its link with the Density Method is also explained. Last but not least, the Level-set Method is outlined to see its completely different background when compared to the first 3 methods. For each method, the algorithms used for optimisation, and the applications in electromagnetism are shortly illustrated to provide a wider overview of what has been done in literature.
Homogenisation Method (HM)
HM was one of the first and most pioneering TO methods introduced in literature by Bendsøe and Kikuchi . It was basically developed for mechanical/structural designs with the aim of reducing material constituting the structures for lighter and stronger ones. It deals essentially with anisotropic/ composite materials, with an interpolation between void and full material. It was founded on theoretical work that proved the existence of solutions could be resolved by modifying the design space to include relaxed designs, for instance in the form of composites . These design spaces made of composites can be modelled by materials with microstructures, and it exists in different types such as rotated, layered or rectangular microstructures amongst others. Hence, this involves the consideration of other parameters such as orientation and dimensions of each microstructure. In a TO problem, each microstructure would normally represent a variable to be optimised, and therefore we have more than one parameter for each variable depending on the microstructure type. The optimal design of structures is closely connected with the study of microstructures and finding the effective homogenised material properties for composite microstructures . The following section reviews some of the existing microstructures.
In one-material microstructures, the material model contains one material with one or more voids. If a portion (or percentage) of a region is made of voids, material is not placed there. Otherwise, if there is no porosity in an area, material is placed in that area . An example is given in Figure 1.2 to show the basic concept of HM in TO using a square microcell with centrally placed rectangular hole as the material model. The top of the figure shows the domain before optimisation, and the bottom, after optimisation. The black area represents material, the white represents void, and the grey area represents intermediate materials. This means that the material found these types of regions is neither fully solid nor void, but is instead consists of a certain percentage of solid and void. This makes it an intermediate material which is not manufacturing-friendly, and hence usually undesired in the final solution. We will go deeper into this matter throughout this thesis work.
Figure 1.2 Basic Concept of HM in TO using Square Microcell 
Various one-material microstructures exist, and some are presented below. They can also directly be implemented into a FE code to be used as main elements of the domain. For instance, instead of using tetrahedral elements, which is the most common practice, it could also be interesting to use the one-material microstructures, and the different parameters of each microstructure would represent the variables of the optimisation problem.
Rank Layered Microstructure
The basic idea of this category is to find extremal microstructures with maximum rigidity (or equivalent minimum compliance). A layered microstructure of rank-p can be used, with p ranging from 1 and above, but usually ranks 1 and 2 are used for simplicity. Usually, in a rank-p, there are alternating layers of void and solid material, with layers of the ranks being orthogonal to each other. For example, in rank-1 material, there are only alternating layers of solid material and void in one direction. In rank-2 material, in addition to the initial alternating layers, there are orthogonal alternating layers of solid material. Figure 1.3 illustrates a rank-1 and rank-2 layered microstructure.
Figure 1.3 Example of Rank-1 and Rank-2 Microstructures 
In TO, rank-2 layers are most commonly used. In this case, the elements of the matrix of elasticity coefficients are functions of 3 parameters: γ, ϑ and θ (as in Figure 1.3), where ϑ and γ lie between 0 and 1, limits included. The parameter γ represents the width of the layers in rank-1 material, while ϑ represents the width of the orthogonal layer in a rank-2 material. The parameter θ gives the orientation of the layers. The volume Ωs occupied by the solid is given in (I-1):
= ∫ ( + − ) (I-1) and the density of the composite can be written as in (I-2): = ( , ) = ( + − ) (I-2)
where ρs is the density of the solid . It must be noted that it is possible to vary the cell relative density from 0 to 1 by changing the value of ϑ and γ.
The advantage of rank layered material is that the effective material properties can be derived analytically. The main weakness is that the material cells do not provide resistance to shear stress in between layers.
In this category, the microstructure is a square cell with a centrally placed rectangular hole in 2D, whereas in 3D, it is represented by a cubic cell with a rectangular parallelepiped hole, as in Figure 1.4.
Figure 1.4 Rectangular Microstructure in 2D and 3D
Rectangular microstructure is one of the most commonly used for TO with HM. The area Ωc is occupied by the solid material in the base cell as given in (I-3), and the volume Ωs is occupied by the solid material in the design domain as given in (I-4).
=1− . (I-3)
=∫(1− . ) (I-4)
where xa and xb lie between 0 and 1, limits included. The angle of orientation is also θ. For different orientations, the properties of elastic constitutive matrix are changed.
The main strength of rectangular microstructures making it popular in TO with HM is due to the smaller number of variables required if a square void is chosen. The main drawbacks are that, on one side the homogenisation equation has to be solved by numerical techniques, and on the other side the optimisation results often contain intermediate regions.
Not very popular in TO, the triangular microstructure is a very complicated one, making it more tedious in numerical implementation and hence increasing computational cost. An example of the plate model setup for triangular microstructure is given in Figure 1.5. The main strength is that the true strain energy can be calculated numerically, which is not always the case with the other microstructures.
Initially presented in , this type of microstructure is also called honeycomb based cell and is given in Figure 1.6(a), along with the dimensions. They have the same advantage and disadvantage as the triangular microstructure. Figure 1.6(b) depicts a FE mesh for a quarter of the honeycomb cell.
Figure 1.6 (a) Hexagonal Microstructure, (b) FE mesh of a Quarter of the Hexagonal Microstructure 
Bi-material microcells involve two solid materials, whether voids are included or not. The geometry parameters of the hard materials, soft materials and voids are set as the design variables of the optimisation problem. As for the one-material microstructure, if a region consists of voids only, material is not placed there. Likewise, if a region has no porosity (no voids), a solid material is placed there. Rank layered microstructures are most commonly used for bi-material microstructures . Figure 1.7 shows examples of bi-material microcell with rank layered microstructures. The black and blue areas represent different solid materials, while the white area represents void. In the case of Figure 1.7(a), optimisation is done only between two solids. The variables shown in the figure are allowed to vary between 0 and 1, limits included. The effective material properties can be derived analytically, and the method can be applied to both 2D and 3D models.
Figure 1.7 Rank Layered Bi-material Microstructures 
The volumes occupied by solid material Ω1 (black) and solid material Ω2 (blue) are given in (I-5) and (I-6) respectively .
= ∫( +(1− ). 1. 2) (I-5)
= ∫ ((1 − ). (1 − 1). 2) (I-6)
Despite the numerous ways of formulating the optimisation domain using HM, it remains more popular in the mechanical field than in electromagnetism. The main reason would be the relative complexity of defining an optimisation problem with HM because of the various variables needed for one microstructure. Other methods, more adapted to electromagnetism were developed from HM, and will be seen in the later sections.
Optimisation Algorithms used with HM
Due to the high dimension of the optimisation problem using HM as described above with multiple variables per cell, it narrows the choice for algorithm classes. Most works with HM apply sensitivity-based approaches using analytical derivatives calculated directly from the definition of the homogenisation problem . Amongst the popular algorithms are the Sequential Linear Programming (SLP), Method of Moving Asymptotes (MMA) or a variety of iterative update rules based on explicit optimality conditions.
Applications of HM to Electromagnetic Problems
The HM, being primarily derived for mechanical/structural designs has mostly been applied to the topology optimisation of cantilever beams, bridges and trusses. Its application to electromagnetic problems is quite rare and remains much dreaded due to the large number of variables. One of the few works that has been presented on TO using HM is , where the authors determine the optimal material distribution in a design domain .by changing the inner hole size and rotational angle of the unit cell. The objective is to maximise the magnetic mean compliance of an H-shaped magnet, which is the same as maximising the magnetic vector potential, and therefore improving the electromagnet performances, according to the authors. Different volume constraints are applied to the design domain to see the behaviour, and the materials used are assumed to be linear. Examples of the topologies obtained are given in Figure 1.8.
Figure 1.8 H-shaped Electromagnet (a) Initial Domain; Volume Constraint of (b) 60%, (c) 70% 
Derived from the HM, the Density-based Method was elaborated to overcome some difficulties with the former. Firstly, the generation of areas with porosity were not quite desirable, due to their problematic tendency for manufacturing. An example of porosity would be during the use of rectangular microstructures in HM (Figure 1.2), where the cell would not completely be made of solid material or void. In the advent of many such microcells occurring adjacently, this would form a porous structure, which would be challenging to homogenise for any manufacturing purpose. Another issue could be the need for various design variables for one microcell. Since the process of topology optimisation is already known to be a long one, this would only add up to the lengthy calculation time. For instance, if the rectangular microstructure is again considered, there are 3 design variables in 2D namely xa, xb and θ, while there are additional ones in 3D. Regarding practicability, the HM is also known to be tedious in implementation, whether for mechanical or electromagnetic problems. To limit the aforementioned difficulties, the Density Method was introduced. It must be pointed out that Direct Approach, Engineer’s Method or SIMP Method are the different names given to Density Method.
Table of contents :
CHAPTER I – STATE OF THE ART
I.2 ORIGIN OF THE TOPOLOGY OPTIMISATION IDEA
I.3 DIFFERENCES BETWEEN MECHANICAL AND ELECTROMAGNETIC STRUCTURES
I.4 TOPOLOGY OPTIMISATION METHODS
I.4.1 Homogenisation Method (HM)
I.4.1.1 One-Material Microstructures
Rank Layered Microstructure
I.4.1.2 Bi-material Microstructure
I.4.1.3 Optimisation Algorithms used with HM
I.4.1.4 Applications of HM to Electromagnetic Problems
I.4.2 Density-based Methods
I.4.2.1 Interpolation Schemes
I.4.2.2 Density Method for Bi-material
I.4.2.3 Optimisation Algorithms with Density Method
I.4.2.4 Application of Density Method to Electromagnetic Problems
I.4.3 ON/OFF Method
I.4.3.1 Optimisation Algorithms with ON/OFF Method
I.4.3.2 Application of ON/OFF Method to Electromagnetic Problems
I.4.4 Level Set Method
I.4.4.1 Optimisation Algorithms with Level Set Approach
I.4.4.2 Application of Level Set Approach to Electromagnetic Problems
I.5 GENERAL COMPLICATIONS WITH TO
I.5.1 Intermediate Material
I.5.2 Local Minima
I.5.3 Checkerboard Designs
I.5.4 Mesh Dependencies
I.6 SUMMARY OF TO METHODS
Choice of TO Method
I.7 NUMERICAL TOOLS
I.7.1 Code_Carmel – A FE Calculation Code
I.7.1.1 Maxwell’s Equations
I.7.1.2 Constitutive Laws of Materials
I.7.1.3 Boundary Conditions
I.7.1.5 Finite Elements Approach
I.7.2 Sophemis – An Optimisation Platform
I.7.2.1 Full Factorial Design
I.7.2.2 Latin Hypercube Square
I.7.2.3 fmincon SQP
I.7.2.4 Genetic Algorithm (GA)
CHAPTER II – METHODOLOGY AND TOOL DEVELOPMENT
II.2 COUPLING OF CODE_CARMEL AND SOPHEMIS
II.2.1 Overall Process
II.2.2 Configurations of the Coupling
1. Local Utilisation
2. Distant Utilisation
3. Distant and Distributed Utilisation
II.3 CHOICE OF TO METHOD – DENSITY METHOD
Global TO Process with Density Method
II.4 NONLINEAR BEHAVIOUR OF MATERIALS FOR TO USING CODE_CARMEL-SOPHEMIS
Integrating the Nonlinear Calculation in the TO process
II.5 3D ELECTROMAGNETIC TEST CASE
II.6 BEHAVIOUR ANALYSIS OF TO USING DESIGN OF EXPERIMENTS
II.6.2 Design of Experiments
II.6.3 Analysis of the Convexity of the Variables
II.6.3.1 One zone is varied
II.6.3.2 Two zones are varied
II.7 DEVELOPMENT OF A METHODOLOGY FOR TO
II.7.2 Mesh Size Investigation
II.7.3 Introduction of the Feasibility Factor (FF) in the Methodology
II.7.4 Using FF in the Optimisation Problem Formulation
II.7.4.1 FF as Constraint
II.7.4.2 Proposed Formulation with FF
II.7.5 Comparison of Proposed Methodology with other Density Mappings
II.7.6 Comparison with ON/OFF Method
II.7.7 Repeatability of Solutions
II.7.8 Using Mesh Elements as Variables
II.8 NONLINEAR BEHAVIOUR OF THE FERROMAGNETIC MATERIALS
II.9 OTHER PROBLEM FORMULATIONS
II.10 SUMMARY AND CONTRIBUTIONS
CHAPTER III – APPLICATION OF TO METHODOLOGY TO A 3D ELECTROMAGNET
III.2 STATE OF THE ART
III.3 3D FE ELECTROMAGNET MODEL
III.3.1 Finite Element Model
III.3.2 Mesh Size Investigation
Computation of Energy
Computation of force
Cross verification with Reluctance Network
III.4 TO OF THE ELECTROMAGNET
III.4.1 Maximising Energy
III.4.2 Maximising Attractive Force
III.4.2.1 Linear Behaviour of Ferromagnetic Materials
III.4.2.2 Nonlinear Case
III.5 SUMMARY AND CONTRIBUTIONS
CHAPTER IV – TO OF A SALIENT POLE SYNCHRONOUS GENERATOR
IV.2 STATE OF THE ART
IV.3 SALIENT POLE SYNCHRONOUS GENERATOR (SPSG) MODEL
IV.3.1 FE Model of the Original SPSG
Magnetic Flux Density in the Air Gap and Spatial Distribution
IV.3.2 TO of the Machine
Magnetic Flux Density in the Air Gap and Spatial Distribution
IV.4 OPTIMISATION OF SPSG
IV.4.1 Recap of TO Process
IV.4.2 Maximisation of B in the Stator
IV.4.3 Optimisation of Magnetic Flux Density in Air Gap
IV.4.3.1 Linear behaviour of Materials
Example 1 – Average Convergence with Relevant Topology
Example 2 – Good Convergence with Poor Topology
IV.4.3.2 Nonlinear Behaviour of Materials
IV.5 SUMMARY AND CONTRIBUTIONS
SUMMARY AND CONTRIBUTIONS