Adv DM v6.2 Tut 01 Ic Layer
Adv DM v6.2 Tut 01 Ic Layer
Adv DM v6.2 Tut 01 Ic Layer
Introduction
This tutorial illustrates the setup and solution of a basic deforming mesh in FLUENT using
the layering approach.
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.
In this tutorial, you will use the layering mesh motion method to update the volume mesh in
the deforming region. You will setup and solve the case for both types of layering; Bottom
Layering and Top Layering. Layering can be used to add or remove layers of cells adjacent
to a moving boundary based on the height of the layer adjacent to the moving surface.
The first part will involve Bottom Layering, and the second part the Top Layering. The
dynamic mesh model in FLUENT allows an ideal layer height to be specified on each moving
boundary. The layer of cells adjacent to the moving boundary is subdivided or merged with
the layer of cells next to it based on the height of the cells in the moving boundary.
In this tutorial you will learn how to:
• Set up a problem for a dynamic mesh.
c Fluent Inc. June 20, 2005 1
2D Adiabatic Compression (Layering)
Prerequisites
This tutorial assumes that you are familiar with the FLUENT interface and that you have
a good understanding of the basic setup and solution procedures. In this tutorial, you will
use the dynamic mesh model, so you should have some experience with it.
If you have not used this model before, please refer to Section 10.6 of the FLUENT 6.2 User’s
Guide.
Problem Description
The problem to be considered is shown schematically in Figure 1. A simplified 2D geometry
is used, consisting of a box, the bottom wall of which represents the piston. The piston moves
up from bottom dead center position (BDC), slowly compressing the fluid adiabatically.
After reaching top dead center (TDC), the piston moves back downward to the initial
position, to complete a cycle.
Preparation
2
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
c Fluent Inc. June 20, 2005 3
2D Adiabatic Compression (Layering)
4
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
Step 2: Models
c Fluent Inc. June 20, 2005 5
2D Adiabatic Compression (Layering)
Step 3: Materials
The only material property you need to modify is density; the default values for all other
properties are acceptable.
6
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
In this tutorial, you will not need to visit the Boundary Conditions panel to set any condi-
tions. You will use the default adiabatic wall thermal conditions for all walls, and no inlets
or outlets are present. Dynamic mesh motion and all related parameters are specified using
the items in the Define/Dynamic Mesh submenu, not through the Boundary Conditions panel.
You will set these conditions in the next step.
c Fluent Inc. June 20, 2005 7
2D Adiabatic Compression (Layering)
8
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
(f) Using the text command interface, plot the piston motion profile.
i. In the text command interface, type the commands as shown below:
/define/models/dynamic-mesh-controls/in-cylinder-parameter> ppl
#f
Lift Profile:(1) [()] **piston-full**
Lift Profile:(2) [()] <Enter>
Start: [180] 0
End: [720]
Increment: [10] 5
Plot lift? [yes] y
8.00e+00
7.00e+00
6.00e+00
5.00e+00
4.00e+00
3.00e+00
2.00e+00
1.00e+00
0.00e+00
0 100 200 300 400 500 600 700 800
c Fluent Inc. June 20, 2005 9
2D Adiabatic Compression (Layering)
10
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
c Fluent Inc. June 20, 2005 11
2D Adiabatic Compression (Layering)
i. Click Integrate.
ii. Keep the default settings under Preview Controls and click Preview.
If the case is setup properly, you should see the piston move through two
complete cycles.
iii. Close the Zone Motion panel.
12
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
The time step size, displayed as 0.008333333 in the read-only text field for Time Step
Size, corresponds to 12 degree crank angle and is based on the crankshaft speed and
crank angle increment parameters defined earlier.
(a) Enter 720 for the number of time-steps.
This corresponds to one full revolution of the crankshaft.
(b) Click Preview the preview the mesh motion.
As the mesh is updated by FLUENT, messages will appear in the console window
reporting the progress of the update.
4. Exit FLUENT.
Step 7: Solution
1. Start FLUENT 2D and read the previously saved case file, box2d layer.cas.gz.
File −→ Read −→Case...
2. Enable the plotting of volume-averaged temperature in the domain during the calcu-
lation by defining a volume monitor.
Solve −→ Monitors −→Volume...
c Fluent Inc. June 20, 2005 13
2D Adiabatic Compression (Layering)
14
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
c Fluent Inc. June 20, 2005 15
2D Adiabatic Compression (Layering)
(a) Keep the default values for all variables, including an initial Temperature value
of 300 K.
(b) Click Apply.
The Apply button does not initialize the flow field data. Apply simply allows you
to save your initialization parameters for later use. You need to use the Init
button to initialize the solution.
(c) Click Init to initialize the solution.
(d) Click Close.
16
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
c Fluent Inc. June 20, 2005 17
2D Adiabatic Compression (Layering)
5.72e+02
5.58e+02
5.45e+02
5.31e+02
5.18e+02
5.04e+02
4.90e+02
4.77e+02
4.63e+02
4.50e+02
4.36e+02
4.22e+02
4.09e+02
3.95e+02
3.82e+02
3.68e+02
3.54e+02
3.41e+02
3.27e+02
3.14e+02
3.00e+02
18
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
c Fluent Inc. June 20, 2005 19
2D Adiabatic Compression (Layering)
(a) Set the Autosave Case File Frequency and Autosave Data File Frequency to 90.
The mesh changes during the simulation, so you must save both the case and
data files.
20
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
(b) In the Filename field, enter box2d layer.gz and click OK.
When FLUENT saves a file, it will append the time step value to the file name
prefix (box2d layer). The standard extensions (.cas and .dat) will also be
appended. When the .gz extension is specified, FLUENT will save the file in
compressed format.
(a) For the Under-Relaxation Factors, set the Pressure to 0.6 and the Momentum to
0.9.
(b) Under Discretization, select PRESTO! for Pressure.
(c) Select PISO for Pressure-Velocity Coupling and set the Skewness Correction to 0.
(d) Click OK.
c Fluent Inc. June 20, 2005 21
2D Adiabatic Compression (Layering)
22
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
Monitors
vol-mon-1
600.0000
550.0000
500.0000
Volume 450.0000
Weighted
Average
(k) 400.0000
350.0000
300.0000
0.0000 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000
Flow Time
Step 8: Postprocessing
c Fluent Inc. June 20, 2005 23
2D Adiabatic Compression (Layering)
5.72e+02
5.58e+02
5.45e+02
5.31e+02
5.18e+02
5.04e+02
4.91e+02
4.77e+02
4.64e+02
4.50e+02
4.36e+02
4.23e+02
4.09e+02
3.96e+02
3.82e+02
3.69e+02
3.55e+02
3.42e+02
3.28e+02
3.15e+02
3.01e+02
6.00e+00
5.75e+00
5.50e+00
5.25e+00
5.00e+00
4.75e+00
4.50e+00
4.25e+00
4.00e+00
3.75e+00
3.50e+00
3.25e+00
3.00e+00
2.75e+00
2.50e+00
2.25e+00
2.00e+00
1.75e+00
1.50e+00
1.25e+00
1.00e+00
24
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
5.72e+02
5.58e+02
5.45e+02
5.31e+02
5.18e+02
5.04e+02
4.91e+02
4.77e+02
4.64e+02
4.50e+02
4.36e+02
4.23e+02
4.09e+02
3.96e+02
3.82e+02
3.69e+02
3.55e+02
3.42e+02
3.28e+02
3.15e+02
3.01e+02
The temperature very closely obeys the analytical result for a reversible, adiabatic
compression:
γ−1
T2 ρ2
=
T1 ρ1
With γ = 1.4 and a compression ratio of 5:1, the theoretical temperature at top
dead center is 571 K.
c Fluent Inc. June 20, 2005 25
2D Adiabatic Compression (Layering)
6.00e+00
5.75e+00
5.50e+00
5.25e+00
5.00e+00
4.75e+00
4.50e+00
4.25e+00
4.00e+00
3.75e+00
3.50e+00
3.25e+00
3.00e+00
2.75e+00
2.50e+00
2.25e+00
2.00e+00
1.75e+00
1.50e+00
1.25e+00
1.00e+00
26
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
Note: In this step, you will modify the case (box2d layer-init.cas.gz) created for the
bottom layering setup. After you read the case file, delete the previously defined dy-
namic zones. Start this part of solution in a separate folder so that the case/data files
and animation files saved during the bottom layering setup do not get overwritten.
2. Delete the previously defined dynamic zones and define new dynamic zones.
Define −→ Dynamic Mesh −→Zones...
(a) Under Dynamic Zones, select moving wall and click Delete.
(b) In the Zone Names drop-down list, select fluid.
(c) Under Type, keep the default setting of Rigid Body.
(d) In the Motion UDF/Profile drop-down list, select **piston-full**.
c Fluent Inc. June 20, 2005 27
2D Adiabatic Compression (Layering)
28
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
c Fluent Inc. June 20, 2005 29
2D Adiabatic Compression (Layering)
30
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
Not specifying the motion for the moving wall zone in the Dynamic Zones panel will
still allow the mesh to deform. However, this will not ensure the proper boundary
condition for the moving wall zone. In addition to the motion for the fluid zone, the
moving wall also needs to be assigned the mesh motion in the Dynamic Zones panel.
The figures A and B below show velocity contours by specifying motion only for fluid
zone, and by specifying motion for both the fluid as well as moving wall zones, respec-
tively. Here, figure A shows the wrong velocity distribution near the wall, whereas,
figure B shows the correct velocity distribution.
c Fluent Inc. June 20, 2005 31
2D Adiabatic Compression (Layering)
Monitors
vol-mon-1
600.0000
550.0000
500.0000
Volume 450.0000
Weighted
Average
(k) 400.0000
350.0000
300.0000
0.0000 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000
Flow Time
Step 2: Postprocessing
32
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
5.72e+02
5.58e+02
5.45e+02
5.31e+02
5.18e+02
5.04e+02
4.91e+02
4.77e+02
4.64e+02
4.50e+02
4.36e+02
4.23e+02
4.09e+02
3.96e+02
3.82e+02
3.69e+02
3.55e+02
3.42e+02
3.28e+02
3.15e+02
3.01e+02
Figure 11: Contours of Static Temperature After Returning to the BDC position
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
0.00e+00
c Fluent Inc. June 20, 2005 33
2D Adiabatic Compression (Layering)
5.72e+02
5.58e+02
5.45e+02
5.31e+02
5.18e+02
5.04e+02
4.91e+02
4.77e+02
4.64e+02
4.50e+02
4.36e+02
4.23e+02
4.09e+02
3.96e+02
3.82e+02
3.69e+02
3.55e+02
3.42e+02
3.28e+02
3.15e+02
3.01e+02
The temperature very closely obeys the analytical result for a reversable, adiabatic
compression:
γ−1
T2 ρ2
=
T1 ρ1
With γ = 1.4 and a compression ratio of 5:1, the theoretical temperature at top
dead center is 571 K.
(c) Display filled contours of density (Figure 14).
Display −→Contours...
i. Deselect everything under Options except Filled and Node Values.
ii. Enter 1 for Min and 6 for Max.
iii. Click Display.
34
c Fluent Inc. June 20, 2005
2D Adiabatic Compression (Layering)
6.00e+00
5.75e+00
5.50e+00
5.25e+00
5.00e+00
4.75e+00
4.50e+00
4.25e+00
4.00e+00
3.75e+00
3.50e+00
3.25e+00
3.00e+00
2.75e+00
2.50e+00
2.25e+00
2.00e+00
1.75e+00
1.50e+00
1.25e+00
1.00e+00
Summary
In this tutorial you learned how to use the dynamic mesh feature of FLUENT. If you are
going to set up and solve real-life simulations that involve valve movement as well as piston
movement, you will have to perform some additional steps that could not be illustrated
with the geometry in this problem. Please see the application-specific tutorial (available
from your technical support engineer) for details.
c Fluent Inc. June 20, 2005 35