Skip to Content.
Sympa Menu

opal - Re: [Opal] Fwd: 3DElectroStatic

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Fwd: 3DElectroStatic


Chronological Thread 
  • From: masao nakao <nakaom AT rcnp.osaka-u.ac.jp>
  • To: Daniel Winklehner <winklehn AT mit.edu>, "opal AT lists.psi.ch" <opal AT lists.psi.ch>
  • Cc: nakaom AT rcnp.osaka-u.ac.jp
  • Subject: Re: [Opal] Fwd: 3DElectroStatic
  • Date: Sat, 21 Mar 2020 18:43:27 +0900

Dear Daniel,

Thank you for kindly reply.
Simulating beam is 50keV proton of about 0.1~1mA. So space charge is important.
I will try to use 3D fieldmaps as you write.

Yours, sincerely,
Masao


On 2020/03/20 21:41, Daniel Winklehner wrote:
Dear Masao,

Yes, you can do it, but it requires some fiddling around at the moment.

The most important question is: what beam current are you simulating? Is
space charge an important factor or not so much?

If space charge is very important for your application, you will have to
compile OPAL with the SAAMG option ON. To my knowledge, there is no binary
package that supports usage of the SAAMG solver that you can just download,
but Achim can correct me on that.

If space-charge is unimportant, you can use the OPAL 2.2 binary.

In both cases, you will need to prepare the electric AND magnetic fields as
3D fieldmaps in the center of the cyclotron as *.h5part format files.
OPAL-cycl, by default, uses the midplane field only and gets the z =/= 0
components from a series expansion. For the electrostatic inflector, you will
need a more accurate field description along the spiral trajectory. There
have been some email list discussions recently on how to transform 3D field
data from ANSYS/TOSCA/COMSOL to h5part using a C script called
ascii2h5part.cpp. I am using python with h5py, which works too. See attached
for electrostatic case. Resulting fields can be checked with VisIt 3.1.1.

The fields can be loaded into OPAL-cycl by using the BANDRF type cyclotron
and loading the fields as RF cavity fields with frequency = 1e-36 (i.e.
static fields) and RFPHI = 0.0 and PI/2 for electric and magnetic fields,
respectively. The units for these fields should be kV/mm (MV/m) and mm.

Finally, the geometry can be loaded as well. Firstly, as the boundary for particle termination,
if you are interested in the losses. Secondly, as the boundary conditions for the SAAMG field
solver (if you are using it). For geometry preparation, you will need the "negative" or
"vacuum" space rather than the individual electrodes. This is described in the paper
you mentioned. Just create a cylinder that encloses all your electrodes (maybe start with just
the spirals) and subtract the electrodes from the cylinder as a Boolean operation in the program
of your choice. Inventor works, so does FreeCAD (which is open source). Save as iges, stp, etc.
and open in GMSH. In gmsh, you can mesh your geometry and save the mesh as vtk. Achim write a C++
program that translates vtk to h5block, which is the format OPAL needs for geometry.

If you do use SAAMG, you have to use the "SPIRAL" cyclotron type instead of
BANDRF.

I will write up better instructions for the whole process over the weekend
and provide a simple example input deck to help along with getting started on
this non-trivial process.

Best,
Daniel



-----Original Message-----
From: opal-request AT lists.psi.ch <opal-request AT lists.psi.ch> On Behalf Of
masao nakao
Sent: Friday, March 20, 2020 07:44
To: opal AT lists.psi.ch
Cc: nakaom AT rcnp.osaka-u.ac.jp
Subject: [Opal] Fwd: 3DElectroStatic

Dear OPAL developers,

I would like to simulate injection system of AVF cycltoron with electrostatic
inflector.
Though OPAL manual shows 3DElectroStatic is "Not implemented yet."(p.173), a
paper [1] shows results by OPAL. How can I calcurate like that? I have 3D electric
field data culculated by TOSCA.
Thank you.

[1] "Realistic simulations of a cyclotron spiral inflector within a
particle-in-cell framework"
Daniel Winklehner et al.
PHYSICAL REVIEW ACCELERATORS AND BEAMS 20, 124201 (2017)

Yours, sincerely,
Masao


--
Masao Nakao
Osaka University
Research Center for Nuclear Physics
Mail : nakaom AT rcnp.osaka-u.ac.jp
Phone: 06-6879-8914
FAX  : 06-6879-8899


--
中尾 政夫
大阪大学 核物理研究センター
Mail : nakaom AT rcnp.osaka-u.ac.jp
電話 : 06-6879-8914
FAX : 06-6879-8899




Archive powered by MHonArc 2.6.19.

Top of Page