You are on page 1of 107

Med Mahmoud

CFD: Final Project

Introduction
This tutorial will go step-by-step through the process of simulating flow in a mixing tank with rotating
eccentric cylinders. This problem is relevant because it is a simplified model of an economical way to mix
viscous fluids, which dont readily exhibit turbulent mixing (the kind of mixing that makes it so easy to stir
milk into coffee) [1].

Figure 1: Diagram of the fluid region. The outer boundary is the inner boundary of the large cylinder, and
rotates with speed 1 . The inner boundary is the outer surface of the small cylinder, and rotates with speed
2 .
In the original problem formulation, the angular speed of the small inner cylinder actually oscillates
sinusoidally, providing better mixing. Since the goal of this tutorial is primarily to exhibit a use case for
ANSYS rather than to solve the actual problem, well skip that complication and assign constant angular
speed to the small inner cylinder.

Problem Statement
The problem involves a fluid domain bounded by two nested rotating cylinders whose axes are not aligned.
The inner cylinder rotates faster than the outer cylinder.
Since the original problem formulation is an analytical one, well have to select the parameters for the
problem in order to actually perform the simulation.

Dimensions
Dimensions were chosen somewhat arbitrarily:
Outside Cylinder Diameter: 3 m
Inside Cylinder Diameter: 1.5 m
Center-to-center Distance: -0.5 m

Fluid Parameters
We selected glycerin as the fluid to model with because its quite viscous and its properties are available in
the FLUENT Fluid Database.

Med Mahmoud

CFD: Final Project

Operating Conditions
We set up the problem so that the inner cylinder rotates at 10 rad/s, and the outer rotates more slowly at
2 rad/s. In our model, they both rotate in the same direction.

Tutorial Stages
To set up and solve a problem with ANSYS/FLUENT, there is a standard workflow that the software guides
you through.
Set up the Geometry
Mesh the Geometry
Setup the solver parameters (boundary conditions, fluid properties, etc)
Solve the actual problem
Visualize the results
This tutorial will be divided into those stages as well.

Med Mahmoud

CFD: Final Project

Geometry
The Geometry setup is done in ANSYS DesignModeler, where the fluid domain is sketched. (This can be
confusing at first... usually the solid parts are being designed, but its the negative space between these parts
that FLUENT will fill with fluid and analyze.) For a more complicated Geometry, its possible to draw the
Geometry in SolidWorks or a less wonky modeling package than DesignModeler and import the Geometry.
To do this, the Geometry should be saved in .STEP format.
In this project, however, the Geometry is quite simple, so we just draw it in DesignModeler as a 2D
object.
Drawing the Geometry
The basic procedure for our eccentric cylinders is this:
Sketch the two circles aligned along y = 0.
Dimension (constrain) their radii, and dimension the distance along the y-axis between their centers.
Convert the sketch to an actual surface bounded by the two circles.

Med Mahmoud

CFD: Final Project

35

Meshing
Meshing is done with ANSYS Meshing. This step very much makes-or-breaks the simulation, because (as
I learned the hard way) tiny differences between two Meshes can make the simulation fail to converge to a
reasonable solution, let alone maintain comparable accuracy.
In ANSYS Meshing, the user specifies the Meshing algorithm and any embellishments, sets the parameters
for these choices, and Generates the Mesh. For our simple Mesh, we will essentially use the default Meshing
algorithm, but embellish it with Inflation, which increases the Mesh resolution near the boundaries of the
domain so that boundary effects can be modeled with greater fidelity.
Meshing Procedure
The basic procedure for our eccentric cylinders is this:
Fix one parameter in the default Meshing algorithm (use a Fine Relevance Center)
Insert an Inflation algorithm and tune its parameters
Name some regions of the Geometry for use in FLUENT later (this could have also been done in
DesignModeler)

Med Mahmoud

CFD: Final Project

60

Setup and Solve


This is where we finally open FLUENT and set up the problem.
Like ANSYS as a whole, FLUENT also has a workflow that it tries to guide the user along. Each step
appears in order in the Problem Setup pane on the left side of the FLUENT window. This process is divided
into two sections of its own (omitting steps that arent relevant to the cylinder problem):
Problem Setup
General, where the type of solver is selected and units are set
Models, where the specific equations to be used are selected (we just use the defaults in this paper)
Materials, where materials and their properties are made available to the later steps
Cell Zone Conditions, where coordinate systems, materials, and other properties are assigned to
Zones of the Mesh
Boundary Conditions, where, obviously, the Boundary Conditions are specified
Solution
Solution Methods, where the type of integrator is selected (the overall method was specified in the
General step, but precisely what variation on the method is selected here)
Monitors, where required information about the computation as it occurs is requested
Solution Initialization, where the Mesh is initialized with a guess at the solution (a requirement for
every iterative method of solving differential equations)
Run Calculation, where computational parameters like Time Step Size are selected, and the computation is actually started

Med Mahmoud

CFD: Final Project

90

Visualizing
The final step is to visualize the results of the computation. FLUENT provides tools for doing this in the
Results section of the Problem Setup pane.
First, the quality of the calculation should be checked by verifying physical constraints (like balance of
fluxes through surfaces). We use Mass Flow Rate across a fictitious Boundary separating the upper and
lower halves of the Geometry.
To find the Mass Flow Rate across an imaginary Boundary, we first need to specify that Boundary in
FLUENT. This is done (counterintuitively) in Graphics and Animations. The actual flux validation is done
under Reports.
Secondly, we should actually look at the flow pathlines to see if mixing is occurring. This is done by
plotting the pathlines in the Graphics and Animations section.
Validation
The validation procedure is as follows:
Set up a Boundary line in Graphics and Animations
Report the Surface Integral of Mass Flow Rate across the Boundary; it should be near zero
Pathlines
The procedure for plotting the Pathlines is straightforward:
Set up a Pathlines graphic under Graphics and Animations
Display it!

Med Mahmoud

CFD: Final Project

106

Closing Remarks
Crappy Result
Our validation step revealed the crappiness of our result. I actually obtained better mass balance earlier,
but upon repeating the procedure to document the steps, I was somehow unable to reproduce the Mesh!
Appended to this report is a table listing different solver parameters in attempts to get better mass
balance. (This table isnt a complete catalogue of my attempts-- only those attempts that I remembered to
write down.)
Notice the sad quality after I remeshed the Geometry.

Mixing
To say a few words about the actual application at hand-- our crappy simulation fidelity notwithstanding-the mixing quality was exremely poor compared to the mixing quality with an oscillating inner cylinder.
The constant speed inner cylinder is a gross simplification of the model, since the oscillating appears to be
crucial. This could perhaps be implemented with a User-Defined Function for the oscillation.

References
1.

B. Y. Ballal & R.S. Rivlin. Flow of a Newtonian Fluid Between Eccentric Rotating
Cylinders: Inertial Effects. Archive for Rational Mechanics and Analysis,
Volume 62, Issue 3. (1976).

First Mesh
Method Gradient
SIMPLEC Cell
SIMPLE
Cell
SIMPLEC Cell
SIMPLEC Cell
SIMPLEC Cell
PISO
Cell
Coupled Cell
SIMPLEC Cell
SIMPLEC Cell
SIMPLEC Cell
SIMPLE
Cell
SIMPLE
Cell
SIMPLE
Cell
PISO
Cell
SIMPLEC Node
PISO
LSQ
SIMPLE
LSQ
SIMPLEC LSQ

Pressure Momentum Time Iters/Step Tstep


Steps
Mass Flux
Presto
2
2
300
0.1
20
0.0047
Presto
2
2
300
0.1
20
0.068
Presto
2
2
300
0.2
20
0.27
Presto
2
2
400
0.2
20
0.278
Presto
2
2
500
0.2
20
0.278
Presto
2
2
300
0.2
20
0.29
Presto
2
2
300
0.2
20
0.297
Presto
2
2
300
0.1
40
0.31
Presto
2
1
300
0.2
20
0.37
Presto
2
1
400
0.2
20
0.371
Presto
2
1
300
0.2
20
0.408
Presto
2
1
400
0.2
20
0.41
Presto
1
1
300
0.2
20
0.46
Presto
1
1
300
0.2
20
0.46
Presto
2
1
300
0.2
20
0.84
Presto
2
2
300
0.2
20
1.44
Presto
2
1
300
0.2
20
1.6
Presto
2
1
300
0.2
20
1.66

Failed Attempt at Reproducing the First Mesh


Method Gradient Pressure Momentum Time Iters/Step Tstep
Steps
Continuity Mass Flux
SIMPLEC Cell
Presto
2
2
300
0.2
20
0.0001
8.32
PISO
Cell
Presto
2
2
200
0.2
20
0.0001
8.44
SIMPLEC Cell
2
2
2
300
0.2
20
0.0001
9.43
SIMPLEC LSQ
2
2
2
300
0.2
20
0.0001
4.43
PISO
LSQ
2
2
2
300
0.2
20
0.0001
4.43
Coupled LSQ
2
2
2
300
0.2
20
0.0001
4.42
Coupled LSQ
2
2
2
60
0.2
20
0.00001
4.44

You might also like