###################################################################### # # File: simpleEs.pre # # Purpose: Simple electrostatic simulation. # Shows basic setup for a pseudospark. # ###################################################################### ########## # # Define variables in lines starting with ¿$¿ for later use # ########## # Variables for simulation parameters $ NDIM = 3 # Number of dimensions in simulation (1, 2, or 3) # Duration of time step for small step in electron plasma period $ DT = 1.e-11 # Variables for the grid input block # Number of cells along x, y, and z axes $ NX = 32 $ NY = 42 $ NZ = 42 # Length of grid along x, y, and z axes $ LX = 0.016 $ LY = 0.021 $ LZ = 0.021 # Location of start point along x, y, and z axes in SI units $ XSTART = -0.0005 $ YSTART = -0.5*LY $ ZSTART = -0.5*LZ # Variables for the particle source input block # Location of end point along x, y, and z axes in SI units $ XEND = XSTART + LX $ YEND = YSTART + LY $ ZEND = ZSTART + LZ # Variables for setting up boundary condition input blocks # Number of cells along x, y, and z axes plus the guard cell $ NXP1 = NX + 1 $ NYP1 = NY + 1 $ NZP1 = NZ + 1 # Number of cells along x, y, and z axes minus one cell $ NXM1 = NX - 1 $ NYM1 = NY - 1 $ NZM1 = NZ - 1 # Number of cells for objects on grid; useful for changing resolution # Cathode (y-lower and y-upper) - bounds on x axis $ CLBX = 14 # lower bounds $ CUBX = 18 # upper bounds # yLowerCathode - upper bounds on y axis $ YLCUBY = 16 # yUpperCathode - lower bounds on y axis $ YUCLBY = 27 # yLowerWall - upper bounds on x axis $ YLWUBX = 18 # yUpperWall - upper bounds on x axis $ YUWUBX = 18 ########## # # Define the simulation parameters # ########## # The dimension and precision of the simulation dimension = NDIM floattype = double # Time step and number of steps dt = DT nsteps = 10 # For a simple example # Dump output into an HDF5 file every 10 time steps dumpPeriodicity = 10 ########## # # Define the grid: the physical problem and the number of cells # ########## # Add explicitly the conductors at the domain boundary in order to # set them via Dirichlet boundary conditions. numPhysCells = [ NX NY NZ] lengths = [ LX LY LZ] startPositions = [ XSTART YSTART ZSTART] ########## # # Define the decomposition # ########## periodicDirs = [1 2] # The periodic directions decompType = regular ########## # # Define the EM field and its solver; describe the EM field¿s # boundary conditions # ########## kind = yeeStaticEmField kind = bicgstab # Other choices for electrostatic solvers are: # cgs, gmres, cg, tfqmr # For fully periodic systems with particles, try this option: # enforceZeroNetCharge = true precond = sym_CS # Other choices for pre-conditioners are: # none, Jacobi, Neumann, ls, dom_decomp, multigrid # # The following options are valid only for multigrid pre-conditioner. # # smoother = GaussSeidel # Other choices for smoothers are: # VBlockSymGaussSeidel, Jacobi # # Number of grid levels # nLevels = 10 # # threshold for refinement # threshold = 1e-8 # # End of options specific to multigrid pre-conditioner. # convergence criterion: tolerance = 1e-8 # maximum number of iterations; default is 1000 # maxIter = 1000 # verbosity of the solver output = none # Other choices for output are: # none, all, warnings, last, 1, 2, 3, ... # Six electrostatic boundary conditions follow. They are all Dirichlet. # Dirichlet boundary conditions specify a value for the potential. # The upperBounds of ES boundary conditions do not include cells # specified by the integer vector. For example, [33 43 43] includes # cells x=32, y=42, and z=42 but not cells x=33, y=43, and z=43. # Dirichlet boundary condition for x-upper wall; potential = 1000 volts kind = dirichlet lowerBounds = [NXM1 0 0] upperBounds = [NXP1 NYP1 NZP1] function = constantFunc amplitude = 1000. # Dirichlet boundary condition for y-lower cathode; potential = 0 volts kind = dirichlet lowerBounds = [CLBX 0 0] upperBounds = [CUBX YLCUBY NZP1] function = constantFunc amplitude = 0. # Dirichlet boundary condition for y-upper cathode; potential = 0 volts kind = dirichlet lowerBounds = [CLBX YUCLBY 0] upperBounds = [CUBX NYP1 NZP1] function = constantFunc amplitude = 0. # Dirichlet boundary condition for x-lower wall; potential = 0 volts kind = dirichlet lowerBounds = [0 0 0] upperBounds = [1 NYP1 NZP1] function = constantFunc amplitude = 0. # Dirichlet boundary condition for y-lower wall; potential = 0 volts kind = dirichlet lowerBounds = [0 0 0] upperBounds = [YLWUBX 1 NZP1] function = constantFunc amplitude = 0. # Dirichlet boundary condition for y-upper wall; potential = 0 volts kind = dirichlet lowerBounds = [0 NY 0] upperBounds = [YUWUBX NYP1 NZP1] function = constantFunc amplitude = 0. # The boundary conditions for the z-lower wall and z-upper wall are not # specified. By default, they are periodic. ########## # # Define the particles and their source; describe the particle boundary conditions # ########## # The particles are electrons kind = relBoris charge = -1.6022e-19 mass = 9.1094e-31 emField = myEsField nominalDensity = 1e10 nomPtclsPerCell = 1. maxcellxing = 1 # The particle source is the entire grid kind = randDensSrc lowerBounds = [XSTART YSTART ZSTART] upperBounds = [XEND YEND ZEND] density = 1.0e10 # Unit probability function = constantFunc amplitude = 1. # Boundary condition that removes particles at x-lower end of grid kind = absorber minDim = 1 lowerBounds = [-1 -1 -1] upperBounds = [ 1 NYP1 NZP1] # Boundary condition that removes particles at x-upper end of grid kind = absorber minDim = 1 lowerBounds = [NXM1 -1 -1] upperBounds = [NXP1 NYP1 NZP1] # Boundary condition that removes particles at y-lower end of grid kind = absorber minDim = 2 lowerBounds = [-1 -1 -1] upperBounds = [ NXP1 1 NZP1] # Boundary condition that removes particles at y-upper end of grid kind = absorber minDim = 2 lowerBounds = [-1 NYM1 -1] upperBounds = [ NXP1 NYP1 NZP1] # Boundary condition that removes particles at z-lower end of grid kind = absorber minDim = 3 lowerBounds = [-1 -1 -1] upperBounds = [ NXP1 NYP1 1] # Boundary condition that removes particles at z-upper end of grid kind = absorber minDim = 3 lowerBounds = [-1 -1 NZM1] upperBounds = [ NXP1 NYP1 NZP1]