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<<<{"href": "../../syntax/MultiApps/index.html"}>>>]
[sub]
type = FullSolveMultiApp<<<{"description": "Performs a complete simulation during each execution.", "href": "../../source/multiapps/FullSolveMultiApp.html"}>>>
positions<<<{"description": "The positions of the App locations. Each set of 3 values will represent a Point. This and 'positions_file' cannot be both supplied. If this and 'positions_file'/'_objects' are not supplied, a single position (0,0,0) will be used"}>>> = '0 0 0
1 1 1'
input_files<<<{"description": "The input file for each App. If this parameter only contains one input file it will be used for all of the Apps. When using 'positions_from_file' it is also admissable to provide one input_file per file."}>>> = 'sub.i'
cli_args<<<{"description": "Additional command line arguments to pass to the sub apps. If one set is provided the arguments are applied to all, otherwise there must be a set for each sub app."}>>> = '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<<<{"href": "../../syntax/StochasticTools/index.html"}>>>]
[]
[Distributions<<<{"href": "../../syntax/Distributions/index.html"}>>>]
[uniform]
type = Uniform<<<{"description": "Continuous uniform distribution.", "href": "../../source/distributions/Uniform.html"}>>>
lower_bound<<<{"description": "Distribution lower bound"}>>> = 5
upper_bound<<<{"description": "Distribution upper bound"}>>> = 10
[]
[]
[Samplers<<<{"href": "../../syntax/Samplers/index.html"}>>>]
[sample]
type = MonteCarlo<<<{"description": "Monte Carlo Sampler.", "href": "../../source/samplers/MonteCarloSampler.html"}>>>
num_rows<<<{"description": "The number of rows per matrix to generate."}>>> = 3
distributions<<<{"description": "The distribution names to be sampled, the number of distributions provided defines the number of columns per matrix."}>>> = 'uniform uniform'
execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps<<<{"href": "../../syntax/MultiApps/index.html"}>>>]
[sub]
type = SamplerFullSolveMultiApp<<<{"description": "Creates a full-solve type sub-application for each row of each Sampler matrix.", "href": "../../source/multiapps/SamplerFullSolveMultiApp.html"}>>>
sampler<<<{"description": "The Sampler object to utilize for creating MultiApps."}>>> = sample
input_files<<<{"description": "The input file for each App. If this parameter only contains one input file it will be used for all of the Apps. When using 'positions_from_file' it is also admissable to provide one input_file per file."}>>> = 'sub.i'
[]
[]
[Controls<<<{"href": "../../syntax/Controls/index.html"}>>>]
[cmdline]
type = MultiAppSamplerControl<<<{"description": "Control for modifying the command line arguments of MultiApps.", "href": "../../source/controls/MultiAppSamplerControl.html"}>>>
multi_app<<<{"description": "The name of the MultiApp to control."}>>> = sub
sampler<<<{"description": "The Sampler object to utilize for altering the command line options of the MultiApp."}>>> = sample
param_names<<<{"description": "The names of the command line parameters to set via the sampled data."}>>> = 'Mesh/xmax Mesh/ymax'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_multiple.i)