Example input files

A number of input file examples are provided inside /inputfiles.

A comprehensive user guide can be found here.

GEM2D

Below is an example of the GEM2D test case.


 # Publications that use results from iPIC3D need to properly cite  
 # 'S. Markidis, G. Lapenta, and Rizwan-uddin. "Multi-scale simulations of 
 # plasma with iPIC3D." Mathematics and Computers in Simulation 80.7 (2010): 1509-1519.'
 #
 #        Copyright 2015 KTH Royal Institute of Technology
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at 
 #
 #         http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.

SaveDirName = data
RestartDirName = data

# New flags:
Case              = GEM       # Select the case
PoissonCorrection = no       # Poisson correction
WriteMethod       = pvtk
SimulationName    = testGEM8p  # Simulation name for the output
# Path to the python script generated by ParaView
ParaviewScriptPath = ../inputfiles/storePersistenceDiagram.py

#  %%%%%%%%%%%%%%%%%%% Magnetic Reconnection %%%%%%%%%%%%%%%%%%
B0x = 0.0195
B0y = 0.0
B0z = 0.0195
delta = 0.5

    
#  %%%%%%%%%%%%%%%%%%% TIME %%%%%%%%%%%%%%%%%%
dt = 0.15          # dt = time step   
ncycles = 3000 #81    # cycles
th = 1.0          # th =   decentering parameter
c = 1.0

#  %%%%%%%%%%%%%%%%%%% SMOOTH %%%%%%%%%%%%%%%%%%
Smooth = 0.2      # Smoothing value (5-points stencil)

Lx = 20   # Lx = simulation box length - x direction    
Ly = 10  # Ly = simulation box length - y direction   
Lz = 10   # Lz = simulation box length - z direction
nxc = 64  # nxc = number of cells - x direction        
nyc = 32  # nyc = number of cells - y direction 
nzc = 1  # nzc = number of cells - z direction 

# %%%%%%%%%%%%%% MPI TOPOLOGY %%%%%%%%%%%%%%
# number of MPI subdomains in each direction
XLEN = 1
YLEN = 1
ZLEN = 1
# topology of subdomains in each dimension (1=true, 0=false)
PERIODICX = 1
PERIODICY = 0
PERIODICZ = 1


# %%%%%%%%%%%%%% PARTICLES %%%%%%%%%%%%%%%%%
#    ns = number of species
#    0 = electrons
#    1 = protons
#    ...
ns = 4

# qom = charge to mass ratio for different species */
qom = -64.0 1.0 -64 1.0

# Initial density (make sure that plasma is neutral)
rhoINIT = 1.0 1.0 0.1 0.1
rhoINJECT = 0.0 0.0 0.0 0.0

# TrackParticleID[species] = 1=true, 0=false --> Assign ID to particles 
TrackParticleID= 1 1 1 1 
 
# uth = thermal velocity for different species - Direction X  */
uth  = 0.045 0.0126 0.045 0.0126
# vth = thermal velocity for different species - Direction Y */
vth  = 0.045 0.0126 0.045 0.0126
# wth = thermal velocity for different species - Direction Z */
wth  = 0.045 0.0126 0.045 0.0126
# u0 = drift velocity   - Direction X    */
u0 = 0.0 0.0 0.0 0.0
# v0 = drift velocity   - Direction Y    */
v0 = 0.0 0.0 0.0 0.0
# w0 = drift velocity   - Direction Z    */
w0 = 0.0065 -0.0325 0.0 0.0 

# npcelx = number of particles per cell - Direction X 
npcelx = 3 3 3 3 
# npcely = number of particles per cell - Direction Y */
npcely = 3 3 3 3 
# npcelz = number of particles per cell - Direction Z */
npcelz = 3 3 3 3 

# &&&&&&&&&&&& boundary conditions &&&&&&&&&&&&&&&
# PHI Electrostatic Potential     
# 0,1 = Dirichilet boundary condition      
# 2   = Neumann boundary condition
bcPHIfaceXright = 1
bcPHIfaceXleft  = 1
bcPHIfaceYright = 1
bcPHIfaceYleft  = 1
bcPHIfaceZright = 1
bcPHIfaceZleft  = 1
    
#    EM field boundary condition
#    0 = perfect conductor
#    1 = magnetic mirror

    bcEMfaceXright = 0
    bcEMfaceXleft =  0
    bcEMfaceYright = 0
    bcEMfaceYleft =  0
    bcEMfaceZright = 0
    bcEMfaceZleft =  0
#    Particles Boundary condition
#    0 = exit
#    1 = perfect mirror
#    2 = riemission
#    Caveat: if your processor topology is set to be periodic in a direction automatically the boundary condition in that direction will be periodic*/
    bcPfaceXright = 1
    bcPfaceXleft =  1
    bcPfaceYright = 1
    bcPfaceYleft =  1
    bcPfaceZright = 1
    bcPfaceZleft =  1

#  print to video results */
    verbose = 1

# velocity of the injection from the wall 
    Vinj= 0.0
    
# CG solver stopping criterium tolerance 
   CGtol = 1E-3
# GMRES solver stopping criterium tolerance 
   GMREStol = 1E-3
# mover predictor corrector iteration 
   NiterMover  = 3
# Output for field
   FieldOutputCycle = 100
   FieldOutputTag   = B+E+Je+Ji
   MomentsOutputTag = rho+PXX+PXY+PXZ+PYY+PYZ+PZZ
# Output for particles if 0 it doesnt save particles data
   ParticlesOutputCycle = 45
   ParticlesOutputTag = position+velocity+q
# restart cycle
   RestartOutputCycle = 100
   CallFinalize=1