DiamondLightSource / Opt-ID

Code for the Optimisation of ID's using Python and Opt-AI
Apache License 2.0
7 stars 6 forks source link

Investigation into using RADIA for Bfield computation. #64

Open JossWhittle opened 4 years ago

JossWhittle commented 4 years ago

Opt-ID does not consider material types, and both Opt-ID and Radia do not consider interactions between magnets for the "sum of bfield" approaches.

All errors are computed relative to using Radia with a magnet group and directly using the magnetic field vectors for the magnet (no rotation matrices).

The magnetic field vector plots (top row) are colour normalized the same as one another, you can see that Opt-ID is brighter (overestimating) for Ferrite and is darker (underestimating) for NdFeB materials.

The error plots are colour normalized down the columns (bfield errors in each axis for the same calculation methods) but are scaled independently between columns (different calculation methods) to highlight details. The colourbars denote the magnitudes being shown. If the error plots are scaled globally like the top row then the Radia sum of bfield methods are completely washed out as they are a couple of orders of magnitude closer to the Radia grouped bfields.

Radia with the sum of bfield method is pretty accurate even when considering Ferrite material magnets without an interaction matrix. I think we will be able to get away with not considering the interaction matrices, at least for now.

No Material

No Material - Z Aligned Fields

bfield-material=None-field=z

No Material - Canted Fields

bfield-material=None-field=canted


Sm2Co17 Material

Sm2Co17 Material - Z Aligned Fields

bfield-material=Sm2Co17-field=z

Sm2Co17 Material - Canted Fields

bfield-material=Sm2Co17-field=canted


NdFeB Material

NdFeB Material - Z Aligned Fields

bfield-material=NdFeB-field=z

NdFeB Material - Canted Fields

bfield-material=NdFeB-field=canted


Ferrite Material

Ferrite Material - Z Aligned Fields

bfield-material=Ferrite-field=z

Ferrite Material - Canted Fields

bfield-material=Ferrite-field=canted