MPM Grid Generation

From OSUPDOCS
Jump to navigation Jump to search

MPM calculations use a background grid. The grid can be easily created with commands on this page.

Regular Grid

Most MPM simulations use a regular, orthogonal grid. In other words, all cells in the grid are the same size and cell edges along x, y, and z directions are 90 degrees to each other. The cells in 2D grids are all all rectangles. the cells in 3D grids are rectangular boxes. The commands in this section create a regular grid:

Regular Grid in Scripted Files

For 2D analyses, the entire grid is generated with the following commands:

GridHoriz (nx),<(symx)>,<(symxdir)>,<(symx2)>
GridVert (ny),<(symy)>,<(symydir)>,<(symy2)>
GridThickness (thick)
GridRect (xmin),(xmax),(ymin),(ymax)

Axisymmetric calculations use x and y limits for R and Z limits. For 3D analyses, the entire grid is generated with the following commands:

GridHoriz (nx),<(symx)>,<(symxdir)>,<(symx2)>
GridVert (ny),<(symy)>,<(symydir)>,<(symy2)>
GridDepth (nz),<(symz)>,<(symzdir)>,<(symz2)>
GridRect (xmin),(xmax),(ymin),(ymax),(zmin),(zmax)

where

  • (nx), (ny), (nz) - the number of elements in the x, y, and z directions. For axisymmetric calculations (nx) and (ny) are the number of elements in the R and Z directions.
  • (symx), (symxdir), and (symx2) (and the analogous ones for y and z) - these optional settings are used to define symmetry planes along one or more axes.
  • (thick) - the grid thickness in 2D planar calculations (in length units). See below for details on grid thickness.
  • (xmin),(xmax),(ymin),(ymax),(zmin),(zmax) - the ranges for the grid along each axis (in length units) ((zmin) and (zmax) are only used for 3D calculations).

Regular Grid in XML Files

In XML input commands, the entire grid is generated within a single <Mesh> block. For 2D analysis, use the following commands:

<Mesh output='file'>
  <Grid xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)' thickness='(thick)'>
    <Horiz nx='(nx)' symmin='(symxmin)' symmax='(symxmax)'/>
    <Vert ny='(ny)' symmin='(symymin)' symmax='(symymax)'/>
  </Grid>
</Mesh>

Axisymmetric calculations use x and y limits for R and Z limits. For 3D analyses, use the following commands:

<Mesh output='file'>
  <Grid xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)' zmin='(zmin)' zmax='(zmax)'>
    <Horiz nx='(nx)' symmin='(symxmin)' symmax='(symxmax)'/>
    <Vert ny='(ny)' symmin='(symymin)' symmax='(symymax)'/>
    <Depth nz='(nz)' symmin='(symzmin)' symmax='(symzmax)'/>
  </Grid>
</Mesh>

The parameters have the same meaning as the parameters for scripted files. XML commands have these additional options:

  1. output='file' - this attribute in the <Mesh> element determines if the nodes and elements should be included in the main output results file or written to separate files in the archive folder. Use the word "file" to write nodes and elements to separate files or omit the attribute to include them in the main file. In large calculations, it is always better to write them to a separate file.
  2. The <Grid> command can use a units attribute to select the input units.
  3. Instead of setting the grid by entering the number cells in each direction, you can optionally specify the cell size by using
    <Horiz cellsize='(size)' symmin='(symxmin)' symmax='(symxmax)'/>
    

    where (size) is the cell size (in length units). Note: if needed, the axis limits will be increased to accomodate an integral number of elements at the desired cell size.

  4. The symmetry planes are set using (symmin) and (symmax) attributes.

Tartan Grid

A tartan grid extends regular grid methods by keeping the grid orthogonal but now allowing unequal cell sizes. Tartan grids are currently only available in OSParticulas and currently only work with Classic (not recommended), GIMP, or CPDI shape functions. Furthermore, axisymmetric calculations are limited to CPDI shape functions.

Areas of Interest

Mcintosh.png

A tartan grid is based around areas of interest (AOIs). Within AOIs, the grid is a regular grid of equal sized elements. Cells outside any AOI get larger. Cells between AOIs are also larger (depending on available space between the AOIs). Overlapping AOIs (by direction) combine into a single length of interest for that axis. The net result looks like a Scottish Tartan as shown in the picture to the right. This picture is the clan McIntosh tartan. The green areas would AOIs with regular cells and the cells get larger outside the AOIs, but all cell edges remain orthogonal.

AOIs are created in scripted files with:

 TartanAOI x1,x2,nx,y1,y2,ny

In XML files, the command is:

 <AreaOfInterest x1="0" x2="10" y1="0" y2="10" nx="5" ny="5"/>

where

  • x1 to x2 and y2 to y2 define a rectangular AOI (add z1,z2,nz for cubical volume in 3D tartan grid). The mesh inside the area of interest will be a regular grid.
  • The nx and ny (and nz for 3D) values give the number of cells in the two (or three directions) inside the AOI (and the cells will have equal sizes along each direction.

Cell Sizes

The rate at which cells outside of AOIs increase is determined a cell ratio and size-increment style for each axis. These parameters are set by modifying the axis commands used to create a regular grid. In scripted files, you insert "R-Style" as second parameter to mean the next two parameters are cell size ratio and style:

 GridHoriz num,"R-style",ratio,<style>,<sym1>,<symdir>,<sym2>

and similar for GridVert and GridDepth. In XML files use

 <Horiz nx='nx' rx='ratio' style='style'/>

and use attributes ry and rz for <Vert> and <Depth>. The two new parameters are:

  • ratio gives ratio of adjacent cells in that direction outside AOIs. If x direction is not given, it is set to the golden ratio ((1+√5)/2=1.618). If y or z directions are not provided, there are set to the x direction ratio. Any ratio less than or equal to 1 is same as not provided.
  • style has two options:
    1. 0 (or "geometric"): the cell size will increase geometrically by given ratio.
    2. 1 (or "linear"): the cell size will increase linearly by the amount (ratio-1)*a (where a is element size inside the AOI)

    If x direction is not given, it is set to "geometric". If y or z directions are not provided, there are set to x direction style. Although this parameter is optional, it must be provided for alignment and symmetry plane boundary conditions are being set,

Note that commonly the ratio and style will be same for all axes. To achieve this result, set only x axis ratio and style and y and z axes (when not provided) will inherit that style (they can be set differently, however, if desired).

Note that when using a tartan grid, the nx, ny, and nz parameters used to create a regular grid are ignored. The number of cells along each axis will depend on the number of cells in AOIs and the rate of increase between AOIs. But, if the commands do not define any AOIs, the grid will revert to a regular grid based on entered nx, ny, and nz values.

Grid Limits and Border

When using a tartan grid, set the limits of the grid limits (in GridRect or <Grid> commands) should be set to the limits of the modeled object (i.e., do not include extra border cells around the edges). This approach makes it easier to align cell edges with the cell edges in the tartan grid.

If you want to add a border in scripted files, use the command:

 TartanBorder xmin,xmax,ymin,ymax

In XML commands, a border is set with:

 <Border xmin="1" xmax="1" ymin="1" ymax="1" />

where

  • xmin, xmax, ymin, and ymax give number of extra elements beyond the edges (which may be small or large elements depending on tartan grid settings (add zmin and zmax for 3D). Added elements will match the size of the last cell within the object in that direction.

If no Border command is used, a border of 1 cell on each edge is created.

Symmetry Planes

By using the optional (symx), (symxdir), and (symx2) parameters (and the analogous ones for y and z) in GridHoriz, GridVert, or GridDepth commands (or the (symmin) and (symmax) attributes in <Horiz>, <Vert> or <Depth> XML commands), you can create a one or two symmetry planes along each axis. For one symmetry plane, the plane is located at x=(symx) (or y=(symy) or z=(symz)). If the corresponding direction property (e.g., (symxdir)) is equal to -1 (or is omitted), the plane is at the minimum edge for the coordinate; if the direction is equal to +1, the plane is at the maximum edge. To create two symmetry planes, create the first one as for one plane, always specify (symxdir) (even if it is -1), and then use (symx2) (or (symy2) or (symz2)) for the location of the other plane. The second plane will be on the opposite side as the first plane (e.g., maximum edge if first was minimum or minimum edge is first was maximum). In XML files, planes and the minimum and/or maximum edges can be specified with one or both of the optional (symmin) and (symmax) attributes.

The creation of a symmetry plane will do the following:

  1. Delete all velocity boundary conditions in the specified axis direction that are beyond the symmetry plane because they are not needed (e.g., at values x≤(symx) for (symxdir)=-1 or x≥(symx) for (symxdir)=+1).
  2. Create velocity boundary conditions for every node in the plane at (symx) (or (symy) or (symz)) with velocity in the axis direction set to zero. Note that the symmetry plane must fall on a plane of nodes in the grid, otherwise an error will result. For the purpose of archiving reaction forces, the created boundary conditions will have the following IDs:
    • -10: plane at minimum x edge
    • -11: plane at maximum x edge
    • -20: plane at minimum y edge
    • -21: plane at maximum y edge
    • -30: plane at minimum z edge
    • -31: plane at maximum z edge
  3. Create a second layer of velocity boundary conditions one element beyond the symmetry plane (e.g., at (symx)+(symxdir)*cell where cell is the cell size along the axis). These special boundary conditions will use reflection to set the velocity equal to the opposite of the velocity for the node on the other side of the symmetry plane and within the object. For example, a symmetry plane at x=(symx) will set the x velocity for the reflected node at (symx)+(symxdir)*cell to be minus the x velocity for the node in the object at (symx)-(symxdir)*cell. This second layer of boundary conditions is needed for best results when using GIMP or CPDI shape functions.
  4. Whenever contact occurs for a node on the plane at(symx) (or (symy) or (symz)), the volume gradient in the symmetry direction is set to zero and the volume is doubled.

Symmetry planes are designed as actual symmetry planes. In other words, the real problem you are trying to solve is where the full object is the object on one side of the symmetry plane combined with its reflection on the opposite side. Although you can manually create pseudo-symmetry planes by creating two rows of zero velocity boundary conditions, the manual approach will not handle contact in multimaterial mode correctly and may have inferior results for boundary conditions. When contact may occur on the symmetry plane, the code needs to explicitly know about those planes so it can adjust volumes and volume gradients to account for symmetry. The above method for symmetry planes achieves that goal (i.e., item #4 above). Symmetry planes also eliminate (or reduce) some edge artifacts at zero-velocity boundary conditions. Thus symmetry planes are recommended whenever you want boundary conditions to create a wall for your simulation.

Some details on symmetry planes are:

  1. For axisymmetric simulations, a symmetry plane at r=0 is implied and is automatically created whenever your mesh extends to r=0. Any minimum symmetry plane you enter will be ignored. You can optionally create a maximum symmetry plane if desired.
  2. Although setting a symmetry plane seems to be a short cut to setting zero velocity boundary conditions on an edge, if that edge corresponds to a real edge of the object and not to a symmetry plane, you should manually create those boundary conditions rather than use a symmetry plane. In other words, the contact mechanics at an edge are different than at a symmetry plane.
  3. The reflective boundary conditions next to symmetry planes work with with multiple materials (each material's velocity is reflected), but if cracks are present, it only reflects the velocity on the same side of the crack as the internal node. If cracks extend though or along symmetry planes, it is possible the reflective boundary conditions will lose accuracy. The zero velocity boundary conditions on the plane, however, account for cracks.

Notes

  1. The thickness in planar 2D calculations defines the thickness of the grid. This attribute is required when doing multimaterial contact including the optional volume check and when using traction or flux boundary conditions. It is optional in other calculations because thickness can be set when defining material points and when defining cracks. If used, however, all material points and cracks will default to the grid thickness. You can enter different values, although it is not recommended (and may change the physics in multimaterial simulations or results to traction or flux boundary conditions). A warning is printed in the output if a crack thickness does not match the grid thickness. Currently no warning is given if material points have different thicknesses.
  2. In scripted files, the GridThickness command must be before the GridRect
  3. When using a GIMP or CPDI shape functions, a particle is considered to have left the grid if it moves into any element on the edge of the analysis. Thus, the use of a GIMP method will cause grid generation to automatically add an extra boundary of elements beyond the dimensions you select.
  4. MPM background grids currently always use linear elements.