Running NairnFEA and NairnMPM

This page has information on running NairnFEA finite element calculations and NairnMPM material point method calculations. If you just compiled the code, it includes information on doing a test FEA or MPM calculation. The options for running calculations are:

Running Using NairnFEAMPM (Macintosh OS X only)

If you are using a Mac (with MacOS 10.4 or newer, Tiger), you can go to the NairnFEAMPM web site and download a complete package that lets you create input files using a command language or raw XML commands, run calculations, and visualize the results. This package only works in MacOS X and does not include the NairnFEA or NairnMPM source code.

If you are working directly with the source code, you can also run calculations using NairnFEAMPM, but there are few settings that are important

Running Using NairnFEAMPMViz Java Application (any platform)

You can run and visualize NairnFEA and NairnMPM calculations on any platform using the NairnFEAMPMViz Java application (note: if you are using a Mac (with MacOS 10.4 or newer, Tiger), NairnFEAMPMViz will work, but the recommendation is to use NairnFEAMPM because it faster and has more features). NairnFEAMPMViz started out only as a visualization tool, but now it lets you create and edit input XML files, launch calculation tasks, and visualize the results.

A prerequisite to running calculations in NairnFEAMPMViz is to download and compile the source code for NairnFEA and NairnMPM. On Windows, the compiling stage (no matter how it is done) requires installation of cygwin; cygwin is also needed to run calculations in NairnFEAMPMViz, but the steps taken during compiling are enough for it to be ready for use by NairnFEAMPMViz.

If you download a posted version of the NairnCode package, the NairnFEAMPMViz jar file will be in the NairnCode/Visualization/info folder. If the jar file is not there, you need to compile the application first. Once the application is ready, you need to start is using a method to make sure it gets enough memory. The method is described here. Once the application is started, do a test run as follows:

Running NairnFEA

Command-Line Execution

You can run NairnFEA from a Unix or Linux command line using:

NairnFEA [options] input > output

where

[options]
The options may be one or more of the following:
-v
Validate the input XML using the DTD file specified in the !DOCTYPE line in the preamble of the input file. If the specified DTD can not be found, the code will exit with an error message. If the input file has no !DOCTYPE, the validation will be skipped. The required DTD file can be found in the input directory of the source files.
-a
Read the input file, set up the mesh and all boundary conditions and then abort before any calculations. This option is useful to check that all commands have created the mesh and boundary conditions correctly before actually doing the analysis in a subsequent run.
-H
Display brief help message and then exit.
Multiple options can use separate options, such as -v -r , or combine them in one option, such as -vr.
input
The path name of the input XML file. The preferred extension for the input files is ".fmcmd".
output
The name of the output text file. The output of NairnFEA is to standard output and redirection should be used to save the output to a file. The preferred extension for the output file is ".fea".

Trial FEA Run

After obtaining and compiling the code, you can do a trial run with the following commands:

cd NairnCode/NairnFEA/input
./NairnMPM Cantilever.fmcmd > output.fea

The 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 requires visualization tools. See the visualization options section for the possible tools. The image below shows plot of stress in the x-direction for this sample problem.

beam example

Running NairnMPM

Command-Line Execution

You can run NairnMPM from a Unix or Linux command line using:

NairnMPM [options] input > output

where

[options]
The options may be one or more of the following:
-v
Validate the input XML using the DTD file specified in the !DOCTYPE line in the preamble of the file. If the specified DTD can not be found, the code will exit with an error message. If the input file has no !DOCTYPE, the validation will be skipped. The required DTD file can be found in the input directory of the source files.
-r
Reverse the bytes when writing results to archive files. This option can be useful when you are running calculations on one computer, but visualizing them on a different computer which uses a different byte order. For example. Macintosh computers and computers with Intel chips use opposite byte orders. This option can be omitted if you analyze on the same computer where you run the calculations or if you have analysis software that works with any byte order (such as all provided visualization options).
-a
Start the analysis, archive the initial conditions, and then abort the calculations. This option is useful to check that all commands have created the mesh, assigned material points, and created boundary conditions correctly before actually doing the analysis in a subsequent run.
-H
display brief help message and then exit.
Multiple options can use separate options, such as -v -r , or combine them in one option, such as -vr.
input
The path name of the input XML file. The preferred extension for the input files is ".fmcmd".
output
The name of the output text file. The output of NairnMPM is to standard output and redirection should be used to save the output to a file. The output file should be saved in the current working directory to insure correct relative paths between the output file and the archive files. The preferred extension for the output file is ".mpm".

Trial MPM Run

After obtaining and compiling the code, you can do a trial run with the following commands:

cd NairnCode/NairnMPM/input
./NairnMPM TwoDisks.fmcmd > output.mpm

The sample MPM calculation of two disks colliding should finish in a few seconds. The file output.mpm will have the text output results. The archive files should be in a folder created in that directory called TwoDisks.

To verify the results requires visualization tools. See the visualization options section for the possible tools. The image below shows plot of stress in the x-direction at three different times. Click here to see a short movie of the same stress.

two disks example