www.kxcad.net Home > CAE Index > ANSYS Index > ANSYS CFX Index
When defining your own simulations, the mesh motion may already be known. In such cases, it can be specified explicitly using the CEL. In this tutorial, the mesh motion is not known a-priori, and will be calculated using the forces that act on the ball. The dynamics equation that describes the motion of the ball is considered before setting up the simulation.
According to Newton's Second Law, the time rate of change in the ball's linear momentum is proportional to the net force acting on the ball. In differential form, the equation to be solved for the motion of the ball is:
![]() |
Equation 1. |
where mBall is the mass of the ball (which is constant), velBall is the velocity of the ball in the y coordinate direction, FFlow is the flow (viscous and drag) force acting on the ball, and FSpring is the spring force acting on the ball.
The left hand side of the equation is discretized to include an expression for the new displacement of the ball (relative to the spring's neutral position). The time derivative of the ball velocity is discretized as:
![]() |
Equation 2. |
where velBallNew is further discretized as:
![]() |
Equation 3. |
The new displacement of the ball also appears in the expression for spring force:
![]() |
Equation 4. |
The discrete form of the equation of motion for the ball is re-assembled, and the ball displacement is isolated as:
![]() |
Equation 5. |
No further substitutions are required because all of these quantities are available through the CFX Expression Language as presented below.