Tutorial: 3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

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)

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 temperature and density fields using graphics

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)

Figure 1: Problem Specification

Preparation

1. Copy the file cyl3d.msh to your working directory.

2. Start the 3D version of FLUENT.


c Fluent Inc. January 31, 2003 3
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

Setup and Solution


Step 1: Grid

1. Read the grid file cyl3d.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
The grid check lists the minimum and maximum x and y values from the grid, in the
default SI units of meters, and reports on a number of other grid features that are
checked. Any errors in the grid would be reported at this time. In particular, you
should always make sure that the minimum volume is not negative, since FLUENT
cannot begin a calculation if this is the case.

3. Create display surfaces for the fluid zones.


This is done so that you can view the fluid zones directly, without selecting specific
surfaces.
Surface −→Zone...

(a) Select fluid-1 in the Zones list, and click Create.


(b) Repeat for fluid-2 and fluid-3.

4
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

4. Display the grid (Figure 2).


Display −→Grid...

(a) In the Surfaces list, select fluid-1, fluid-2, and fluid-3.


(b) Click Display.

Z
Y
X

Grid Sep 18, 2002


FLUENT 6.1 (3d, segregated, lam)

Figure 2: Grid for the 3D Geometry

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

1. Enable a time-dependent calculation.


Define −→ Models −→Solver...

(a) Select Unsteady under Time.

6
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

(b) Keep the default Unsteady Formulation of 1st-Order Implicit.


Dynamic mesh simulations currently work only with first-order time advance-
ment.

Step 3: Materials
The only material property you need to modify is density; the default values for all other
properties are acceptable.

1. Specify that the flow is compressible.


Define −→Materials...

(a) Select ideal-gas in the drop-down list for Density.


(b) Click Change/Create and close the panel.
Note: FLUENT will automatically activate the energy equation when the ideal-
gas law is selected, so you will not need to visit the Energy panel.


c Fluent Inc. January 31, 2003 7
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

Step 4: Boundary Conditions

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.

Step 5: Mesh Motion Setup

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


Define −→ Dynamic Mesh −→Parameters...

(a) Under Model, select Dynamic Mesh.


The panel will expand to show additional inputs.
(b) Under Model, select In-Cylinder.
Selection of the In-Cylinder option allows input for IC-specific needs, including
valve and piston motion.
(c) Under Methods, select Smoothing, Layering, and Remeshing.
FLUENT will automatically flag the existing mesh zones for use of the different
dynamic mesh methods where applicable.
(d) Keep the default settings for the layering and smoothing parameters.
(e) Click on the Remeshing tab.

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)

D. Select Grid... and Cell Volume in the Histogram Of drop-down lists.


E. Click on the Plot button to generate the histogram plot in the active
graphics window (Figure 3).
You will notice that some cells have a value of volume as large as 0.138
m3 . However, these values are for the quad cells. A good maximum
cell volume is actually smaller than the computed value.

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)

Histogram of Cell Volume (Time=0.0000e+00) Sep 23, 2002


FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 3: Histogram Plot for Cell Volume

iv. Keep the Maximum Skewness as 0.9.


This is the suggested value for 3D problems. Smaller values of maximum
skew will result in improved grid quality at increased computational cost.
The default value of 0.9 represents a compromise between grid quality and
solution time for 3D problems.
(f) Set the In-Cylinder parameters.

10
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

i. Click on the In-Cylinder tab.


The In-Cylinder parameters will be displayed.
ii. Set the Crank Shaft Speed to 10 rpm.
This simulation is run at low speed to approximate the ideal process.
iii. Set the Starting Crank Angle to 180 degrees.
The piston is currently at the bottom dead center (BDC) position. The BDC
position is defined as 180 degrees crank angle, while the top dead center
(TDC) position is defined as 0 degrees crank angle.
iv. Keep the default Crank Period of 720 degrees.
A value of 720 degrees is used for four-stroke engines, while a value of 360
degrees is used for two-stroke engines. This governs the periodicity associated
with valve events and valve lift profiles. Since there are no moving valves,
this parameter is not used in the current calculation.
v. Set the Crank Angle Step Size to 0.5 degrees.
This value is used along with the crankshaft speed to determine the timestep.
vi. Set the Piston Stroke to 8 m.
vii. Set the Connecting Rod Length to 14 m.
viii. Set the Piston Stroke Cutoff to 4 m.
This is the distance from TDC at which the dynamic layering starts to take
place for the hexahedral cell zone fluid-3.
In an actual in-cylinder calculation with moving valves, the layered cells
above the piston move in rigid body motion to avoid interfering with the
valves above the piston. Once the layers are clear of the valves, layering
begins when the rigid body motion of these cells terminates and the piston


c Fluent Inc. January 31, 2003 11
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

continues to move. The Piston Stroke Cutoff parameter defines a truncated


piston profile used to define the motion of the layered cell zone.
ix. Under Minimum Valve Lift, keep the default value of 0 m.
This parameter specifies the value of the lift at which you want FLUENT to
consider each valve to be closed. In this example, there are no valves.
x. Click OK.
(g) Using the text command interface, plot the piston motion profile.
i. In the text command interface, type the following command:
/define/models/dynamic-mesh-controls
ii. Type ppl to invoke the print-plot-lift text command.
iii. Type **piston-full** and click return.
iv. Type **piston-limit**.
v. Click return twice.
vi. Enter a start angle of 0 degrees.
vii. Enter an end angle of 720 degrees.
viii. Enter an increment of 5 degrees.
ix. Click return twice.
The **piston-full** profile (Figure 4) describes motion in terms of the
Piston Stroke and Connecting Rod Length parameters defined previously. Note
that the **piston-limit** profile (Figure 4) is limited to the Piston Stroke
Cutoff parameter.

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

Valve Lifts (Time=6.0000e+00) Jan 22, 2003


Crank Angle=540.00(deg) FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 4: The **piston-full** and **piston-limit** Profiles


c Fluent Inc. January 31, 2003 13
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

2. Specify the zone motion.


Define −→ Dynamic Mesh −→Zones...

(a) Specify the motion of the piston.


i. In the Zone Names drop-down list, select moving-wall.
ii. Under Type, keep the default setting of Rigid Body.
iii. In the Motion UDF/Profile drop-down list, select **piston-full**.
iv. Set the Valve/Piston Axis to (0, 0, 1).
v. Click on the Meshing Options tab.

14
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

vi. Set the Cell Height to 0.5 m.


vii. Click Create.
(b) Specify the motion of the deforming wall.
Note that the declaration of the deforming boundary zones is only necessary for
boundary zones adjacent to cell zones which are remeshed. Deforming boundary
zones adjacent to a dynamically layered cell zone are handled automatically by
extrusion. In this case, the deformation of side-wall-3 is handled automatically
by the solver. side-wall-2 does not experience any resmeshing at all (manual
or automatic) since the adjacent fluid zone, fluid-2, only experiences rigid body
motion but otherwise remains unchanged throughout the simulation.
i. In the Zone Names drop-down list, select side-wall-1.
ii. Under Type, select Deforming.
iii. Click on the Geometry Definition tab.


c Fluent Inc. January 31, 2003 15
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

iv. In the Definition drop-down list, select cylinder.


v. Enter a Cylinder Radius of 4 m.
vi. Set the Cylinder Origin to (0, 0, 0).
vii. Set the Cylinder Axis to (0, 0, 1).
viii. Click on the Meshing Options tab.

16
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

ix. Set the Height to 0.5 m.


x. Set the Height Factor to 0.4.
xi. Set the Max Skewness to 0.7.
xii. Click Create.
(c) Specify the motion of the layered cells above the piston (fluid-3).
As described in the introduction, it is necessary to move the layered cell zone
“out of the way” of the moving valves in an in-cylinder case. Although there
are no moving valves in this tutorial, this approach is demonstrated here. You
will apply truncated piston motion to the layered cell zone defined by the built-in
function **piston-limit**. When the piston is above the Piston Stroke Cutoff value
specified in the Dynamic Mesh panel, the motion of the layers is identical to that
of the piston. When the piston is below cutoff position, the rigid body motion of
the layers stops, while the piston continues to move. Layers are then added or
removed to account for the volume deformation.


c Fluent Inc. January 31, 2003 17
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

i. In the Zone Names drop-down list, select fluid-3.


ii. Under Type, select Rigid Body.
iii. In the Motion UDF/Profile drop-down list, select **piston-limit**.
The **piston-limit** profile is a truncated version of the **piston-full** profile
(Figure 4). When the piston stroke exceeds the Piston Stroke Cutoff, **piston-
limit** remains fixed and layering begins as the piston continues to move.
iv. Click on the Motion Attributes tab.
v. Set the Valve/Piston Axis to (0, 0, 1).
vi. Click Create.
(d) Specify the motion of the mixed cell zone (fluid-2).
For the mixed cell zone, you will prescribe the same motion as for the layered
cell zone (fluid-3).
i. In the Zone Names drop-down list, select fluid-2.
ii. Click Create.
(e) Close the Dynamic Zones panel.

3. Preview the mesh motion.


The zone motion preview utility is useful for quickly checking rigid body motion set-
tings. The mesh coordinates are not actually modified during this procedure; instead
dynamic zones with rigid body motion settings are simply translated in the display
window to emulate the actual grid motion. User errors, such as an improperly scaled
mesh or valve lift profile, incorrect valve/piston axis definition, etc., can be quickly
identified using this procedure. Only the motion of zones with rigid body motion is
represented, remeshing on deforming zones is not depicted.
(a) Display the grid outline.
Display −→Grid...
i. Deselect all surfaces.
ii. Click Outline to select all of the boundary surfaces and click Display to display
the grid.
iii. Close the Grid Display panel.

18
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

(b) Initiate the mesh motion.


Display −→IC Zone Motion...

i. Keep the default settings and click Preview.


If the case is set up properly, you should see the piston move through two
complete cycles.
ii. Close the IC Zone Motion panel.

Step 6: Solution Setup

1. Enable the plotting of volume-averaged temperature in the domain during the calcu-
lation by defining a volume monitor.
Solve −→ Monitors −→Volume...

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


(b) Turn on Plot, Print, 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 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.

i. In the Report Type drop-down list, select Volume-Average.


ii. In the X Axis drop-down list, select Flow Time.
iii. In the Field Variable drop-down lists, select Temperature... and Static Tem-
perature.
iv. In the Cell Zones list, select fluid-1, fluid-2, and fluid-3.
v. In the File Name field, enter vol-monitor-1.out.
vi. Click OK in the Define Volume Monitor panel, and then in the Volume Mon-
itors panel.

20
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

2. Enable the plotting of residuals during the calculation.


Solve −→ Monitors −→Residual...

(a) Select Plot under Options.


(b) Under Plotting, set the Iterations to 100.
To avoid a cluttered residual plot in transient simulations, it is useful to display
only the most recent iterations.
(c) Click OK to close the Residual Monitors panel.


c Fluent Inc. January 31, 2003 21
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

3. Initialize the solution.


Solve −→ Initialize −→Initialize...

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)

4. Set up an animation for temperature.


(a) Activate a new window for the animation.
Display −→Options...

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)

(b) Display filled contours of temperature (Figure 5).


Display −→Contours ...

i. Select Filled under Options.


ii. Select Temperature... and Static Temperature in the Contours of drop-down
lists.
iii. Deselect all surfaces and then select moving-wall, side-wall-1, side-wall-2, and
top-wall under Surfaces.
iv. Click Display.
v. Close the Contours panel.

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

Contours of Static Pressure (pascal) (Time=0.0000e+00) Jan 22, 2003


Crank Angle=180.00(deg) FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 5: Contours of Static Temperature

(c) Save the current view.


Display −→Views...

i. Click Save to save the current view as view-0.


ii. Close the Views panel.


c Fluent Inc. January 31, 2003 25
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

(d) Open the command monitor window.


Solve −→Execute Commands...

i. Set the Defined Commands to 1.


ii. Select the checkbox under the On column.
iii. Select 10 under the Every column.
iv. In the When drop-down list, select Time Step.
v. For the text-entry field under Command, enter the following commands se-
quentially (on the single line):
/di/sw 2
/di/view/restore-view view-0
/di/cont temp 300 570
/di/hc temperature%t.tiff
Note: It is possible to specify multiple text commands in a single entry. Be
sure to maintain at least a single space between commands. The above
command will first activate ‘window 2’, restore the saved view ‘view-0’,
display contours of static temperature and then make a hardcopy of the
resulting image. The ‘%t’ appended to the file name instructs FLUENT
to append the timestep index to the filename.
vi. Click OK.

26
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

(e) Set hardcopy settings.


File −→Hardcopy...

i. Select TIFF under Format.


ii. Select Color under Coloring.
iii. Click Apply and close the panel.

5. Request saving of case and data files every 90 time steps.


File −→ Write −→Autosave...

(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)

6. Set the solution parameters.


Solve −→ Controls −→Solution...

(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.

Step 7: Mesh Preview

1. Save the case file.


The mesh changes during the preview so be sure to save the case before mesh preview.

2. Display the grid.


Display −→Grid...

(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)

3. Set up the mesh preview.


Solve −→Mesh Motion...

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

1. Read the case file back into FLUENT.


File −→ Read −→Case...

2. Initialize the solution.


Solve −→ Initialize −→Initialize...
(a) Click Init.
(b) Close the Solution Initialization panel.


c Fluent Inc. January 31, 2003 29
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

3. Start the calculation.


Solve −→Iterate...

(a) Set the Number of Time Steps to 720.


(b) Set the Max Iterations per Time Step to 10.
(c) Click Iterate.
The plot of volume-averaged temperature is shown in Figure 6. Note that since the
values may be different for different computers, the plot that appears on your screen
may not be exactly the same as the one shown here.

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

Convergence history of Static Temperature on fluid-3 etc. (in SI units) (Time=6.0000e+00)


Jan 22, 2003
Crank Angle=540.00(deg) FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 6: Convergence History of Static Temperature

Postprocessing

1. Inspect the solution at the final time step (BDC).


(a) Display contours of static temperature on the outer surfaces (Figure 7).
Display −→Contours...
i. In the Contours Of drop-down lists, select Temperature... and Static Temper-
ature.
ii. In the Surfaces list, select moving-wall, side-wall-1, side-wall-2, side-wall-3, and
top-wall.
iii. Deselect everything under Options except Filled and Node Values.
iv. Enter 300 for Min and 500 for Max.
v. Click Display.


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

Contours of Static Temperature (k) (Time=6.0000e+00) Jan 23, 2003


Crank Angle=540.00(deg) FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 7: Contours of Static Temperature After Returning to the BDC Position

32
c Fluent Inc. January 31, 2003
3D Adiabatic Compression (Layering, Remeshing and Spring Smoothing)

(b) Display contours of density (Figure 8).


Display −→Contours...
i. In the Contours Of drop-down lists, select Density... and Density.
ii. In the Surfaces list, select moving-wall, side-wall-1, side-wall-2, side-wall-3, and
top-wall.
iii. Deselect everything under Options except Filled and Node Values.
iv. Enter 1.18 for Min and 5.88 for Max.
v. Click Display.

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

Contours of Density (kg/m3) (Time=6.0000e+00) Jan 28, 2003


Crank Angle=540.00(deg) FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 8: Contours of Density After Returning to the BDC Position

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)

2. Inspect the solution at top dead center.


(a) Read in the corresponding case and data files (cyl3d0360.cas and cyl3d0360.dat).
File −→ Read −→Case & Data...
(b) Display contours of static temperature (Figure 9).
Display −→Contours...
i. Deselect everything under Options except Filled and Node Values.
ii. Enter 300 for Min and 500 for Max.
iii. Click Display.

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

Contours of Static Temperature (k) (Time=3.0000e+00) Jan 23, 2003


Crank Angle=360.00(deg) FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 9: Contours of Static Temperature at Top Dead Center

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)

(c) Display contours of density (Figure 10).


Display −→Contours...
i. Enter 1.18 for Min and 5.88 for Max.
ii. Click Display.

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

Contours of Density (kg/m3) (Time=3.0000e+00) Jan 28, 2003


Crank Angle=360.00(deg) FLUENT 6.1 (3d, segregated, dynamesh, lam, unsteady)

Figure 10: Contours of Density at Top Dead Center

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

You might also like