Вы находитесь на странице: 1из 4

____________________________________________________________________________________

Difference between Simulating Sloshing with


Momentum Source or MDM
Problem/Description:
A multiphase flow model (VOF) may be used for analyzing a sloshing tank and others. Three methods
that can be used are:
1. Specify the momentum source which simulates the vibration with a UDF
2. To simulate the movement (vibration), use the moving/deforming mesh (MDM) function
3. Temporally change the direction of gravity (e.g. using a scheme)

This solution will examine the difference in results for method 1 and 2.

Solution:
Consider the example setup in Figure 1. The vibrations will be sinusoidal in the direction perpendicular to
gravity (x direction).

Figure 1: Simple sloshing setup

Specify Momentum Source


The displacement is defined by 𝑥 = 𝐴 cos(𝜔𝑡) which makes the acceleration defined as:

© 2016 ANSYS, Inc. All rights reserved.


𝑎 = −𝐴𝜔2 cos(𝜔𝑡)

where
Amplitude (A) is 0.2 [m]
angular frequency (ω) is 2𝜋𝑓 with f=0.5 [Hz]

To specify the momentum per unit volume, the following equation is used as a source term for each cell
(acceleration applied to the fluid is in the opposite direction of the object movement):

𝐹 = 𝐴𝜔2 cos(𝜔𝑡) × 𝜌𝑚 [N/m3]

where ρm is the mixed density. The UDF used will be:

#include “udf.h”

#define a 0.2
#define f 0.5

DEFINE_SOURCE(momentum, c, mix_thread, dS, eqn)


{
real source, omega;
omega = 2.0*acos(-1.0)*f;
source = a*omega*omega*cos(omega*CURRENT_TIME)*C_R(c,mix_thread); /* x-direction of
momentum*/
dS[eqn] = 0.0;
return source;
}

Hook the momentum source (x-direction) to the fluid region. If there are multiple fluid regions, it should be
to all fluid regions.

Use MDM
The speed of the object needed to define the MDM is:

𝑢 = −𝐴𝜔 sin(𝜔𝑡) [m/s]

The UDF used is:

#include “udf.h”

#define a 0.2
#define f 0.5

DEFINE_CG_MOTION(mm_x_t, dt, cg_vel, cg_omega, time, dtime)


{
real omega;
omega = 2.0*acos(-1.0)*f;

cg_vel[0] = -a*omega*sin(omega*CURRENT_TIME); /*speed in the x-direction*/


cg_vel[1] = 0.0;
cg_vel[2] = 0.0;

cg_omega[0] = 0.0;
cg_omega[1] = 0.0;
cg_omega[2] = 0.0;

© 2016 ANSYS, Inc. All rights reserved.


}

This UDF should be hooked at the defined position. In Define->Dynamic Mesh->Zone, set the moving
fluid area and wall surface to Rigid Body and hook this UDF for Motion UDF/Profile.

Results
If the momentum source without the MDM function is used, the progression results are shown in Figure 2.

Figure 2: Time progression of the volume fraction of air without MDM function used

When the MDM function is used, the results are identical as shown in Figure 3.

© 2016 ANSYS, Inc. All rights reserved.


Figure 3: Time progression of the volume fraction of air when MDM is used

Since the mesh itself is moved in case 2, the computational time might be longer than in using a
momentum source. A benefit of using the MDM is the post-processing results are easy to understand
(especially when accompanied with rotation).

© 2016 ANSYS, Inc. All rights reserved.

Вам также может понравиться