Sample MPM Input Command File

From OSUPDOCS
Jump to navigation Jump to search

The two sample MPM input command files given below will run an analysis of two disks impacting each other

Scripted MPM Input Command File

TBD

Trial Run with Scripted MPM 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. These sample calculations are for two disks approach each other, impacting, and the bouncing back. The image below shows plot of stress in the x-direction in the middle of the impact event:

Beam.jpg

XML MPM Input Command File

<?xml version='1.0'?>
<!DOCTYPE JANFEAInput SYSTEM "/Users/nairnj/Programming/Cocoa_Projects/nairn-mpm-fea/NairnMPM/input/NairnMPM.dtd"
[
 <!ENTITY modulus "1.0">  <!-- modulus of the spheres -->
 <!ENTITY nu "0.33">      <!-- Poisson's ratio of the spheres -->
 <!ENTITY rho "1.5">      <!-- density of the spheres -->
 <!ENTITY vel "2500">     <!-- velocity of the approach -->
 <!ENTITY maxtime "20">   <!-- time to stop calculation (ms) -->
 <!ENTITY atime ".5">     <!-- archive time (ms) -->
 <!ENTITY cs "2">         <!-- cell size in grid (disks have diameter 30mm) -->
 <!ENTITY hmax "52">      <!-- semi grid size x direction -->
 <!ENTITY vmax "24">      <!-- semi grid size y direction -->
]>
<JANFEAInput version='3'>

  <Header>
    <Description>
2D simulation of two identical disks colliding in a head-on impact
    </Description>
    <Analysis>10</Analysis>
  </Header>

  <MPMHeader>
    <MaxTime units="ms">&maxtime;</MaxTime>
    <ArchiveTime units="ms">&atime;</ArchiveTime>
    <ArchiveRoot>Two_Disks_Results/USAVG.</ArchiveRoot>
    <MPMArchiveOrder>iYYYYNNNNNNNNNNNNY</MPMArchiveOrder>
    <GlobalArchiveTime units="ms">&atime;</GlobalArchiveTime>
    <GlobalArchive type="velx" matname="Disk 1"/>
    <GlobalArchive type="Kinetic Energy"/>
    <GIMP/>
  </MPMHeader>

  <Mesh output="file">
    <Grid xmin="-&hmax;" xmax="&hmax;" ymin="-&vmax;" ymax="&vmax;">
      <Horiz cellsize="&cs;" symmin="-&hmax;" symmax="&hmax;"/>
      <Vert cellsize="&cs;" symmin="-&vmax;" symmax="&vmax;"/>
    </Grid>
  </Mesh>

  <MaterialPoints>
    <Body matname="Disk 1" angle="0" thick="1" vx="&vel;" vy="0">
      <Oval xmin="-45" xmax="-15" ymin="-15" ymax="15"/>     
    </Body>
    <Body matname="Disk 2" angle="0" thick="1" vx="-&vel;" vy="0">
      <Oval xmin="15" xmax="45" ymin="-15" ymax="15"/>     
    </Body>
  </MaterialPoints>

  <Material Type="1" Name="Disk 1">
    <rho>ρ</rho>
    <E>&modulus;</E>
    <nu>ν</nu>
    <alpha>60</alpha>
  </Material>

  <Material Type="1" Name="Disk 2">
    <rho>ρ</rho>
    <E>&modulus;</E>
    <nu>ν</nu>
    <alpha>60</alpha>
  </Material>

</JANFEAInput>

Trial Run with XML MPM 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. To do a command-line trial run, first compile NairnMPM using the command-line method, which will install the executable in the NairnMPM/input folder. Next, run the following commands:

cd nairn-mpm-fea/NairnMPM/input
./NairnMPM XML_Input/TwoDisks.fmcmd > TwoDisks.mpm

The first command cd's to the nairn-mpm-fea project folder with the executable and a folder with an example XML input file TwoDisks.fmcmd. The second command runs the MPM calculations. These sample calculations are for two disks approach each other, impacting, and then bouncing back. The outfile file TwoDisks.mpm will have the plain text output results and archived results at various times will be in a Two_Disks_Results folder. To verify the results, open the new Cantilever.fea in your visualization tools (e.g., NairnFEAMPM or NairnFEAMPMViz). A sample plot of stresses during impact given above.