NEML2ModelExecutor

The NEML2 library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: Execute the specified NEML2 model)

commentnote

Users are NOT expected to directly use this object in an input file. Instead, it is always recommended to use the NEML2 action.

Description

This object uses the specified NEML2 material model to perform mesh-wise (or subdomain-wise) batched material update.

Each NEML2 model input variable is gathered from MOOSE by a MOOSEToNEML2 user object (gatherer) given in "gatherers". Optionally, NEML2 model parameters can also be gathered from MOOSE by gatherers given in "param_gatherers".

Currently, three types of gatherers are available:

Each model output and its derivatives with respect to input variables and model parameters can be retireved by a NEML2ToMOOSEMaterialProperty material object.

NEML2 model execution

The actual execution of the NEML2 model takes place in the execute() method. The model execution involves five steps:

  1. Re-allocate the model, if necessary

  2. Fill out model input variables and parameters

  3. Apply the predictor

  4. Solve, i.e., perform the material update

  5. Extract model output variables and their derivatives

Note that the model is only re-allocated when the gathered batch size and the model's batch size do not match, which could happen

  • Before the very first material update;

  • After a mesh-change event which results in a change in the number of quadrature points in the operating subdomain.

Input Parameters

  • batch_index_generatorThe NEML2BatchIndexGenerator used to generate the element-to-batch-index map.

    C++ Type:UserObjectName

    Unit:(no unit assumed)

    Controllable:No

    Description:The NEML2BatchIndexGenerator used to generate the element-to-batch-index map.

Required Parameters

  • devicecpuDevice on which to evaluate the NEML2 model. The string supplied must follow the following schema: (cpu|cuda)[:] where cpu or cuda specifies the device type, and : optionally specifies a device index. For example, device='cpu' sets the target compute device to be CPU, and device='cuda:1' sets the target compute device to be CUDA with device ID 1.

    Default:cpu

    C++ Type:std::string

    Unit:(no unit assumed)

    Controllable:No

    Description:Device on which to evaluate the NEML2 model. The string supplied must follow the following schema: (cpu|cuda)[:] where cpu or cuda specifies the device type, and : optionally specifies a device index. For example, device='cpu' sets the target compute device to be CPU, and device='cuda:1' sets the target compute device to be CUDA with device ID 1.

  • enable_ADFalseSet to true to enable PyTorch AD. When set to false (default), no function graph or gradient is computed, which speeds up model evaluation.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Set to true to enable PyTorch AD. When set to false (default), no function graph or gradient is computed, which speeds up model evaluation.

  • execute_onINITIAL LINEAR NONLINEARThe 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.

    Default:INITIAL LINEAR NONLINEAR

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM

    Controllable:No

    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.

  • gatherersThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE*ToNEML2 user objects gathering MOOSE data as NEML2 input variables)

    C++ Type:std::vector<UserObjectName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE*ToNEML2 user objects gathering MOOSE data as NEML2 input variables)

  • modelName of the NEML2 model, i.e., the string inside the brackets [] in the NEML2 input file that corresponds to the model you want to use.

    C++ Type:std::string

    Unit:(no unit assumed)

    Controllable:No

    Description:Name of the NEML2 model, i.e., the string inside the brackets [] in the NEML2 input file that corresponds to the model you want to use.

  • param_gatherersThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE*ToNEML2 user objects gathering MOOSE data as NEML2 model parameters)

    C++ Type:std::vector<UserObjectName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of MOOSE*ToNEML2 user objects gathering MOOSE data as NEML2 model parameters)

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • skip_inputsThe `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 variables to skip when setting up the model input. If an input variable is skipped, its value will stay zero. If a required input variable is not skipped, an error will be raised.)

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:The `NEML2` library is required but not enabled. Refer to the documentation for guidance on how to enable it. (Original description: List of NEML2 variables to skip when setting up the model input. If an input variable is skipped, its value will stay zero. If a required input variable is not skipped, an error will be raised.)

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Unit:(no unit assumed)

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters