New Users

Welcome to MOOSE! This page describes some helpful ways to start developing with MOOSE.

commentnote

If you arrived here directly, be sure to complete one of the "Getting Started" instruction sets (such as Linux and MacOS).

Create an Application

MOOSE is designed for building custom applications, therefore to use MOOSE an application is required. An application is where code and input files are created for a particular problem or set of problems of interest.

To create an application, run the stork.sh script while sitting outside the MOOSE repository with a single argument: the name of your application:


cd ~/projects
./moose/scripts/stork.sh YourAppName

Running this script will create a folder named "your_app_name" in the projects directory, this application will automatically link against MOOSE. Obviously, the "YourAppName" should be the desired name of your application; consider the use of an acronym. Animal names are preferred for applications, but you are free to choose whatever name suits your needs.

warningwarning:Execute stork from outside of the MOOSE directory

Do not attempt to run this script while inside the MOOSE repository. Doing so will result in an error.

Build and Test

Enter your application's directory, build your application and then run tests:


cd ~/projects/YourAppName
make -j 6
./run_tests -j 6

If your application is working correctly, the output shows a single passing test. This indicates that your application is ready to be further developed. Be sure to recompile and test your application each time you update MOOSE.

Enable Modules

To enable use of the various Physics Modules available from MOOSE in an application, modify the section of ~/projects/your_app_name/Makefile that is shown below.

################################## MODULES ####################################
# To use certain physics included with MOOSE, set variables below to
# yes as needed.  Or set ALL_MODULES to yes to turn on everything (overrides
# other set variables).

ALL_MODULES                 := no

CHEMICAL_REACTIONS          := no
CONTACT                     := no
ELECTROMAGNETICS            := no
EXTERNAL_PETSC_SOLVER       := no
FLUID_PROPERTIES            := no
FSI                         := no
FUNCTIONAL_EXPANSION_TOOLS  := no
GEOCHEMISTRY                := no
HEAT_TRANSFER               := no
LEVEL_SET                   := no
MISC                        := no
NAVIER_STOKES               := no
OPTIMIZATION                := no
PERIDYNAMICS                := no
PHASE_FIELD                 := no
POROUS_FLOW                 := no
RAY_TRACING                 := no
REACTOR                     := no
RDG                         := no
RICHARDS                    := no
SOLID_MECHANICS             := no
STOCHASTIC_TOOLS            := no
THERMAL_HYDRAULICS          := no
XFEM                        := no

Then, to begin using a module's capabilities, recompile the application in the same manner described in the Build and Test section.

schooltip:Only enable modules needed

Each module enabled will increase compilation times, thus it is recommended to enable modules as-needed.

Learn More

With a working application next consider looking at the Examples & Tutorials page for a beginning tour of how to use input files and implement custom behavior in an application. The first tutorial demonstrates how MOOSE application development works. If you are interested in contributing to MOOSE please visit Framework Development.

Helpful Software

A text editor is necessary for creating application files. There are many options available, so please feel free to chose an editor that meets your needs. A popular option for application developers is VSCode, which has community developed add-ons specifically for MOOSE: VSCode MOOSE.

A graphical post-processor, particularly one that can read ExodusII files, is also necessary. MOOSE includes a graphical user interface (GUI): PEACOCK. Another popular tool is ParaView. Both of these applications are free and will allow you to visualize and process the results of your simulations.

Join the Community

Customizing MOOSE

MOOSE can be customized by running a configure script in ~/projects/moose. Note that the configure script must be invoked from ~/projects/moose. Below we summarize the configuration options available:

  • --prefix: Specify a target installation path. Useful if you plan on running make install.

Automatic Differentiation

  • --with-derivative-size=<n>: Specify the length of the underlying derivative storage array. The default is 64. A smaller number may be chosen for increased speed; a larger number may be required for 3D problems or problems with coupling between many variables.

Troubleshooting

Please see the MOOSE FAQ page for common issues. If your issue is not listed, this would be an excellent time to visit the MOOSE Discussion forum and ask for help.