foundations of analytical and numerical field computation · 2019. 2. 28. · stephan russenschuck,...

55
Stephan Russenschuck, CERN-AT-MEL 1 Foundations of Analytical and Numerical Field Computation Stephan Russenschuck CERN, TE-MCS, 1211 Geneva, Switzerland

Upload: others

Post on 15-Mar-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 2: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

2

Permanent Magnet Circuits

Page 3: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

3

Pole shimming

Rogowski profiles

Page 4: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 5: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

5

Directional Derivative

Page 6: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 7: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

7

Maxwell’s House

Page 8: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

8

Maxwell’s Equations in Differential Form

Page 9: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 10: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 11: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 12: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 13: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

13

Multipoles and Scaling Laws

Page 14: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

14

Ideal Pole Shape of Conventional Magnets

Page 15: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 16: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

16

The Model Problem (1-D)

or

Page 17: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

17

Shape Functions

Page 18: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 19: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 20: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

20

Galerkin’s Method

Linear equation system for the nodepotentials

Page 21: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

21

Numerical Example

Page 22: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

22

Numerical Example

Essential boundary conditions (Dirichlet)

Page 23: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

23

Higher order elements

Page 24: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

24

Two Quadratic Elements

Page 25: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

25

Curl-Curl Equation

Problem in 3-D: Gauging

Page 26: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

26

Weak Form in the FEM Problem

Page 27: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 28: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

28

Weak Form in the FEM Problem

Page 29: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

29

Meshing the Coil

Page 30: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 31: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

31

Total Scalar Potential / Reduced Scalar Potential

Page 32: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

32

Shape Functions

Page 33: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

33

Barycentric Coordinates

Page 34: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

34

Barycentric Coordinates

Page 35: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 36: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 37: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

37

Mapped Elements

Page 38: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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?

Page 39: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 40: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

40

Topology Decomposition

Page 41: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 42: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

42

Examples for FEM Meshes

Page 43: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 44: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

44

Magnet Extremities

Page 45: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 46: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

46

Source, Reduced, Total Field

Page 47: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

47

BEM-FEM Coupling (Elementary Model Problem)

Page 48: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

48

The FEM Part (Vector Laplace Equation)

Page 49: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

49

FEM Part

Page 50: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

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

Page 51: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

51

BEM Part

Page 52: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

52

BEM-FEM Coupling

FEM

BEM

Page 53: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

53

Page 54: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

54

Page 55: Foundations of Analytical and Numerical Field Computation · 2019. 2. 28. · Stephan Russenschuck, CERN-AT-MEL 22 Numerical Example. Essential boundary conditions (Dirichlet) Stephan

Ste

phan

Rus

sens

chuc

k, C

ER

N-A

T-M

EL

55

Always check convergence of your computation