Difference between revisions of "3D MPM Shape Commands"
Line 55: | Line 55: | ||
== Torus Command == | == Torus Command == | ||
A scripted <tt>Torus</tt> command defines a defines a toroidal volume to be filled with material points or defined as a hole: | |||
Torus (xmin),(xmax),(ymin),(ymax),(zmin),(zmax),(axis),<(radius)> | |||
In <tt>XML</tt> files, the command is: | |||
<Torus xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)' | |||
zmin='(zmin)' zmax='(zmax)' axis='(axis)' radius='(radius)'/> | |||
where | |||
* <tt>(xmin),(xmax),(ymin),(ymax),(zmin)</tt>, and <tt>(zmax)</tt> are the x, y, and z extents used to define the torus (see below). If xmax<xmin, ymax<ymin, or zmax<zmin, they will be automatically switched to define the box. The units are mm (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files). | |||
* <tt>(axis)</tt> is 1, 2, or 3 for the normal direction to the plane of the torus to be in the x, y, or z direction, respectively. | |||
* <tt>(radius)</tt> is an optional parameter to define the radius of the toroidal ring cross section in the plane of the torus. | |||
The <tt>(axis)</tt> parameter specifies the normal direction to the plane of the torus. The bounds for the directions in the plane of the torus (''e.g.'', x and y bounds when <tt>(axis)</tt> is 3) define an ellipsoid (or circle if the bounds have the same range) that runs through the center of the torodial ring. The bounds in the direction of the axis define top and bottom for the cross-section of the torodial ring. The cross section will be a circle with radius given by half the distance between the top and bottom. To have an eliptical cross section, you can specify optional <tt>(radius)</tt> parameter to define the radius of the cross section in the plane of the torus (while top and bottom give radius of the cross section in the axis direction). | |||
If the defined toroidal volume overlaps regions that already have material points or previously were defined as a hole, those regions will be ignored. | |||
== Faces or Pyramid == | == Faces or Pyramid == |
Revision as of 08:59, 7 December 2013
These shape commands are used in 3D MPM simulations within Region and Hole commands to discretize an object for the calculations. Besides these shapes, you can also discretize objects directly from a stack of images.
Box Command
A scripted Box command defines a region to be filled with material points or to be defined as a hole:
Box (xmin),(xmax),(ymin),(ymax),(zmin),(zmax)
In XML files, the command is:
<Box xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)' zmin='(zmin)' zmax='(zmax)'/>
where
- (xmin),(xmax),(ymin),(ymax),(zmin), and (zmax) are the x, y, and z extents of the cubical volume. If xmax<xmin, ymax<ymin, or zmax<zmin, they will be automatically switched to define the box. The units are mm (or determined by a units attribute in XML files).
If the defined cubical volume overlaps regions that already have material points or previously was defined as a hole, those regions will be ignored.
Sphere Command
A scripted Sphere command defines a region to be filled with material points or to be defined as a hole:
Sphere (xmin),(xmax),(ymin),(ymax),(zmin),(zmax)
In XML files, the command is:
<Sphere xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)' zmin='(zmin)' zmax='(zmax)'/>
where
- (xmin),(xmax),(ymin),(ymax),(zmin), and (zmax) are the x, y, and z extents of the cubical volume that encloses the spherical volume. If xmax<xmin, ymax<ymin, or zmax<zmin, they will be automatically switched to define the box. The units are mm (or determined by a units attribute in XML files).
If the defined spherical volume overlaps regions that already have material points or previously was defined as a hole, those regions will be ignored.
Cylinder Command
A scripted Cylinder command defines a cylindrical or conical region to be filled with material points or to be defined as a hole:
Cylinder (xmin),(xmax),(ymin),(ymax),(zmin),(zmax),(axis),<(radius)>
In XML files, the command is:
<Cylinder xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)' zmin='(zmin)' zmax='(zmax)' axis='(axis)' radius='(radius)'/>
where
- (xmin),(xmax),(ymin),(ymax),(zmin), and (zmax) are the x, y, and z extents of the cubical volume that encloses the cylindrical or conical volume. If xmax<xmin, ymax<ymin, or zmax<zmin, they will be automatically switched to define the box. The units are mm (or determined by a units attribute in XML files).
- (axis) is 1, 2, or 3 for the axial direction of the cylinder to be in the x, y, or z direction, respectively. This command can only define cylinders aligned with one of the global axes.
- (radius) is an optional parameter with a value between -1 and 1. This value gives the relative radius of the cylinder at the top (if > 0) or at the bottom of the cylinder (if < 0) while the opposite end will have relative radius of 1. Entering 0 gives a cone with a point on the top (to get a cone with point on the bottom enter a small negative number). The radius of the cylinder varies linearly along its length.
If the defined cylindrical or conical volume overlaps regions that already have material points or previously were defined as a hole, those regions will be ignored.
Torus Command
A scripted Torus command defines a defines a toroidal volume to be filled with material points or defined as a hole:
Torus (xmin),(xmax),(ymin),(ymax),(zmin),(zmax),(axis),<(radius)>
In XML files, the command is:
<Torus xmin='(xmin)' xmax='(xmax)' ymin='(ymin)' ymax='(ymax)' zmin='(zmin)' zmax='(zmax)' axis='(axis)' radius='(radius)'/>
where
- (xmin),(xmax),(ymin),(ymax),(zmin), and (zmax) are the x, y, and z extents used to define the torus (see below). If xmax<xmin, ymax<ymin, or zmax<zmin, they will be automatically switched to define the box. The units are mm (or determined by a units attribute in XML files).
- (axis) is 1, 2, or 3 for the normal direction to the plane of the torus to be in the x, y, or z direction, respectively.
- (radius) is an optional parameter to define the radius of the toroidal ring cross section in the plane of the torus.
The (axis) parameter specifies the normal direction to the plane of the torus. The bounds for the directions in the plane of the torus (e.g., x and y bounds when (axis) is 3) define an ellipsoid (or circle if the bounds have the same range) that runs through the center of the torodial ring. The bounds in the direction of the axis define top and bottom for the cross-section of the torodial ring. The cross section will be a circle with radius given by half the distance between the top and bottom. To have an eliptical cross section, you can specify optional (radius) parameter to define the radius of the cross section in the plane of the torus (while top and bottom give radius of the cross section in the axis direction).
If the defined toroidal volume overlaps regions that already have material points or previously were defined as a hole, those regions will be ignored.