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 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. Besides these shapes, you can also [[BMPRegion Command|discretize objects directly from images]].
 
__TOC__
== Rect Command ==
== Rect Command ==


A scripted <tt>Rect</tt> command defines a region to be assigned element materials or to be defined as a hole:
A scripted <tt>Rect</tt> command defines a region to be filled with material points or to be defined as a hole:


  Rect (xmin),(xmax),(ymin),(ymax)
  Rect (xmin),(xmax),(ymin),(ymax)
Line 15: Line 15:
* <tt>(xmin),(xmax),(ymin)</tt>, and <tt>(ymax)</tt> 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|units attribute]] in <tt>XML</tt> files).
* <tt>(xmin),(xmax),(ymin)</tt>, and <tt>(ymax)</tt> 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|units attribute]] in <tt>XML</tt> files).


If the defined rectangle overlaps areas that already has assigned elements, or has been defined as a hole, those areas will be ignored.
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 ==
== Oval Command ==


A scripted <tt>Oval</tt> command defines a region to be assigned element materials or to be defined as a hole:
A scripted <tt>Oval</tt> command defines a region to be filled with material points or to be defined as a hole:


  Oval (xmin),(xmax),(ymin),(ymax)
  Oval (xmin),(xmax),(ymin),(ymax)
Line 31: Line 31:
* <tt>(xmin),(xmax),(ymin)</tt>, and <tt>(ymax)</tt> 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|units attribute]] in <tt>XML</tt> files).
* <tt>(xmin),(xmax),(ymin)</tt>, and <tt>(ymax)</tt> 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|units attribute]] in <tt>XML</tt> files).


If the defined oval overlaps areas that already has assigned elements, or has been defined as a hole, those areas will be ignored.
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 ==
== PolyPt Command ==


In scripted files, a series of <tt>PolyPt</tt> commands is used to define a polygonal region to be assigned element materials, or to be defined as a hole:
In scripted files, a series of <tt>PolyPt</tt> 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 (x1),(y1)
Line 57: Line 57:


A blank <tt>PolyPt</tt> 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 <tt>PolyPt</tt> command. Intervening [[#Rect Command|<tt>Rect</tt>]] and [[#Oval Command|<tt>Oval</tt>]] commands or the end of a block will also stop the current polygon; in these cases the blank <tt>PolyPt</tt> is not needed.
A blank <tt>PolyPt</tt> 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 <tt>PolyPt</tt> command. Intervening [[#Rect Command|<tt>Rect</tt>]] and [[#Oval Command|<tt>Oval</tt>]] commands or the end of a block will also stop the current polygon; in these cases the blank <tt>PolyPt</tt> 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.

Revision as of 09:42, 21 November 2013

These shape commands are used in 2D or axisymmetric MPM simulations within Regionand Hole commands to discretize an object for the calculations. Besides these shapes, you can also discretize objects directly from images.

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.