Вы находитесь на странице: 1из 76

Training Manual

Chapter 2

CFD Analysis with ANSYS/FLOTRAN

The Example Problem

An Example Problem !!

Training Manual

Flow of Air in a 2D duct.

Objective: Peform laminar analysis of a relatively slow


moving flow and then increase the flow rate dramatically.

Streamlines

CFD Analysis with ANSYS/FLOTRAN

The Geometry

Training Manual

This is Duct which has a smooth transition to a larger area.

Units of Length - Inches


Inlet length

3.0

Inlet height

0.5

Transition length

1.0

Outlet height

1.0

Outlet length

4.0

CFD Analysis with ANSYS/FLOTRAN

Properties - Conditions
Use PSI system of units
Property type is AIR-IN
Density will be 1.1214E-7 (lbf-s2/in4)
Viscosity will be 2.6240E-9 (lbf-s/in2)

Conditions
Reference Pressure 14.7 psi
Outlet Pressure 0 psi (relative pressure)
Default Temperature used : 293K

Flow
Velocity of 10 inch/sec -> RE ~ 424 (laminar)
Note in 2D the hydraulic diameter (used in the Reynolds
Number) is twice the inlet height

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Set Preferences

Preferences provides a filter to prevent irrelevant information


from being presented.

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Establish Element Type

Main Menu: Preprocessor-> Element Type->Add/Edit/Delete

2 - Choose

1- Add
4 - Close

3 - OK

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Geometry - Create Inlet/Outlet Regions


Preprocessor>Modeling>Create Areas> Rectangle (By
Dimensions)

First
X1=0,X2=3
Y1=0,Y2=0.5
Click Apply

Second
X1=4,X2=8
Y1=0,Y2=1
Click OK

CFD Analysis with ANSYS/FLOTRAN

Training Manual

The Two Rectangles

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Transition Region Between Them

Training Manual

Create a smooth transition line between the two

Preprocessor>Modeling>Create Lines (Tangent to 2 Lines)

Follow the Instructions carefully in the resulting PICKERS


There will be four successive choices

Check your result with the following page.

CFD Analysis with ANSYS/FLOTRAN

The Smooth Transition Line


Tangency to two lines requires choosing the proper
endpoints..

CFD Analysis with ANSYS/FLOTRAN

Training Manual

The Transition Area

Training Manual

Preprocessor>Modeling>Create> Area >Arbitrary

Choose 4 keypoints in response to the PICKER, then OK

CFD Analysis with ANSYS/FLOTRAN

Geometry is Finished!!

Line Plot

CFD Analysis with ANSYS/FLOTRAN

Area Plot

Training Manual

Boundary Conditions
Use Solid Model Boundary Conditions
Do not require require re-application upon re-meshing

Preprocessor>Loads>Apply>Velocity> Lines

We will apply Velocities and Pressures


Inlets are Velocity or Pressure
Outlets are Pressure
Walls: Velocities are zero

CFD Analysis with ANSYS/FLOTRAN

Training Manual

The Boundary Conditions

Training Manual

These boundary conditions are typical

Proper condition at boundary intersections is determined by


FLOTRAN

Walls

Inlet:
VX=10,VY=0

Walls

Outlet
PRES = 0

CFD Analysis with ANSYS/FLOTRAN

Solid Model Boundary Conditions


Example for
Walls

4 - Input Values,
Do Endpoints of linesOK

1-Lines
3-OK

2-Pick These 6 Lines

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Remaining Boundaries.
Note that leaving a blank DOES NOT result in a zero
condition being applied..

Inlet

Outlet

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Control of the Display

To prevent display of these symbols:


Utility Menu: PlotCtrls>Symbols
Choose NONE and OK

CFD Analysis with ANSYS/FLOTRAN

This is a line plot after application of the


Boundary Conditions

Training Manual

Preparation for Meshing


Use the Mesh Tool
Size Controls, Lines, Set
PICKER shows up and you choose the lines,OK
Set the number of divisions and the ratio, OK

Use these settings for line divisions Line Divisions


Lines

NDIV

Ratio

Transverse direction

12

-3

Inlet Region - flow direction

16

-2

Transition - flow direction

10

Outlet - flow direction

18

See next page for Mesh tool!

SAVE Database Before Meshing.

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Mesh Tool

Training Manual

3 - OK

Use FLIP
if Line Bias
is reversed

CFD Analysis with ANSYS/FLOTRAN

2 - Choose Lines

Element Size Box

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Proper Line Divisions

Training Manual

Four Different Groups of Lines must be done for this


problem

Remember to flip one of the outlet lines

Generally, Avoid large adjacent element size changes

The Four lines in the Y direction are the transverse lines

Inlet Lines

Transition

Outlet Lines

(Flipped!)

CFD Analysis with ANSYS/FLOTRAN

Meshing Step
Use the Mesh Tool
1: Choose Areas
2: Mapped
3: Quad
4: Mesh

PICKER comes up

Pick All

(Meshing Occurs)

5: Close Meshtool

3
2
4
5

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Now You Have a Mesh!

CFD Analysis with ANSYS/FLOTRAN

Picture Made with Reverse Video


(PlotCtrls>Style>Color>ReverseVideo

Training Manual

Now for the FLOTRAN Input


Enter FLOTRAN Setup through PREP7
or Solution

(Depending on Program Setup, you


may need to access Unabridged
Menu)

CFD Analysis with ANSYS/FLOTRAN

Training Manual

FLOTRAN Setup

We will be making changes to these portions of the Menu.


NOW - Our Initial Analysis

LATER - Follow On Work

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Execution Control
Choose 50 Global
Iterations to Start with
We are not relying on the
automatic termination
criterion based on
problem convergence

OK!

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Fluid Properties
Choose AIR-IN for the
property type for
Density and Viscosity
using scroll down
menu.

OK

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Resulting Screen (click OK)

Training Manual

CFD Analysis with ANSYS/FLOTRAN

(Thermal conductivity and Specific Heat not needed)

Flow Environment

Pressure: 14.7Psi
Nominal Temperature: 70F
Offset Temperature: 460R
OK!

CFD Analysis with ANSYS/FLOTRAN

Reference Conditions are


found as a subset:

Training Manual

FLOTRAN Execution
Done in SOLUTION:

Run FLOTRAN

Execute 50 iterations, look at


the results and then run 50
more

Convergence monitors
indicate the normalized rate
of change of the solution

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Convergence Monitors

Training Manual

CFD Analysis with ANSYS/FLOTRAN

More Convergence Monitors


Training Manual

CFD Analysis with ANSYS/FLOTRAN

Post-Processing
FLOTRAN Post-Processing is fairly typical of ANSYS
Explicity read in a set of results (not automatically loaded)

Velocity Vectors

Nodal Solution Plots


Solid Color
Line Contours

Path Plots

Particle Traces

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Velocity Vectors
Plot Results>Predefined Vector Plot..OK
(Use this for Nodal
Solution Plots.)

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Vectors - Typical

after 100 Global Iterations

CFD Analysis with ANSYS/FLOTRAN

50 Global Iterations

Training Manual

Nodal Results Plotting


Show up as solid color plots or lines depending on the
device chosen
Utility Menu>Plot Ctrls>Device Options
Shading or Contours

Choose DOF

OK

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Pressures (50, 100 Global Iterations)

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Results

Training Manual

We also notice that the Convergence Monitors (Normalized


rate of change of each DOF) have leveled off.
This implies solution is slightly oscillatory

We will modify the input slightly, choosing the SUPG


(Streamline Upwind Petrov-Galerkin) formulation for the
momentum equations
The SUPG algorithm is less diffusive and more accurate (but
sometimes less robust) than the default algorithm (MSU Monotone Streamline Upwind Method)

Also, set the number of Global Iterations to 100

CFD Analysis with ANSYS/FLOTRAN

We cant tell the difference between the velocity vector plots,


but it looks like the pressures have changed slightly.

Changing Advection
FLOTRAN Setup > Advection

OK!

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Convergence with SUPG

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Results

Training Manual

We could continue, but you get the idea...

Use of SUPG has given enhanced convergence.

We should expect a less diffusive solution, and so the recirculation region may be better defined.

CFD Analysis with ANSYS/FLOTRAN

Comparison of Vectors at 100, 200 GI

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Vectors at 200 GI show more extensive recirculation

Path Plots
Look at the profile of VX along the outlet

Procedure -Path Operations


Define Path by Nodes
Choose Nodes on either corner of the outlet
Map Onto Path
Choose VX and label it
Plot
On graph

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Set up the Path Plot

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Path plot
Pick the corner nodes

OK

Name the Path

OK

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Path plot - Still More


Read and dismiss the PDEF (path definition) box

Map Onto Path, Choose VX, Give it a Name, OK

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Path Plot - Almost Done


-Plot Path Item on Graph

Choose DOF, OK

And Then...

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Path Plot of the Outlet Velocity!

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Some Discussion
Modify the line colors as needed with the Utility Menu
PlotCtrls>Style>Colors>Graphs

Modify the plot controls as needed with Utility Menu


PlotCtrls>Style>Graphs

Result
Fully developed flow would show the outlet velocity profile as a
perfect parabola
Therefore, the problem domain could be lengthened to provide
room for more flow development
Check the Mass Balance

CFD Analysis with ANSYS/FLOTRAN

Training Manual

The Print File

Training Manual

Use the Utility Menu to Look at the bottom of the jobname.pfl


file

List > Files> Other> (choose jobname.pfl file)

Scan to the bottom

Mass balance looks good!!!

(If you had forgotten to put a No-Slip Boundary condition


somewhere, there would be another outlet listed.)

CFD Analysis with ANSYS/FLOTRAN

Massless Particle traces

Training Manual

Particle traces are based on the velocity field, not the stream
function.

For a steady state, perfectly converged problem on a perfect


mesh, the streamlines and particle trace plots would be
identical.

Procedure: Plot Results>Flow Traces


Define trace points with PICKER
Plot Flow Traces
Optionally color code trace with
the value of a DOF

CFD Analysis with ANSYS/FLOTRAN

Trace Points
The points defined on the Working Plane
Ensure, for 3D models, that the WP is correctly located!

The resolution of the trace point location is controlled by the


currently set Snap Increment (Working plane controls)

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Particle Trace
Color Code According to PRES (or something else!)

Note Maximum number of loops allowd

OK

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Particle Trace
The maximum number of loops is exceeded in the
recirculation region. Close the box

CFD Analysis with ANSYS/FLOTRAN

Training Manual

New Analysis
Increase the velocity from 10 to 200 (no other changes)
This makes the Reynolds Number ~8500

Solve the problem


Very Shortly you will get a message that either the solution has
diverged or that a negative value has been encountered in the
coefficient matrix main diagonal.

This is because the flow is now in the turbulence regime and


a laminar solution will be unstable.

So activate the turbulence model and again solve.

CFD Analysis with ANSYS/FLOTRAN

Training Manual

FLOTRAN Solution Options


Activate Turbulence with Scroll Down Menu Option,OK

SOLVE

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Convergence Monitors

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Turbulent Flow Results

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Discussion

Training Manual

Note that the maximum value of pressure is no longer at the


inlet. It has moved to the outlet !!!

Consider Bernoullis equation and note that in our new,


higher velocity problem the relative importance of the
viscosity has decreased.
The recoverable pressure due to the velocity change now
dramatically outweighs the viscous losses.

V12
V22
P1
gh1 P2
gh 2 Punrec
2g c
2g c

CFD Analysis with ANSYS/FLOTRAN

New Outlet Velocity Profile

A Fully developed flow would have the maximum value in the


center. This implies we should make the problem domain
longer.

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Another New Analysis - Extend the


Problem
Outline of the steps required
Add another rectangle to the outlet
Try 15 additional inches
Remember to Merge Keypoints
Revise boundary conditions
Delete old pressure boundary
Pressure on new boundary
Walls

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Training Manual

New Geometry

CFD Analysis with ANSYS/FLOTRAN

Completing the New Geometry

Preprocessor>Numbering Ctrls>Merge Items> Keypoints

As expected, the meshed line is kept

CFD Analysis with ANSYS/FLOTRAN

Training Manual

New Boundary Conditions


Preprocessor>Loads>Delete>

CFD Analysis with ANSYS/FLOTRAN

Training Manual

New Boundary Conditions

Training Manual

Add the walls as done previously

Assign Zero pressure to the outlet line as done previously

CFD Analysis with ANSYS/FLOTRAN

Mesh the New Outlet Area


Use the Mesh tool to copy the transverse
direction assignment to the new outlet
boundary.

PICKER asks for the line to be copied from


(pick andOK) and then the line to be copied to
(pick and OK).

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Set Divisions Along Outlet

Then Mesh the New Area as in previous fashion

CFD Analysis with ANSYS/FLOTRAN

Flip the line after setting (when necessary)

Training Manual

The Mesh

Training Manual

Note that the symbols shown are the previously transferred


Nodal Boundary Conditions. The solid model boundary
conditions dont show up on an element plot.

The complete mesh with the symbols turned off..

CFD Analysis with ANSYS/FLOTRAN

Execute

Note that if you have not changed the jobname, FLOTRAN


will provide a notice to the effect that it has renamed the old
results file to jobname.rfo
This occurs because the number of nodes and elements in the
case has changed.
Other files such as the jobname.pfl are appended to, even
though this is a new analysis

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Convergence Monitors

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Convergence Monitors - more


Training Manual

CFD Analysis with ANSYS/FLOTRAN

Results

Training Manual

Two representations of pressure, the second in the vector


mode with 128 contours.

Note that the pressure drop, once the flow has recovered, is
very small.

We expect a good outlet velocity profile.

CFD Analysis with ANSYS/FLOTRAN

Recirculation Region

CFD Analysis with ANSYS/FLOTRAN

The recirculation region is captured


despite the relatively coarse mesh.

Training Manual

Benefits of Extension

The lines are superimposed onto the new velocity vector plot.
It is clear that the flow is continuing to develop past the
original boundary of the problem.

Old Outlet

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Outlet Velocity Profile

Training Manual

CFD Analysis with ANSYS/FLOTRAN

Final Check of Transverse Velocity

The flow is very close to fully developed. The following plot


of the transverse velocities at the outlet provides a measure
of how close it is. Note the scale. The maximum transverse
velocity is 0.11.

End of
Problem!

CFD Analysis with ANSYS/FLOTRAN

Training Manual

Вам также может понравиться