Create a Mesh with Images and Shapes
One way to create a complicated FEA mesh, especially composite materials with complex structures of subelements, is to define them with image and shape commands.
Introduction
An advanced method for creating FEA meshes is to create them using image and shape commands. The process to use these commands is:
- Create a standard mesh, which can be done by generating or explicitly defining a mesh. Each area (in generated meshes) or element (in explicitly defined meshes) can be assigned to various materials. For sections of the mesh that will be set from a image or shape commands, set the material argument in the Area Command to _NONE_ or the mat attribute of XML commands to 0. The material will be determined later by subsequent image and shape commands.
- Once the initial mesh is ready, use one or more interspersed BMPRegion, Region, or Hole commands (in XML files, the corresponing commands are <BMP>, <Body>, or <Hole> commands). These commands will map elements covered by the image or by shapes to the material associated with the command. The grid can be regular or irregular. The material will be selected by comparing the centroid of the element to same location in an image or to see if it is contained in a shape. To resolve complicated structures, the grid has to be fine enough to resolve material boundaries.
- When the mesh is done, any elements initialized to _NONE_ (or mat=0) but not assigned to a material by an image or shape command will automatically be removed from the mesh. This feature allows calculations on materials with voids or irregular edges without needing to use complicated Area commands to construct the shape. If these removals cause the mesh to be partitioned into disconnected sections, however, the FEA analysis will fail. A good way to verify connectivity is to attempt to resequence the nodes.
- For scripted files, use the scripted image and shape commands. For XML files, use the XML image and shape commands.
Scripted Images and Shapes
The main commands for creating a mesh from images and shapes are:
- BMPRegion Command: Generate elements from an image in a BMP file.
- Region Command: Generate elements using a series of shape commands.
- Hole Command: Remove elements using a series of shape commands.
The available 2D shapes for create FEA meshes are:
- Rect Command: Define rectangle to set element material type.
- Oval Command: Define oval to set element material type.
- PolyPt Command: Define polygon to set element material type
XML Images and Shapes
The main commands for creating a mesh from images and shapes in XML files are:
- <BMP> Command: Generate elements from an image in a BMP file.
- <Body> Command: Generate elements using a series of shape commands.
- <Hole> Command: Remove elements using a series of shape commands.
The available 2D shapes for create FEA meshes are:
- <Rect> Command: Define rectangle to set element material type.
- <Oval> Command: Define oval to set element material type.
- <PolyPt> Command: Define polygon to set element material type
<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>
The image and shape commands are:
<BMP>
- The details on the
<BMP>
command and the meaning of its attributes and subordinate commands are given <a href="definempm.html#BMPShape">here</a> (in the MPM documentation). <Body>
- Defines a block of material. All material points in the block will be assigned the same material
number (
mat
, see <a href="definematl.html">Defining Materials</a>; numbers can be replaced by names using amatname
attribute as explained <a href="definematl.html#usemats">here</a>), material angle (angle
in degrees which is used for some <a href="definematl.html">anisotropic materials</a>; t can be entered as a number or as a <a href="function.html">user-defined function</a>), and thickness (thick
in mm) A single<Body>
for 2D FEA can contain any number of the <a href="definempm.html#2DShapes">2D shape commands</a>. The shapes can overlap; if they do the element material will be for the first shape command that intersects that elements centroid. If not specified angle will be zero and the thickness will be 1 mm. <Hole>
- Defines empty space within a body. A single
<Hole>
group for 2D FEA can contain any number of the <a href="definempm.html#2DShapes">2D shape commands</a>. Any subsequent<BMP>
or<Body>
structures that overlap the hole will not assign those elements.