Add Moving Body Variable¶
Introduction¶
Moving body variables are quantities defined directly on the surfaces of moving meshes, such as impellers, agitators, or other translating and rotating boundaries. Unlike static body variables, which are evaluated in the fluid voxels adjacent to a surface and then projected, moving body variables are computed directly on the triangular mesh elements themselves. As a result, there is no interpolation or projection step, and the quality of the moving body mesh directly informs the precision and level of detail in the reported data.
These variables focus on capturing the dynamic interaction of moving boundaries with both the surrounding fluid and suspended particles. They are particularly useful for quantifying particle collisions with moving surfaces, which can be used to assess erosion and wear rates. They are also valuable for sampling fluid properties immediately adjacent to the moving surface, such as species concentrations near rotating impellers or relative velocity fields between the moving mesh and the fluid. Together, these quantities provide insight into key performance metrics such as erosion resistance, mixing efficiency, and surface transfer rates in stirred or agitated systems.
Access¶
When you select Add Moving Body Variable on the Moving Body context-specific toolbar, a new child geometry is formed and the property grid below will launch.
Property Grid¶
General
¶
- Template
Moving body variables are defined using one of two template types, which determine how the variable is calculated and updated during the simulation:
- Surface UDF
A user-defined function (UDF) is provided to calculate the moving body variable directly. The UDF may draw on local fluid conditions, properties, or other custom variables.
- Data Type
The Data Type setting determines whether the surface variable represents a scalar or a vector quantity. For variables defined using the UDF, this choice must be explicitly specified:
- Scalar
This computes a single-valued output for each triangle. The calculation UDF must return one floating-point value to represent this property.
- Vector
This computes a three-component directional output for each particle. In this case, the calculation UDF must explicitly define all three components of the vector within the function. These components move with the particle and evolve over time.
- Moving Body Variable UDF
depends | This UDF defines the custom variable to be computed along the moving surface. If the Data Type is set to scalar, one output must be defined within the UDF: a floating-point variable named
{mv}
, where{mv}
is the dynamic name of the surface variable. If the Data Type is set to vector, the thee components of the vector must be defined individually as{mv}_x
,{mv}_y
and{mv}_z
. This is a local UDF, calculated on a voxel-by-voxel basis using the local fluid properties. The UDF is only applied along the cells touching the solid surface.
Download Sample File:
Moving Body Variable
- Particle Surface Collision
A UDF is executed each time a particle collides with the solid surface. In this mode, the UDF serves as the kernel that defines the collision statistic for a single event, and you must also specify a calculation type, a reduction type, and the collision UDF.
This mode is commonly used to model surface processes such as erosion, wear, deposition, or energy transfer from particle impacts. Mechanically speaking, the Collision UDF defines what is calculated during each particle–wall impact, the Reduction determines how results from multiple collisions are combined, and the Calculation setting defines how those results evolve over time—whether instantaneously, cumulatively, or normalized per surface area.
- Calculation
The calculation type determines how collision events are tracked over time—whether results are reported as instantaneous (reset at each time step) or accumulated over time. Three modes are available:
- Instantaneous
This reports collisions occurring during the current time step only, without retaining history. This is useful when collisions are independent and have no lasting effect.
- Accumulated
This tracks the cumulative number or magnitude of collisions over the course of the simulation. This is valuable for studying longterm processes such as wear or material loss.
- Accumulated per Area
This normalizes the accumulated collisions by the surface area of the wall, providing a measure of collision density per unit area. This is often used when comparing collision intensities across surfaces of different sizes.
- Reduction
The Reduction setting determines how multiple simultaneous collisions at a given surface location are collapsed into a single value for the variable:
- Min
This stores the minimum collision statistic.
- Max
This stores the maximum collision statistic.
- Sum
This aggregates the contributions from all collisions in that time step. When a particle collides with only one surface element, all three reductions produce the same result. For multiple collisions, the reduction defines how they are combined into one representative value.
- Particle Collision Set
This field specifies which particle set is considered when evaluating collisions. By selecting from previously defined particle families, users can restrict collision statistics to only those particle types that are physically relevant.
- Particle Collision UDF
depends | This UDF defines the kernel of the calculation executed for each interaction between a particle and the moving body. One output must be defined within the UDF: a floating-point variable named
value
. This is a local UDF, calculated on an individual collision basis using the local fluid and particle properties.
Download Sample File:
Particle Collision
- Initial Value
depends | The Initial Value defines the starting value assigned to the surface variable before runtime calculations begin. By default, this is set to zero, but it may be specified as a nonzero baseline to seed more complex workflows. For scalar variables, a single initial value is provided. For vector-valued surface variables, three components (x, y, z) must be specified. These values establish the initial condition of the variable before UDF calculations, collision statistics, or surface reactions update it during the simulation.
Advanced
¶
The Advanced settings provide additional controls over how custom variables are displayed, reported, and integrated into the simulation framework.
- Display Name Override
This setting controls how the variable name appears in the GUI and exported results. These overrides do not affect the internal computation but allow you to customize presentation for clarity during downstream analysis.
- Display Unit Override
This setting controls how the variable units appears in the GUI and exported results. These overrides do not affect the internal computation but allow you to customize presentation for clarity during downstream analysis.
Location¶
Moving Body Variable Toolbar¶
Context-Specific Toolbar Forms |
Description |
---|---|
|
The Help command launches the M-Star reference documentation in your web browser. |
For a full description of each option, see Context-Specific Toolbar selections.