Skip to content
Snippets Groups Projects

Faster CircularResistiveWall

Merged Keon Hee KIM requested to merge faster_circular_resistive_wall into develop
1 unresolved thread
1 file
+ 26
24
Compare changes
  • Side-by-side
  • Inline
@@ -133,6 +133,11 @@ class CircularResistiveWall(WakeField):
to the characteristic time t0.
Eq. (11) in [1] is completely identical to Eq. (22) in [2].
The real parts of the last two terms of Eq. (11) in [1] are the same,
and the imaginary parts have the same magnitude but opposite signs.
Therefore, the former term was doubled, the latter term was eliminated,
and only the real part was taken to speed up the calculation.
The fundamental theorem of beam loading [3] is applied for the exact
expression of the longitudinal wake function: Wl(0) = Wl(0+)/2.
@@ -188,10 +193,15 @@ class CircularResistiveWall(WakeField):
Eq. (11) in [1] is completely identical to Eq. (25) in [2].
There are typos in both Eq. (11) in [1] and Eq. (25) in [2].
Corrected the typos in the last two terms of exact expression
for transverse wake function in Eq. (11), of [1].
Corrected the typos in the last two terms of exact expression for
transverse wake function in Eq. (11), of [1].
It is necessary to multiply Eq. (25) in [2] by c*t0.
The real parts of the last two terms of Eq. (11) in [1] are the same,
and the imaginary parts have the same magnitude but opposite signs.
Therefore, the former term was doubled, the latter term was eliminated,
and only the real part was taken to speed up the calculation.
Parameters
----------
time : array of float
@@ -230,31 +240,23 @@ class CircularResistiveWall(WakeField):
return wt
def __LongWakeExact(self, t, factor):
wl = np.real( factor *
( 4 * np.exp(-1 * t / self.t0) *
np.cos(np.sqrt(3) * t / self.t0)
+ wofz( 1j *
np.sqrt(2 * t / self.t0) )
- wofz( np.exp(1j * np.pi / 6) *
np.sqrt(2 * t / self.t0) )
- wofz( -1 * np.exp(-1j * np.pi / 6) *
np.sqrt(2 * t / self.t0)) ) )
wl = factor * ( 4 * np.exp(-1 * t / self.t0) *
np.cos(np.sqrt(3) * t / self.t0)
+ np.real( wofz( 1j *
np.sqrt(2 * t / self.t0) ) )
- 2 * np.real( wofz( np.exp(1j * np.pi / 6) *
np.sqrt(2 * t / self.t0) ) ) )
return wl
def __TransWakeExact(self, t, factor):
wt = np.real( factor *
( 2 * np.exp(-1 * t / self.t0) *
( np.sqrt(3) *
np.sin(np.sqrt(3) * t / self.t0) -
np.cos(np.sqrt(3) * t / self.t0) )
+ wofz( 1j *
np.sqrt(2 * t / self.t0) )
+ np.exp(-1j * np.pi / 3) *
wofz( np.exp(1j * np.pi / 6) *
np.sqrt(2 * t / self.t0) )
+ np.exp(1j * np.pi / 3) *
wofz( -1 * np.exp(-1j * np.pi / 6) *
np.sqrt(2 * t / self.t0) ) ) )
wt = factor * ( 2 * np.exp(-1 * t / self.t0) *
( np.sqrt(3) * np.sin(np.sqrt(3) * t / self.t0)
- np.cos(np.sqrt(3) * t / self.t0) )
+ np.real( wofz( 1j *
np.sqrt(2 * t / self.t0) ) )
+ 2 * np.real( np.exp(-1j * np.pi / 3) *
wofz( np.exp(1j * np.pi / 6) *
np.sqrt(2 * t / self.t0) ) ) )
return wt
def __LongWakeApprox(self, t):
Loading