Page 1 of 1

Usage of computeRBGGE

Posted: 16 Jan 2024, 03:52
by alexb
Hello,

I am trying to use computeRBGGE, following the example in elegantExamples. However, when running this function the magnetic fields in the output file are huge (of order 10^10 or greater).

The magnetic field file used is attached, along with the script for generating the GGE (copied from the examples). It is not clear to me whether the issue is with my implementation of the script (i.e. optional arguments that should be given), or with the precision or range of the field file, or something else entirely.

Thank you in advance for your support,
Alex

Re: Usage of computeRBGGE

Posted: 25 Jan 2024, 11:19
by michael_borland
Alex,

Something is not right in construction of the magnet field map file. For example, if I plot By(x=0,y=0,z) using

Code: Select all

$ sddsplot -col=z,By magmnew.sdds -filter=col,y,-1e-6,1e-6 -filter=col,x,-1e-6,1e-6 -graph=sym
I get
plot-x0-y0.png
Also, if try to plot By(x,y) as a function of z using

Code: Select all

$ sddssort magmnew.sdds -pipe=out -col=z -col=x -col=y | sddsbreak -pipe=in magmnew-split.sdds -change=z
$ sddscontour -shade -xyz=x,y,By magmnew-split.sdds
I get an error message

Code: Select all

Error: x and y data does not appear to form a grid (nx=101, ny=7, rows=808)
--Michael

Re: Usage of computeRBGGE

Posted: 26 Jan 2024, 09:48
by alexb
Hi Michael, thank you very much for your reply. As you mentioned, there was an issue with the field file. I originally had only 1/4 of the magnet and had to generate the other parts by reflecting the fields across the Y and Z axes, and I made a mistake. Now it looks more regular.
The issue with the contours is still present, however. Is it required to have the same number of grid points? There are not many samples in the Y direction from the magnet file.

Alex