Grid

Grid

Determines the simulation size and relationship of physical coordinates to cell indices.

Every object in Vorpal interacts with a grid defined by the Grid block. If there is more than one Grid block in the input file, Vorpal uses the grid named globalGrid and ignores any others. If there are no Grid blocks named globalGrid, the last Grid block will be used and all preceding Grid blocks will be ignored.

Grid defaults to a uniform Cartesian grid if you omit the kind parameter or when you set kind to uniCartGrid, regardless of the presence or value of coordinateSystem parameter.

Note

There are no restrictions on the ratio of grid sizes among the dimensions. However, Tech-X recommends novice users unfamiliar with effects of large aspect ratio cells, keep the grid sizes, DX, DY, and DZ, within a factor of 5 from each other.

By convention, Vorpal lays out its axes as follows:

x: left to right y: front to back z: bottom to top

Grid Parameters

maxIntDepHalfWidth (integer, optional, default = 1)

Maximum half-width of either the interpolator or depositor stencil.

Please see Additional Attributes for Particle Simulations for more information.

maxCellXings (integer, optional, default = 1)

The maximum number of cells a particle is allowed to cross in one time step. This does not override the maxcellxing parameter specified in the species block, but must be equal to or larger than any species block maxcellxing value. This is used in calculating the number of guard cells found in the simulation. Please see Additional Attributes for Particle Simulations for more information.

kind (string)

Specifies type of grid to use, and is one of the following options.

  • uniCartGrid (default) Works with VSimBase, VSimEM, VSimPD, VSimPA, and VSimVE licenses.

    numCells (integer vector, required)

    Sets number of cells in the x, y, and z directions. Should contain at least as many values as there are dimensions in the grid. Example usage:

      numCells = [5 10 15]
    or
      numCells = [NX NY NZ]
    
    lengths (float vector, required)

    Sets lengths of the simulation space in meter units. Should contain at least as many values as there are dimensions in the grid. Example usage:

      lengths = [0.1 0.1 0.1]
    or
      lengths = [LX LY LZ]
    
    startPositions (float vector, required, default = [0 0 0])

    Specifies where the starting coordinates in the simulation space are in meter units. Should contain at least as many values as there are dimensions in the grid. Example usage:

      startPositions = [-0.05 0.0 0.0]
    or
      startPositions = [XBGN YBGN ZBGN]
    
  • coordProdGrid Works with VSimPD and VSimVE licenses.

    coordinateSystem (optional, default=Cartesian)

    Sets the coordinate system of the grid. One of:

    • Cartesian (default), e.g. x,y,z

    • Cylindrical, e.g. z, r, phi

    • Polar, e.g. r, phi,z

    • Tubular, e.g. phi, z, r

    includeCylAxis (integer, optional, default = 0)

    Whether or not to include the lower bound in the radial direction that corresponds to r = 0 in the simulation. If includeCylAxis is true, one needs to make sure that the starting position in the r direction (dir1) is set to 0.0. If includeCylAxis is false, one needs to make sure that the starting position in the r direction (dir1) is set to greater than 0.0. Setting includeCylAxis to true in the Grid block sets a flag that allows for proper evaluation of the nodal volume element and Ez area element for the first cell. One should also take care to set includeCylAxis in any necessary FieldUpdater blocks. See: FieldUpdater for the different kinds of CoordProd updaters that are available.

    coordinateGrid (block, required)

    Specifies the lower and upper bounds and cell size of each dimension of the coordinate product grid independently in its own CoordinateGrid block. See CoordinateGrid.

Example Uniform Cartesian Grid Block

<Grid globalGrid>
  kind = uniCartGrid
  numCells = [40 20 20]
  lengths = [5e-06 5e-05 5e-05]
  startPositions = [0.0 -2.5e-05 -2.5e-05]
</Grid>

Example Cylindrical Grid Block

<Grid globalGrid>
  kind = coordProdGrid
  coordinateSystem = Cylindrical
  includeCylAxis = 1
  <CoordinateGrid dir0>
    sectionBreaks = [ZBGN ZEND]
    deltaAtBreaks = [DZ DZ]
  </CoordinateGrid>
  <CoordinateGrid dir1>
    sectionBreaks = [RBGN REND]
    deltaAtBreaks = [DR DR]
  </CoordinateGrid>
</Grid>