opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: Christian Baumgarten <christian.baumgarten AT psi.ch>
- To: yangjianjun2000 AT tsinghua.org.cn
- Cc: opal AT lists.psi.ch
- Subject: [Opal] Bug in OPAL?
- Date: Fri, 7 Dec 2012 14:11:17 +0100
- List-archive: <https://lists.web.psi.ch/pipermail/opal/>
- List-id: The OPAL Discussion Forum <opal.lists.psi.ch>
- Organization: Paul Scherrer Institut
Hi, Jianjun.
I already informed Andreas that I suspect a bug
in some coordinate transformation inside OPAL.
I tracked a coasting beam in (an idealized) machine
similar to the PSI ring machine for some turns with
data output every 10 steps and compared the results
with a linear TRANSPORT-like code (incl. space charge).
I did this by applying a transformation from the global
cartesic frame (X,PX,Y,PY,Z,PZ) to local (co-moving) coordinates.
I carefully checked my transformation several times,
but always obtained some very strange results.
I found no problem with the vertical coordinates.
The local horizontal coordinates are the usual (x,x',l,\delta),
where l is the longitudinal coordinate and x is the transverse
coordinate. I transformed all 10^5 particles of the bunch,
computed and analyzed the full covariance matrix.
As usual in beam physics, I take the longitudinal coordinates
with index 5 and 6, and the horizontal to have index 1 and 2, so
that (for instance)
c16=cov(1,6)=cov(x,\delta)
c25=cov(2,5)=cov(px,l)
I attached a plot (loc_cov.pdf) of the results from OPAL-cycl
and (for comparison) the results I obtained with a
TRANSPORT-like code (ring_sigma.pdf: one sector only;
starting with 72 MeV(blue) up to 590 MeV(red)).
As visible in ring_sigma.pdf, the covariance c25/c16 should
be more or less constant at low energy (both about ~0.75).
The OPAL result for c16 is in good agreement with this expectation,
but OPAL shows very different behavior for c25. Not only that
it changes significantly, even the sign changes.
I looked more into the details and plotted also some other
results of interest, for instance sigma_px, which I would expect
to vary, but (at low energy) only a little bit. The OPAL-results
do not only indicate strong variations, but also a very unlikely
behavior at the sector edges.
My conclusion is, that the results indicate a bug in OPAL and from
the shape of sigma_px I suspect some bug in a local::global
transformation (or global::local).
Andreas asked me to inform you about my findings. I hope that
this bug concerns only the data output, but to check this certainly
requires someone who is more familiar with the code than I am.
Let me know, if you have new about this issue.
Best, Christian Baumgarten
PS.: If you have access to felsim, please find my H5-file here:
/scratch/baumgarten/opal/ideal_ring/noacc/NewSingleBunch.h5
My input file:
~baumgarten/opal/ideal_ring/noacc/NewSingleBunch.in
Attachment:
loc_cov.pdf
Description: Adobe PDF document
Attachment:
ring_sigma.pdf
Description: Adobe PDF document
- [Opal] Bug in OPAL?, Christian Baumgarten, 12/07/2012
Archive powered by MHonArc 2.6.19.