Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mbtrack2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Collective Effects
mbtrack2
Commits
b965100e
Commit
b965100e
authored
3 years ago
by
Alexis GAMELIN
Browse files
Options
Downloads
Patches
Plain Diff
Add non-linear model to FBII rise time calculation
Correct typo in ion_frequency
parent
0020d7ea
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
collective_effects/ions.py
+32
-11
32 additions, 11 deletions
collective_effects/ions.py
with
32 additions
and
11 deletions
collective_effects/ions.py
+
32
−
11
View file @
b965100e
...
...
@@ -56,7 +56,7 @@ def ion_cross_section(ring, ion):
return
sigma
def
ion_frequency
(
N
,
L
e
sp
,
sigmax
,
sigmay
,
ion
=
"
CO
"
,
dim
=
"
y
"
,
express
=
"
coupling
"
):
def
ion_frequency
(
N
,
Ls
e
p
,
sigmax
,
sigmay
,
ion
=
"
CO
"
,
dim
=
"
y
"
,
express
=
"
coupling
"
):
"""
Compute the ion oscillation frequnecy.
...
...
@@ -64,7 +64,7 @@ def ion_frequency(N, Lesp, sigmax, sigmay, ion="CO", dim="y", express="coupling"
----------
N : float
Number of electrons per bunch.
L
e
sp : float
Ls
e
p : float
Bunch spacing in [m].
sigmax : float or array
Horizontal beam size in [m].
...
...
@@ -118,22 +118,32 @@ def ion_frequency(N, Lesp, sigmax, sigmay, ion="CO", dim="y", express="coupling"
elif
express
==
"
no_coupling
"
:
k
=
1
f
=
c
*
np
.
sqrt
(
2
*
rp
*
N
/
(
A
*
k
*
L
e
sp
*
sigmay
*
(
sigmax
+
sigmay
)
)
)
/
(
2
*
pi
)
f
=
c
*
np
.
sqrt
(
2
*
rp
*
N
/
(
A
*
k
*
Ls
e
p
*
sigmay
*
(
sigmax
+
sigmay
)
)
)
/
(
2
*
pi
)
return
f
def
fast_beam_ion
(
ring
,
Nb
,
nb
,
Lsep
,
sigmax
,
sigmay
,
P
,
T
,
beta
,
decoherence
=
True
,
delta_omega
=
0
,
ion
=
"
CO
"
,
dim
=
"
y
"
):
model
=
"
linear
"
,
delta_omega
=
0
,
ion
=
"
CO
"
,
dim
=
"
y
"
):
"""
Compute fast beam ion instability rise time [1].
Warning ! If decoherence=False, the rise time is not an e-folding time
(i.e. y ~ exp(t/tau)) but an assymptotic grow time
(i.e. y ~ exp(sqrt(t/tau))) see [1][2].
Warning !
If model=
"
linear
"
, the rise time is an assymptotic grow time
(i.e. y ~ exp(sqrt(t/tau))) [1].
If model=
"
decoherence
"
, the rise time is an e-folding time
(i.e. y ~ exp(t/tau)) [2].
If model=
"
non-linear
"
, the rise time is a linear growth time
(i.e. y ~ t/tau) [3].
The linear model assumes that [1]:
x,y << sigmax,sigmay
The decoherence model assumes that [2]:
Lsep << c / (2 * pi * ion_frequency)
Lsep << c / (2 * pi * betatron_frequency)
Lsep << c / (2 * pi * betatron_frequency)
The non-linear model assumes that [3]:
x,y >> sigmax,sigmay
Parameters
----------
...
...
@@ -154,8 +164,10 @@ def fast_beam_ion(ring, Nb, nb, Lsep, sigmax, sigmay, P, T, beta,
Tempertature in [K].
beta : float
Average betatron function around the ring in [m].
decoherence : bool, optional
If True, decoherence is taken into account using [2].
model : str, optional
If
"
linear
"
, use [1].
If
"
decoherence
"
, use [2].
If
"
non-linear
"
, use [3].
delta_omega : float, optional
RMS variation of the ion oscillation angular frequnecy around the ring
in [Hz].
...
...
@@ -175,6 +187,8 @@ def fast_beam_ion(ring, Nb, nb, Lsep, sigmax, sigmay, P, T, beta,
linear theory and simulations
"
, Physical Review E 52 (1995).
[2] : G. V. Stupakov, T. O. Raubenheimer, and F. Zimmermann,
"
Fast beam-ion
instability. II. effect of ion decoherence
"
, Physical Review E 52 (1995).
[3] : Chao, A. W., & Mess, K. H. (Eds.). (2013). Handbook of accelerator
physics and engineering. World scientific. 3rd Printing. p417.
"""
if
dim
==
"
y
"
:
...
...
@@ -198,8 +212,15 @@ def fast_beam_ion(ring, Nb, nb, Lsep, sigmax, sigmay, P, T, beta,
tau
=
den
/
num
if
decoherence
is
True
:
if
model
==
"
decoherence
"
:
tau
=
tau
*
2
*
np
.
sqrt
(
2
)
*
nb
*
Lsep
*
delta_omega
/
c
elif
model
==
"
non-linear
"
:
fi
=
ion_frequency
(
Nb
,
Lsep
,
sigmax
,
sigmay
,
ion
,
dim
)
tau
=
tau
*
2
*
pi
*
fi
*
ring
.
T1
*
nb
**
(
3
/
2
)
elif
model
==
"
linear
"
:
pass
else
:
raise
ValueError
(
"
model unknown
"
)
return
tau
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment