The Input File

  • By default uses a hierarchical, block-structured input file.
  • Within each block, any number of name/value pairs can be listed.
  • The syntax is completely customizable, or replaceable.
  • To specify a simple problem, you will need to populate five or six top-level blocks.
  • We will briefly cover a few of these blocks in this section and will illustrate the usage of the remaining blocks throughout this manual.

Hierarchical Block-Structure

  • The u and v and blocks define variables, since they are declared in the block.
  • The active line can be used to turn on/off variables quickly. In this case, only the variable will be used in the simulation. An absent line means all variables are active.
  • The block names are user-defined, but must be unique and should not contain non-ASCII characters.
[Variables]
  active = 'u'
  [./u]
    order = FIRST
    family = LAGRANGE
  [../]
  [./v]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[Kernels]
  ...
[]

Main Input File Blocks

  • MOOSE expects the following basic blocks for a simple problem:
    • [Mesh] Specifies the geometry of the problem
    • [Variables] Defines the unknowns to solve
    • [Kernels] Implementation of the domain physics of the problem
    • [BCs] Implementation of the boundary conditions physics for the problem
    • [Executioner] Specifies how the problem is to be solved
    • [Outputs] Indicate the format and variables to output

Mesh Block

  • The Mesh block is generally associated with an that reads and/or constructs the mesh for the simulation.
  • The default type, FileMesh, is suitable for reading any normal mesh format from a file.
  • The base class MooseMesh can be extended to construct or modify your own Meshes during runtime as needed.
  • There are additional advanced options for this and the following blocks which are not listed in this section...

[Mesh]
  # Optional Type
  type = <FileMesh | GeneratedMesh>

  # FileMesh
  file = <filename>

  # Some other commonly used options
  uniform_refine = <n>
  second_order = <true|false>
[]

Variables Block

  • The Variables block declares the nonlinear variables that will be solved for in the simulation.
  • The default order and family are FIRST and LAGRANGE, respectively.

[Variables]
  [./nonlinear_variable_1]
    order = <FIRST | SECOND | ...>
    family = <LAGRANGE | HERMITE | ...>
  [../]

  [./nonlinear_variable2]
      ...
  [../]
[]

Kernels Block

  • The Kernels block declares PDE operators that will be used in the simulation.
  • The type parameter is used to specify the type of kernel to instantiate.

[Kernels]
  [./my_kernel1]
    type = <Any Registered Kernel>
    variable = <Nonlinear Variable Name> 
  [../]
  [./my_kernel2] 
    ...
  [../]
[]

Boundary Conditions Block

  • The BCs block declares the boundary conditions that will be used in the simulation.
  • The type parameter is used to specify the type of boundary condition to instantiate.

[BCs] 
  [./bottom_bc]
    type = <Any Registered BoundaryCondition>
    variable = <Nonlinear Variable Name> 
  [../]
  [./top_bc] 
    ...
  [../] 
[]

Executioner Block

  • The Executioner block declares the executioner that will be used in the simulation.
  • The type parameter is used to specify the type of executioner to instantiate.

[Executioner]
  type = <Steady | Transient | ...>
[]

Outputs Block

  • The Outputs block controls the various output(s) (to screen and file) used in the simulation.
  • Provides control over file format, variable output, output intervals, etc...

[Outputs]
  file_base = <base_file_name>
  exodus = true
  console = true
[]