Skip to Content.
Sympa Menu

opal - Re: [Opal] Problem with Cyclotron Tune and Phase Calculation

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Problem with Cyclotron Tune and Phase Calculation


Chronological Thread  
  • From: Adelmann Andreas <andreas.adelmann AT psi.ch>
  • To: Ezgi Sunar <ezgi.sunar AT mnt.com.tr>
  • Cc: "opal AT lists.psi.ch" <opal AT lists.psi.ch>, Milo Conard <milo AT pac.be>, Uğur Bozluolcay <ugur.bozluolcay AT bozlu.com.tr>, Ezgi Sunar <sunarezgi AT gmail.com>
  • Subject: Re: [Opal] Problem with Cyclotron Tune and Phase Calculation
  • Date: Wed, 29 May 2024 06:53:34 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 20.250.75.252) smtp.rcpttodomain=bozlu.com.tr smtp.mailfrom=psi.ch; dmarc=pass (p=none sp=none pct=100) action=none header.from=psi.ch; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8XbZXlMDW07ts+XpmBDKQ7zGr2zRhtpETkKbOEjp7p8=; b=MCS7aJaDQ7InXweH+Yjtl77fse1o0gEprPqFhWAgNHR3Dt1FWSUaYyAkL8uxAq5NHaYV7SwfejXULclfrwOf4QszYV4C4EwyK2VLXLZ1bstAI0OnGbt6+7Ag326URxWGsNgqmKjkFVZGm5qyHxr2Oxx64NorY6B6jD0Uu+UpLZ7IyPSivp1RHhsT79Wgy7NShbudGmDX1xaqvsl0TGUahFiDw6zT8ws9G22UFoR/ixcys/LwTzlJL6VU5IP5H1eEXihN1QoT20SYkWF/t5Hlv88RFs7Hbe4Rf4b1hr9/mLFuA/OJnex4ngmQ/Egq37Nz/AoxXpfeihCQqSg/0T7qrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cj1I+AloY3ukvm/gtue5WyC/wPyUchn3CNSuqO0uPy+Syfd8vL2NZXCCtP92A2dkAz3+pgfJ9YopO9ZVTIFpz4FjL7z0XyPC2kZtvF58xFRkfzdlaKwwSFgsFB6IbcoUsy/ww/POd7FEzN367y+uQCT59nu+nQDZlZWJXG4Gm6uYwHar86mZKJw30MnMAcKQ+D8ZaR1mDzuzxxVXw1rka+rveSKeIzbqiMcIvUAbTcZa2pvKvoxbmn+7lwNyZKSy6g0lwrR66VsMI4OfA8ZT09D3dJoer5zoiF7PRdEzt2v0jiwPwLS8aHvlSeC7FnbINRbd+g0caOGWP3CA6UUeQw==
  • Authentication-results: mc1; iprev=pass (mail-switzerlandnorthazon11020002.outbound.protection.outlook.com) smtp.remote-ip=52.101.186.2; spf=pass smtp.mailfrom=psi.ch; dkim=pass header.d=psi.ch header.s=selector2 header.a=rsa-sha256; dmarc=pass header.from=psi.ch
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=psi.ch;

Hi Sunar

1. How and where can I define the initial and final energies in the input file?

You specify the injection energy in the input file, check line 44 in 
https://gitlab.psi.ch/OPAL/documentation/manual/blob/master/examples/Injector2.in for the PSI Injector example.
P0 will then be used on line 282 on the BEAM command

2. Which type of cyclotron should I run for this application? I suppose it would be CARBONCYCL. If so, I have some difficulties with the necessary structures of the data files; like BFIELD.

YES, CARBONCYCL and the detailed description can be found in the manual section 7.4.1.

3. How and where can I define and calculate the orbit coordinates according to the given energies in the input file? I found that OPAL uses the external program FIXPO for calculating the initial orbit coordinates based on our desired energy range. If this is correct, I cannot find how and where to set these parameters. 

FIXPO is used to calculate the reference solution only. This is only for making sure the OPAL tune calculation is correct. 

To me your particle (initial condition) starts out of the field map, please check.

Cheers Andy 
------
Dr. sc. math. Andreas (Andy) Adelmann
Paul Scherrer Institut OHSA/D17 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Zoom ID: 470-582-4086 Password: AdA
Zoom Link: https://ethz.zoom.us/j/4705824086?pwd=dFcvT1pMMGY0bHg0dTNncUNZZTJkZz09

-------------------------------------------------------
Friday: ETH HPK G 28   +41 44 633 3076
============================================
The more exotic, the more abstract the knowledge, 
the more profound will be its consequences.
Leon Lederman 
============================================

On 28 May 2024, at 16:16, Ezgi Sunar <ezgi.sunar AT mnt.com.tr> wrote:

Hello again,
 
I apologize for the oversight in my previous email. The error message encountered during the run is provided in the attachment.

Thanks for your time.
 
Best Regards,
Ezgi
 
From: Ezgi Sunar 
Sent: Tuesday, May 28, 2024 5:02 PM
To: opal AT lists.psi.ch
Cc: Milo Conard <milo AT pac.be>; Uğur Bozluolcay <ugur.bozluolcay AT bozlu.com.tr>; Ezgi Sunar <sunarezgi AT gmail.com>
Subject: Problem with Cyclotron Tune and Phase Calculation
 
Dear Sir/Madam,
 
I am working on the design of a low energy cyclotron (for industrial applications).
The first result I’d like to get is a simple tune calculation in order to optimise the magnetic field
To achieve this, I have modified the cyclotron example file from the OPAL wiki page to suit my design parameters. Here is the relevant section of the input file:
 
Name_Cycl: CYCLOTRON, TYPE=CARBONCYCL, CYHARMON=4, FMLOWE=0.5, FMHIGHE=3.0, PHIINIT=0.0, PRINIT=pr0, RINIT=r0, SYMMETRY=4.0, RFFREQ=f1, FMAPFN="bfield.dat", BSCALE=1E-3;
L1: LINE = (Name_Cycl);
Dist1: DISTRIBUTION, TYPE=FILENAME, NSTEPS=100, SECTOR=FALSE, FNAME="dist1.dat";
Fs1: FIELDSOLVER, FSTYPE=NONE, MX=64, MY=64, MT=64, PARFFTX=true, PARFFTY=true, PARFFTT=false, BCFFTX=open, BCFFTY=open, BCFFTT=open;
Beam1: BEAM, PARTICLE=PROTON, PC=P0, NPART=2, BCURRENT=1.0E-6, BFREQ=f1;
SELECT, LINE=L1;
TRACK, LINE=L1, BEAM=Beam1, MAXSTEPS=nstep*turns, STEPSPERTURN=nstep;
RUN, METHOD="CYCLOTRON-T", BEAM=Beam1, FIELDSOLVER=Fs1, DISTRIBUTION=Dist1;
 
As part of the tune calculation mode, I am using data distribution for two particles: one as the reference particle with all data set to zero and another one off-center. The `dist1.dat` file includes the following information:
 
2
0.0         0.0           0.0           0.0          0.0           0.00
0.005       0.001         0.005         0.001        0.005         0.001
 
Additionally, the B-field data is created with:
- Grid points along azimuth (ntet): 239
- Grid points along radius (nrad): 4
 
4
4
0.0
1.5
239
48
11296.6  11317.7  11327.6  11337.9  11354.2
11367.0  11378.0  11393.0  11412.4  11435.4
11453.5  11472.2  11495.2  11523.0  11551.7 ......
 
Upon running this configuration, I encountered a few issues and a failure during execution. I would appreciate your guidance on the following points:
 
1. How and where can I define the initial and final energies in the input file?
2. Which type of cyclotron should I run for this application? I suppose it would be CARBONCYCL. If so, I have some difficulties with the necessary structures of the data files; like BFIELD.
3. How and where can I define and calculate the orbit coordinates according to the given energies in the input file? I found that OPAL uses the external program FIXPO for calculating the initial orbit coordinates based on our desired energy range. If this is correct, I cannot find how and where to set these parameters.
 
I have attached the error message encountered during the run for your reference.
 
Thank you for your assistance.
 
Best regards,  
Ezgi Sunar

opal cyclotron1.in

OPAL> ____ _____ ___

OPAL> / __ \| __ \ /\ | |

OPAL> | | | | |__) / \ | |

OPAL> | | | | ___/ /\ \ | |

OPAL> | |__| | | / ____ \| |____

OPAL> \____/|_| /_/ \_\______|

OPAL>

OPAL> This is OPAL (Object Oriented Parallel Accelerator Library) Version
2022.1.0

OPAL> git rev. a4e0e14466557289b4f7a843fb9eb72700ff1992

OPAL>

OPAL>

OPAL> (c) PSI, http://amas.web.psi.ch

OPAL>

OPAL>

OPAL> The optimiser (former opt-Pilot) is integrated

OPAL>

OPAL> Please send cookies, goodies or other motivations (wine and beer ... )

OPAL> to the OPAL developers opal AT lists.psi.ch

OPAL>

OPAL> Time: 14:02:04 date: 27/05/2024

OPAL>

OPAL> * Reading input stream 'cyclotron1.in'

OPAL> * Reading input stream 'data.dat' from "CALL" command.

OPAL>

Ippl> No solver attached

Ippl> * Creating new file for data: 'cyclotron1.stat'

Ippl> * Creating new file for data: 'cyclotron1.lbal'

OPAL>

OPAL> * ************* T R A C K R U N
***************************************************

OPAL> * Selected Tracking Method == CYCLOTRON-T, NEW TRACK

OPAL> *
**********************************************************************************

OPAL> * Phase space dump frequency = 24500000

OPAL> * Statistics dump frequency = 10 w.r.t. the time step.

OPAL> * DT = 1e-12 [s]

OPAL> * MAXSTEPS = 3600

OPAL> * Mass of simulation particle = 0.938272 [GeV/c^2]

OPAL> * Charge of simulation particle = 1.60218e-19 [C]

OPAL> * Number of neighbour bunches = 1

OPAL> * STEPSPERTURN = 360

OPAL> *
**********************************************************************************

OPAL>

OPAL> * ************* D I S T R I B U T I O N
********************************************

OPAL> *

OPAL> * Number of particles: 2

OPAL> *

OPAL> * Distribution input momentum units: [eV/c]

OPAL> *

OPAL> * Distribution type: FROMFILE

OPAL> *

OPAL> * Input file: 'dist1.dat'

OPAL> *

OPAL> * Distribution is injected.

OPAL> *

OPAL> *
**********************************************************************************

OPAL>

OPAL> * ************* B E A M
************************************************************

OPAL> * BEAM BEAM1

OPAL> * PARTICLE PROTON

OPAL> * REST MASS 0.938272 [GeV]

OPAL> * CHARGE +e * 1

OPAL> * MOMENTUM 3.06353e+07 [eV/c]

OPAL> * CURRENT 1e-06 [A]

OPAL> * FREQUENCY 110 [MHz]

OPAL> * NPART 2

OPAL> *
**********************************************************************************

OPAL>

OPAL> * ************* F I E L D S O L V E R
**********************************************

OPAL> * FIELDSOLVER FS1

OPAL> * TYPE NONE

OPAL> * N-PROCESSORS 1

OPAL> * MX 64

OPAL> * MY 64

OPAL> * MT 64

OPAL> * BBOXINCR 2

OPAL> * XDIM parallel

OPAL> * YDIM parallel

OPAL> * Z(T)DIM serial

OPAL> *
**********************************************************************************

OPAL>

OPAL> * ----------------------------- Cyclotron
-------------------------------- *

OPAL>

OPAL> * Bunch global starting position:

OPAL> * RINIT = 10 [mm]

OPAL> * PHIINIT = 0 [deg]

OPAL> * ZINIT = 0 [mm]

OPAL>

OPAL> * Bunch global starting momenta:

OPAL> * Initial gamma = 1.00053

OPAL> * Initial beta = 0.0326334

OPAL> * Reference total momentum = 0.0326508 [beta gamma]

OPAL> * Reference azimuthal momentum (Pt) = 0.0326355 [beta gamma]

OPAL> * Reference radial momentum (Pr) = 0.001 [beta gamma]

OPAL> * Reference axial momentum (Pz) = 0 [beta gamma]

OPAL>

OPAL> * 4-fold field symmetry

OPAL> * Field map file = 'bfield_nm.dat'

OPAL> * Type of cyclotron = CARBONCYCL

OPAL> * Radial aperture = 0 ... 10 [m]

OPAL> * Vertical aperture = -10 ... 10 [m]

OPAL> * Number of trimcoils = 0

OPAL> * Harmonic number h = 4

OPAL> * RF frequency = 110 [MHz]

OPAL> * Read data from 450MeV Carbon cyclotron field file

OPAL> * ----------------------------------------------

OPAL> * READ IN CARBON CYCLOTRON FIELD MAP

OPAL> * ----------------------------------------------

OPAL> * Minimal radius of measured field map: 4 [mm]

OPAL> * Stepsize in radial direction: 4 [mm]

OPAL> * Minimal angle of measured field map: 0 [deg]

OPAL> * Stepsize in azimuthal direction: 1.5 [deg]

OPAL> * Grid points along azimuth (ntet): 239

OPAL> * Grid points along radius (nrad): 48

OPAL> * Adding a guard cell along azimuth

OPAL> * Total stored grid point number ((ntet+1) * nrad): 11520

OPAL> * Rescaling of the magnetic fields with factor: 0.001

Error>

Error> *** User error detected by function "Cyclotron::getFieldFromFile"

Error> fscanf returned EOF at std::fscanf(f, "%16lE",
&(Bfield_m.bfld_m[idx(i, k)]))

Error> fscanf returned EOF at std::fscanf(f, "%16lE",
&(Bfield_m.bfld_m[idx(i, k)]))

--------------------------------------------------------------------------

MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD

with errorcode -100.



NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.

You may or may not see output from other processes, depending on

exactly when Open MPI kills them.


Archive powered by MHonArc 2.6.24.

Top of Page