-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTP_proj1.py
59 lines (52 loc) · 1.23 KB
/
TP_proj1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
output_every=1
n_part=10
Main(
geometry = "1Dcartesian",
interpolation_order = 2,
simulation_time = 10*2*math.pi,
timestep = 0.18,
grid_length = [4],
cell_length = [0.2],
number_of_patches = [ 1 ],
print_every = 100,
EM_boundary_conditions = [['periodic']]
)
Species(
name = 'ion',
number_density = 1.0,
position_initialization = 'regular',
momentum_initialization = 'cold',
particles_per_cell = n_part,
mass = 1836.0,
charge = 1.0,
time_frozen = 10000.0,
boundary_conditions = [['periodic']]
)
Species(
name = "eon",
position_initialization = "regular",
momentum_initialization = "cold",
particles_per_cell = n_part,
mass = 1.0,
charge = -1.0,
number_density = cosine(1,xamplitude=0.01,xnumber=1),
boundary_conditions = [['periodic']]
)
DiagScalar (
precision = 3,
every = output_every,
vars = ['Utot', 'Ukin', 'Uelm', 'Ukin_eon', 'Ntot_eon', 'Uelm_Ex']
)
DiagParticleBinning(
deposited_quantity = "weight",
every = output_every,
species = ["eon"],
axes = [
["x", 0., Main.grid_length[0], 100],
["px", -0.01, 0.01, 100]
]
)
DiagFields(
every = output_every,
fields = ['Jx', 'Rho_eon']
)