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

CFD

CFX 5.7
CEL

1-1

CFX 5.7
2004 ANSYS Inc.

CFD

1-2

CFX 5.7
2004 ANSYS Inc.

z
z
z
z
z
z
z
z

1-3

CFD?
CFD
CFD
CFX-5.7
CFX-5
CFX-5
CFX-5
CFX -5
CFX 5.7
2004 ANSYS Inc.

CFD?

CFD

Computational Fluid
Dynamics
CFD

Coal combustion in a multi-burner furnace.


Courtesy of International Combustion Limited
1-4

CFX 5.7
2004 ANSYS Inc.

CFD
z

1-5

1970s CFD
.
1980s - CFD ,

-
CFDCFD

CFX 5.7
2004 ANSYS Inc.

CFD
z
z
z
z
z
z
z
z

1-6

CFX 5.7
2004 ANSYS Inc.

z
z
z

1-7

CFD

CFX 5.7
2004 ANSYS Inc.

, ,

1-8

CFX 5.7
2004 ANSYS Inc.

K
0=
cv d + cs v dA
t
: , 1D,
0 = ( AV )1 ( AV ) 2
1-9

CFX 5.7
2004 ANSYS Inc.

+ -

K d ( m vK )
K
KK K
=
F =
cv vd + cs vv dA
t
dt
: , 1D,
Fx + P1 A 1 P2 A 2 = ( mV)
 2 ( mV)
 1
m
 = AV

1-10

CFX 5.7
2004 ANSYS Inc.

- =

1-11

+
-

K K


(Q W ) =
e d + cs H v dA
t cv
v2
1D
:
e = u +
+ gz
2
 W
 = 0 + (mH)
Q
 2 (mH)
 1
H = e + P
CFX 5.7
m = AV
2004 ANSYS Inc.

z
z

,
,

- :

1-12

CFX 5.7
2004 ANSYS Inc.

- ()

-
-
- ,,

- CFX5

1-13

CFX 5.7
2004 ANSYS Inc.

-
- : (), ,

Example: 2D Heat Conduction

K
q = 0
K
q = -kT
for k = constant
2 T = 0
2T 2T
+ 2 =0
or
2
x y

1-14

T=50

T=100

2T = 0

T=0

q=0
CFX 5.7
2004 ANSYS Inc.

:
-
- ()
- :
>
>
>
>
>
>
>

1-15

Gauss

CFX 5.7
2004 ANSYS Inc.

:
- , :
- ,
-

1-16

CFX 5.7
2004 ANSYS Inc.

z
z
z

:
- ,
-
-

1-17

CFX 5.7
2004 ANSYS Inc.

CFX-5.7
z
z
z
z
z
z
z
z

z
z
z
z
z
z

1-18

/
/
/ ()
/
/

GGI)

CFX 5.7
2004 ANSYS Inc.

CFX 5
z

CFX-5
-
-
-
-
-
-
-
- ...

1-19

CFX 5.7
2004 ANSYS Inc.

1-20

CFX 5.7
2004 ANSYS Inc.

1-21

.
CFX
Expression
Language (CEL)
.

CFX 5.7
2004 ANSYS Inc.

1-22

k-

CFX 5.7
2004 ANSYS Inc.

1-23

CFX 5.7
2004 ANSYS Inc.

1-1

CFX 5.7
2004 ANSYS Inc.

1-2

CFX-5

CFX 5.7
2004 ANSYS Inc.

F22

Geometry and grid provided by DaimlerChrysler Aerospace AG

1-3

.
CFX-5


0.9
5.

CFX 5.7
2004 ANSYS Inc.

1-4

Ensight

CFX 5.7
2004 ANSYS Inc.

CFX5.7

Step I:
-
- 2D3D)
-
Step II: - CFX-Pre
-
-
-
Step III: - CFX-Solve

-
Step IV: - CFX-Post

-
1-5

CFX 5.7
2004 ANSYS Inc.

II.
z

.
- (,,
,)
- (, ,
,)
- (,
, , , )

CFX-Pre

1-6

CFX 5.7
2004 ANSYS Inc.

III.

z
z

CFX-5

1-7

CFX 5.7
2004 ANSYS Inc.

IV:
z

CFX-Post
-

1-8

CFX 5.7
2004 ANSYS Inc.

CFX-Pre GUI
Define
Menu
Bar

Viewer

Tools Menu
Bar
Object
Selector

Physics
Error
Summary
1-9

CFX 5.7
2004 ANSYS Inc.

CFX-5.7

CFX-Pre
name.cfx
Cfx.##.pre

Third Party
Meshes
--- CFX-4
--- TASCflow
--- ICEM
--- .
1-10

CFX-5 Solver
Manager

CFX-Post
---.res
---.def
---.gtm

CFX-5 Solver
---.def
---.res (binary)
---.out (ascii)

CFX 5.7
2004 ANSYS Inc.

CFX 5.7

z
z
z

1-11

.cfx CFX-Precase
.pre CFX-Pre session
.def CFX-Pre
CFX-Post
.res .def

.out

CFX 5.7
2004 ANSYS Inc.

CFD - Computational Fluid


Dynamics
CFD
CFX-5

-
-
-
CFX-Pre

1-12

CFX 5.7
2004 ANSYS Inc.

CFX-5.7

2-1

CFX 5.7
2004 ANSYS Inc.

CFX-5

z
z
z
z
z

CFX-Post

2-2

.def

CFX 5.7
2004 ANSYS Inc.

CFX-Pre
z
z

CFX5 CFX-Pre
case
- , File New Simulation
- New Case File Name mixer
- Save

2-3

CFX 5.7
2004 ANSYS Inc.

Mesh Import
z
z
z

Import Mesh
Mesh Format CFX-5 GTM File
Browse mixer.gtm Select File for Import
Open Import Mesh OK

Import Mesh

2-4

CFX 5.7
2004 ANSYS Inc.

CFX-Pre

2-5

CFX 5.7
2004 ANSYS Inc.

Creating the Fluid Domain

z
z

Domains
Define Domain Name
mixer OK
Domain:mixer General
Options
- Fluid List Water at 25 C
- Relative Pressure 1 atm

2-6

CFX 5.7
2004 ANSYS Inc.

Creating the Fluid Domain


z
z

Edit Domain:mixer Fluid Models


Fluid Models
- Heat Transfer Model Thermal Energy.
- Turbulence Model Zero Equation
- OK

2-7

CFX 5.7
2004 ANSYS Inc.

Creating the Boundary Conditions

z
z

Boundary Conditions
Name in1 Define
Boundary OK
Edit Boundary:in1 in
Domain:mixer Basic
Settings

- Boundary Type Inlet.


- Location inlet1

2-8

CFX 5.7
2004 ANSYS Inc.

Creating the Boundary Conditions


z

Edit Boundary:in1 in
Domain:mixer Boundary
Details
Boundary Details
- Normal Speed 2.0 m/s.
- Static Temperature 315 K
- OK

2-9

in2
inlet22.0 m/s
285 K
out
outlet Average Static Pressure
0.0 Pa

CFX 5.7
2004 ANSYS Inc.

Setting an Initial Guess

Global Initialization .
- Automatic.
- -OK-.

2-11

CFX 5.7
2004 ANSYS Inc.

Setting Solver Parameters

z
z

z
z

2-12

Solver Control
Timescale Control
Physical Timescale
Physical Timescale 5 s
Max. No. Iterations
50

OK

CFX 5.7
2004 ANSYS Inc.

Writing a Definition Filedef

2-13

Write Definition File .


- File Name mixer.def.
- Operation Start Solver
Manager.
- Quit CFX-Pre .
- OK
Save Changes Yes
cfx

CFX 5.7
2004 ANSYS Inc.

Running the Solver


-Start Run CFX-5 Solver.

2-14

CFX 5.7
2004 ANSYS Inc.

Running the Solver

CFX-5 Solver
.
-
OK.

2-15

CFX 5.7
2004 ANSYS Inc.

Geometry Outline
z

solver manager
Post CFXPost
Run with Results
CFX-Post
*
.
- .
- Object Selector Window
Wirefame,
wireframe Object Editor
.
- edge angle 0 degrees
-Apply- .

2-16

CFX 5.7
2004 ANSYS Inc.

2-17

CFX 5.7
2004 ANSYS Inc.

Mesh Quality Check


z

Minimum Face Angle


- Tools>Mesh Calculator

- Mesh Calculator , Function Minimum


Face Angle Calculate

2-18

CFX 5.7
2004 ANSYS Inc.

Mesh Quality Check


z

Point

2-19

Create>Point
, Point 1,
OK
PointGeometry
Option Variable
Minimum
Variable
Minimum Face Angle
Symbol Size 2
Color Color
Selector
Apply

CFX 5.7
2004 ANSYS Inc.

Mesh Quality Check

2-20

CFX 5.7
2004 ANSYS Inc.

Creating a Slice Plane


- Object SelectorPoint 1

- WireframeObject EditorEdge
Angle 45 degree
- Create Plane . (
Create>Plane)
- New Planenameslice
OK.
- Object Editor Method
Point and Normal.
- point (0,0,1)
- Normal (0,0,1)

2-21

CFX 5.7
2004 ANSYS Inc.

Creating a Slice Plane

- Object editorColour

- Mode Variable
- Variable
Temperature
- -Apply-

2-22

CFX 5.7
2004 ANSYS Inc.

Creating a Legend

- Create Legend
. (
Create>Legend)
- New Legendslice
legend OK
- object editorDefinition
slice
- -Apply-

2-23

CFX 5.7
2004 ANSYS Inc.

Slice Plane

2-24

CFX 5.7
2004 ANSYS Inc.

Contours

- Contour Plot
. (
Create>Contour)
- New Contour slice
contour OK
- Object Editor Location
slice
- variableTemperature
- -Apply-
slice.

2-25

CFX 5.7
2004 ANSYS Inc.

Contours

2-26

CFX 5.7
2004 ANSYS Inc.

Animating
slice contour
slice.
Animation icon.
Animation EditorNew Key
Frame - KeyFrameNo 1

- Object Selectorslice
(0,0,-1.99) -Apply- Animation EditorNew Key
Frame - KeyFrameNo 2

2-27

CFX 5.7
2004 ANSYS Inc.

Animating

- Animation Editor
Previous Key Frame
- Animation EditorPlay
Forward
-

2-28

CFX 5.7
2004 ANSYS Inc.

Stream Line
- Animation Editor
- slice
- Streamline
. (
Create>Streamline)
- New Contour
Streamline-In1OK
- object editor, Geometry
tLocation In1
- Colour Mode
Variable Temperature
- -Apply-

2-29

CFX 5.7
2004 ANSYS Inc.

Stream Line

2-30

CFX 5.7
2004 ANSYS Inc.

Advanced Features

- CFX-Post .
CFX-Post

2-31

CFX 5.7
2004 ANSYS Inc.

Create a User Variable


-

2-32

Tools>Variables
Variable Editor , New icon,
New Variable Radius OK
Expression (X^2+Y^2)^0.5 Apply
Variable Editor

CFX 5.7
2004 ANSYS Inc.

Create an Isosurface
- Wireframe

- Create>Isosurface,
OK
- Geometry ,
Radius
- Colour , Mode
Variable,
Temperature
Local
Apply

2-33

CFX 5.7
2004 ANSYS Inc.

Create an Isosurface

2-34

CFX 5.7
2004 ANSYS Inc.

Create a Vector
- Wireframe

- Create>Vector,
OK
- Geometry ,
Isosurface
Velocity
ProjectionTangential
Reduction2
- Symbol Size2
Apply

2-35

CFX 5.7
2004 ANSYS Inc.

Create a Vector

2-36

CFX 5.7
2004 ANSYS Inc.

Plot Velocity Profile


- Create a Plane
> Wireframe

> Plane 1,
ZX Plane Y=0
color

- Create a Polyline
> Plane 1
> Create> Polyline,
OK
> Geometry
Boundary Intersection
, Boundary List
out, Location
Plane 1 Apply

2-37

CFX 5.7
2004 ANSYS Inc.

Plot Velocity Profile

2-38

CFX 5.7
2004 ANSYS Inc.

Plot Velocity Profile


- Create a Chart
>
>
>
>
>
>
>

2-39

Create>Chart, OK
Object Editor New Chart Line
name New Line
Locator Polyline
X AxisX.
Y Axis Velocity w
OK

CFX 5.7
2004 ANSYS Inc.

Plot Velocity Profile


- Create a Chart (Contd)

> Chart Title


Velocity Profile at
Outlet
> X Axis Label
X Y Axis Label
W Velocity
>
Apply
> View
> Chart Viewer

2-40

CFX 5.7
2004 ANSYS Inc.

Plot Velocity Profile

2-41

CFX 5.7
2004 ANSYS Inc.

Instance Transform
- Create an Instance Transform
> Create>Instance Transform,
OK
> # of Copies 2.
> Rotation Apply Rotation
> Translation Apply Translation. 6, 0, 2
Apply.

2-42

CFX 5.7
2004 ANSYS Inc.

Instance Transform
- slice Plane

> Wireframe
slice

> Object Editor


Geometry
(0, 0, 1)
Apply
> Render
Instancing Instance
Transform 1 Apply.
> Wireframe
Instancing
Instance Transform 1
Apply

2-43

CFX 5.7
2004 ANSYS Inc.

Instance Transform

2-44

CFX 5.7
2004 ANSYS Inc.

CFX

CEL


CFX
z

CEL - CFX Expression Language


CEL CFX5
CEL
FORTRAN
CEL
CELCFX5 ()
CFX5CEL
CEL
CEL:



CFX-5.7 2004

Slide serial no 2

2004 ANSYS CFX

CEL
CFX
z

CEL
-

)
CEL

:
-

CEL */^

CFX-5.7 2004

Slide serial no 3

2004 ANSYS CFX


CFXz


, A+ B/C
A+
B
/C

1.0[mm] + 0.45[yds]
2.5[s m^-1] - (3.0[m s^-1])^-1
1.0[mm] + 0.3[kg]
CFX-5.7 2004

(valid)
(valid)
(invalid)
Slide serial no 4

2004 ANSYS CFX


CFX
z

a^1/2
1.0^0.5

(valid)
(valid)

(a[kg m^-3] * b[m s^-1]) [kg m^2 s^-1]

CFX-5.7 2004

Slide serial no 5

2004 ANSYS CFX


CFX

CFX-5.7 2004

Slide serial no 6

2004 ANSYS CFX


CFX
z

air.density
air.viscosity
air.carbondioxide.mf - the mass fraction of carbon
dioxide in air

CFX-5.7 2004

Slide serial no 7

2004 ANSYS CFX

CFX

CFX-5.7 2004

Slide serial no 8

2004 ANSYS CFX

CEL

CFX

CFX-5.7 2004

Slide serial no 9

2004 ANSYS CFX


CFX
z

-
-

CFX-5.7 2004

CEL,
FORTRAN

Slide serial no 10

2004 ANSYS CFX


CFX

CFX-Pre
- CCL
- Expression Editor
-

CCL
- .DEF .RES
- CCL
-

CFX-5.7 2004

Slide serial no 11

2004 ANSYS CFX

CEL
CFXMathematical Expression

CEL Equivalent

= K n 1
z

Power-law for fluid


viscosity

K = 10.0 [kg m^-1 s^-0.5]


n = 1.5
ViscT = K * sstrnr ^ (n-1)

or
ViscT = K*(min(UpperS,(sstrnr+LowerS))^(n1))

where is the shear


strain rate

where sstrnr is the shear strain rate


provided as a system variable

The second form of the CEL equation above includes an


upper and lower bound for strain rate to ensure it remains
physically reasonable
CFX-5.7 2004

Slide serial no 12

2004 ANSYS CFX

Expression Editor
CFX
z

Expression Editor
- CFX

- TOOLS

CFX-5.7 2004

Slide serial no 13

2004 ANSYS CFX

Expression Editor
CFX
z

The following example shows how to set the viscosity to be a function


of temperature. The viscosity-temperature relation is taken as follows:

= e 10 T

CFX-5.7 2004

Slide serial no 14

2004 ANSYS CFX

CEL (B.C.)
CFX
The following example shows how to set angular velocity for a rotating
wall using the u and v components

CFX-5.7 2004

Slide serial no 15

2004 ANSYS CFX


CFX
z
z
z

Available in solver and Post


Allow calculation of non-local integrated quantities at named locations.
Examples:
- Calculate the area average of Cp on an isosurface:
areaAve(Cp)@iso1

- Mass flow of particular fluid through a locator:


oil.massFlow()@slice1
z

Note:
-

CFX-5.7 2004

@<locator> syntax - must always supply a location.


Phase/component can be selected using [<phase>.][<component>.]<function>

Slide serial no 16

2004 ANSYS CFX


CFX
EXPRESSIONS:
ReqT = 350 [K]
TempOut = areaAve(T)@outlet
TCFilter = step(TempOut/1[K]-ReqT/1[K])
TCTemp = 400[K]*TCFilter+285[K]*(1-TCFilter)
TCFlow = 10[m/s]*TCFilter+2[m/s]*(1-TCFilter)
END
[]
BOUNDARY : TempControl
Boundary Type = INLET
Location = TempControl
Coord Frame = Coord
BOUNDARY CONDITIONS :
MASS AND MOMENTUM :
Option = Normal Speed
Normal Speed = TCFlow
END
HEAT TRANSFER :
Option = Static Temperature
Static Temperature = TCTemp
END
END
END

CFX-5.7 2004

Slide serial no 17

2004 ANSYS CFX

POST
CFX
In CFX-Post Expressions may be defined by:
z
using the CFX-Post Expression Editor
z
entered directly in an object form
z
entered at the commandline (using Line input mode), or the
Command Editor
z
read in from a CCL file
z
read in from a session file
z
read in from a state file

CFX-5.7 2004

Slide serial no 18

2004 ANSYS CFX


CFX
z

CFX-Post provides an additional set of functions:

[<Fluid>.]<function>[_<Axis>[_<Coord Frame>]]([<Expression>])@<Location>
-

CFX-5.7 2004

area
areaAve
areaInt
ave
count
force
forceNorm
length
lengthAve
lengthInt
massFlow
massFlowAve
massFlowInt
maxVal
minVal
probe
sum
torque
volume
volumeAve
volumeInt

Area (projected to axis optional)


Area-weighted average
Area-weighted integral
Arithmetic average
Number of calculation points
Force on a surface in the specified direction
Magnitude of normalized force on a curve in the specified direction
Length of a curve
Length-weighted average
Length-weighted integration
Total mass flow
Mass-weighted average
Mass-weighted integral
Maximum Value
Minimum Value
Value at a point
Sum over the calculation points
Torque on a surface about the specified axis
Volume of a 3-D location
Volume-weighted average
Volume-weighted integral
Slide serial no 19

2004 ANSYS CFX


CFX
z

CEL
Values/Expressions
Rules
System variables, functions and constant

CFX-5.7 2004

Examples using CEL

Slide serial no 20

2004 ANSYS CFX

You might also like