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
14ac2edc
Commit
14ac2edc
authored
9 months ago
by
Alexis GAMELIN
Browse files
Options
Downloads
Patches
Plain Diff
Add form factor contribution to lcbi_growth_rate_mode
parent
03787000
No related branches found
No related tags found
1 merge request
!13
v0.7.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mbtrack2/instability/instabilities.py
+32
-7
32 additions, 7 deletions
mbtrack2/instability/instabilities.py
with
32 additions
and
7 deletions
mbtrack2/instability/instabilities.py
+
32
−
7
View file @
14ac2edc
...
...
@@ -103,10 +103,11 @@ def lcbi_growth_rate_mode(ring,
fr
=
None
,
RL
=
None
,
QL
=
None
,
Z
=
None
):
Z
=
None
,
bunch_length
=
None
):
"""
Compute the longitudinal coupled bunch instability growth rate driven by
an impedance for a given coupled bunch mode mu [1].
an impedance for a given coupled bunch mode mu [1
-2
].
Use either a list of resonators (fr, RL, QL) or an Impedance object (Z).
...
...
@@ -131,6 +132,10 @@ def lcbi_growth_rate_mode(ring,
Loaded quality factor of the resonator.
Z : Impedance, optional
Longitunial impedance to consider.
bunch_length : float, optional
Bunch length in [s].
Used to computed the form factor for a resonator impedance if given.
Default is None.
Returns
-------
...
...
@@ -142,9 +147,12 @@ def lcbi_growth_rate_mode(ring,
[1] : Eq. 51 p139 of Akai, Kazunori.
"
RF System for Electron Storage
Rings.
"
Physics And Engineering Of High Performance Electron Storage Rings
And Application Of Superconducting Technology. 2002. 118-149.
[2] : Tavares, P. F., et al.
"
Beam-based characterization of higher-order-mode
driven coupled-bunch instabilities in a fourth-generation storage ring.
"
NIM A (2022): 165945.
"""
if
synchrotron_tune
is
None
and
Vrf
is
None
:
raise
ValueError
(
"
Either synchrotron_tune or Vrf is needed.
"
)
if
synchrotron_tune
is
None
:
...
...
@@ -188,8 +196,15 @@ def lcbi_growth_rate_mode(ring,
n1
=
np
.
arange
(
1
,
n_max
)
omega_p
=
ring
.
omega0
*
(
n0
*
M
+
mu
+
nu_s
)
omega_m
=
ring
.
omega0
*
(
n1
*
M
-
mu
-
nu_s
)
if
bunch_length
is
None
:
FFp
=
1
FFm
=
1
else
:
FFp
=
np
.
exp
(
-
(
omega_p
*
bunch_length
)
**
2
)
FFm
=
np
.
exp
(
-
(
omega_m
*
bunch_length
)
**
2
)
sum_val
=
np
.
sum
(
omega_p
*
Zr
(
omega_p
))
-
np
.
sum
(
omega_m
*
Zr
(
omega_m
))
sum_val
=
np
.
sum
(
omega_p
*
Zr
(
omega_p
)
*
FFp
)
-
np
.
sum
(
omega_m
*
Zr
(
omega_m
)
*
FFm
)
return
factor
*
sum_val
...
...
@@ -202,10 +217,11 @@ def lcbi_growth_rate(ring,
fr
=
None
,
RL
=
None
,
QL
=
None
,
Z
=
None
):
Z
=
None
,
bunch_length
=
None
):
"""
Compute the maximum growth rate for longitudinal coupled bunch instability
driven an impedance [1].
driven an impedance [1
-2
].
Use either a list of resonators (fr, RL, QL) or an Impedance object (Z).
...
...
@@ -228,6 +244,10 @@ def lcbi_growth_rate(ring,
Loaded quality factor of the HOM.
Z : Impedance, optional
Longitunial impedance to consider.
bunch_length : float, optional
Bunch length in [s].
Used to computed the form factor for a resonator impedance if given.
Default is None.
Returns
-------
...
...
@@ -245,6 +265,10 @@ def lcbi_growth_rate(ring,
[1] : Eq. 51 p139 of Akai, Kazunori.
"
RF System for Electron Storage
Rings.
"
Physics And Engineering Of High Performance Electron Storage Rings
And Application Of Superconducting Technology. 2002. 118-149.
[2] : Tavares, P. F., et al.
"
Beam-based characterization of higher-order-mode
driven coupled-bunch instabilities in a fourth-generation storage ring.
"
NIM A (2022): 165945.
"""
growth_rates
=
np
.
zeros
(
M
)
...
...
@@ -259,7 +283,8 @@ def lcbi_growth_rate(ring,
fr
=
fr
,
RL
=
RL
,
QL
=
QL
,
Z
=
Z
)
Z
=
Z
,
bunch_length
=
bunch_length
)
growth_rate
=
np
.
max
(
growth_rates
)
mu
=
np
.
argmax
(
growth_rates
)
...
...
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