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: Ezgi Sunar <ezgi.sunar AT mnt.com.tr>
  • To: "opal AT lists.psi.ch" <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: RE: [Opal] Problem with Cyclotron Tune and Phase Calculation
  • Date: Tue, 28 May 2024 14:16:51 +0000
  • Accept-language: tr-TR, en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mnt.com.tr; dmarc=pass action=none header.from=mnt.com.tr; dkim=pass header.d=mnt.com.tr; arc=none
  • 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=XKa8Dp+36KjecCKLHPEVqiRz6X3sUQbT37mvAwxJd+M=; b=cVa1FwdeBJ9D4KdaTHiSKYbuBGw2DV7M80odo/xC4D9l5dozMPjDIe20joAexdOvOu+DWPYmGLZBO4xfIBQ+5b21GQLNEvGbbHP1iAhL/vPY17mGBJNxlylayt4JLT/5xyHrs9LbSNFcXKBCmw25+s8FvVSgmp7LuZeqCPn5Ih8XVLH9eYZ1Ym+vkPqZtRT1IPoaSUW/Cu24Xg0Tu13QhGBm3Qq0+3Qv8sAoVchJyo69NfsyPDzGwWXcApIqJqiA0TSqOSd4/TKjJ5N4XWf4xMc+z+GMLFVnj+3pbqG+C7juzIhQ+n60QIcR2cAgU8nTz3bT8oYRrYNWHTaz8Zl1Qw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mJ61GXa79AvSH48e/MGmqDMftiCRwqZDA/RdryGrNQrZgiOVR7gWdQX/i55ZSZutMsue5Iv96FTefbYqRwtv+WByvrBFkjUHDq853JXiB1z7KSK1undX82tIlTsO/oru4W/c/gVv8r2/5Vmiu8Xiok42nil3npf3AsARVDEUmlek5ajxQouJpzJnlOG9/b1V51YyQopz4F02f2QLNhmV8XSrCXyycQeWFh4QJttOkNp7n5Se5n5/VBtwQ5JQT6Uh9FLZt69umSUddZ2GAsc/lq6DmWikJk+6fpHTVN5zuVMG9C5A6urBSuB87J3s9b/cqYLBKwfOHo+TP+LnDC1e3w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mnt.com.tr;

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