MOOSE News (February 2019)

Continued Automatic Differentiation Expansion

Automatic differentiation can now be conducted for VectorKernels, NodalBCs, VectorNodalBCs, IntegratedBCs, and VectorIntegratedBCs. Additionally, the framework now calculates the dependence of important finite element quantities like JxW, shape function gradients and consequently variable gradients, normals, and 'curvatures` on mesh displacements. Calculating these dependencies is critical for efficient non-linear solves of large-deformation solid mechanics, laser-melting/welding, and fluid-structure-interaction problems.

Improved support for "execute_on = FINAL"

Support for executing objects with the "FINAL" execute flag was improved; specifically, the ability to perform a transfers on final was added. This change also involved improving support for Exodus output to also be limited to final.

Additionally, the ability to create symbolic links to the "latest" and "final" versions of VectorPostprocessor output was added. This capability is controlled via the CSV output object using the create_latest_symlink and create_final_symlink input parameter flags. These flags, when enabled, will create files with "_LATEST" and "_FINAL". The latest flag will link to the last timestep for the most current simulation run and the final flag will point to the file created if the output object is setup to execute on final.

MultiApp Input Control Support

The ability to control MultiApp command line arguments during the MultiApp initialization was added to allow for input parameters for each MultiApp to be defined via the input file of the parent application.

For example, the following snippet show a MultiApps input block that is creates two sub-applications from a single input file. Using the 'cli_args' input parameter the mesh size for the two applications is modified.

[MultiApps]
  [sub]
    type = FullSolveMultiApp
    positions = '0 0 0
                 1 1 1'
    input_files = 'sub.i'
    cli_args = 'Mesh/mesh/type=GeneratedMeshGenerator;Mesh/mesh/dim=1;Mesh/mesh/nx=10
                Mesh/mesh/type=GeneratedMeshGenerator;Mesh/mesh/dim=1;Mesh/mesh/nx=100'
  []
[]
(test/tests/multiapps/command_line/parent.i)

For more advanced parameter manipulation the Control System should be utilized. For example, within the stochastic tools module the following test demonstrates the ability to set input parameters within the sub-applications with values from a distribution.

[StochasticTools]
[]

[Distributions]
  [uniform]
    type = Uniform
    lower_bound = 5
    upper_bound = 10
  []
[]

[Samplers]
  [sample]
    type = MonteCarlo
    num_rows = 3
    distributions = 'uniform uniform'
    execute_on = 'PRE_MULTIAPP_SETUP'
  []
[]

[MultiApps]
  [sub]
    type = SamplerFullSolveMultiApp
    sampler = sample
    input_files = 'sub.i'
  []
[]

[Controls]
  [cmdline]
    type = MultiAppSamplerControl
    multi_app = sub
    sampler = sample
    param_names = 'Mesh/xmax Mesh/ymax'
  []
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_multiple.i)