Académique Documents
Professionnel Documents
Culture Documents
Introduction
This tutorial provides information for performing basic dynamic mesh calculations. In
addition to combining the basic mesh-motion schemes, this tutorial will introduce rigid-
body motion of a cell zone. This is useful for a multitude of realistic cases with moving
meshes.
In this tutorial you will learn how to:
• Use the dynamic mesh capability of FLUENT to solve a simple flow-driven rigid-
body motion problem.
Prerequisites
This tutorial assumes that you are familiar with the menu structure in FLUENT and that
you have completed Tutorial 1. Some steps in the setup and solution procedure will not
be shown explicitly.
Problem Description
The problem to be considered is shown schematically in Figure 11.1. A 2D axisymmetric
valve geometry is used, consisting of a pressurized cavity on the left, driving the motion
of a poppet that toggles the flow to the circumferential pressure outlets. A spring force
is also acting on the poppet. In this case the transient closure of the valve is studied.
c Fluent Inc. January 11, 2005 11-1
Using Dynamic Meshes
pressure outlets
mass
flow
inlet
moving
poppet
2. Unzip dynamic_mesh.zip.
valve.msh and valve.c can be found in the /dynamic mesh folder created after
unzipping the file.
A user-defined function will be used to define the rigid-body motion of the poppet
in the valve geometry. This function has already been written (valve.c). You will
only need to compile it within FLUENT.
11-2
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
Step 1: Grid
1. Read the grid file valve.msh.
File −→ Read −→Case...
(a) Under Unit Conversion, select in from the drop-down list to complete the phrase
Grid Was Created In in (inches).
(b) Click Scale to scale the grid.
(c) Click Change Length Units to set inches as the working units for length, and
then close the panel.
c Fluent Inc. January 11, 2005 11-3
Using Dynamic Meshes
Grid
FLUENT 6.2 (2d, segregated, lam)
11-4
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
Step 2: Units
1. For convenience, define new units for pressure and mass flow.
In the problem description, pressure, length, and mass flow are specified in psi, in,
and gpm, respectively. While the units for length were switched while scaling the
grid in the previous step, psi and gpm are not the default units for pressure and
mass flow.
Define −→Units...
c Fluent Inc. January 11, 2005 11-5
Using Dynamic Meshes
Step 3: Models
1. Enable an axisymmetric time-dependent calculation.
Define −→ Models −→Solver...
Dynamic mesh simulations currently work only with first-order time ad-
! vancement.
(d) Click OK.
11-6
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
(a) Select k-epsilon as the Model, and retain the default setting of Standard under
k-epsilon Model.
(b) Click OK.
c Fluent Inc. January 11, 2005 11-7
Using Dynamic Meshes
Step 4: Materials
You will create a new material called oil.
Define −→Materials...
4. Click Change/Create.
11-8
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
c Fluent Inc. January 11, 2005 11-9
Using Dynamic Meshes
1. Set the conditions for the mass flow inlet (inlet) as shown in the following figure.
2. Click OK.
11-10
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
3. Set the conditions for the exit boundary (outlet) as shown in the following figure.
5. Select oil as the Material Name from the drop-down list, and keep the default Motion
Type as Stationary.
This replaces air with oil as a working media.
6. Repeat this procedure for the other two fluid zones, inlet zone and outlet zone.
c Fluent Inc. January 11, 2005 11-11
Using Dynamic Meshes
11-12
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
Note that in general, you will need to set boundary conditions for these new wall
zones, when they are not empty. In this case, default settings are used.
c Fluent Inc. January 11, 2005 11-13
Using Dynamic Meshes
11-14
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
c Fluent Inc. January 11, 2005 11-15
Using Dynamic Meshes
i. Under Options, be sure that the Must Improve Skewness option is selected.
ii. Specify other parameters as shown the following table:
Parameter Value
Minimum Length Scale 2.0e-5
Maximum Length Scale 0.007
Maximum Cell Skewness 0.7
Size Remesh Interval 1
If a cell exceeds these limits, the cell is marked for remeshing. Therefore,
you will always need to specify problem-specific values under Remeshing
Parameters.
(e) Click OK.
4. Specify the motion of the poppet, the adjacent walls, and the fluid region left of
the poppet.
The poppet motion and the motion of the deforming wall side-wall-3 are specified by
means of the UDF valve.
Define −→ Dynamic Mesh −→Zones...
11-16
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
c Fluent Inc. January 11, 2005 11-17
Using Dynamic Meshes
11-18
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
(c) Specify the motion of the deforming wall corresponding to the radial boundary
of the deforming fluid zone next to the poppet (int int).
i. In the Zone Names drop-down list, select int int.
ii. Under Type, keep the previous selection of Deforming.
iii. Click the Geometry Definition tab.
iv. In the Definition drop-down list, select plane.
The panel will expand again to show the inputs for a planar geometry.
v. Under Point on Plane, enter 0, 0.22625.
vi. Under Plane Normal, keep the previous setting of 0, 1.
vii. Click the Meshing Options tab.
viii. Under Methods, be sure that Smoothing and Remeshing are selected, and
keep the previous settings for Maximum Skewness to value of 1.
ix. Specify a value of 0.0045 for Minimum Length Scale and a value of 0.0055
for Maximum Length Scale.
x. Click Create.
In many MDM problems, you may want to preview the mesh motion before proceed-
ing any further. In this problem, the mesh motion is driven by the pressure exerted
by the fluid on the poppet and acting against the inertia of the poppet and the force
of a preloaded spring attached to it. Hence, for this problem, mesh motion in the
absence of a flow field solution is meaningless, and you will not use this feature
here.
c Fluent Inc. January 11, 2005 11-19
Using Dynamic Meshes
Step 9: Solution
1. Set the solution parameters.
Solve −→ Controls −→Solution...
(a) Keep all default discretization schemes and values for under-relaxation factors.
This problem has been found to converge satisfactorily with these default set-
tings. Alternatively, you may want to try the PISO discretization scheme for
Pressure-Velocity Coupling in conjunction with higher under-relaxation factors
in order to reduce the overall CPU time needed for this simulation.
(b) Click OK.
3. Request that case and data files are automatically saved every 10 time steps.
File −→ Write −→Autosave...
11-20
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
(a) Set the Autosave Case File Frequency and Autosave Data File Frequency to 10.
To retain all files, keep the Overwrite Existing Files inactive.
(b) In the Filename field, enter valve.
When FLUENT saves a file, it will append the time step value to the file name
prefix (valve). The standard extensions (.cas and .dat) will also be ap-
pended.
(c) Click OK.
c Fluent Inc. January 11, 2005 11-21
Using Dynamic Meshes
5. Create animation sequences for the static pressure contour plots and velocity vectors
plots in the valve.
You will use FLUENT’s solution animation feature to save contour plots of temper-
ature every 5 time steps. After the calculation is complete, you will use the solution
animation playback feature to view the animated temperature plots over time.
Solve −→ Animate −→Define...
11-22
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
c Fluent Inc. January 11, 2005 11-23
Using Dynamic Meshes
8.00e+01
7.67e+01
7.35e+01
7.02e+01
6.69e+01
6.37e+01
6.04e+01
5.71e+01
5.39e+01
5.06e+01
4.74e+01
4.41e+01
4.08e+01
3.76e+01
3.43e+01
3.10e+01
2.78e+01
2.45e+01
2.12e+01
1.80e+01
1.47e+01
11-24
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
c Fluent Inc. January 11, 2005 11-25
Using Dynamic Meshes
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
3.10e+00
11-26
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
7. Save the initial case and data files (valve.cas and valve.dat).
File −→ Write −→Case & Data...
Extra: If you decide to read in the case file that is provided for this tutorial on the
documentation CD, you will need to compile the UDF associated with this tutorial
in your working directory. This is necessary because FLUENT will expect to find
the correct UDF libraries in your working directory when reading the case file.
The UDF (valve.c) that is provided can be edited and customized by changing the
parameters as required for your case. In this tutorial, the values necessary for this
case were preset in the source code. These values may be modified to best suit your
model.
c Fluent Inc. January 11, 2005 11-27
Using Dynamic Meshes
8.17e+02
7.60e+02
7.04e+02
6.47e+02
5.90e+02
5.33e+02
4.77e+02
4.20e+02
3.63e+02
3.07e+02
2.50e+02
1.93e+02
1.36e+02
7.97e+01
2.29e+01
-3.38e+01
-9.05e+01
-1.47e+02
-2.04e+02
-2.61e+02
-3.17e+02
11-28
c Fluent Inc. January 11, 2005
Using Dynamic Meshes
7.77e+01
7.38e+01
6.99e+01
6.60e+01
6.21e+01
5.83e+01
5.44e+01
5.05e+01
4.66e+01
4.28e+01
3.89e+01
3.50e+01
3.11e+01
2.73e+01
2.34e+01
1.95e+01
1.56e+01
1.18e+01
7.88e+00
4.00e+00
1.23e-01
c Fluent Inc. January 11, 2005 11-29
Using Dynamic Meshes
(b) Set the slider bar above Replay Speed about halfway in between Slow and Fast.
(c) Keep the default settings in the rest of the panel and click the play button
(the second from the right in the group of buttons under Playback).
See Tutorial 4 and Section 26.20 of the User’s Guide for additional information
on animating the solution.
Summary
In this tutorial you learned how to use the dynamic mesh feature of FLUENT to simulate
the rigid-body motion of a valve poppet in a flow field, driven by the flow-generated
forces, and spring and inertial forces, by means of a user defined function (UDF).
11-30
c Fluent Inc. January 11, 2005