Stephan Russenschuck, CERN-AT-MEL 1 Foundations of Analytical and Numerical Field Computation Stephan Russenschuck CERN, TE-MCS, 1211 Geneva, Switzerland
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
1
Foundations of Analytical and Numerical
Field Computation
Stephan RussenschuckCERN, TE-MCS, 1211 Geneva, Switzerland
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
2
Permanent Magnet Circuits
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
3
Pole shimming
Rogowski profiles
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
4
Different Incarnations of Maxwell’s Equations
Integral form
Local form
Global form
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
5
Directional Derivative
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
6
The Differential Operators
Conclusion: This is horrible, so let’s try the geometrical approach
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
7
Maxwell’s House
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
8
Maxwell’s Equations in Differential Form
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
9
Maxwell’s House
Would be even more symmetric with magnetic monopoles
Outeroriented
Inneroriented
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
10
Maxwell’s Facade
Only forCartesian components
Constant permeablity and no sources
No sources
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
11
Method of Separation
How do you solve differential equations: Look them up in a book
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
12
Solution of Laplace’s Equation
What have we won? If we know the field at a reference radius, we know it everywhere inside
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
13
Multipoles and Scaling Laws
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
14
Ideal Pole Shape of Conventional Magnets
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
15
Numerical Field Computation
Principles of numerical field computation–
Formulation of the Problem–
Weighted residual–
Weak form–
Discretization–
Numerical exampleTotal vector potential formulation–
Weak form in 3-DElement shape functions–
Global shape functions–
Barycentric coordinatesMesh generation
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
16
The Model Problem (1-D)
or
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
17
Shape Functions
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
18
Shape Functions
Cramer’s rule
What have we won? We can express the field in the element as a function of the node potentials using known polynomials in the spatial coordinates
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
19
The Weighted Residual
What have we won? Removal of the second derivative, a way to incorporate Neumann boundary conditions
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
20
Galerkin’s Method
Linear equation system for the nodepotentials
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
21
Numerical Example
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
22
Numerical Example
Essential boundary conditions (Dirichlet)
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
23
Higher order elements
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
24
Two Quadratic Elements
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
25
Curl-Curl Equation
Problem in 3-D: Gauging
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
26
Weak Form in the FEM Problem
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
27
Weak Form in the FEM Problem
Conclusion: 3-D is more complicated than addition just one dimension in space; it’s a different mathematics, and thus often a separate software package
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
28
Weak Form in the FEM Problem
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
29
Meshing the Coil
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
30
Nodal versus Edge-Elements
Notice: Finer discretization does not help! Use edge-elements, or a different formulation (scalar potential, whenever possible. Remember: This problem does not exist in 2-D
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
31
Total Scalar Potential / Reduced Scalar Potential
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
32
Shape Functions
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
33
Barycentric Coordinates
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
34
Barycentric Coordinates
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
35
Higher Order Elements
Higher accuracy of the field solution, but also better modeling of the iron contour
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
36
Mapped Elements
Use of the same shape functions for the transformation of the elements
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
37
Mapped Elements
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
38
Transformation of Differential Operators
Complicated Easy
But how about the Jacobian being singular?
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
39
Collinear Sides yield Singular Jacobi Matrices
Note: Bad meshing is not a trivial offence
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
40
Topology Decomposition
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
41
Paving and Mesh Closing in Simple Domains
The number of nodes is less than 6
The domian does not contain “bottlenecks” , i.e., C2/a approaches 4π
The biggest inner angle is less then π
For triangles: a+b < c
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
42
Examples for FEM Meshes
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
43
Point Based Morphing
Always use morphing (if available) for sensitivity analysis
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
44
Magnet Extremities
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
45
Reduced Vector Potential Formulation
Advantages: No meshing of the coil, no cancellation errors, distinction between source field and iron magnetization
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
46
Source, Reduced, Total Field
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
47
BEM-FEM Coupling (Elementary Model Problem)
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
48
The FEM Part (Vector Laplace Equation)
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
49
FEM Part
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
50
BEM Part
From Green’s second theorem:
Vector Laplace Weighted Residual
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
51
BEM Part
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
52
BEM-FEM Coupling
FEM
BEM
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
53
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
54
Ste
phan
Rus
sens
chuc
k, C
ER
N-A
T-M
EL
55
Always check convergence of your computation