New Users
Welcome to MOOSE! This page describes some helpful ways to start developing with MOOSE. Before proceeding, please visit the Install MOOSE page and follow the instructions to get the framework up and running.
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.
Do not attempt to run this script while inside the MOOSE repository. Doing so will result in an error.
Compile and Test Your Application
cd ~/projects/YourAppName
make -j4
./run_tests -j4
If the application is working correctly, the output shows a single passing test. This indicates that the application is ready to be further developed. Be sure to recompile and tests the application each time MOOSE is updated.
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
EXTERNAL_PETSC_SOLVER := no
FLUID_PROPERTIES := no
FSI := no
FUNCTIONAL_EXPANSION_TOOLS := no
GEOCHEMISTRY := no
HEAT_CONDUCTION := no
LEVEL_SET := no
MISC := no
NAVIER_STOKES := no
PERIDYNAMICS := no
PHASE_FIELD := no
POROUS_FLOW := no
RAY_TRACING := no
REACTOR := no
RDG := no
RICHARDS := no
STOCHASTIC_TOOLS := no
THERMAL_HYDRAULICS := no
TENSOR_MECHANICS := no
XFEM := no
Then, to begin using a module's capabilities, recompile the application in the same manner described in the Compile and Test Your Application section.
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 and 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 Atom, which has community developed add-ons specifically for MOOSE: Atom Editor for 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
Join our mailing list for announcements: moose-announce@googlegroups.com
Gmail users: Just click the "Join Group" button,
otherwise, send an email to:
mailto:moose-announce+subscribe@googlegroups.com
If you haven't already, please sign up for GitHub: github.com/join.
Visit the MOOSE Discussion forum on GitHub for technical Q&A.
Customizing MOOSE Configuration
MOOSE can be customized by running a configure
script in $MOOSE_DIR
. Note that the configure
script must be invoked from $MOOSE_DIR
. Below we summarize the configuration options available:
Automatic Differentiation
--with-derivative-type
: Specify the derivative storage type to use for MOOSE'sDualReal
object. Options aresparse
andnonsparse
.sparse
selectsSemiDynamicSparseNumberArray
as the derivative storage type;nonsparse
selectsNumberArray
. A more detailed overview of these storage types can be found in theDualReal
documentation.--with-derivative-size=<n>
: Specify the length of the underlying derivative storage array. The default is 50. 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.