Documente Academic
Documente Profesional
Documente Cultură
Language
Lecture 3
28 November 2005
2005 ANSYS, Inc. L3-1 ANSYS, Inc. Proprietary
Boundary Conditions
28 November 2095
2005 ANSYS, Inc. L3-2 ANSYS, Inc. Proprietary
Basic Settings
Boundary Type
- Inlet, Outlet, Opening, Wall,
Symmetry
Location
- select from all 2D primitive and
composite regions
Coord Frame
- if more than one exists, select
the appropriate frame
Frame Type
- available only in a rotating
domain. Allows you to specify
quantities based on a rotating
or stationary (absolute) frame
of reference.
28 November 2095
2005 ANSYS, Inc. L3-3 ANSYS, Inc. Proprietary
Boundary Details
28 November 2095
2005 ANSYS, Inc. L3-4 ANSYS, Inc. Proprietary
Boundary Condition Types
Inlet
Where fluid enters the domain: displayed with white arrows
Outlet
Where fluid leaves the domain: displayed with yellow arrows
Opening
Fluid can leave or enter the domain based on local conditions:
displayed with bi-directional blue arrows. Similar setup to Inlet
boundary conditions. Flow direction and pressure are also set
Wall
Displayed with green octahedra. No Slip/Free Slip, heat
transfer properties and roughness characteristics can be set.
Symmetry
Used when flow on one side of a plane is a mirror image of
flow on the other side. Can be utilised to reduce the number of
nodes in cases where symmetric flow exists.
28 November 2095
2005 ANSYS, Inc. L3-5 ANSYS, Inc. Proprietary
Profile Boundary Conditions
28 November 2095
2005 ANSYS, Inc. L3-6 ANSYS, Inc. Proprietary
Steps to implement a Profile
Boundary Condition
Create a BC Profile
file. You can
facilitate this by
using the Export
feature of CFX-
Post.
28 November 2095
2005 ANSYS, Inc. L3-8 ANSYS, Inc. Proprietary
Steps to implement a Profile
Boundary Condition
28 November 2095
2005 ANSYS, Inc. L3-9 ANSYS, Inc. Proprietary
Steps to implement a Profile
Boundary Condition
The Boundary Details
panel will be modified
to use the profile data.
These changes to the
Boundary Details
panel will not be
applied unless you
click Apply.
28 November 2095
2005 ANSYS, Inc. L3-10 ANSYS, Inc. Proprietary
Steps to implement a Profile
Boundary Condition
The profile boundary
condition (as well as other
boundary conditions) can be
visualised in CFX-Pre by
using the Plot Options panel
on the boundary condition
editor. You can create a
Boundary Contour or a
Boundary Vector plot of the
profile data.
The profile data is read into
the CFX-Solver each time the
solver is started/restarted
(I.e. the profile file can be
edited between solver runs
without returning to CFX-Pre.
28 November 2095
2005 ANSYS, Inc. L3-11 ANSYS, Inc. Proprietary
Using a profile in more than
one location
28 November 2095
2005 ANSYS, Inc. L3-12 ANSYS, Inc. Proprietary
Standard Variable Names
28 November 2095
2005 ANSYS, Inc. L3-15 ANSYS, Inc. Proprietary
Extracting Profile Data from
Results Files
To find out which profile file(s) is/are referenced by the
current results file, enter:
cfx5dfile file_001.res list-profile-files (This outputs a list of all
profile files stored in the results file, one per line)
For any file referenced in the results file, enter:
cfx5dfile file_001.res read-profile-file <profile_name>.csv (To
print the profile data from the file <profile_name> to your terminal
window)
Alternatively, enter:
cfx5dfile file_001.res extract-profile-file <profile_name>.csv
(to write it to the current directory under the name
<profile_name>.csv. If this file already exists in the current
directory, it will not be overwritten)
28 November 2095
2005 ANSYS, Inc. L3-16 ANSYS, Inc. Proprietary
CFX Expression Language
28 November 2095
2005 ANSYS, Inc. L3-17 ANSYS, Inc. Proprietary
CEL Statements
28 November 2095
2005 ANSYS, Inc. L3-19 ANSYS, Inc. Proprietary
Rules for Expressions
28 November 2095
2005 ANSYS, Inc. L3-20 ANSYS, Inc. Proprietary
System Variables
28 November 2095
2005 ANSYS, Inc. L3-21 ANSYS, Inc. Proprietary
System Variables
x Direction 1 in Reference Coordinate Frame
y Direction 2 in Reference Coordinate Frame
z Direction 3 in Reference Coordinate Frame
r Radial spatial location, r = (x^2+y^2)^0.5
theta Angle, arctan(y/x)
t Time
u Velocity in the x coordinate direction
v Velocity in the y coordinate direction
w Velocity in the z coordinate direction
p (absolute) Pressure
ke Turbulent kinetic energy
ed Turbulent eddy dissipation
T Temperature
sstrnr Shear strain rate
density Denstiy
rNoDim Non-dimensional radius (rotating frame only)
viscosity Dynamic Viscosity
Cp Specific Heat Capacity at Constant Pressure
cond Thermal Conductivity
enthalpy Specific Enthalpy
beta Thermal Expansivity
speedofsound Local speed of sound in fluid
subdomain Sub-domain variable (1.0 in Sub-domain, 0.0 elsewhere)
mean diameter Mean Diameter
deneff Effective Density
AV name Additional Variable name
mf Mass Fraction
28 November 2095
2005 ANSYS, Inc. L3-22 ANSYS, Inc. Proprietary
System Variables
CFX-5 System Variables and
user-defined expressions will
be available or unavailable
depending on the simulation
you are performing and the
expressions you wish to create
In some circumstances,
System Variables are logically
unavailable
- time (t) is not available for
steady-state simulations
- Temperature (T) is not
available when heat transfer
is turned off
In others, the availability of a
System Variable is not allowed
for physical model reasons
28 November 2095
2005 ANSYS, Inc. L3-23 ANSYS, Inc. Proprietary
Built in functions / constants
28 November 2095
2005 ANSYS, Inc. L3-24 ANSYS, Inc. Proprietary
Built in operators/functions and
constants
Some constants are also available in CEL for
developing your expressions, these are:
- e Constant: 2.7182818
- g Acceleration due to gravity: 9.806 [m s^-2]
- pi Constant: 3.1415927
- R Universal Gas Constant: 8314.5 [m^2 s^-2 K^-1]
You can also define your own 1-D linear, or 3-D cloud
interpolation functions
- apply a linear interpolation between input data points and
output a single value
- input units and output units are defined by the user
If you require a function which is not available through
CEL, or requires access to certain variables, such as
gradient terms, a user defined function may be created
by linking to a Fortran library
28 November 2095
2005 ANSYS, Inc. L3-25 ANSYS, Inc. Proprietary
Defining Expressions
CFX-Pre
- Read in from a file
- Created in the Expression Editor
- Entered directly where needed
28 November 2095
2005 ANSYS, Inc. L3-26 ANSYS, Inc. Proprietary
CEL Example: Variable
Viscosity
Mathematical Expression CEL Equivalent
Viscosity of a shear Viscosity as a function of
thickening fluid: temperature
K = 10.0 [kg m^-1 s^-0.5]
K n1 n = 1.5
ViscT = K * sstrnr ^ (n-1)
where is the shear strain or
rate ViscT =
K*(min(UpperS,(sstrnr+LowerS))^(n-
1))
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
28 November 2095
2005 ANSYS, Inc. L3-27 ANSYS, Inc. Proprietary
Evaluating Expressions
In CFX-Pre
The expression editor has a calculate feature to test
expressions, or plot 1-D results
- some values may have to be input manually, since solver
variables will not have values
In the Solver
Expressions are evaluated when the value is needed
- Initial guess: at the start of a run
- Time dependant boundary condition: at the start of each
timestep
- Fluid property: inner solver loops between timesteps
- Integrated quantities: at the start of each timestep
28 November 2095
2005 ANSYS, Inc. L3-28 ANSYS, Inc. Proprietary
Expression Editor
Expression Editor
- Interactive tool for
developing and managing
expressions within CFX
- Available from many panels
and from the Create pull
down menu
28 November 2095
2005 ANSYS, Inc. L3-29 ANSYS, Inc. Proprietary
CEL Example
The following example shows how to set the viscosity
to be a function of temperature. The viscosity-
temperature relation is taken as follows:
e 10T
28 November 2095
2005 ANSYS, Inc. L3-30 ANSYS, Inc. Proprietary
CEL Example
28 November 2095
2005 ANSYS, Inc. L3-31 ANSYS, Inc. Proprietary
CEL Example (B.C.)
The following example shows how to set angular
velocity for a rotating wall using the u and v
components :
28 November 2095
2005 ANSYS, Inc. L3-32 ANSYS, Inc. Proprietary
Integrated Quantities
28 November 2095
2005 ANSYS, Inc. L3-33 ANSYS, Inc. Proprietary
Integrated Quantities
28 November 2095
2005 ANSYS, Inc. L3-34 ANSYS, Inc. Proprietary
Integrated Quantities
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
28 November 2095
2005 ANSYS, Inc. L3-35 ANSYS, Inc. Proprietary
Defining Expressions in Post
28 November 2095
2005 ANSYS, Inc. L3-36 ANSYS, Inc. Proprietary
CFX-Post Functions
28 November 2095
2005 ANSYS, Inc. L3-37 ANSYS, Inc. Proprietary
CFX-Post Functions
[<Fluid>.]<function>[_<Axis>[_<Coord Frame>]]([<Expression>])@<Location>
- probe Value at a point
- sum Sum over the calculation points
- torque Torque on a surface about the specified axis
- volume Volume of a 3-D location
- volumeAve Volume-weighted average
- volumeInt Volume-weighted integral
28 November 2095
2005 ANSYS, Inc. L3-38 ANSYS, Inc. Proprietary
CEL Example: Pressure
Coefficient
Mathematical Expression CEL Equivalent
- or
Cpress = (P - massFlowAve(P)@inflow) /
massFlowAve(.5*Density*V^2)@inflow
28 November 2095
2005 ANSYS, Inc. L3-39 ANSYS, Inc. Proprietary
Practical Session
28 November 2095
2005 ANSYS, Inc. L3-40 ANSYS, Inc. Proprietary