Está en la página 1de 20

Tutorial: Solving a 2D Vibromixer Problem Using the

Dynamic Mesh Model

Introduction
The dynamic mesh model in FLUENT can be used to model flows where the shape of the
domain is changing with time due to motion on the domain boundaries. The motion can be
either a prescribed motion (e.g., you can specify the linear and angular velocities about the
center of gravity of a solid body with time) or an unprescribed motion where the subsequent
motion is determined through a user-defined function (UDF).
The update of the volume mesh is handled automatically by FLUENT at each time step
based on the new positions of the boundaries. To use the dynamic mesh model, you need
to provide a starting volume mesh and the description of the motion of any moving zones
in the model.
This tutorial demonstrates the use of FLUENT’s dynamic mesh capabilities for a vibromixer,
a device with a perforated (cylindrical) plate of small thickness that moves with a sinusoidal
motion which is implemented through a UDF.
In this tutorial you will learn how to:

• Set up a problem for a dynamic mesh

• Specify dynamic mesh modeling parameters

• Specify the motion of dynamic zones

• Preview the dynamic mesh before starting the calculation

• Perform basic dynamic mesh calculations with residual plotting

• Examine the pressure and velocity fields using graphics

Prerequisites
This tutorial assumes that you are familiar with the FLUENT interface and have completed
Tutorial 1 from the FLUENT 6.2 Tutorial Guide. Some of the basic steps in the setup and
solution procedures will not be shown explicitly. You should be familiar with the dynamic
mesh model. If you are not, you can refer Section 10.6: Dynamic Meshes in the FLUENT
6.2 User’s Guide.


c Fluent Inc. April 1, 2005 1
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

Preparation

1. Copy the files, vibromix2d.msh, vibromix bin.scm, vibromix.bin and vibromix-2d.c


to your working directory.

2. Start the 2D version of FLUENT.

Setup and Solution


Step 1: Grid

1. Read the grid file, vibromix2d.msh.


File −→ Read −→Case...
As the mesh file is read in, messages will appear in the console window reporting the
progress of the reading.

2. Check the grid.


Grid −→Check
FLUENT will perform various checks on the mesh and will report the progress in the
console window. Pay attention to the reported minimum volume and make sure this
is a positive number.

3. Display the grid (Figure 1).


Display −→Grid...

2
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

(a) Under Surfaces, keep the default selection of the surfaces.


(b) Click Display and close the panel.
Figure 1 displays the three fluid zones: bottom-zone, moving zone (mid zone) and
top zone.

Figure 1: Grid for the 2D Vibromixer Geometry


c Fluent Inc. April 1, 2005 3
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

Step 2: Models

1. Enable a time-dependent calculation.


Define −→ Models −→Solver...

(a) Select Unsteady under Time.


(b) Keep the default Unsteady Formulation of 1st-Order Implicit.
Dynamic mesh simulations currently work only with first-order time advance-
ment.

4
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

2. Turn on the standard k- viscous model with standard wall functions.
Define −→ Models −→Viscous...

3. Read the scheme file for specifying motion parameters (vibromix bin.scm).
File −→ Read −→Scheme...
The scheme file, vibromix bin.scm, loads the vibromix.bin file, which creates the
Define/User-Defined/Motion Parameters... menu item. This panel that is opened using
this menu item is used to specify the frequency and amplitude values of the motion.
4. Set the frequency and amplitude motion parameters.
Define −→ User-Defined −→Motion Parameters...

(a) Set the Frequency to 10 Hz.


(b) Set the Amplitude to 0.1 m.


c Fluent Inc. April 1, 2005 5
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

Step 3: Materials

1. Copy liquid water from the materials database.


Define −→Materials...
(a) Click the Fluent Database... button in the Materials panel.
The Fluent Database Materials panel will open.

(b) In the list of Fluent Fluid Materials, select water-liquid (h2o<l>).


(c) Click Copy to copy the information for liquid water to your model.
(d) Close the Fluent Database Materials panel and the Materials panel.

6
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

Step 4: Boundary Conditions


Define −→Boundary Conditions...
In this step, you will change the fluid type to water for each one of the three fluid zones -
bottom-zone, moving zone, and top zone

1. Set the conditions for the fluid, bottom-zone.

(a) Select water-liquid in the Material Name drop-down list.


c Fluent Inc. April 1, 2005 7
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

2. Set the conditions for the fluid, moving zone.


(a) Select water-liquid in the Material Name drop-down list.

3. Set the conditions for the fluid, top zone.


(a) Select water-liquid in the Material Name drop-down list.

Step 5: User-Defined Function

1. Compile the UDF, vibromix-2d.c, using the Compiled UDFs panel.


Define −→ User-Defined −→ Functions −→Compiled...

(a) Make sure that the UDF source file, vibromix-2d.c, is in the same directory
that contains your case and data files.
(b) Select the UDF source file by clicking Add... under Source Files in the Compiled
UDFs panel.
This will open the Select File panel.
(c) In the Select File panel, select vibromix-2d.c.
(d) In the Compiled UDFs panel, enter the name of your library directory (e.g.,
libudf2d) and click Build to build a shared library for your source file.
(e) Click Load to link your shared library to the FLUENT executable.

8
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

Step 6: Mesh Motion Setup

1. Activate dynamic mesh motion and specify the associated parameters.


Define −→ Dynamic Mesh −→Parameters...

(a) Under Models, select Dynamic Mesh.


The panel will expand to show additional inputs.
(b) Under Mesh Methods, deselect Smoothing and select Layering.
Make sure the Smoothing and Remeshing methods are turned off.
(c) Retain the default settings for the split and collapse factors.
These factors allow you to vary the cell split and collapse characteristics along
with the motion of the moving zone.
(d) Click OK.


c Fluent Inc. April 1, 2005 9
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

2. Specify the dynamic zones.


Define −→ Dynamic Mesh −→Zones...

(a) In the Zone Names drop-down list, select bottom-interior.


(b) Under Type, keep the default setting of Rigid Body.
(c) Click the Meshing Options tab.
(d) Set the Cell Height for the adjacent moving zone and bottom-zone to 0.03 and
0.05 respectively.
(e) Click Create.
(f) In the Zone Names drop-down list, select top-interior.
(g) Under Type, keep the default setting of Rigid Body.
(h) Click the Meshing Options tab.
(i) Keep the default of 0.03 and 0.05 for Cell Height of the adjacent moving zone
and top zone respectively.
(j) Click Create.
(k) In the Zone Names drop-down list, select moving zone.
(l) Under Type, keep the default setting of Rigid Body.
(m) Click Create.
(n) Close the Dynamic Mesh Zones panel.

10
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

3. Initialize the computational domain.


Solve −→ Initialize −→Initialize...

(a) Set the Turbulence Kinetic Energy to 0.001 m2 /s2 .


(b) Set the Turbulence Dissipation Rate to 0.001 m2 /s3 .
(c) Click Init and close the panel.
4. Set the display options.
Display −→Options...


c Fluent Inc. April 1, 2005 11
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

(a) Select Double Buffering to ensure a non-flickering display of the mesh motion.

5. Save the case and data file.


File −→ Write −→Case & Data...

6. Preview the mesh motion.


Solve −→Mesh Motion...

The zone motion preview utility is useful for quickly checking rigid body motion set-
tings. User errors, such as an improperly scaled mesh, can be quickly identified using
this procedure.
(a) Under Time, set the Time Step Size to 0.001 s.
(b) Under Time, set the Number of Time Steps to 100.
(c) Click Preview.

Step 7: Solution

1. Read the previously saved case and data file back into FLUENT.
File −→ Read −→Case & Data...
Since the preview of the mesh altered the initial location of moving part, it is recom-
mended that you read the case and data file that you have saved before the preview.

2. Enable the plotting of static pressure in the domain during the calculation by defining
a volume monitor (see Figure 3).
Solve −→ Monitors −→Volume...

12
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

(a) Increase the number of Volume Monitors to 1.


(b) Turn on Plot and Write for the first monitor.
Note: When the Write option is selected in the Volume Monitors panel, the
volume-averaged temperature history will be written to a file. If you do not
select the Write option, the history information will be lost when you exit
FLUENT.
(c) In the Every drop-down list, select Time Step for the monitor frequency.
(d) Click Define... to define the monitor.
The Define Volume Monitor panel will open automatically.

i. In the Report Type drop-down list, keep Volume Integral.


ii. In the X-Axis drop-down list, select Flow-Time.


c Fluent Inc. April 1, 2005 13
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

iii. In the Field Variable drop-down lists, select Pressure... and Static Pressure.
iv. In the Cell Zones list, select all zones.
v. In the File Name field, enter total-vol.out.
vi. Click OK in the Define Volume Monitor panel, and then in the Volume Mon-
itors panel.

3. Enable the plotting of residuals during the calculation.


Solve −→ Monitors −→Residuals...

(a) Select Plot under Options.


(b) Click OK to close the Residual Monitors panel.

4. Open the command monitor window.


Solve −→Execute Commands...

14
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

(a) Increase the number of Defined Commands to 6.


(b) Turn each command on by clicking the check buttons under On.
(c) For all commands set Every to 5 and When to Time Step.
(d) Specify the commands as shown in the Execute Commands panel.
Note: These commands capture the contours of velocity magnitude, static pres-
sure, and velocity vectors after every five timesteps. and save the images in
the working directory. The ’%t’ appended to the file name instructs FLUENT
to append the timestep index to the filename. It is possible to specify multiple
text commands in a single entry. Be sure to maintain at least a single space
between commands.
(e) To save the images in tiff format, set the options in the Graphics Hardcopy panel.
In the panel, select TIFF under Format and Color under Coloring and keep all the
other options unchanged.
(f) Click OK.
(g) For filled contour plots enter the following command in the FLUENT console.
> display set contours filled-contours yes
(h) To set the scale factor for the vector display, you can enter the following command
in the FLUENT console.
> display set velocity-vectors scale 8
The default length scale is 1.


c Fluent Inc. April 1, 2005 15
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

5. Specify the time-stepping parameters.


Solve −→Iterate...

(a) Set the Time Step Size to 0.001 s.


(b) Set the Number of Time Steps to 215.

6. Start the calculation.

7. Save the case and the data files.


File −→ Write −→Case & Data...

16
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

Residuals
continuity
x-velocity 1e+01
y-velocity
k
epsilon 1e+00

1e-01

1e-02

1e-03

1e-04

1e-05

1e-06

1e-07

1e-08
0 500 1000 1500 2000 2500 3000 3500 4000 4500

Iterations

Scaled Residuals (Time=2.1500e-01)


FLUENT 6.2 (2d, segregated, dynamesh, ske, unsteady)

Figure 2: Scaled Residuals

Monitors
total-vol
1500000.0000

1000000.0000

500000.0000

Total 0.0000
Volume
Integral
(pascal)(m3)-500000.0000

-1000000.0000

-1500000.0000
0.0000 0.0250 0.0500 0.0750 0.1000 0.1250 0.1500 0.1750 0.2000 0.2250

Flow Time

Convergence history of Static Pressure on bottom-zone etc. (Time=2.1500e-01)


FLUENT 6.2 (2d, segregated, dynamesh, ske, unsteady)

Figure 3: Convergence History of Static Pressure


c Fluent Inc. April 1, 2005 17
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

Step 8: Postprocessing

1. Display filled contours of static pressure (Figure 4).


Display −→Contours...

(a) Under Options, select Filled.


(b) In the Contours of drop-down lists, select Pressure... and Static Pressure.
(c) Click Display.

2. Display filled contours of velocity magnitude (Figure 5).


(a) In the Contours of drop-down lists, select Velocity... and Velocity Magnitude.
(b) Click Display.

18
c Fluent Inc. April 1, 2005
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

1.35e+05
1.02e+05
6.97e+04
3.72e+04
4.62e+03
-2.79e+04
-6.05e+04
-9.30e+04
-1.26e+05
-1.58e+05
-1.91e+05
-2.23e+05
-2.56e+05
-2.88e+05
-3.21e+05
-3.53e+05
-3.86e+05
-4.19e+05
-4.51e+05
-4.84e+05
-5.16e+05

Contours of Static Pressure (pascal) (Time=2.1500e-01)


FLUENT 6.2 (2d, segregated, dynamesh, ske, unsteady)

Figure 4: Contours of Static Pressure

2.73e+01
2.60e+01
2.46e+01
2.32e+01
2.19e+01
2.05e+01
1.91e+01
1.78e+01
1.64e+01
1.50e+01
1.37e+01
1.23e+01
1.09e+01
9.57e+00
8.20e+00
6.83e+00
5.47e+00
4.10e+00
2.73e+00
1.37e+00
0.00e+00

Contours of Velocity Magnitude (m/s) (Time=2.1500e-01)


FLUENT 6.2 (2d, segregated, dynamesh, ske, unsteady)

Figure 5: Contours of Velocity Magnitude


c Fluent Inc. April 1, 2005 19
Solving a 2D Vibromixer Problem Using the Dynamic Mesh Model

3. Display the velocity vectors (Figure 6).


Display −→Vectors...

(a) Select Velocity... and Velocity Magnitude in the Color by drop-down list.
(b) Click Display.

2.74e+01
2.60e+01
2.46e+01
2.33e+01
2.19e+01
2.05e+01
1.92e+01
1.78e+01
1.64e+01
1.51e+01
1.37e+01
1.23e+01
1.10e+01
9.59e+00
8.22e+00
6.85e+00
5.48e+00
4.11e+00
2.74e+00
1.37e+00
8.13e-04

Velocity Vectors Colored By Velocity Magnitude (m/s) (Time=2.1500e-01)


FLUENT 6.2 (2d, segregated, dynamesh, ske, unsteady)

Figure 6: Velocity Vectors

Summary
In this tutorial you learned how to use the dynamic mesh model in FLUENT to model a
vibromixer.

20
c Fluent Inc. April 1, 2005