Input File
An input file used by MOOSE-based applications is a human-readable text file that can be prepared in an ordinary text editor.
Blocks
Every input file will contain blocks with the following format:
where BlockName
can contain letters, numbers, and underscores.
Nested Blocks
Some blocks allow nesting; an example of a nested block would look like this:
Parameters
Parameters are specified in the following format:
There are several types of values that can be supplied as parameters:
Parameter type | Example value | Note |
---|---|---|
Integer | 1 | |
Real | 3.2 | |
Vector of integers | '1 14 6' | Note the ' around the values |
Vector of reals | '1.2 5.4 6.99' | Note the ' around the values |
Point in 3D space | 'x y z' | x , y and z are real spatial coordinates |
Boolean | True , False , On , Off , 1 , 0 | |
String | "Text" | Note the " around the values |
The list of parameters you can specify in each block is given via the type
parameter. The type refers to a C++ class which defines its input file parameters. The type of each parameter is specified in the C++ class and is documented in the user manual.
Comments
Comments are supported. They start with #
and can be placed almost anywhere in the input file.
Named values
It is possible to create named values that can be used thoughout the input file.
Note: These values cannot be specified inside blocks that have the type
parameter. Usually, these values are specified at the top level of the input file outside of any block. When specified inside a block, they are local to the block.
Expressions
Mathematical operations can be done using the fparse
directive:
Unit conversion
Simple unit conversion is supported via units
directive:
Here, length
will have the value of 0.0254
.
Substitution
To use the named value in an input file, use the ${name}
syntax:
Here, the length
parameter in Block
will have the value of 1
.
Global Parameters
Global parameters are parameters that are used globally in the whole input file. They are specified in the [GlobalParams]
block:
If any block in the input file accepts parameter A
, then this value will be used and does not have to supplied individually in every such block.
The global value can be locally overriden inside the block:
Example
The following input file shows the above-explained features on a simple input file:
More Information
The exact blocks and their allowed types will be explained in other sections of this documentation.