Difference between revisions of "FEA Mesh Generation Commands"

From OSUPDOCS
Jump to navigation Jump to search
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
The best way to generate an FEA mesh is to use [[Keypoint Command|Keypoint]], [[Path Command|Path]], and [[Area Command|Area]] commands. Advanced mesh generation can be done with [[Create a Mesh with Images and Shapes|image files and shape]] commands.
The best way to generate an FEA mesh is to use [[Keypoint Command|Keypoint]], [[Path Command|Path]], and [[Area Command|Area]] commands.
 
__TOC__
== Scripted Input Files ==
== Scripted Input Files ==


In scripted input files, you build the mesh by using multiple [[#Basic Commands|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 <tt>#length</tt>, height <tt>#height</tt>, and thickness <tt>#thick</tt> with <tt>#horiz</tt> elements in the horizontal direction and <tt>#vert</tt> elements in the vertical direction (where terms beginning in number signs are [[Variable Names|script variables]]) can be created with:
In scripted input files, you build the mesh by using multiple [[#mesh_cmds|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 <tt>#length</tt>, height <tt>#height</tt>, and thickness <tt>#thick</tt> with <tt>#horiz</tt> elements in the horizontal direction and <tt>#vert</tt> elements in the vertical direction (where terms beginning in number signs are [[Variable Names|script variables]]) can be created with:


  Area #matname$,#thick
  Area #matname$,#thick
Line 19: Line 19:
   EndPath
   EndPath
   Path "Left",#vert
   Path "Left",#vert
     Keypoints "TopLeft","BotRIght"
     Keypoints "TopLeft","BotRight"
   EndPath
   EndPath
  EndArea
  EndArea
  Resequence "BotRight"
  Resequence "BotRight"


==== Basic Commands ====
<span id="mesh_cmds"></span>The following commands are used for generating the mesh in scripted files.
 
The fundamental commands for generating a mesh are


* [[Area Command|Area]]: Define an area for mesh generation.
* [[Area Command|Area]]: Define an area for mesh generation.
Line 33: Line 31:
* [[Keypoint Command|Keypoint]]: Define a keypoint used in defining [[Path Command|paths]]
* [[Keypoint Command|Keypoint]]: Define a keypoint used in defining [[Path Command|paths]]
* [[Keypoint Command|Keypoints]]: Add multiple defined keypoints to a [[Path Command|path]].
* [[Keypoint Command|Keypoints]]: Add multiple defined keypoints to a [[Path Command|path]].
 
* [[Resequence Command]]: To turn on the option to resequence the nodes, which will minimize the bandwidth of the problem and speed the calculations.
==== 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 ====
 
See [[Create a Mesh with Images and Shapes]].
 


== XML Input Files ==
== XML Input Files ==


In <tt>XML</tt> input files, you build the mesh with [[#Mesh Generation Commands|mesh generation commands]] that must be within a single Mesh block:
In <tt>XML</tt> input files, you build the mesh with [[#mesh_cmds_xml|mesh generation commands]] that must be within a single <tt><Mesh></tt> block. Here is a <tt><Mesh></tt> block that creates at 50X10 rectangular mesh with 6 elements in the horizontal direction and 3 in the vertical direction:


<pre>
<pre>
Line 76: Line 63:
   &lt;/Path&gt;
   &lt;/Path&gt;


   &lt;<a href="#Areas"><code>Area</code></a> mat="1" thick="10" type="4" flip="0" angle="0"&gt;
   &lt;Area mat="1" thick="10" type="4" flip="0" angle="0"&gt;
     &lt;path id="bottom"/&gt;
     &lt;path id="bottom"/&gt;
     &lt;path id="right"/&gt;
     &lt;path id="right"/&gt;
Line 83: Line 70:
   &lt;/Area&gt;
   &lt;/Area&gt;
&lt;/Mesh&gt;
&lt;/Mesh&gt;
&lt;!-- image and shape methods to set element properties --&gt;
&lt;BMP name="MatImage.bmp" width="50" angles="MatAngles.bmp"&gt;
  &lt;Origin x="0" y="0"/&gt;
  &lt;Intensity mat="2" imin="76" imax="255"&gt;
    &lt;Thickness units="mm"&gt;1&lt;/Thickness&gt;
  &lt;/Intensity&gt;
  &lt;Intensity mat="3" imin="1" imax="75"&gt;
    &lt;Thickness units="mm"&gt;1&lt;/Thickness&gt;
  &lt;/Intensity&gt;
  &lt;Intensity imin="0" imax="255" minAngle="0.000000" maxAngle="90.000000"/&gt;
&lt;/BMP&gt;
&lt;Body mat='1' angle='0' thick='1'&gt;
  &lt;Oval units='mm' xmin='10' xmax='40' ymin='10' ymax='40'/&gt;
  &lt;Rect units='mm' xmin='10' xmax='40' ymin='10' ymax='40'/&gt;   
&lt;/Body&gt;
&lt;Hole&gt;
  &lt;Rect xmin='20' xmax='30' ymin='20' ymax='30'/&gt;   
&lt;/Hole&gt;
</pre>
</pre>


==== Mesh Generation Commands ====
<span id="mesh_cmds_xml"></span>The fundamental <tt>XML</tt> commands for generating a mesh are:
 
The fundamental <tt>XML</tt> commands for generating a mesh are:
 
* [[Area Command#XML Area Block|Area]]: Define an area for mesh generation.
* [[Path Command|Path]]: Define a path used in defining [[Area Command#XML Area Block|areas]].
* [[Keypoint Command|Keypoints]]: Define a keypoint used in defining [[Path Command|paths]]


==== Paths ====
* [[Keypoint Command#XML Keypoints Block|<tt><Keypoints></tt>]]: Define all key point to be used in defining [[Path Command|paths]]
* [[Path Command#XML Path Command|<tt><Path></tt>]]: Define a path to be used in defining [[Area Command#XML Area Block|areas]].
* [[Area Command#XML Area Block|<tt><Area></tt>]]: Define an area for mesh generation.
* [[Resequence Command]]: To turn on the option to resequence the nodes, which will minimize the bandwidth of the problem and speed the calculations.


Following the <tt>&lt;Keypoints&gt;</tt>, there are a series of <tt>&lt;Path&gt;</tt> commands that link the key points into lines or arcs and define mesh information along those paths. Subordinate to each <tt>&lt;Path&gt;</tt> command are a series of <tt>&lt;keypt&gt;</tt> 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 <tt>id</tt>. The attributes for a <tt>&lt;Path&gt;</tt> command are:
== Using Images and Shapes ==


*<tt>id</tt>: An <tt>id</tt> for the path. The <tt>id</tt>'s can be text or numbers and must be unique among all paths.
If some elements in the generated mesh are set the material id _NONE_ (see [[Area Command]]) or mat = 0 (see [[Area Command#XML Area Block|<tt><Area></tt> Command]]), you can follow mesh creation with [[Create a Mesh with Images and Shapes|image and shape commands]] to fill in material types, angles, and define the final mesh geometry. This option is described [[Create a Mesh with Images and Shapes|here]].
*<tt>intervals</tt>: Number of elements along this path when it is meshed into an area.
* <tt>ratio</tt>: Ratio of the size of the first element along the path to the last one. If <tt>ratio<0</tt>, then the absolute size of the first element on the path with be <tt>|ratio|</tt>. The default is 1.0 which gives equally sized elements.

Latest revision as of 13:17, 2 June 2015

The best way to generate an FEA mesh is to use Keypoint, Path, and Area 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"

The following commands are used for generating the mesh in scripted files.

  • Area: Define an area for mesh generation.
  • Path: Define a path used in defining areas.
  • Paths: Add multiple defined paths to an area.
  • Keypoint: Define a keypoint used in defining paths
  • Keypoints: Add multiple defined keypoints to a path.
  • Resequence Command: To turn on the option to resequence the nodes, which will minimize the bandwidth of the problem and speed the calculations.

XML Input Files

In XML input files, you build the mesh with mesh generation commands that must be within a single <Mesh> block. Here is a <Mesh> block that creates at 50X10 rectangular mesh with 6 elements in the horizontal direction and 3 in the vertical direction:

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

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

The fundamental XML commands for generating a mesh are:

  • <Keypoints>: Define all key point to be used in defining paths
  • <Path>: Define a path to be used in defining areas.
  • <Area>: Define an area for mesh generation.
  • Resequence Command: To turn on the option to resequence the nodes, which will minimize the bandwidth of the problem and speed the calculations.

Using Images and Shapes

If some elements in the generated mesh are set the material id _NONE_ (see Area Command) or mat = 0 (see <Area> Command), you can follow mesh creation with image and shape commands to fill in material types, angles, and define the final mesh geometry. This option is described here.