Sample FEA Input Command File

From OSUPDOCS
Revision as of 12:34, 28 May 2013 by Nairnj (talk | contribs) (Created page with "The two sample FEA input command files run an analysis for an end-loaded cantilever beam. __TOC__ == Scripted FEA Input Command File == <pre>! ********** Preamble Section *...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The two sample FEA input command files run an analysis for 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                  ! Element 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

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>