2D MPM Shape Commands

From OSUPDOCS
Jump to navigation Jump to search

These shape commands are used in 2D or axisymmetric MPM simulations within Region and Hole commands to discretize an object for the calculations.

Rect Command

A scripted Rect command defines a region to be filled with material points or to be defined as a hole:

Rect (xmin),(xmax),(ymin),(ymax),<(arcStart)>,<(arcEnd)>

In XML files, the command is:

<Rect xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)'>
   <arc start='(arcStart)' end='(arcEnd)'/>
</Rect>

where

  • (xmin),(xmax),(ymin), and (ymax) are the x and y extents of the rectangle (or R and Z extents if axisymmetric). If xmax<xmin or ymax<ymin, they will be automatically switched to define the rectangle. The units are length units (or determined by a units attribute in XML files).
  • (arcStart) and (arcEnd) are optional parameters that limit the shape to an to arc of the rectangle (ccw from start to end in degrees with 0 degrees along the x axis).

If the defined rectangle overlaps areas that already have material points or previously was defined as a hole, those areas will be ignored.

Oval Command

A scripted Oval command defines a region to be filled with material points or to be defined as a hole:

Oval (xmin),(xmax),(ymin),(ymax),<(arcStart)>,<(arcEnd)>

In XML files, the command is:

<Oval xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)'>
   <arc start='(arcStart)' end='(arcEnd)'/>
</Rect>

where

  • (xmin),(xmax),(ymin), and (ymax) are the x and y extents of the rectangle (or R and Z extents if axisymmetric) that encloses the oval. If xmax<xmin or ymax<ymin, they will be automatically switched to define the oval. The units are length units (or determined by a units attribute in XML files).
  • (arcStart) and (arcEnd) are optional parameters that limit the shape to an to arc of the oval (ccw from start to end in degrees with 0 degrees along the x axis).

If the defined oval overlaps areas that already have material points or previously was defined as a hole, those areas will be ignored.

PolyPt Command

In scripted files, a series of PolyPt commands is used to define a polygonal region to be filled with material points or to be defined as a hole:

PolyPt (x1),(y1)
PolyPt (x2),(y2)
  ...
PolyPt (xn),(yn)
PolyPt

In XML files, a polygon is defined with a <Polygon> block:

<Polygon>  
  <pt x='(x1)' y='(y1)'/>  
  <pt x='(x2)' y='(x2)'/>
    ...
  <pt x='(xn)' y='(yn)'/>
</Polygon>

where

  • (xi),(yi) (for i = 1 to n) are the x and y coordinates of the each point in the polygon (or R and Z if axisymmetric) with the last point (xn),(yn)) being connected to the first ((x1),(y1)). If the PolyPt arguments are omitted, the polygon is closed. The units are length units (or determined by a units attribute in XML files).

A blank PolyPt command in scripted files is only needed if you need to define more than one polygon in the same region. The blank command will finish the current one and the next one will start with the next PolyPt command. Intervening Rect and Oval commands or the end of a block will also stop the current polygon; in these cases the blank PolyPt is not needed.

If the defined polygon overlaps areas that already have material points or previously was defined as a hole, those areas will be ignored.

Using 2D Images

You can convert pixels in 2D images into material points using BMRegion commands.