Skip to content

Commit 6c6df92

Browse files
committed
Use twin clouds
1 parent 60f583e commit 6c6df92

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

test_physics/000_test_with_ecloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
from Simulation_with_eclouds import Simulation
99
simulation_content = Simulation()
1010

11-
myCPUring = RingOfCPUs(simulation_content, N_pieces_per_transfer=5)
11+
myCPUring = RingOfCPUs(simulation_content, N_pieces_per_transfer=10)
1212

1313
myCPUring.run()

test_physics/Simulation_with_eclouds.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ def init_all(self):
6464
nel_mp_ref_0 = init_unif_edens*4*x_aper*y_aper/N_MP_ele_init
6565

6666
import PyECLOUD.PyEC4PyHT as PyEC4PyHT
67-
my_new_part = []
68-
self.my_list_eclouds = []
69-
for ele in self.mypart:
70-
my_new_part.append(ele)
71-
if ele in self.machine.transverse_map:
72-
ecloud_new = PyEC4PyHT.Ecloud(slice_by_slice_mode=True,
67+
ecloud = PyEC4PyHT.Ecloud(slice_by_slice_mode=True,
7368
L_ecloud=self.machine.circumference/n_segments,
7469
slicer=None,
7570
Dt_ref=25e-12,
@@ -81,6 +76,14 @@ def init_all(self):
8176
N_mp_max=N_mp_max,
8277
nel_mp_ref_0=nel_mp_ref_0,
8378
B_multip=B_multip)
79+
80+
81+
my_new_part = []
82+
self.my_list_eclouds = []
83+
for ele in self.mypart:
84+
my_new_part.append(ele)
85+
if ele in self.machine.transverse_map:
86+
ecloud_new = ecloud.generate_twin_ecloud_with_shared_space_charge()
8487
my_new_part.append(ecloud_new)
8588
self.my_list_eclouds.append(ecloud_new)
8689
self.mypart = my_new_part

test_ring_with_objects/Simulation_with_eclouds.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,9 @@ def init_all(self):
5353
N_mp_max = N_MP_ele_init*4.
5454
Dh_sc = .2e-3
5555
nel_mp_ref_0 = init_unif_edens*4*x_aper*y_aper/N_MP_ele_init
56-
56+
5757
import PyECLOUD.PyEC4PyHT as PyEC4PyHT
58-
my_new_part = []
59-
self.my_list_eclouds = []
60-
for ele in self.mypart:
61-
my_new_part.append(ele)
62-
if ele in self.machine.transverse_map:
63-
ecloud_new = PyEC4PyHT.Ecloud(L_ecloud=self.machine.circumference/n_segments, slicer=None,
58+
ecloud = PyEC4PyHT.Ecloud(L_ecloud=self.machine.circumference/n_segments, slicer=None,
6459
Dt_ref=10e-12, pyecl_input_folder='../pyecloud_config',
6560
chamb_type = chamb_type,
6661
x_aper=x_aper, y_aper=y_aper,
@@ -71,6 +66,13 @@ def init_all(self):
7166
nel_mp_ref_0=nel_mp_ref_0,
7267
B_multip=B_multip_per_eV*self.machine.p0/e*c,
7368
slice_by_slice_mode=True)
69+
70+
my_new_part = []
71+
self.my_list_eclouds = []
72+
for ele in self.mypart:
73+
my_new_part.append(ele)
74+
if ele in self.machine.transverse_map:
75+
ecloud_new = ecloud.generate_twin_ecloud_with_shared_space_charge()
7476
my_new_part.append(ecloud_new)
7577
self.my_list_eclouds.append(ecloud_new)
7678
self.mypart = my_new_part

0 commit comments

Comments
 (0)