11import communication_helpers as ch
22import numpy as np
3- from scipy .constants import c
3+ from scipy .constants import c , e
44
55
66class Simulation (object ):
77 def __init__ (self ):
8- self .N_turns = 128
8+ self .N_turns = 2
99
1010 def init_all (self ):
1111 n_slices = 100
@@ -14,7 +14,7 @@ def init_all(self):
1414 self .n_slices = n_slices
1515 self .z_cut = z_cut
1616
17- n_segments = 70
17+ n_segments = 3
1818
1919 from LHC import LHC
2020 self .machine = LHC (machine_configuration = 'Injection' , n_segments = n_segments , D_x = 0. ,
@@ -52,16 +52,16 @@ def init_all(self):
5252 init_unif_edens = 9.000000e+11
5353 N_MP_ele_init = 100000
5454 N_mp_max = N_MP_ele_init * 4.
55- Dh_sc = .2e -3
55+ Dh_sc = 1e -3
5656 nel_mp_ref_0 = init_unif_edens * 4 * x_aper * y_aper / N_MP_ele_init
5757
5858 import PyECLOUD .PyEC4PyHT as PyEC4PyHT
5959 my_new_part = []
6060 self .my_list_eclouds = []
61- for ele in mypart :
61+ for ele in self . mypart :
6262 my_new_part .append (ele )
63- if ele in machine .transverse_map :
64- ecloud_new = PyEC4PyHT .Ecloud (L_ecloud = machine .circumference / n_segments , slicer = None ,
63+ if ele in self . machine .transverse_map :
64+ ecloud_new = PyEC4PyHT .Ecloud (L_ecloud = self . machine .circumference / n_segments , slicer = None ,
6565 Dt_ref = 10e-12 , pyecl_input_folder = '../pyecloud_config' ,
6666 chamb_type = chamb_type ,
6767 x_aper = x_aper , y_aper = y_aper ,
@@ -70,11 +70,11 @@ def init_all(self):
7070 init_unif_edens = init_unif_edens ,
7171 N_mp_max = N_mp_max ,
7272 nel_mp_ref_0 = nel_mp_ref_0 ,
73- B_multip = B_multip_per_eV * machine .p0 / e * c ,
73+ B_multip = B_multip_per_eV * self . machine .p0 / e * c ,
7474 slice_by_slice_mode = True )
7575 my_new_part .append (ecloud_new )
7676 self .my_list_eclouds .append (ecloud_new )
77- mypart = my_new_part
77+ self . mypart = my_new_part
7878
7979 def init_master (self ):
8080
0 commit comments