About Mesh Motion

A mesh motion flow condition specifies displacement of the fluid mesh at surfaces, three-dimensional volumes, or vertices of the fluid domain.

See Also
Defining Mesh Motion

Mesh motion is used in a deforming mesh flow simulation in which an arbitrary (ALE) methodology models the fluid flow. For these simulations, is deformed according to the boundary motion. To specify the displacement in the X-, Y-, and Z-directions. You can specify the displacement components using uniform values or with Javascript user subroutines that define the value programmatically.

Note: For fluid-structure interaction (FSI) simulations using ALE with a deforming mesh, mesh motion boundary conditions are not permitted at the co-simulation interface region because these conditions are managed automatically.

Examples: User Subroutines to Perform a Rotation

The following sample user subroutine shows how you can define a rotation with respect to the global Z-axis. These statements define the displacements in the X-direction:

//X displacement
coord = support.getVector('UNDEF_COORD', CenteringType.NODE);
//Define the center of rotations
rx = 10;
ry = 7.5;
t = timeParameters.time;
//Specify the angular velocity
omega = .4;
//Calculate the rotation angle as a function of time
alpha = omega * t;
s = Math.sin(alpha);
c = Math.cos(alpha);
for (var i = 0; i < this.values.length; i++) {
  	x = coord[i][0];
  	y = coord[i][1];
  	xx = x - rx;
  	yy = y - ry;
  	xnew = xx * c - yy * s;
  	xnew = xnew + rx;
   this.values[i] = xnew - x;
}

These statements define the displacements in the Y-direction:

//Y displacement
coord = support.getVector('UNDEF_COORD', CenteringType.NODE);
//Define the center of rotations
rx = 10;
ry = 7.5;
t = timeParameters.time;
//Specify the angular velocity
omega = .4;
//Calculate the rotation angle as a function of time
alpha = omega * t;
s = Math.sin(alpha);
c = Math.cos(alpha);
for (var i = 0; i < this.values.length; i++) {
  	x = coord[i][0];
  	y = coord[i][1];
  	xx = x - rx;
  	yy = y - ry;
  	ynew = xx * s + yy * c;
  	ynew = ynew + ry;
   this.values[i] = ynew - y;
}