Difference between revisions of "Sample FEA Input Command File"
Line 136: | Line 136: | ||
==== Trial Run with XML FEA Input ==== | ==== Trial Run with XML FEA Input ==== | ||
These <XML> commands can be tried in [[NairnFEAMPM]] or [[NairnFEAMPMViz]] as described [[#Trial Run with Scripted FEA Input|above]]. Alternatively, they can be used to try out [[Options for Running Calculations|Command-Line Execution|command line execution]]. To do a command-line trial run, first compile [[NairnFEA]] using the command-line method, which will install the executable in the <tt>NairnFEA/input</tt> folder. Next < | These <XML> commands can be tried in [[NairnFEAMPM]] or [[NairnFEAMPMViz]] as described [[#Trial Run with Scripted FEA Input|above]]. Alternatively, they can be used to try out [[Options for Running Calculations|Command-Line Execution|command line execution]]. To do a command-line trial run, first compile [[NairnFEA]] using the command-line method, which will install the executable in the <tt>NairnFEA/input</tt> folder. Next, run the following commands: | ||
cd nairn-mpm-fea/NairnFEA/input | |||
./NairnFEA Cantilever.fmcmd > output.fea | |||
The <tt>XML</tt> input file <tt>Cantilever.fmcmd</tt> is in the <tt>nairn-mpm-fea</tt> project. This sample FEA calculation of an end-loaded cantilever beam will finish quickly. The file <tt>output.fea</tt> will have the text output results. To verify the results, open <tt>output.fea</tt> in your visualization tools (e.g., [[NairnFEAMPM]] or [[NairnFEAMPMViz]]). |
Revision as of 12:15, 29 August 2013
The two sample FEA input command files given below will run an analysis of an end-loaded cantilever beam.
Scripted FEA Input Command File
! ********** Preamble Section ********** Title "FEA Analysis of Cantilever Beam" Name "A nairn-mpm-fea Project Member" ! Header Header A cantilever beam that is clamped at its base and loaded on its free end with a single point load. EndHeader Analysis "Plane Stress FEA" Element "8 Node Quadrilateral" ! ********** Parameters Section ********** ! 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 ! Elements in vertical direction #load=500 ! End load in N #matname$="polymer" ! which material to use ! ********** Materials Section ********** Material "polymer","Polymer","Isotropic" E 2300 nu .33 a 60 Done ! ********** Meshing Section ********** 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 Condition Section ********** FixLine 0,0,0,#depth Displacement x Displacement y EndFixLine FixPoint "TopRight" Load y,#load EndFixPoint
Trial Run with Scripted FEA Input
These scripted commands can be tried out by copying all the commands and pasting them into an empty window in NairnFEAMPM or in NairnFEAMPMViz. When done, choose the "Analyze → Run FEA/MPM Analysis" menu command. The results will stream to a window. When they are done, you can visualize the results.
XML FEA Input Command File
<?xml version='1.0'?> <!DOCTYPE JANFEAInput SYSTEM '/Users/jnairn/Programming/Cocoa_Projects/nairn-mpm-fea/NairnFEA/input/NairnFEA.dtd'> <JANFEAInput version="3"> <Header> <Description> 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.000000" y="0.000000" id="BotLeft"/> <pt x="50.000000" y="0.000000" id="BotRight"/> <pt x="50.000000" y="10.000000" id="TopRight"/> <pt x="0.000000" y="10.000000" id="TopLeft"/> </Keypoints> <Path id="Bottom" intervals="6"> <keypt id="BotLeft"/> <keypt id="BotRight"/> </Path> <Path id="Right" intervals="3"> <keypt id="BotRight"/> <keypt id="TopRight"/> </Path> <Path id="Top" intervals="6"> <keypt id="TopRight"/> <keypt id="TopLeft"/> </Path> <Path id="Left" intervals="3"> <keypt id="TopLeft"/> <keypt id="BotLeft"/> </Path> <Area mat="1" thick="10.000000" type="3" flip="0"> <path id="Bottom"/> <path id="Right"/> <path id="Top"/> <path id="Left"/> </Area> </Mesh> <Material Type="1" Name="Polymer"> <E>2300</E> <nu>0.33</nu> <alpha>60</alpha> </Material> <GridBCs> <BCLine x1="0" y1="0" x2="0" y2="10"> <DisBC dof="1" disp="0"/> <DisBC dof="2" disp="0"/> </BCLine> <BCPt keypt="TopRight"> <LoadBC dof="2" load="500"/> </BCPt> <Resequence keypt="BotRight"/> </GridBCs> </JANFEAInput>
Trial Run with XML FEA Input
These <XML> commands can be tried in NairnFEAMPM or NairnFEAMPMViz as described above. Alternatively, they can be used to try out Command-Line Execution|command line execution. To do a command-line trial run, first compile NairnFEA using the command-line method, which will install the executable in the NairnFEA/input folder. Next, run the following commands:
cd nairn-mpm-fea/NairnFEA/input ./NairnFEA Cantilever.fmcmd > output.fea
The XML input file Cantilever.fmcmd is in the nairn-mpm-fea project. This sample FEA calculation of an end-loaded cantilever beam will finish quickly. The file output.fea will have the text output results. To verify the results, open output.fea in your visualization tools (e.g., NairnFEAMPM or NairnFEAMPMViz).