You can enable the In-Cylinder option in the Dynamic Mesh Task Page (Figure 10.13: The Dynamic Mesh Task Page) for transient problems. Then click the button in the Options group box to open the Options Dialog Box. Click the In-Cylinder tab and specify the Crank Shaft Speed, the Starting Crank Angle, and the Crank Period, which are used to convert between flow time and crank angle. You must also specify the time step to use for advancing the solution in terms of crank angle in Crank Angle Step Size. By default, ANSYS Fluent assumes a Crank Angle Step Size of 0.5 degrees.
ANSYS Fluent provides a built-in function that can define the location of the piston as a function of crank angle. This function is named **piston-full**, and is selected from the Motion/UDF Profile drop-down list in the Dynamic Mesh Zones dialog box as part of rigid body motion (see Rigid Body Motion for details). If you plan to specify the piston motion using this function, you must specify the Crank Radius (that is, the distance between the crank center and the center of the crank pin) and the Connecting Rod Length. You also have the option of entering a value for the Piston Pin Offset for cases when the piston pin is offset perpendicularly from the plane defined by the crank shaft axis and the direction of motion of the piston. The sign of this offset can be positive or negative, and is determined based on the geometry and the direction of rotation of the crank shaft (as shown in Figure 10.53: Determining the Sign of the Piston Pin Offset).
When the **piston-full** function is used, the piston location is calculated according to the following equation:
(10–25) |
where is the piston location,
the crank radius,
is the connecting rod length,
is
the piston pin offset, and
is the current crank angle.
The piston location is always 0 at top-dead-center
(TDC), that is, when the crank pin is perfectly aligned between the
piston pin and the center of rotation of the crank shaft. TDC occurs
when the crank angle is 0° when there is no piston pin offset, and prior to the crank angle
reaching 0° when
there is a positive piston pin offset. The piston location is a positive
value at bottom-dead-center (BDC), that is, when the crank shaft is
perfectly aligned between the piston pin and the crank pin. The value
of
at BDC is equal to
when
there is no piston pin offset, and greater than
when there
is a nonzero piston pin offset (positive or negative).
The current crank angle is calculated from
(10–26) |
where is the Starting Crank Angle and
is the Crank Shaft Speed.
The Piston Stroke Cutoff and Minimum Valve Lift values are used to control the actual values of the valve lift and piston stroke such that
(10–27) |
where is the valve lift
computed from the appropriate valve profiles,
is the Minimum Valve
Lift,
is the stroke calculated
from Equation 10–25, and
is the Piston Stroke
Cutoff. (See Defining Motion/Geometry Attributes of Mesh Zones on how the Piston Stroke Cutoff is used to
control the onset of layering in the cylinder chamber.)
Enable the Write In-Cylinder Output option then click the button if you want to specify specific output parameters. The In-Cylinder Output Controls Dialog Box will open, where you can specify various quantities needed for the calculation of swirl and tumble along with the frequency of writing the output to the chosen file. Swirl is used to describe circulation about the cylinder axis. Tumble flow circulates around an axis perpendicular to the cylinder axis, orthogonal to swirl flow.
The following list describes the In-Cylinder Output Controls Dialog Box.
is an integer entry specifying the interval in number of time-steps. Make sure that a value other than 0 is used for the frequency, in order to allow you to complete your setup.
is a drop-down list that allows you to select the method to calculate the swirl center. The list contains center of gravity and fixed, with center of gravity being the default value.
option calculates the swirl center inside the code and is used as the center of gravity of the chosen cell zones.
option enables you to specify a swirl center in the entries below the drop-down list.
In addition to these two options, you can chose to use your own compiled UDF to calculate the swirl center.
For details on using a dynamic mesh UDF, see the Fluent Customization Manual for information on user-defined functions.
is a list that displays the names of all existing cell zones in the case files. You can select only the zones relevant for the swirl and tumble calculations.
specifies the swirl axis with three entries for the directional components. By default, X, Y, Z = 0, 1, 0.
specifies the directional components of Tumble Axis in X, Y, Z directions. By default, X, Y, Z = 0, 0, 1. This applies only in 3D.
specifies the directional components of Cross Tumble Axis in X, Y, Z directions. By default, X, Y, Z = 1, 0, 0. This applies only in 3D.
specifies the name of the In-Cylinder output file. By default, the file name contains the name of the
case file appended with a .txt extension.
The In-Cylinder specific output controls can also be controlled using the TUI as follows:
Go to define/dynamic-mesh/controls/in-cylinder-output? Enable in-cylinder output?[no]yesOutput Write Frequency[0]10Cell zone name/id(1)[()]2Cell zone name/id(1)[()] File Name[‘‘/nfs/devvault/data9/ic-sp-output.txt’’] Swirl Center Method: (fixed cg user-defined)Option[cg] Swirl Axis x[0] Swirl Axis y[1] Swirl Axis z[0] Tumble Axis x[0] Tumble Axis y[0] Tumble Axis z[1] Cross Tumble Axis x[1] Cross Tumble Axis y[0] Cross Tumble Axis z[0]
If you select fixed as the choice at Swirl Center Method then you will be prompted to enter the swirl center as follows:
Swirl Center(x) (mm) [0] Swirl Center(y) (mm) [0] Swirl Center(z) (mm) [0]
If a swirl center method UDF has been compiled already and loaded into UDF then you can choose user-defined as the swirl center method option, in such a case the following is the sequence of prompts.
Swirl Center UDF[] swirl_udf::libudf
If the name of the UDF library is libudf then you can omit this and enter in the swirl center UDF[]swirl_udf, otherwise the name of the UDF followed
by the UDF library name with symbol:: in between, should be entered.
By filling up the various entries that are needed in the In-Cylinder Output Controls Dialog Box and pressing the button, the swirl and tumble calculations will be written at the chosen frequency to the chosen file while doing the solution run. Details of the quantities written to the file are as follows:
|
CA = Crank Angle |
|
m = Mass of the entire fluid contained in the selected cell zones |
|
L = Angular momentum vector of fluid mass contained in selected cell zones with respect to the swirl center |
|
|
|
|
|
|
|
|
|
I |
|
I |
|
I |
|
|
Altogether, the previous quantities are combined to yield eight columns of data in the output file, as shown in the figure that follows:
This section describes the problem setup procedure for an in-cylinder dynamic mesh simulation.
Consider the 2D in-cylinder example shown in Figure 10.56: A 2D In-Cylinder Geometry for a typical pent-roof engine.
In setting up the dynamic mesh model for an in-cylinder problem, you must consider the following issues:
how to provide the proper mesh topology for the volume mesh update methods (smoothing, dynamic layering, and local or zonal remeshing)
how to define the motion attributes and geometry for the valve and piston surfaces
how to address the opening and closing of the intake and exhaust valves
how to specify the sequence of events that controls the in-cylinder simulation
ANSYS Fluent requires that you provide an initial volume mesh with the appropriate mesh topology such that the various mesh update methods described in Dynamic Mesh Update Methods can be used to automatically update the dynamic mesh. However, ANSYS Fluent does not require you to set up all in-cylinder problems using the same mesh topology. When you generate the mesh for your in-cylinder problem, you must consider the various mesh regions that you can identify as moving, deforming, or stationary, and generate these mesh regions with the appropriate cell shape.
The mesh topology for the example problem in Figure 10.56: A 2D In-Cylinder Geometry is shown in Figure 10.57: Mesh Topology Showing the Various Mesh Regions, and the corresponding volume mesh is shown in Figure 10.58: Mesh Associated With the Chosen Topology.
Because of the rectilinear motion of the moving surfaces, you can use dynamic layering zones to represent the mesh regions swept out by the moving surfaces. These regions are the regions above the top surfaces of the intake and exhaust valves and above the piston head surface, and must be meshed with quadrilateral or hexahedral cells (as required by the dynamic layering method).
For the chamber region, you must define a remeshing zone (triangular cells) to accommodate the various positions of the valves in the course of the simulation. In this region, the motion of the boundaries (valves and piston surfaces) is propagated to the interior nodes through smoothing. If the cell quality violates any of the remeshing criteria that you have specified, ANSYS Fluent will automatically agglomerate these cells and remesh them. Furthermore, ANSYS Fluent will also remesh the deforming faces (based on the minimum and maximum length scale that you have specified) on the cylinder walls as well as those on the sliding interfaces used to connect the chamber cell zone to the layering zones above the valve surfaces.
For the intake and exhaust port regions, you can use either triangular or quadrilateral cell zones because these zones are not moving or deforming. ANSYS Fluent will automatically mark these regions as stationary zones and will not apply any mesh motion method on these cell zones.
The dynamic layering regions above the piston and valves are conformal with the adjacent cell zone in the chamber and ports, respectively, so you do not have to use sliding interfaces to connect these cell zones together. However, you must use sliding interfaces to connect the dynamic layering regions above the valves and the remeshing region in the chamber. This is shown in Figure 10.59: The Use of Sliding Interfaces to Connect the Exhaust Valve Layering Zone to the Remeshing Zone with the exhaust valve almost at full extension. Notice that cells on the chamber side of the interface zone are remeshed (that is, split or merged) as the interface zone opens and closes because of the motion of the exhaust valve.
Figure 10.59: The Use of Sliding Interfaces to Connect the Exhaust Valve Layering Zone to the Remeshing Zone

As the piston moves down from the TDC to the BDC position, you
must expand the remeshing region such that it can accommodate the
valves when they are fully extended. To accomplish this, you must
specify the dynamic layering zone adjacent to the piston surface to
move with the piston until some specified distance from the TDC position.
Beyond this cutoff distance, the motion of the layering zone is stopped
and the piston wall is allowed to continue to the BDC position. Because
there is relative motion between the piston head surface and the now
non-moving dynamic layering zone, cell layers will be added when the
ideal layer height criteria is violated. Figure 10.60: Mesh Sequence 1 to Figure 10.65: Mesh Sequence 6 show the sequence of meshes
before and after the onset of cell layering when the motion in the
layering zone above the piston surface is stopped (shown with = 5°).
ANSYS Fluent provides built-in functions to handle the full
piston motion and the limited piston motion for the dynamic layering
zone above the piston surface. When you define the motion attribute
of the dynamic layering zone above the piston surface, you must use
the limited piston motion function (**piston-limit** in the Motion UDF/Profile field in the Dynamic Mesh Zones Dialog Box). Note that you must define
the parameters used by these functions before you can use them. In
the current example, the crank radius is 40 mm and the connecting
rod length is 140 mm. The piston stroke cutoff is assumed to
happen at 25 mm from TDC position. The lift as a function of
crank angle between and
is shown in Figure 10.66: Piston Position (m) as a Function of Crank Angle (deg) for both limited and full piston
motion.
To define the motion of the valves, you must use profiles that describe the variation of valve lift with crank angle. ANSYS Fluent expects certain profile fields to be used to define the lift and the crank angle. For example, consider the following simplified profile definition:
((ex-valve 5 point) (angle 0 180 270 360 720) (lift 0.05 0.05 1.8 0.05 0.05)) ((in-valve 5 point) (angle 0 355 440 540 720) (lift 0.05 0.05 2.0 0.05 0.05))
ANSYS Fluent expects the angle and lift fields to define the crank angle and lift variations,
respectively. The angle must be specified in degrees and the lift
values must be in meters. The actual valve lift profiles that you
will use for the current example are shown in Figure 10.67: Intake and Exhaust Valve Lift (m) as a Function of Crank Angle
(deg). Notice that there is an overlapped
period where both the intake and exhaust valves are open.
The valve lift profiles and the built-in functions will describe how each surface moves as a function of crank angle with respect to some reference point. For example, the valve lift is zero when the valve is fully closed and the valve lift is maximum when it is fully open. In order to move the surfaces, ANSYS Fluent requires that you specify the direction of motion for each surface. ANSYS Fluent will then update the “center of gravity” of each surface such that
(10–28) |
where is some reference position,
is the unit
vector in the direction of motion, and
is either the valve or the piston
distance with respect to the reference position
. Note that the unit vector
of the direction of motion is specified to point in the negative direction.
For example, the correct intake valve axis for this example is
, as shown
in Figure 10.68: Definition of Valve Zone Attributes (Intake Valve).
ANSYS Fluent assumes that once you have set up the mesh topology, the mesh topology is unchanged throughout the entire simulation. Therefore, ANSYS Fluent does not allow you to completely close the valves such that the cells between the valve and the valve seat become degenerate (flat cells) when these surfaces come in contact (removing these flat cells would require the creation of new boundary face zones). To prevent the collapse, you must define a minimum valve lift and ANSYS Fluent will automatically stop the motion of the valve when the valve lift is smaller than the minimum valve lift value. The minimum valve lift value can be specified in the In-Cylinder tab of the Options Dialog Box. For the current example, a minimum valve lift value of 0.1 mm is assumed.
When the valve position is smaller than the minimum valve lift value, it is normal practice to assume that the valve is closed. The actual closing of the valves is accomplished by deleting the sliding interfaces that connect the chamber cell zone to the dynamic layering zones on the valves. The interface zones are then converted to walls to close off the “gaps” between the valves and the valve seats.
The valve opening is achieved by the reverse process. When the valve lift has reached beyond the minimum valve lift value, the valve is assumed to be open and you can redefine the sliding interfaces such that the chamber zone is now connected to the dynamic layering zones above the valves.