forked from BLAST-WarpX/warpx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinputs_1d_semiimplicit
81 lines (69 loc) · 2.49 KB
/
inputs_1d_semiimplicit
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#################################
############ CONSTANTS #############
#################################
my_constants.n0 = 1.e30 # plasma densirty, m^-3
my_constants.nz = 40 # number of grid cells
my_constants.Ti = 100. # ion temperature, eV
my_constants.Te = 100. # electron temperature, eV
my_constants.wpe = q_e*sqrt(n0/(m_e*epsilon0)) # electron plasma frequency, radians/s
my_constants.de0 = clight/wpe # skin depth, m
my_constants.nppcz = 100 # number of particles/cell in z
my_constants.dt = 0.1/wpe # time step size, s
#################################
####### GENERAL PARAMETERS ######
#################################
max_step = 100
amr.n_cell = nz
amr.max_level = 0
geometry.dims = 1
geometry.prob_lo = 0.0
geometry.prob_hi = 10.*de0
boundary.field_lo = periodic
boundary.field_hi = periodic
boundary.particle_lo = periodic
boundary.particle_hi = periodic
#################################
############ NUMERICS ###########
#################################
warpx.const_dt = dt
algo.evolve_scheme = semi_implicit_picard
algo.max_picard_iterations = 5
algo.picard_iteration_tolerance = 0.
algo.current_deposition = esirkepov
algo.field_gathering = energy-conserving
algo.particle_shape = 2
warpx.use_filter = 0
#################################
############ PLASMA #############
#################################
particles.species_names = electrons protons
electrons.species_type = electron
electrons.injection_style = "NUniformPerCell"
electrons.num_particles_per_cell_each_dim = nppcz
electrons.profile = constant
electrons.density = n0
electrons.momentum_distribution_type = gaussian
electrons.ux_th = sqrt(Te*q_e/m_e)/clight
electrons.uy_th = sqrt(Te*q_e/m_e)/clight
electrons.uz_th = sqrt(Te*q_e/m_e)/clight
protons.species_type = proton
protons.injection_style = "NUniformPerCell"
protons.num_particles_per_cell_each_dim = nppcz
protons.profile = constant
protons.density = n0
protons.momentum_distribution_type = gaussian
protons.ux_th = sqrt(Ti*q_e/m_p)/clight
protons.uy_th = sqrt(Ti*q_e/m_p)/clight
protons.uz_th = sqrt(Ti*q_e/m_p)/clight
# Diagnostics
diagnostics.diags_names = diag1
diag1.intervals = 100
diag1.diag_type = Full
diag1.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz rho divE
diag1.electrons.variables = z w ux uy uz
diag1.protons.variables = z w ux uy uz
warpx.reduced_diags_names = particle_energy field_energy
particle_energy.type = ParticleEnergy
particle_energy.intervals = 1
field_energy.type = FieldEnergy
field_energy.intervals = 1