Professional Documents
Culture Documents
Tutorial: 3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
Tutorial: 3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
Tutorial: 3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
Introduction
This tutorial introduces how to perform basic dynamic mesh calculations in FLUENT 6.1.
In addition to combining the basic mesh motion schemes, this tutorial will introduce rigid
body motion of a cell zone. This is useful for realistic in-cylinder cases with moving valves.
In geometries where the valves and piston occupy the same space (at different times), the
cell zone containing the layered cells above the piston must be moved “out of the way” to
avoid interfering with the moving valves.
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, spring-based smoothing, and remeshing mesh
motion methods to update the volume mesh in the deforming region.
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 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.
For zones with a triangular or tetrahedral mesh, spring-based smoothing can be used to
adjust the interior node locations based on the known displacements at the boundary nodes.
The spring-based smoothing method updates the volume mesh without changing the mesh
connectivity.
When the boundary displacement is large compared to the local cell sizes, the cell quality can
deteriorate or the cells can become degenerate, and this will lead to convergence problems
when the solution is updated to the next time step. To circumvent this problem, FLUENT
agglomerates poor-quality cells (cells that are too large, too small, or excessively stretched)
and locally remeshes the agglomeration.
c Fluent Inc. January 31, 2003 1
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
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 be generally familiar with it. If you are not,
please review the FLUENT Dynamic Mesh Manual.
Problem Description
The problem to be considered is shown schematically in Figure 1. A simplified 3D in-cylinder
geometry is used, consisting of a a circular cylinder, the bottom wall of which represents the
piston. The piston moves up from bottom dead center position (BDC), corresponding to a
crank shaft angle of 180 degrees, slowly compressing the fluid adiabatically. After reaching
top dead center (TDC), corresponding to a crank shaft angle of 360 degrees, the piston
moves back downward to the initial position, to complete a cycle, at a crank shaft angle of
540 degrees.
2
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
Preparation
c Fluent Inc. January 31, 2003 3
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
4
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
Z
Y
X
Note that fluid-1 is tetrahedral, fluid-2 is a mixed cell zone containing pyramids
and tetrahedrals, and fluid-3 consists of hexahedral cells. Because the remeshing
c Fluent Inc. January 31, 2003 5
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
scheme used by FLUENT works only with tetrahedral cells, the pyramids must
be separated from the remeshed zone (fluid-1). Furthermore, a “cap” of tetrahe-
dral cells is attached to the pyramids and combined in cell zone fluid-2. These
tetrahedral elements were generated in TGrid using the “fill-cap” option. When
pyramids are generated over quadrilaterals, the surface appears very irregular.
The “fill” cap option allows the creation of tetrahedral elements between the ir-
regularities to make the surface smoother. The “fill cap” is an optional step, but
may improve the remeshing robustness since the “fill-cap” provides a smoother
surface than a typical pyramid cap.
The current tutorial uses layered hexahedral cells. In realistic in-cylinder meshes,
the use of pyramids to transition to the tetrahedral cells can cause difficulty if the
“squish” volume at the TDC position becomes very small. For these cases the use
of pyramids is not recommended. Instead, layered wedge elements may be used
in place of the hexehedral cells, eliminating the need for pyramids. Alternately,
if hexehedral layered cells are desired, the transition to the tetrahedral cells can
be accomplished using a non-conformal interface.
Step 2: Models
6
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
Step 3: Materials
The only material property you need to modify is density; the default values for all other
properties are acceptable.
c Fluent Inc. January 31, 2003 7
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
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.
8
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
i. Under Options, keep the default settings for Sizing Function and Must Improve
Skewness.
By default, the Sizing Function option is turned off and the Must Improve
Skewness option is turned on.
ii. Set the Minimum Cell Volume to 0.002 m3 .
iii. Set the Maximum Cell Volume to 0.07 m3 .
If the cell size gets larger than the Maximum Cell Volume or smaller than the
Minimum Cell Volume, local remeshing will occur. Therefore, you will always
need to specify problem-specific values for remeshing parameters.
Extra: A good way to obtain correct maximum and minimum cell volumes
is by generating a histogram plot.
The steps for generating a histogram plot are as follows:
A. Initialize the solution.
Solve −→ Initialize −→Initialize...
B. In the Initialize panel, click on Init and close the panel.
C. Open the Solution Histogram panel.
Plot −→Histogram...
c Fluent Inc. January 31, 2003 9
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
35
30
25
20
15
10
0
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14
Y
Z X Cell Volume (m3)
10
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
c Fluent Inc. January 31, 2003 11
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
12
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
**piston-full**
**piston-limit**
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
Z Y
Crank Angle (deg)
X
c Fluent Inc. January 31, 2003 13
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
14
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
c Fluent Inc. January 31, 2003 15
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
16
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
c Fluent Inc. January 31, 2003 17
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
18
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
1. 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. January 31, 2003 19
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
(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.
20
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
c Fluent Inc. January 31, 2003 21
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
The solution is initialized at this point in the problem setup so that the contours for
setting up the view for the animation can be displayed.
Note that if you have initialized the solution in an earlier step for the purpose of
generating a histogram plot, FLUENT will present a warning dialog box asking you if
it should discard the current solution data. You will be saving the case file in a later
step, so you can click OK in this box.
(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.
22
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
i. In the Graphics Window section, enter 2 for the Active Window and click
Open.
ii. Close the Display Options window.
c Fluent Inc. January 31, 2003 23
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
24
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
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
Z Y
0.00e+00
0.00e+00 X
c Fluent Inc. January 31, 2003 25
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
26
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
(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.
(b) In the Filename field, enter cyl3d and click OK.
When FLUENT saves a file, it will append the time step value to the file name
prefix (cyl3d). The standard extensions (.cas and .dat) will also be appended.
c Fluent Inc. January 31, 2003 27
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
(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 and PISO for Pressure-Velocity
Coupling.
(c) Under PISO Parameters, set the Skewness Correction to 0.
(d) Click OK.
(a) Deselect all surfaces and then select moving-wall, side-wall-1, side-wall-2, and top-
wall under Surfaces.
(b) Click Display.
(c) Close the Grid Display panel.
28
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
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.
Step 8: Solution
c Fluent Inc. January 31, 2003 29
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
30
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
600.000
550.000
500.000
Volume 450.000
Weighted
Average
(k) 400.000
350.000
300.000
0 1 2 3 4 5 6
Y
Z X Flow Time
Postprocessing
c Fluent Inc. January 31, 2003 31
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
5.00e+02
4.90e+02
4.80e+02
4.70e+02
4.60e+02
4.50e+02
4.40e+02
4.30e+02
4.20e+02
4.10e+02
4.00e+02
3.90e+02
3.80e+02
3.70e+02
3.60e+02
3.50e+02
3.40e+02
3.30e+02
3.20e+02
Z Y
3.10e+02
3.00e+02 X
32
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
5.88e+00
5.64e+00
5.41e+00
5.18e+00
4.94e+00
4.70e+00
4.47e+00
4.24e+00
4.00e+00
3.77e+00
3.53e+00
3.30e+00
3.06e+00
2.83e+00
2.59e+00
2.36e+00
2.12e+00
1.88e+00
1.65e+00
Z Y
1.41e+00
1.18e+00 X
Note that the temperature and density at the end of one full cycle closely replicate
those at the beginning of the simulation (the 300 K uniform initial temperature).
c Fluent Inc. January 31, 2003 33
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
5.00e+02
4.90e+02
4.80e+02
4.70e+02
4.60e+02
4.50e+02
4.40e+02
4.30e+02
4.20e+02
4.10e+02
4.00e+02
3.90e+02
3.80e+02
3.70e+02
3.60e+02
3.50e+02
3.40e+02
3.30e+02
3.20e+02
Z Y
3.10e+02
3.00e+02 X
The temperature very closely obeys the analytical result for a reversible adiabatic
compression:
γ−1
T2 ρ2
=
T1 ρ1
where γ = 1.4, and the compression ratio is 5:1 (ρ2 /ρ1 = 5), yielding a theoretical
temperature at top dead center of 571 K.
34
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)
5.88e+00
5.64e+00
5.41e+00
5.18e+00
4.94e+00
4.70e+00
4.47e+00
4.24e+00
4.00e+00
3.77e+00
3.53e+00
3.30e+00
3.06e+00
2.83e+00
2.59e+00
2.36e+00
2.12e+00
1.88e+00
1.65e+00
Z Y
1.41e+00
1.18e+00 X
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 in-cylinder 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
for in-cylinder modeling (available from your technical support engineer) for details.
c Fluent Inc. January 31, 2003 35