Options for Running Calculations

From OSUPDOCS
Jump to: navigation, search

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 test calculations.

Contents

Running Using NairnFEAMPM (Macintosh OS X only)

If you are using a Mac, you can go to the NairnFEAMPM web site and download a complete package that lets you create input files using a scripting language or raw XML commands, run calculations, and visualize the results. This package only works in MacOS X and does not include the code engines' source code. If you are working directly with the source code, you can still run calculations using NairnFEAMPM, but first you have to configure it to use to new compiled code engines in place of the embedded code engines. To make that change consult to "Code Engine Development" topic in the help window.

To do a test calculation, choose the "New → FEA Example" or "New → MPM Example" command, and then choose the "Analyze → Run FEA/MPM Analysis" command. The text output will stream to a window. When it is done you can use built-in tools to visualize the results. For all the details on running calculations and on visualizing results, you can consult the help window within NairnFEAMPM.

Running Using NairnFEAMPMViz Java Application (any platform)

You can run and visualize NairnFEA and NairnMPM (or OSParticulas if you are using it) calculations on any platform using the NairnFEAMPMViz Java application. NairnFEAMPMViz lets you create input files using a scripting language or raw XML commands, run calculations, and visualize the results. (Note: if you are using a Mac NairnFEAMPMViz will work, but the recommendation is to use NairnFEAMPM because it faster and has more features).

See documentation on NairnFEAMPMViz to learn how to launch the Java application and how to try a test calculation.

Command-Line Execution

You can run calculations on any platform using a command line window in Mac, Linux, or cygwin in Windows. If you compiled in Windows using Visual Studio, you can use these same methods (substituting Window's file paths as needed) in a DOS command window. The following sections give brief instructions.

Running NairnFEA

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

NairnFEA [options] input > output

where

  • [options] are 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 cannot 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 NairnFEA/input and NairnMPM/input directories of the nairn-mpm-fea project. As explained below, this option should always be used when running from a command line.
    -np 4 
    Set the number of processors to use for parallel execution (required compilation of the parallel version of NairnFEA.
    -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.
    -w 
    When this option is not used, relative file names for output files and for input of bmp files are resolved as being relative to the input file. When this option is used, relative file names are resolved instead to the current working directory.
    -H 
    Display brief help message and then exit.
    -? 
    Display brief help message and then exit.
  • input is the path name of the input XML file. The preferred extension for the input files is .fmcmd.
  • output is 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.

Note that NairnFEA checks many command options, but not all. Most commonly, a typo in an XML command name or attribute or use of an invalid attribute may or may not trigger an error. If you have such errors, the resulting FEA analysis may be very different than the one you expected. For this reason, when using command-line execution, you should always include the -v option to validate the input file.

See the sample FEA input XML file for a method to do a trial command line execution for FEA calculations.

Running NairnMPM

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

NairnMPM [options] input > output

where

  • [options] are 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 cannot 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 NairnMPM/input directory of the nairn-mpm-fea project. As explained below, this option should always be used when running from a command line.
    -np 4 
    Set the number of processors to use for parallel execution (requires compilation of the parallel version of code engine).
    -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. old 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 NairnFEAMPM and NairnFEAMPMViz
    -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.
    -w 
    When this option is not used, relative file names for output files and for input of bmp files are resolved as being relative to the input file. When this option is used, relative file names are resolved instead to the current working directory.
    -H 
    Display brief help message and then exit.
    -? 
    Display brief help message and then exit.
  • input is the path name of the input XML file. The preferred extension for the input files is .fmcmd.
  • output is 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. To insure correct relative paths between the output file and the archive files, the output file should be saved in the same folder as the input file or if option -w is used, it should be saved in the current working directory. The preferred extension for the output file is .mpm.

Note that NairnMPM checks many command options, but not all. Most commonly, a typo in an XML command name or attribute or use of an invalid attribute may or may not trigger an error. If you have such errors, the resulting MPM simulation may be very different than the one you expected. For this reason, when using command-line execution, you should always include the -v option to validate the input file.

See the sample MPM input XML file for a method to do a trial command line execution for MPM calculations.

Personal tools
Namespaces

Variants
Actions
Navigation
Software
Toolbox