Difference between revisions of "2D MPM Shape Commands"

From OSUPDOCS
Jump to navigation Jump to search
Line 1: Line 1:
These shape commands are used in 2D or axisymmetric MPM simulations within [[MPM Region and Hole Commands|<tt>Region</tt> and <tt>Hole</tt> commands]] to discretize an object for the calculations. Besides these shapes, you can also [[BMPRegion Command|discretize objects directly from images]].
These shape commands are used in 2D or axisymmetric MPM simulations within [[MPM Region and Hole Commands|<tt>Region</tt> and <tt>Hole</tt> commands]] to discretize an object for the calculations.
__TOC__
__TOC__
== Rect Command ==
== Rect Command ==

Revision as of 09:28, 7 December 2013

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)

In XML files, the command is:

<Rect xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)'/>

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 mm (or determined by a units attribute in XML files).

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)

In XML files, the command is:

<Oval xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)'/>

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 mm (or determined by a units attribute in XML files).

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 mm (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.