- blockList of blocks whose nodes are displaced. If neither 'block' nor 'boundary' is specified, all blocks in the mesh are used.
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:List of blocks whose nodes are displaced. If neither 'block' nor 'boundary' is specified, all blocks in the mesh are used.
- boundaryList of boundaries whose nodes are displaced
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:List of boundaries whose nodes are displaced
- constant_expressionsVector of values for the constants in constant_names (can be an FParser expression)
C++ Type:std::vector<std::string>
Controllable:No
Description:Vector of values for the constants in constant_names (can be an FParser expression)
- constant_namesVector of constants used in the parsed function
C++ Type:std::vector<std::string>
Controllable:No
Description:Vector of constants used in the parsed function
- coupled_variablesNodal variables usable as symbols in the displacement expressions
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:Nodal variables usable as symbols in the displacement expressions
- density_factor_variableIf set, the per-element density adjustment factor (original volume divided by current volume) is written to this elemental aux variable, which must be created by the user.
C++ Type:AuxVariableName
Unit:(no unit assumed)
Controllable:No
Description:If set, the per-element density adjustment factor (original volume divided by current volume) is written to this elemental aux variable, which must be created by the user.
- displacement_x0Parsed expression for the displacement in the x direction
Default:0
C++ Type:ParsedFunctionExpression
Unit:(no unit assumed)
Controllable:No
Description:Parsed expression for the displacement in the x direction
- displacement_y0Parsed expression for the displacement in the y direction
Default:0
C++ Type:ParsedFunctionExpression
Unit:(no unit assumed)
Controllable:No
Description:Parsed expression for the displacement in the y direction
- displacement_z0Parsed expression for the displacement in the z direction
Default:0
C++ Type:ParsedFunctionExpression
Unit:(no unit assumed)
Controllable:No
Description:Parsed expression for the displacement in the z direction
- epsilon0Fuzzy comparison tolerance
Default:0
C++ Type:Real
Unit:(no unit assumed)
Controllable:No
Description:Fuzzy comparison tolerance
- functionsFunctions usable as symbols in the displacement expressions
C++ Type:std::vector<FunctionName>
Unit:(no unit assumed)
Controllable:No
Description:Functions usable as symbols in the displacement expressions
- functor_namesFunctors (e.g. functor material properties) usable as symbols in the displacement expressions. They are evaluated at each node in its original (undisplaced) position. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
C++ Type:std::vector<MooseFunctorName>
Unit:(no unit assumed)
Controllable:No
Description:Functors (e.g. functor material properties) usable as symbols in the displacement expressions. They are evaluated at each node in its original (undisplaced) position. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
- functor_symbolsSymbolic name to use for each functor in 'functor_names' in the displacement expressions. If not provided, then the actual functor names will be used.
C++ Type:std::vector<std::string>
Controllable:No
Description:Symbolic name to use for each functor in 'functor_names' in the displacement expressions. If not provided, then the actual functor names will be used.
- notify_mesh_changedFalseWhether to notify the problem that the mesh has changed (by calling meshChanged) after the nodes are moved, so that mesh-dependent caches, the displaced mesh, geometric searches, and outputs are updated.
Default:False
C++ Type:bool
Controllable:No
Description:Whether to notify the problem that the mesh has changed (by calling meshChanged) after the nodes are moved, so that mesh-dependent caches, the displaced mesh, geometric searches, and outputs are updated.
- original_coordinate_variablesIf set, the original (undisplaced) node coordinates are written to these three nodal auxiliary variables, given in x, y, z order, which must be created by the user.
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:If set, the original (undisplaced) node coordinates are written to these three nodal auxiliary variables, given in x, y, z order, which must be created by the user.
- parsed_displacement_variablesIf set, the current node displacement (current minus original position) is written to these three nodal auxiliary variables, given in x, y, z order, which must be created by the user.
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:If set, the current node displacement (current minus original position) is written to these three nodal auxiliary variables, given in x, y, z order, which must be created by the user.
- postprocessorsPostprocessors usable as symbols in the displacement expressions
C++ Type:std::vector<PostprocessorName>
Unit:(no unit assumed)
Controllable:No
Description:Postprocessors usable as symbols in the displacement expressions
MoveNodesByParsedExpressionModifier
Actively displaces the selected mesh nodes by parsed expressions for the x, y, and z displacement components, evaluated relative to each node's original position.
Displaces the nodes from the supplied "boundary" or "block" by the parsed expressions "displacement_x", "displacement_y", and "displacement_z". If neither "boundary" nor "block" is specified, all nodes in the mesh are transformed.
The displacement of each node is evaluated relative to that node's original (undisplaced) position, so executing the modifier repeatedly (e.g. on a regular schedule or after adaptivity) does not accumulate drift. The expressions may reference the node's original coordinates x, y, z and the time t, as well as nodal variables listed in "coupled_variables" (an error is raised for non-nodal variables), "functions", "postprocessors", "functor_names", and constants defined through "constant_names" and "constant_expressions". Coordinates and any referenced functions or functors are evaluated at each node's original (undisplaced) position.
The modifier displaces the mesh actively on its own execution schedule, set by the "execute_on" parameter (it does not respond to the problem's mesh-changed event like MoveNodesToSphere does). Set "notify_mesh_changed" to true to notify the problem that the mesh has changed after the nodes are moved, so that mesh-dependent caches, the displaced mesh, geometric searches, and output reflect the new node positions.
When "coupled_variables" are used, or when the mesh is distributed, each rank displaces only the nodes it owns and the resulting positions are then synchronized across ranks. Every degree of freedom of a node belongs to that node's owner, so this needs neither a serialized copy of the solution nor any additional ghosting. On a replicated mesh with no coupled variables, every rank instead evaluates every node, which avoids communicating positions at all.
Functors
Any functor, such as a functor material property, can be made available to the displacement expressions by listing it in "functor_names". By default a functor is referred to in the expressions by its own name; supply "functor_symbols" to give each functor a different symbol instead (one symbol per functor). Functors are evaluated at the node without a block connection, as elsewhere in MOOSE's nodal functor evaluations, so a functor material property must be defined on every block of the mesh (or of this object's spatial restriction) to be usable here.
Variables cannot be passed through "functor_names": a variable functor reads a partitioned solution vector, and functors are evaluated on every rank whenever the displacement is not already restricted to owned nodes (see above). Use "coupled_variables" instead, which reads nodal values safely in parallel. An error is raised if a variable name is given as a functor.
[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
[move]
type = MoveNodesByParsedExpressionModifier<<<{"description": "Actively displaces the selected mesh nodes by parsed expressions for the x, y, and z displacement components, evaluated relative to each node's original position.", "href": "MoveNodesByParsedExpressionModifier.html"}>>>
block<<<{"description": "List of blocks whose nodes are displaced. If neither 'block' nor 'boundary' is specified, all blocks in the mesh are used."}>>> = 0
displacement_x<<<{"description": "Parsed expression for the displacement in the x direction"}>>> = 'swelling'
displacement_y<<<{"description": "Parsed expression for the displacement in the y direction"}>>> = 'a*y'
functor_names<<<{"description": "Functors (e.g. functor material properties) usable as symbols in the displacement expressions. They are evaluated at each node in its original (undisplaced) position. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = 'swelling alpha'
functor_symbols<<<{"description": "Symbolic name to use for each functor in 'functor_names' in the displacement expressions. If not provided, then the actual functor names will be used."}>>> = 'swelling a'
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."}>>> = 'TIMESTEP_BEGIN'
[]
[](test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/functors.i)Optional outputs
Three optional outputs can be enabled, each independently and only when its parameter is supplied. The target auxiliary variables must be created by the user in the input (with the names below); the modifier writes into them.
"original_coordinate_variables": writes the original (undisplaced) node coordinates to the three named nodal aux variables, given in x, y, z order.
"parsed_displacement_variables": writes the current node displacement (current minus original position) to the three named nodal aux variables, given in x, y, z order.
"density_factor_variable": writes a per-element density adjustment factor to the named elemental (
MONOMIAL,CONSTANT) aux variable. The factor is the original element volume divided by the current element volume (equivalently1/det(F)); multiplying a strain-free density by it conserves mass, analogous to theStrainAdjustedDensitymaterial. Element volumes are coordinate-aware (XYZ, RZ, and RSPHERICAL). The original volumes are captured at the modifier's first execution, which must precede any displacement of these nodes.
Input 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
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).
- execute_onNONEThe 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:NONE
C++ Type:ExecFlagEnum
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.
- 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
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
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
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
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
Execution Scheduling Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
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
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- 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
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
- disable_fpoptimizerFalseDisable the function parser algebraic optimizer
Default:False
C++ Type:bool
Controllable:No
Description:Disable the function parser algebraic optimizer
- enable_ad_cacheTrueEnable caching of function derivatives for faster startup time
Default:True
C++ Type:bool
Controllable:No
Description:Enable caching of function derivatives for faster startup time
- enable_auto_optimizeTrueEnable automatic immediate optimization of derivatives
Default:True
C++ Type:bool
Controllable:No
Description:Enable automatic immediate optimization of derivatives
- enable_jitTrueEnable just-in-time compilation of function expressions for faster evaluation
Default:True
C++ Type:bool
Controllable:No
Description:Enable just-in-time compilation of function expressions for faster evaluation
- evalerror_behaviornanWhat to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception
Default:nan
C++ Type:MooseEnum
Controllable:No
Description:What to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception
Parsed Expression Advanced 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.
- 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
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.
Material Property Retrieval Parameters
Input Files
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/coupled.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/notify_mesh_changed.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/twoblock.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/displace.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/all_blocks.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/time.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/density_factor.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/symbols.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/functors.i)
- (test/tests/meshmodifiers/move_nodes_by_parsed_expression_modifier/outputs.i)