## Dynamic aperture scan in x direction with a y offset

Moderators: cyao, michael_borland

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

### Dynamic aperture scan in x direction with a y offset

Hello, Michael, and other experts,

Usually we make dynamic aperture line survey as shown in follow figure. And we can use like follow words to get the dynamic aperture for the line (X= n*sigma_x, Y=n*sigma_y), (X= -n*sigma_x, Y=n*sigma_y)
and (X= 0*sigma_x, Y=n*sigma_y).
&find_aperture
output = "%s.aper",
mode = n-lines,
n_lines = 41,
xmin = -0.001,
xmax = 0.001,
ymin = 0
ymax = 0.0005,
nx = 21,
ny = 11,
n_splits = 5,
desired_resolution = 0.00001,
verbosity = 1
&end

But for the line (X= n*sigma_x, Y=1*sigma_y), I don't know how to make the dynamic aperture scan.
And when I make a scan with the line (X= n*sigma_x, Y=0*sigma_y), I can only get a result of NO 3 of follow figures which is not enough. Thank you.

Guohui

michael_borland
Posts: 1832
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

### Re: Dynamic aperture scan in x direction with a y offset

Guohui,

If I understand correctly, you want to set the initial y coordinate to a fixed value and scan the x coordinate to find the aperture. You can do this by simply creating a line of particles in phase space, e.g.,

Code: Select all

``````&bunched_beam
n_particles_per_bunch = 100,
bunch = %s.bun,
! 20mm horizontal size
beta_x = 2e300,
emit_x = 2e-304,
! Zero vertical size
beta_y = 1,
emit_y = 0,
! 1mm vertical offset
centroid = 1e-3
! Distribution is a line in x-x' and y-y' phase space
distribution_type = 2*"line"
&end
``````
In addition, in the &run_setup command, you should request the acceptance output:

Code: Select all

``````&run_setup
...
acceptance = %s.acc
...
&end
``````
The .acc file will contain the initial coordinates of all particles that survive tracking, which is the aperture in this case.

--Michael

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

### Re: Dynamic aperture scan in x direction with a y offset

--
Last edited by gwei on 25 Jan 2017, 10:43, edited 1 time in total.

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

### Re: Dynamic aperture scan in x direction with a y offset

michael_borland wrote:Guohui,

If I understand correctly, you want to set the initial y coordinate to a fixed value and scan the x coordinate to find the aperture. You can do this by simply creating a line of particles in phase space, e.g.,

Code: Select all

``````&bunched_beam
n_particles_per_bunch = 100,
bunch = %s.bun,
! 20mm horizontal size
beta_x = 2e300,
emit_x = 2e-304,
! Zero vertical size
beta_y = 1,
emit_y = 0,
! 1mm vertical offset
centroid = 1e-3
! Distribution is a line in x-x' and y-y' phase space
distribution_type = 2*"line"
&end
``````
--Michael
Thank you, Michael

And what's the meaning of ' centroid = 1e-3 ' ? a y offset=0.001 m ?
In your definition of centroid, it is
double centroid = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
And I guess {0.0, 0.0, 0.0, 0.0, 0.0, 0.0} is values in (x, x’, y, y’, t, p)
Is it right?

Best wishes

Guohui

michael_borland
Posts: 1832
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

### Re: Dynamic aperture scan in x direction with a y offset

Guohui,
And what's the meaning of ' centroid = 1e-3 ' ? a y offset=0.001 m ?
In your definition of centroid, it is
double centroid = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
And I guess {0.0, 0.0, 0.0, 0.0, 0.0, 0.0} is values in (x, x’, y, y’, t, p)
Is it right?
Yes, that's all correct, except centroid and centroid, which are in units of meters and fractional momentum deviation, respectively.

--Michael

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

### Re: Dynamic aperture scan in x direction with a y offset

michael_borland wrote:Guohui,
And what's the meaning of ' centroid = 1e-3 ' ? a y offset=0.001 m ?
In your definition of centroid, it is
double centroid = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
And I guess {0.0, 0.0, 0.0, 0.0, 0.0, 0.0} is values in (x, x’, y, y’, t, p)
Is it right?
Yes, that's all correct, except centroid and centroid, which are in units of meters and fractional momentum deviation, respectively.

--Michael
So centroid means x, centroid means x', centroid means y, centroid means y', centroid means t, centroid means p.
if we want a centroid offset of x = 0.001 m and y = 0.001 m ,
we should write : centroid[0, 2] ={1e-3, 1e-3}. Is it right?

michael_borland
Posts: 1832
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

### Re: Dynamic aperture scan in x direction with a y offset

Guohui,
So centroid means x, centroid means x', centroid means y, centroid means y', centroid means t, centroid means p.
if we want a centroid offset of x = 0.001 m and y = 0.001 m ,
we should write : centroid[0, 2] ={1e-3, 1e-3}. Is it right?
That's not quite right. centroid is distance traveled, not time, while centroid is (p-<p>)/<p>, not p itself. The syntax for changing several centroids is

Code: Select all

``````centroid = 1e-3
centroid = 1e-3,
``````
or

Code: Select all

``````centroid = 1e-3, 0, 1e-3
``````
--Michael

gwei
Posts: 33
Joined: 17 Jul 2015, 07:16

### Re: Dynamic aperture scan in x direction with a y offset

michael_borland wrote:Guohui,
So centroid means x, centroid means x', centroid means y, centroid means y', centroid means t, centroid means p.
if we want a centroid offset of x = 0.001 m and y = 0.001 m ,
we should write : centroid[0, 2] ={1e-3, 1e-3}. Is it right?
That's not quite right. centroid is distance traveled, not time, while centroid is (p-<p>)/<p>, not p itself. The syntax for changing several centroids is

Code: Select all

``````centroid = 1e-3
centroid = 1e-3,
``````
or

Code: Select all

``````centroid = 1e-3, 0, 1e-3
``````
--Michael
Thank you very much! Michael

Guohui