Difference between revisions of "FEA Region and Hole Commands"

From OSUPDOCS
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
When using [[Create a Mesh with Images and Shapes|shapes]] to define an FEA mesh, use <tt>Region</tt> command to define material properties for elements and use <tt>Hole</tt> commands to remove elements from the mesh.
When using [[Create a Mesh with Images and Shapes|shapes]] to define an FEA mesh, use <tt>Region</tt> commands to define material properties for elements and use <tt>Hole</tt> commands to remove elements from the mesh.


== Region Commands ==
== Region Commands ==
Line 17: Line 17:
where
where


* (matid) is the material ID for a previously defined material.
* <tt>(matid)</tt> is the material ID for a previously defined [[FEA Material Models|material]].
* (thick) is the thickness of the region in mm.
* <tt>(thick)</tt> is the thickness of the region in [[ConsistentUnits Command#Legacy and Consistent Units|length units]].
* (angle) is an optional angle for the material which is only relevant for anisotropic materials. It can be entered as a number or as a [[User Define Functions|user-defined function]] of the coordinates for the element centroid. The units are degrees.
* <tt>(angle)</tt> is an optional angle for the material which is only relevant for [[FEA Material Models|anisotropic materials]]. It can be entered as a number or as a [[User Defined Functions|user-defined function]] of the coordinates for the element centroid. The units are degrees.


Between the <tt>Region</tt> command and the subsequent <tt>EndRegion</tt> command (or within the <tt><Body></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 will use the region's material properties.
Between the <tt>Region</tt> command and the subsequent <tt>EndRegion</tt> command (or within the <tt><Body></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 will use this region's material properties.


== Hole Commands ==
== Hole Commands ==
Line 37: Line 37:
  </Hole>
  </Hole>


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 ==
== Rect Command ==


A scripted <tt>Rect</tt> command defines a region to be assign element materials or to be defined as a hole:
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)
  Rect (xmin),(xmax),(ymin),(ymax),<(arcStart)>,<(arcEnd)>


In <tt>XML</tt> files, the command is:
In <tt>XML</tt> files, the command is:


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


where
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, the 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 [[ConsistentUnits Command#Legacy and Consistent Units|length units]] (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files).
* <tt>(arcStart)</tt> and <tt>(arcEnd)</tt> 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, 0&le;<tt>(arcStart)</tt>&lt;360, and <tt>(arcEnd)</tt>><tt>(arcStart)</tt>).


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 has assigned elements, or has been defined as a hole, those areas will be ignored.
Line 57: Line 60:
== Oval Command ==
== Oval Command ==


A scripted <tt>Oval</tt> command defines a region to be assign element materials or to be defined as a hole:
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)
  Oval (xmin),(xmax),(ymin),(ymax),<(arcStart)>,<(arcEnd)>


In <tt>XML</tt> files, the command is:
In <tt>XML</tt> files, the command is:


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


where
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, the 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 [[ConsistentUnits Command#Legacy and Consistent Units|length units]] (or determined by a [[Units Attribute|units attribute]] in <tt>XML</tt> files).
* <tt>(arcStart)</tt> and <tt>(arcEnd)</tt> 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, 0&le;<tt>(arcStart)</tt>&lt;360, and <tt>(arcEnd)</tt>><tt>(arcStart)</tt>).


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 has assigned elements, or has been 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:
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 [[ConsistentUnits Command#Legacy and Consistent Units|length units]] (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.
== Nested Shape Commands ==
By [[Nested Shapes|nesting shapes]], you can create many more types of shapes.
== Using 2D Images ==
You can also fill the mesh based on drawings in 2D images by using [[BMPRegion Command|BMPRegion commands]].

Latest revision as of 20:28, 5 December 2016

When using shapes to define an FEA mesh, use Region commands to define material properties for elements and use Hole commands to remove elements from the mesh.

Region Commands

Once the mesh is ready to use shapes, elements within shapes are assigned to materials by using a series of Region commands (or <Body> commands in XML files). In scripted files, the Region command defines material type, thickness, and angle (needed for some anisotropic materials):

Region (matid),(thick),<(angle)>
  (any number of shape commands)
EndRegion

In XML files, the <Body> block is:

<Body mat='(matid)' angle='(angle)' thick='(thick)'>
  (any number of shape commands)    
</Body>

where

  • (matid) is the material ID for a previously defined material.
  • (thick) is the thickness of the region in length units.
  • (angle) is an optional angle for the material which is only relevant for anisotropic materials. It can be entered as a number or as a user-defined function of the coordinates for the element centroid. The units are degrees.

Between the Region command and the subsequent EndRegion command (or within the <Body> block), there can be any number of Rect, Oval, and PolyPt commands to define the geometry whose elements will use this region's material properties.

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.

Rect Command

A scripted Rect command defines a region to be assigned element materials 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, 0≤(arcStart)<360, and (arcEnd)>(arcStart)).

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 Oval command defines a region to be assigned element materials 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)'/>
</Oval>

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, 0≤(arcStart)<360, and (arcEnd)>(arcStart)).

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 PolyPt 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 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.

Nested Shape Commands

By nesting shapes, you can create many more types of shapes.

Using 2D Images

You can also fill the mesh based on drawings in 2D images by using BMPRegion commands.