
The Steps in a Finite Element Analysis
This help topic summarizes the process of setting up and running finite element analysis (FEA) calculations. The discussion assumes the user is familiar with FEA and only needs to learn how to do FEA in NairnFEAMPM. See the References section for some suggested papers and books about FEA.
The basic steps for setting up and running FEA calculations are:
- Open or create an input commands file
- Set up the calculation commands by one of two methods:
- Run the FEA calculations
- Analyze and Plot the results
Quick Start FEA Calculations
To see a sample FEA analysis that illustrates the above process, try the following steps:
- Choose any of the "FEA Example" options in the New submenu in the File Menu. A new document will open with analysis commands for the loaded example. You can run "as is" or customize the example by editing the varibles in the "Parameters" section.
- Choose Run FEA/MPM Analysis from the Analyze Menu and select file name for saving the FEA results. The FEA analysis will run and the results will appear in a new window.
- Choose Mesh Plots from the Analyze Menu. A new window will open and plot the mesh. Select the desired result to plot from the pop-up menus. For example, select "Nodal Stress" and then select "xx" from the "Tensor" menu to see calculate x-direction stress.
Open or Create an Input Commands File
Calculations are controlled by an input commands file. Use the New→FEA Commands File menu command to create a new FEA commands file or use the Open menu command to open a previous commands file. Input commands files have the extension .fmcmd
meaning finite element or material point method input commands file.
Once opened, the window (as shown below) is used to edit the commands. The top part of the window is a tool bar with icons for common tasks (control click on the tool bar to customize the icons). The middle section is a text editing field for entering analysis commands. The bottom section holds the result of interpreting commands which will be the raw XML
commands that are input into the NairnFEA code engine. You can drag the bar to adjust the size of the two text fields.

Use NairnFEAMPM Commands
When using the built-in interpretive language, you use NairnFEAMPM Commands to set up the analysis. When the commands are done, use the Interpret Commands menu command to create the raw XML
input commands for NairnFEA. Each line is a command which must be formatted as explained in the command line syntax information. See the NairnFEAMPM Commands section for details of all possible commands (you can jump to any help on any command by control (or right) clicking on any line and choosing the menu command to show help on the clicked line). See the section on running FEA calculations when you are ready to do the calculations.
The following example of FEA commands illustrates the typical sections in an FEA command file. You can load these example commands into a new input commands file window by selecting New→FEA Sample - Cantilever Beam menu command in the File Menu. Each section is explained below the example.
! ---------- Preamble ! A cantilever beam analysis Title "FEA Analysis of Cantilever Beam" Name "A NairnFEAMPM User" Header A cantilever beam that is clamped at its base and loaded on its free end with a single point load. EndHeader ! ---------- Parameters ! Define variables for more general mesh generation capabilities #length=50 ! Length in mm #depth=10 ! Depth in mm #thick=10 ! Thickness in mm #horiz=6 ! Elements in horizontal direction #vert=3 ! Element in vertical direction #load=500 ! End load in N #matname="polymer" ! which material to use ! ---------- Analysis Type and Materials Analysis "Plane Stress FEA" Element "8 Node Quadrilateral" Material "polymer","Polymer","Isotropic" E 2300 nu .33 a 60 Done ! ---------- Create the Mesh Area #matname,#thick Path "Bottom",#horiz Keypoint "BotLeft",0,0 Keypoint "BotRight",#length,0 EndPath Path "Right",#vert Keypoint "BotRight" Keypoint "TopRight",#length,#depth EndPath Path "Top",#horiz Keypoint "TopRight" Keypoint "TopLeft",0,#depth EndPath Path "Left",#vert Keypoint "TopLeft" Keypoint "BotLeft" EndPath EndArea Resequence "BotRight" ! ---------- Boundary Conditions FixLine 0,0,0,#depth Displacement x Displacement y EndFixLine FixPoint "TopRight" Load y,#load EndFixPoint
The various command sections have the following functions:
Preamble Section
It is useful, but optional, to start all files with comments that describe the purpose of the commands. This section usually has a series of comment lines. A Header command is for comments that will by inlcuded in the output file for the calculations.
Parameters Section
For more general commands, it is good practice to use variables and expressions to define key properties of the analysis. These variables and expressions can be used as arguments to other commands. Variables can be defined any place in the file, but it can be helpful to collect the important variables in a parameters section near the top.
Analysis Type and Materials Section
This section has commands to set up the calculations, enter archiving options, define materials, and various other options. The NairnFEAMPM commands commonly used in this section are:
- Main Analysis Header commands
- Material definition commands
Meshing Section
This section has commands to define the FEA Mesh. See the FEA mesh definition commands for details.
Boundary Condition Section
This section has commands to apply boundary conditions such as fixed displacement, loads on nodes, and stresses on element faces. See the commands for applying FEA boundary bonditions and for thermal calculations.
Use Direct XML
Commands
Alternatively, you can enter and edit XML
commands to be directly input into the NairnFEA code engine. When running, XML
commands will simply be copied to the bottom field and then input to NairnFEA. The OSUPDocs wiki explains all the direct XML
commands.
The following example of direct XML
commands end loads a cantilever beam clamped at its base. Notice that the XML
commands can use any feature of XML
files such as defining and using entities. You can copy and paste this example to an input commands file window to run as an example FEA calculation.
<?xml version='1.0'?> <!DOCTYPE JANFEAInput SYSTEM 'NairnFEA.dtd' [ <!ENTITY modulus '2300'> <!ENTITY length '50'> <!ENTITY depth '10'> <!ENTITY thickness '10'> <!ENTITY load '500'> ]> <JANFEAInput version='3'> <Header> <Description> Name: A JANFEA User A cantilever beam that is clamped at its base and loaded on its free end with a single point load. </Description> <Analysis>1</Analysis> </Header> <Mesh> <Keypoints> <pt x='0' y='0' id='lowerleft'/> <pt x='0' y='&depth;' id='upperleft'/> <pt x='&length;' y='0' id='lowerright'/> <pt x='&length;' y='&depth;' id='upperright'/> </Keypoints> <Path id='bottom' intervals='6'> <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='&thickness' type='3'> <path id='bottom'/> <path id='right'/> <path id='top'/> <path id='left'/> </Area> </Mesh> <Material Type='1' Name='Polymer'> <E>&modulus;</E> <nu>0.33</nu> <alpha>100</alpha> </Material> <GridBCs> <BCLine x1='0' y1='0' x2='0' y2='&depth;' tolerance='.1'> <DisBC dof='1'/> <DisBC dof='2'/> </BCLine> <BCPt keypt='upperright'> <LoadBC dof='2' load='&load;'/> </BCPt> </GridBCs> </JANFEAInput>