Difference between revisions of "MPM Region and Hole Commands"

From OSUPDOCS
Jump to navigation Jump to search
Line 58: Line 58:


Between the <tt>Hole</tt> command and the subsequent <tt>EndHole</tt> command (or within the <tt><Hole></tt> block), there can be any number of [[#Rect Command|<tt>Rect</tt>]],  [[#Oval Command|<tt>Oval</tt>]], and [[#PolyPt Command|<tt>PolyPt</tt>]] commands to define the geometry whose elements should be removed.
Between the <tt>Hole</tt> command and the subsequent <tt>EndHole</tt> command (or within the <tt><Hole></tt> block), there can be any number of [[#Rect Command|<tt>Rect</tt>]],  [[#Oval Command|<tt>Oval</tt>]], and [[#PolyPt Command|<tt>PolyPt</tt>]] commands to define the geometry whose elements should be removed.
== Rect Command ==
A scripted <tt>Rect</tt> command defines a region to be assigned element materials or to be defined as a hole:
Rect (xmin),(xmax),(ymin),(ymax)
In <tt>XML</tt> files, the command is:
<Rect xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)'/>
where
* <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.
== Oval Command ==
A scripted <tt>Oval</tt> command defines a region to be assigned element materials or to be defined as a hole:
Oval (xmin),(xmax),(ymin),(ymax)
In <tt>XML</tt> files, the command is:
<Oval xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)'/>
where
* <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.
== 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:
PolyPt (x1),(y1)
PolyPt (x2),(y2)
  ...
PolyPt (xn),(yn)
PolyPt
In <tt>XML</tt> files, a polygon is defined with a <tt><Polygon></tt> block:
<Polygon> 
  <pt x='(x1)' y='(y1)'/> 
  <pt x='(x2)' y='(x2)'/>
    ...
  <pt x='(xn)' y='(yn)'/>
</Polygon>
where
* <tt>(xi),(yi)</tt> (for i = 1 to n) are the <tt>x</tt> and <tt>y</tt> coordinates of the each point in the polygon (or <tt>R</tt> and <tt>Z</tt> if axisymmetric) with the last point <tt>(xn),(yn)</tt>) being connected to the first (<tt>(x1),(y1)</tt>). If the <tt>PolyPt</tt> arguments are omitted, the polygon is closed. The units are mm (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files).
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.

Revision as of 14:07, 20 November 2013

In MPM, the most common way to discretize an object is to add material points to the background grid using Region commands and to designate regions of the grid has having no material points using Hole commands. Enclosed in these commands are various shape commands to define the object. An alternative and powerful option for discretizing an object is to create material points automatically from an image of the object.

Region Commands

Once the background grid is created, material points are added to the grid using a series of Region commands (or <Body> commands in XML files). In scripted files, the Region command defines material type, initial velocity, thickness (in 2D), and optionally an initial angle (for some anisotropic materials), temperature, and concentration. The command is

Region (matid),(velx),(vely),(velz) or (thick),<(property),(value)>...
  (any number of shape commands)
EndRegion

In XML files, regions are defined using <Body> elements and optional one PointList element. All these element must be withinthe single MaterialPoints element in the input file:

<MaterialPoints>
  <PointList>
    (see help on creating individual material points)
  </PointList>
 
  <Body mat='(matid)' vx='(velx)' vy='(vely)' vz='(velz)' thick='(thick)'
                         angle='(angle)' temp='(temp)' conc='(conc)' wtconc='(wtconc)'>
    (any number of shape commands)     
  </Body>

  ....
</MaterialPoints>

where

  • (matid) is the material ID for a previously defined material.
  • (velx), (vely), and (velz) are the components of the initial velocity for for all particles in the region (velx is only used for 3D simulations). The units or mm/sec
  • (thick) is the thickness of each material point in mm. The thickness is only used for planar 2D calculations. In scripted files, the thickness parameter should still be provided for parameter alignment, although its value is ignored.

After the above required parameters, you can provide one to three optional parameters to set initial conditions for all particles in the region. In scripted files, the optional parameters appear in pairs. The first item in the pair, or (property), is the name of initial property to set and the second item, or (value), is the initial value for the property. In XML files, the optional parameters are three optional attributes:

  • angle,(angle) to set the initial rotation angle for the material axes about the z axis. The units are degrees. This parameter is sufficient for 2D analysis with constant material angle. See help on setting material angles for methods to set variable angles or to set more than on rotation angle in 3D calculations.
  • temp,(temp) to set the initial particle temperature. The units are degrees.
  • conc,(conc) to set the initial particle concentration. The units concentration potential from 0 to 1.
  • (wtconc)to set concentration use weight fraction concentration (0 to 1) instead of concentration potential. The result potential is (wtcon) divided my the material saturation concentration weight fracture. This option is only available in XML input files.

Between the Region command and the subsequent EndRegion command (or within the <Body> element), there can be any number of shape commands to define material point positions. The details on these shape command are given elsewhere:

Hole Commands

Once the mesh is ready to use shapes, elements within shapes can be removed with a series of Hole commands (or <Hole> commands in XML files). In scripted files, the Hole command is:

Hole
  (any number of shape commands)
EndHole

In XML files, the <Body> block is:

<Hole>
  (any number of shape commands)    
</Hole>

Between the Hole command and the subsequent EndHole command (or within the <Hole> block), there can be any number of Rect, Oval, and PolyPt commands to define the geometry whose elements should be removed.