aboutsummaryrefslogtreecommitdiff
path: root/Example/Langmuir/langmuir_PICMI.py
diff options
context:
space:
mode:
Diffstat (limited to 'Example/Langmuir/langmuir_PICMI.py')
-rw-r--r--Example/Langmuir/langmuir_PICMI.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/Example/Langmuir/langmuir_PICMI.py b/Example/Langmuir/langmuir_PICMI.py
new file mode 100644
index 000000000..dd2156157
--- /dev/null
+++ b/Example/Langmuir/langmuir_PICMI.py
@@ -0,0 +1,36 @@
+import numpy as np
+from pywarpx import PICMI
+
+nx = 64
+ny = 64
+nz = 64
+
+xmin = -20.e-6
+ymin = -20.e-6
+zmin = -20.e-6
+xmax = +20.e-6
+ymax = +20.e-6
+zmax = +20.e-6
+
+grid = PICMI.Grid(nx=nx, ny=ny, nz=nz,
+ xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
+ bcxmin='periodic', bcxmax='periodic', bcymin='periodic', bcymax='periodic', bczmin='periodic', bczmax='periodic',
+ moving_window_velocity=[0., 0., 0.],
+ max_grid_size=32, max_level=0, coord_sys=0)
+
+solver = PICMI.EM_solver(current_deposition_algo = 3,
+ charge_deposition_algo = 0,
+ field_gathering_algo = 0,
+ particle_pusher_algo = 0)
+
+electrons = PICMI.Species(type='electron', name='electrons')
+
+plasma = PICMI.Plasma(species=electrons, density=1.e25, xmax=0., vxmean=0.1, number_per_cell_each_dim=[2,2,2])
+
+sim = PICMI.Simulation(verbose = 1,
+ timestep_over_cfl = 1.0,
+ max_step = 40,
+ plot_int = 1)
+
+sim.write_inputs(inputs_name='inputs_from_PICMI')
+