FEA Mesh Generation Commands

From OSUPDOCS
Revision as of 11:31, 30 August 2013 by Nairnj (talk | contribs)
Jump to navigation Jump to search

The best way to generate an FEA mesh is to use Keypoint, Path, and Area commands. Advanced mesh options can be done with image files and shape commands.

Scripted Input Files

In scripted input files, you build the mesh by using multiple mesh generation commands. These commands are usually grouped together, but may be at various locations in the input file. For example, a simple 2D, rectangular mesh of width #length, height #height, and thickness #thick with #horiz elements in the horizontal direction and #vert elements in the vertical direction (where terms beginning in number signs are script variables) can be created with:

Area #matname$,#thick
  Path "Bottom",#horiz
    Keypoint "BotLeft",0,0
    Keypoint "BotRight",#length,0
  EndPath
  Path "Right",#vert
    Keypoints "BotRight"
    Keypoint "TopRight",#length,#height
  EndPath
  Path "Top",#horiz
    Keypoints "TopRight"
    Keypoint "TopLeft",0,#height
  EndPath
  Path "Left",#vert
    Keypoints "TopLeft","BotRIght"
  EndPath
EndArea
Resequence "BotRight"

Basic Commands

The fundamental commands for generating a mesh are

Mesh Attribute Commands

  • <a href="Origin.html">Origin</a>: Define coordinate system origin for entry of <a href="keypoint.html">Keypoints</a> using polar coordinates.
  • <a href="element.html">Element</a>: Define type of element to use in the mesh.
  • <a href="fliptriangles.html">FlipTriangles</a>: Select the direction of triangular elements in meshes that use those elements.
  • <a href="resequence.html">Resequence</a>: To turn on the option to resequence the nodes, which will minimize the bandwidth of the problem and speed the calculations.

Creating a Mesh Using Image and Shape Commands

  • <a href="bmpregion.html">BMPRegion</a> ... <a href="endregion.html">EndRegion</a>: Generate elements from an image in a BMP file.
  • <a href="hole.html">Hole</a> ... <a href="endhole.html">EndHole</a>: Remove elements using a series of shape commands.
  • <a href="oval.html">Oval</a>: Define oval to set element material type.
  • <a href="polypt.html">PolyPt</a>: Define polygon to set element material type
  • <a href="rect.html">Rect</a>: Define rectangle to set element material type.
  • <a href="region.html">Region</a> ... <a href="endregion.html">EndRegion</a>: Generate elements for a series of shape commands.

XML Input Files

In XML input files, you build the mesh with mesh generation commands that must be within a single Mesh block:

<Mesh>
  <Keypoints>
    <pt x='0' y='0' id='lowerleft'/>
    <pt x='0' y='10' id='upperleft'/>
    <pt x='50' y='0' id='lowerright'/>
    <pt x='50' y='10' id='upperright'/>
  </Keypoints>

  <Path id="bottom" intervals='6' ratio='1'>
    <keypt id='lowerleft'/>
    <keypt id='lowerright'/>
  </Path>
  <Path id="right" intervals='3'>
    <keypt id='lowerright'/>
    <keypt id='upperright'/>
  </Path>
  <Path id="top" intervals='6'>
    <keypt id='upperright'/>
    <keypt id='upperleft'/>
  </Path>
  <Path id="left" intervals='3'>
    <keypt id='upperleft'/>
    <keypt id='lowerleft'/>
  </Path>

  <<a href="#Areas"><code>Area</code></a> mat="1" thick="10" type="4" flip="0" angle="0">
    <path id="bottom"/>
    <path id="right"/>
    <path id="top"/>
    <path id="left"/>
  </Area>
</Mesh>

<!-- image and shape methods to set element properties -->

<BMP name="MatImage.bmp" width="50" angles="MatAngles.bmp">
  <Origin x="0" y="0"/>
  <Intensity mat="2" imin="76" imax="255">
    <Thickness units="mm">1</Thickness>
  </Intensity>
  <Intensity mat="3" imin="1" imax="75">
    <Thickness units="mm">1</Thickness>
  </Intensity>
  <Intensity imin="0" imax="255" minAngle="0.000000" maxAngle="90.000000"/>
</BMP>

<Body mat='1' angle='0' thick='1'>
   <Oval units='mm' xmin='10' xmax='40' ymin='10' ymax='40'/>
   <Rect units='mm' xmin='10' xmax='40' ymin='10' ymax='40'/>     
</Body>

<Hole>
   <Rect xmin='20' xmax='30' ymin='20' ymax='30'/>     
</Hole>

Mesh Generation Commands

The fundamental XML commands for generating a mesh are:

  • Area: Define an area for mesh generation.
  • Path: Define a path used in defining areas.
  • Keypoints: Define a keypoint used in defining paths

Paths

Following the <Keypoints>, there are a series of <Path> commands that link the key points into lines or arcs and define mesh information along those paths. Subordinate to each <Path> command are a series of <keypt> commands that list the key points that define the path. Use two key points to define a line or three key points to define an arc. Currently the path can only have two or three key points. The key points are selected by their id. The attributes for a <Path> command are:

  • id: An id for the path. The id's can be text or numbers and must be unique among all paths.
  • intervals: Number of elements along this path when it is meshed into an area.
  • ratio: Ratio of the size of the first element along the path to the last one. If ratio<0, then the absolute size of the first element on the path with be |ratio|. The default is 1.0 which gives equally sized elements.