Skip to content
Snippets Groups Projects
Commit 3ead6b4a authored by Gamelin Alexis's avatar Gamelin Alexis
Browse files

Fix phasor_evol

Correct time decay !
Now ok versus for loop (decay then beam loading)
parent e1cd920a
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ class CavityResonator():
m : int or float
Harmonic number of the cavity.
Rs : float
Shunt impedance of the cavity in [Ohm].
Shunt impedance of the cavity in [Ohm], defined as 0.5*Vc*Vc/Pc.
Q : float
Quality factor of the cavity.
QL : float
......@@ -226,7 +226,6 @@ class CavityResonator():
if index != self.bunch_index:
self.phasor_evol(profile, bin_length, charge_per_mp, ref_frame=ref_frame)
print('here')
else:
# modify beam phasor
for i, center0 in enumerate(center):
......@@ -334,7 +333,7 @@ class CavityResonator():
# Phasor evolution due to induced voltage by marco-particles
k = np.arange(0, n_bin)
var = np.exp( (-1/self.filling_time + 1j*delta) *
(n_bin-k) * deltaT )
(n_bin-k) * bin_length )
sum_tot = np.sum(profile * var)
sum_val = -2 * sum_tot * charge_per_mp * self.loss_factor
self.beam_phasor += sum_val
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment