Skip to Content.
Sympa Menu

opal - Re: [Opal] H5Part field specification? / Re: Coordinates for SBEND3D element in OPAL

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] H5Part field specification? / Re: Coordinates for SBEND3D element in OPAL


Chronological Thread 
  • From: "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
  • To: opal <Opal AT lists.psi.ch>
  • Cc: James Gerity <jgerity AT tamu.edu>, Daniel Winklehner <winklehn AT mit.edu>, Chris Rogers <chris.rogers AT stfc.ac.uk>, "Akhdiyor I. Sattarov" <dior AT phyacc.tamu.edu>, "Zhang Hui (PSI)" <hui.zhang AT psi.ch>
  • Subject: Re: [Opal] H5Part field specification? / Re: Coordinates for SBEND3D element in OPAL
  • Date: Wed, 15 Mar 2017 08:12:03 +0000
  • Accept-language: en-US, de-CH

I put the converter tool into opal/tools/BandRF (https://gitlab.psi.ch/OPAL/src/tree/master/tools). 

This needs certainly some work, please contribute.

Cheers Andreas 


------
Dr. sc. math. Andreas (Andy) Adelmann
Staff Scientist
Paul Scherrer Institut WBBA/219 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Phone Home: xx41 62 891 91 44
-------------------------------------------------------
Friday: ETH CAB F37 or HPK G 28   +41 44 632 75 22
============================================
The more exotic, the more abstract the knowledge, 
the more profound will be its consequences.
Leon Lederman 
============================================

On 14 Mar 2017, at 18:49, Zhang Hui (PSI) <hui.zhang AT psi.ch> wrote:

I only have a .cpp code to transform ASCII map to H5part map. I guess it should be the same as what Daniel sent to you.

I know the H5part map could be visualised by a program called VISIT. You may check whether the map is correct or not.

Best regards, Hui

________________________________________
From: James Gerity [jgerity AT tamu.edu]
Sent: Tuesday, March 14, 2017 5:59 PM
To: Zhang Hui (PSI)
Cc: Daniel Winklehner; Adelmann Andreas (PSI); Chris Rogers; Akhdiyor I. Sattarov
Subject: Re: H5Part field specification? / Re: Coordinates for SBEND3D element in OPAL

Hui,
 Thanks very much for this information, it is a relief to know that
full 3D specification of E and B fields is possible without modifying
the BANDRF type.  Do you know if the H5Part/H5Block format is
documented in any more detail than what is available in the H5Hut
repository? [1]  Looking at the script Daniel sent and the source of
the H5Block portion of the H5hut library, I think I can figure it out,
but having formal documentation available would be very handy.

James

[1] https://gitlab.psi.ch/H5hut/src/blob/master/doc/H5X_File_Format.txt

On Tue, Mar 14, 2017 at 2:01 AM, Zhang Hui (PSI) <hui.zhang AT psi.ch> wrote:
Hi James



Yes, it is possible to combine 2D mid-plane magnetic field map together with
3D-electromagnetic field maps in OPAL-cycl using the type BANDRF, which was
developed by Jianjun initially aiming at the simulation of the COMET
cyclotron at PSI. We apply a 2D field map for the superconducting magnet,
and several maps for the RF field and the vertical electrostatic deflector.
I would say, it is also possible to add 3D static magnetic maps.



Please notice that the 2D mid-plane map is in cylindrical coordinate, while
the 3D map must be in Cartesian coordinate, and be transformed into
so-called H5Part format as mentioned by Andreas and Daniel.



Best regards, Hui



__________________________________________
Paul Scherrer Institut
Dr. Hui Zhang
WBGA/C34
CH-5232 Villigen PSI

Telefon: +41 56 310 53 98
E-Mail: hui.zhang AT psi.ch

From: Daniel Winklehner [mailto:winklehn AT mit.edu]
Sent: Montag, 13. März 2017 19:13
To: Adelmann Andreas (PSI); James Gerity
Cc: Chris Rogers; Zhang Hui (PSI)
Subject: RE: H5Part field specification? / Re: Coordinates for SBEND3D
element in OPAL



Hi James



Here is a .cpp file I adapted from something that Achim or Jianjun wrote to
generate h5part field files from OPERA 3D field data (*.table text files).
Note that the field data comes without the coordinates, the limits of the
mesh and the step size in OPERA have to be manually set in this file, and it
is rigged for electric fields or magnetic fields only. So…this file is a
total hack, but you should be able to understand what format OPAL needs for
the 3D field maps used with BANDRF. If you want electric and magnetic fields
in one h5 file that’s not a problem, just contract the two loops into one
writing both E and H values into the h5 file.



I included the Makefile and Makefile.def. You will have to change the paths
and make sure you have the HDF5 library and OPAL’s Ippl library compiled on
your system.



Good luck!

    Daniel



--

Daniel Winklehner

Postdoctoral Associate

Massachusetts Institute of Technology

Laboratory for Nuclear Science

Phone: +1 617 715 4280

Email: winklehn AT mit.edu

--



From: opal-request AT lists.psi.ch [mailto:opal-request AT lists.psi.ch] On Behalf
Of Adelmann Andreas (PSI)
Sent: Monday, March 13, 2017 03:49
To: James Gerity <jgerity AT tamu.edu>
Cc: Chris Rogers <chris.rogers AT stfc.ac.uk>; opal AT lists.psi.ch; Zhang Hui
(PSI) <hui.zhang AT psi.ch>
Subject: Re: [Opal] H5Part field specification? / Re: Coordinates for
SBEND3D element in OPAL



Dear James,



I've read through what the user manual has to say a few times and
believe it should be possible to specify mid-plane fields along with
3D RF using the BANDRF type, and an additional HDF5 input file.



Yes this is correct!



I cc: Hui, he is using this format (if I am not mistaken) and can give you
better input on this.



I also opened an issue (BABDRF) please contribute.



Cheers Andreas



PS: please use next time opal AT lists.psi.ch.





On 9 Mar 2017, at 10:00, Chris Rogers <chris.rogers AT stfc.ac.uk> wrote:



Hi James,
I am not familiar with the BANDRF model. Andreas (cc) might be able to help.
Just as a warning, if you would like to use the BANDRF together with
SBEND3D, it will need a bit of jiggling in the code...

Cheers,
Chris


On 08/03/17 17:16, James Gerity wrote:

Chris,
Sorry for the long radio silence on this, we ended up deciding to
scope back to a less ambitious model using only mid-plane fields until
we have need of 3D fields for focusing elements.

However, I do have another question for you. I'm interested in adding
3D RF fields to the model our group at Texas A&M has been working on,
to better capture the tapered geometry of our cavity of interest.
I've read through what the user manual has to say a few times and
believe it should be possible to specify mid-plane fields along with
3D RF using the BANDRF type, and an additional HDF5 input file.

Is there a specification of how the field data is stored in the H5Part
file format? I've poked around on the webside for H5Part a little and
found the H5Block structure [1], but the names that would be expected
for BANDRF are still unclear to me.  I've poked around a bit in the
OPAL source, but was wondering if you could point me to any
documentation on the subject.

Thanks,
James

[1] https://gitlab.psi.ch/H5hut/src/blob/master/doc/H5X_File_Format.txt

On Fri, Jan 27, 2017 at 12:04 PM, Chris Rogers <chris.rogers AT stfc.ac.uk>
wrote:

Hi James,
Sorry the attachment seems to have gotten lost when Andreas sent the email
onto me. Is there any chance you could resend with the attachment?

Thanks,
Chris

On 20/01/17 07:53, Adelmann Andreas (PSI) wrote:


Hi James great that you are using OPAL.

Please repost this to opal AT lists.psi.ch you get a much larger
audience :-).

I cc: to Chris who wrote SBEND3D and surely can help you with that.


Cheers Andreas


On 19 Jan 2017, at 17:42, James Gerity <jgerity AT tamu.edu> wrote:

Dr. Adelmann,
I am trying to use OPAL to simulate transport in a cyclotron with
strong focusing, and would like to make use of the SBEND3D
functionality to specify the fields. I have some questions, and I've
tried to consult the OPAL manual, the source, and asked these
questions to Nate Pogue (one of our lab's alums), but have not yet
gotten the answers I need.

- Does SBEND3D use a local coordinate system, relative to the
beginning of the element? If so, how is this coordinate system
defined?

- Is the OPAL manual's description of the LENGTHUNITS correct? When
adding an SBEND3D, the diagnostic output from OPAL specifies the
lengths in both 'm' and 'mm,' it seems one of these is wrong and
confusing. I.e. `zini= -1.0000000000000000e+03 m; zfinal=
1.0000000000000000e+03 mm` for the input file attached.

As a test case, I have tried to propagate a beam through a simple π/6
sector (input files attached). However, the beam travels straight in
the initial direction, indicating to me that my element is either the
wrong size or placed incorrectly relative to the beam. Perhaps you can
shed some light on what I am misunderstanding about how this element
interacts with the global coordinate system.

Thanks,
James Gerity
<generate_fieldmap.py><sbend3D_test.in><testbend.bmap>





--
ISIS Intense Beams Group

tel: +44 (0)1235 44 6983

Building R2,
Rutherford Appleton Laboratory,
Harwell Science and Innovation Campus,
Didcot.
OX11 0QX

Obama:
No matter what happens, the sun will rise in the morning.



--
ISIS Intense Beams Group

tel: +44 (0)1235 44 6983

Building R2,
Rutherford Appleton Laboratory,
Harwell Science and Innovation Campus,
Didcot.
OX11 0QX

Obama:
No matter what happens, the sun will rise in the morning.





Archive powered by MHonArc 2.6.19.

Top of Page