You are on page 1of 48

Lecture 04 Domains, Boundary Conditions and Sources 14.

5 Release

Introduction to ANSYS CFX


2012 ANSYS, Inc. December 17, 2012 1 Release 14.5

Domains
Domains are regions of space in which the equations of fluid flow
or heat transfer are solved

e.g. A simulation of a copper heating coil in water will require a fluid domain and a solid domain.

e.g. To account for rotational motion, the rotor is placed in a rotating domain.

Only the mesh components which are included in a domain are


included in the simulation
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
2

Sources
Release 14.5

How to Create a Domain


Define Domain Properties
Right-click on the domain and pick Edit Or right-click on Flow Analysis 1 to insert a new domain
When editing an item a new tab panel opens containing the properties. You can switch between open tabs.

Sub-tabs contain various different properties Complete the required fields on each sub-tab to define the domain

Optional fields are activated by enabling a check box

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
3

Sources
Release 14.5

Domain Creation
Basic Settings panel:
Location: Assemblies and 3D primitives
Domain Type: Fluid, Solid or Porous Coordinate Frame: select coordinate frame to
which all domain inputs will be referred Not to be confused with the reference frame, which can be stationary or rotating The default Coord 0 frame is usually used

Fluids and Particles Definitions: select the


participating materials

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
4

Sources
Release 14.5

Domain Creation Reference Pressure


Basic Settings: Reference Pressure
Represents the absolute pressure datum from which
all relative pressures are measured
Pabs = Preference + Prelative

Pressures specified at boundary and initial conditions


are relative to the Reference Pressure

Used to avoid problems with round-off errors which


occur when the local pressure differences in a fluid are small compared with the absolute pressure level
Pressure Pressure Pref

Prel,max=1 Pa Prel,min=99,999 Pa

Prel,min=-1 Pa

Pref

Ex. 1: Preference= 0 Pa Domains


2012 ANSYS, Inc. December 17, 2012

Ex. 2: Preference= 100,000 Pa Boundary Conditions


5

Sources
Release 14.5

Domain Creation Buoyancy


Basic Settings: Buoyancy
When gravity acts on fluid regions with differences in
density, a buoyancy force arises

When buoyancy is included, a source term is added to


the momentum equations. It is based on the difference between the fluid density and a reference density
SM,buoy=( ref)

ref is the reference density. This is the datum from

which all densities are evaluated. Fluid with density other than ref experience either a positive or negative buoyancy force. on the type of fluid

The ( ref) term is evaluated differently depending

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
6

Sources
Release 14.5

Domain Creation Buoyancy


Full Buoyancy Model
Evaluates the density differences directly

Used when modeling ideal gases, real fluids,


multicomponent fluids or multiphase systems

A Buoyancy Reference Density is required


In single-phase models use an average value of the expected domain density

Boussinesq Model
Used when modeling constant density fluids Buoyancy is driven by temperature differences
( ref) = - ref (T Tref)

A Buoyancy Reference Temperature is required


Use an approximate value of the average expected domain temperature
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
7

Sources
Release 14.5

Domain Creation Buoyancy


Buoyancy Reference Density
The Buoyancy Reference Density is used to avoid
round-off errors

Careful selection of the value will remove the


hydrostatic head from the Pressure solution If rref = 0 [kg m^-3] the full hydrostatic variation appears in the Pressure field If rref = the fluid density (r), then no hydrostatic pressure appears in the Pressure field and the only gradients are those driving the flow

Absolute Pressure always includes both the hydrostatic


and reference pressures
Pabs = Preference + Prelative + rref g h

For a non-buoyant flow a hydrostatic pressure does not


exist
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
8

Sources
Release 14.5

Pressure and Buoyancy Example


Consider the case of flow through a tank
30 psi The inlet is at 30 [psi] absolute Buoyancy is included and so a hydrostatic pressure

gradient exists The outlet pressure will be approximately 30 [psi] plus the hydrostatic pressure given by r g h The flow field is driven by small dynamic pressure changes NOT by the large hydrostatic pressure or the large operating pressure

Small pressure changes drive the flow field in the tank

To resolve the small dynamic pressure changes


accurately, we use the Reference Pressure to offset the operating pressure and the Buoyancy Reference Density to offset the hydrostatic pressure
Gravity, g Domains
2012 ANSYS, Inc. December 17, 2012

~30 psi + r gh

Boundary Conditions
9

Sources
Release 14.5

Domain Creation
General Options panel: Domain Motion
You can specify a domain that is rotating about an axis When a domain with a rotating frame is specified, the
CFX-Solver computes the appropriate Coriolis and centrifugal momentum terms and solves a rotating frame total energy equation

Mesh Deformation
Used for problems involving moving boundaries or
moving subdomains Mesh motion could be imposed or arise as an implicit part of the solution

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
10

Sources
Release 14.5

Domain Types
The additional domain tabs/settings
depend on the Domain Type selected

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
11

Sources
Release 14.5

Domain Type: Fluid Models


Heat Transfer
Specify whether a heat transfer model for
convection and conduction is used to predict the temperature throughout the flow Discussed in Heat Transfer Lecture

Turbulence
Specify whether a turbulence model is used
to predict the effects of turbulence in fluid flow For many flows Shear Stress Transport (SST) is recommended Discussed in Turbulence Lecture

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
12

Sources
Release 14.5

Domain Type: Fluid Models


Reaction or Combustion Models
CFX includes combustion models to allow

the simulation of flows in which combustion reactions occur Available only if Option = Material Definition on the Basic Settings tab Not covered in detail in this course

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
13

Sources
Release 14.5

Domain Type: Fluid Models


Radiation Models
For simulations when thermal radiation is
significant See the Heat Transfer Lecture for more details

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
14

Sources
Release 14.5

Domain Type: Solid Models


Solid Domains are used to model regions that
contain no fluid or porous flow (for example, the walls of a heat exchanger)

Heat Transfer (Conjugate Heat Transfer)


Discussed in Heat Transfer Lecture

Radiation
Only the Monte Carlo radiation model is available
in solids Theres no radiation in a solid domain if it is opaque!

Solid Motion
Used only when you need to account for
advection of heat in the solid domain Solid motion must be tangential to its surface everywhere (for example, an object being extruded or rotated)
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
15

Sources
Release 14.5

Domain Type: Porous Domains


Used to model flows where the
geometry is too complex to resolve with a grid

Instead of including the geometric


details, their effects are accounted for numerically

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
16

Sources
Release 14.5

Domain Type: Porous Domains


Area Porosity
The area porosity (the fraction of physical area that
is available for flow) is assumed isotropic

Volume Porosity
The local ratio of the volume of fluid to the total
physical volume (can vary spatially)

Loss Model
In a porous region, the True Velocity of the fluid is
larger than the Superficial velocity because of the reduction in flow volume
Superficial Velocity = Volume Porosity * True Velocity

Select the Loss Velocity Type that is consistent with


the velocity to which the chosen loss coefficients apply
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
17

Sources
Release 14.5

Domain Type: Porous Domains


Loss Model (continued)
Isotropic: Losses equal in all directions Directional Loss: For many applications, different
losses are induced in the streamwise and transverse directions. (Examples: honeycombs and porous plates) Losses are applied using Darcys Law Permeability and Loss Coefficients
dp r U i K loss U i dxi K perm 2

Linear and Quadratic Resistance Coefficients


dp CR1U i CR 2 U i dxi

Laminar flow: pressure drop typically scales with velocity Turbulent flow: pressure drop typically scales with velocity2
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
18

Sources
Release 14.5

Materials

Create a name for the fluid to be used

Select the material to be used in the domain


Currently loaded materials are available in the drop-down list Additional Materials are available by clicking

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
19

Sources
Release 14.5

Materials
A Material can be created/edited by right clicking Materials in
the Outline tree

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
20

Sources
Release 14.5

Multicomponent/Multiphase Flow
ANSYS CFX has the capability to model fluid mixtures (multicomponent) and
multiple phases
Multicomponent (more details on next slide)
One flow field for the mixture Variations in the mixture accounted for by variable mass fractions Applicable when components are mixed at the molecular level

Multiphase
Each fluid may possess its own flow field (not available in CFD-Flo product) or all fluids may share a common flow field Applicable when fluids are mixed on a macroscopic scale with a discernible interface between the fluids.

Creating multiple fluids will allow you to specify fluid specific and fluid pair models

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
21

Sources
Release 14.5

Multicomponent Flow
ANSYS CFX has the capability to model fluid mixtures (multicomponent) and
multiple phases

For a multicomponent fluid mixture the ANSYS CFX-Solver will calculate


appropriate average values of the properties for each control volume in the flow domain and use these in calculating the fluid flow

These average values will depend both on component property values and on
the proportion of each component present in the control volume

In multicomponent flow the various components of a fluid share the same


mean velocity, pressure and temperature fields, and mass transfer takes place by convection and diffusion

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
22

Sources
Release 14.5

Activated by selecting an Ideal Gas, Real Fluid, or a General Fluid whose density
is a function of pressure

Compressible Flow Modeling

Can solve for subsonic, supersonic and transonic flows Supersonic/transonic flow problems
Set the heat transfer option to Total Energy Generally more difficult to solve than subsonic/incompressible flow problems, especially
when shocks are present. For Mach numbers > 2 increasing the maximum number or continuity loops per time step can help. Expert parameter, max continuity loops.

Click to load a real gas library

Max continuity loops = 2

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
23

Sources
Release 14.5

Boundary Conditions
14. 5 Release

Introduction to ANSYS CFX


2012 ANSYS, Inc. December 17, 2012 24 Release 14.5

Defining Boundary Conditions


You must specify information for the dependent (flow) variables at
the domain boundaries

Specify fluxes of mass, momentum, energy, etc. into the domain.

Defining boundary conditions involves:


Identifying the location of the boundaries (e.g. inlets, walls, symmetry) Supplying information at the boundaries

The data required at a boundary depends upon the boundary


condition type and the physical models employed

You must be aware of types of the boundary condition available and


locate the boundaries where the flow variables have known values or can be reasonably approximated

Poorly defined boundary conditions can have a significant impact on your


solution

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
25

Sources
Release 14.5

Available Boundary Condition Types


Inlet
Velocity Components Normal Speed Mass Flow Rate Total Pressure (stable) Relative Static Pressure (Supersonic) Static Pressure Static Temperature Total Temperature (Heat Transfer) Total Enthalpy (Heat Transfer) Inlet Turbulent conditions

Outlet

Wall
Inlet

Outlet
Average Static Pressure Velocity Components Static Pressure
Normal Speed Mass Flow Rate

Opening
Opening Pressure and Dirn Entrainment Static Pressure and Direction Velocity Components Opening Temperature (Heat Transfer) Opening Static Temperature (Heat Transfer) Inflow Turbulent conditions

Symmetry

Opening

Wall
No Slip / Free Slip Roughness Parameters Wall Velocity (tangential motion only) Adiabatic (Heat Transfer) Fixed Temperature (Heat Transfer) Heat Flux (Heat Transfer) Heat Transfer Coefficient (Heat Transfer)

Symmetry
No details (only specify region which corresponds to the symmetry plane

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
26

Sources
Release 14.5

How to Create a Boundary Condition


Right-click on the domain to insert BCs

After completing the boundary condition, it appears in the Outline tree below its domain

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
27

Sources
Release 14.5

Inlets and Outlets


Inlets are used predominantly for regions where inflow is expected; however,
inlets also support outflow when velocity is specified
Velocity Specified Condition
Inlet Inflow allowed Outflow allowed

Pressure or Mass Flow Condition


Inlet Inflow allowed Artificial wall prevents outflow

Velocity specified inlets are intended for incompressible flows


Using velocity inlets with compressible flows can lead to non-physical results

Pressure and mass flow inlets are suitable for compressible and incompressible
flows

The same concept applies to outlets


Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
28

Sources
Release 14.5

Openings
The opening type boundary allows both inflow and outflow You have to provide information on conditions, e.g. temperature, turbulence,
composition, that apply to fluid flowing into the domain

Do not use opening as an excuse for a poorly placed boundary


See the following slides for examples

Pressure Specified Opening


Inlet Inflow allowed

Outflow allowed

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
29

Sources
Release 14.5

Symmetry
Used to reduce computational effort in problem. No inputs are required. Flow field and geometry must be symmetric:
Zero normal velocity at symmetry plane Zero normal gradients of all variables at symmetry plane Must take care to correctly define symmetry boundary locations

Can be used to model slip walls in viscous flow

symmetry planes

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
30

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


Consider the following case which contains separate air and fuel supply pipes Three possible approaches in locating inlet boundaries:
1 Upstream of manifold Can use uniform profiles since natural profiles will develop in the supply pipes Requires more elements 2 Nozzle inlet plane Requires accurate velocity profile data for the air and fuel 3 Nozzle outlet plane Requires accurate velocity profile data and accurate profile data for the mixture fractions of air and fuel

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
31

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


If possible, select boundary location
and shape such that flow either goes in or out
Upper pressure boundary modified to ensure that flow always enters domain.

Not necessary, but will typically observe


better convergence

Should not observe large gradients in


direction normal to boundary

Indicates incorrect boundary condition


location
This outlet is poorly located. It should be moved further downstream
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
32

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


Boundaries placed over recirculation zones
Poor Location: Apply an opening to allow inflow
Opening

Better Location: Apply an outlet with an accurate velocity/pressure


profile (difficult)
Outlet

Ideal Location: Apply an outlet downstream of the recirculation zone to


allow the flow to develop. This will make it easier to specify accurate flow conditions
Outlet

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
33

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


Turbulence at the Inlet
Nominal turbulence intensities range from 1% to 5% but will depend on
your specific application.

The default turbulence intensity value of 0.037 (that is, 3.7%) is


sufficient for nominal turbulence through a circular inlet, and is a good estimate in the absence of experimental data.

For situations where turbulence is generated by wall friction, consider


extending the domain upstream to allow the walls to generate turbulence and the flow to become developed

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
34

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


External Flow
In general, if the building has height H and width W, you would want your
domain to be at least 5H high, 10W wide, with at least 2H upstream of the building and 10 H downstream of the building. You would want to verify that there are no significant pressure gradients normal to any of the boundaries of the computational domain. If there are, then it would be wise to enlarge the size of your domain.

w Concentrate mesh in regions of high gradients 5h

h
10w At least 2H
Domains
2012 ANSYS, Inc. December 17, 2012

10H
Boundary Conditions
35

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


Symmetry Plane and the Coanda Effect
Symmetric geometry does not necessarily mean symmetric flow Example: The coanda effect. A jet entering at the center of a symmetrical duct
will tend to attach to one side above a certain Reynolds number

Coanda effect not allowed

No Symmetry Plane

Symmetry Plane

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
36

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


When there is 1 Inlet and 1 Outlet
Most Robust: Velocity/Mass Flow at an Inlet; Static Pressure at an Outlet. The
Inlet total pressure is an implicit result of the prediction.

Robust: Total Pressure at an Inlet; Velocity/Mass Flow at an Outlet. The static


pressure at the Outlet and the velocity at the Inlet are part of the solution.

Sensitive to Initial Guess: Total Pressure at an Inlet; Static Pressure at an Outlet.


The system mass flow is part of the solution

Very Unreliable: Static Pressure at an Inlet; Static Pressure at an Outlet. This


combination is not recommended as the inlet total pressure level and the mass flow are both an implicit result of the prediction (the boundary condition combination is a very weak constraint on the system)

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
37

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


At least one boundary should specify Pressure (either Total or Static)
Unless its a closed system Using a combination of Velocity and Mass Flow conditions at all boundaries over
constrains the system

Total Pressure cannot be set at an Outlet


It is unconditionally unstable

Outlets that vent to the atmosphere typically use a Static Pressure = 0


boundary condition

With a domain Reference Pressure of 1 [atm]

Inlets that draw flow in from the atmosphere often use a Total Pressure = 0
boundary condition (e.g. an open window)

With a domain Reference Pressure of 1 [atm]


Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
38

Sources
Release 14.5

Specifying Well Posed Boundary Conditions


Mass flow inlets produce a uniform velocity profile over the inlet
Fully-developed flow is not achieved You cannot specify a mass flow profile

For a mass flow outlet, the mass flow distribution, by default, is based on
the upstream profile and the pressure distribution is an implicit part of the solution. Options to modify are:

Constant flux uniform mass flow (used when flow highly tangential to outlet) Shift pressure option to constrain pressure profile

Pressure specified boundary conditions allow a natural velocity profile to


develop

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
39

Sources
Release 14.5

Source Terms
14. 5 Release

Introduction to ANSYS CFX


2012 ANSYS, Inc. December 17, 2012 40 Release 14.5

Source Terms
Sources add additional terms to the transport equations
Energy Transport Equation

Transient
Convection Conduction Viscous work They provide a source (or sink) of the solved variable, e.g.

Source

A source term added to the energy transport equation represents a source of heat A source / sink term added to the momentum equations represent adding / removing
work to / from the system e.g. a pump / turbine

Source terms are often used as black-boxes


The details of the process producing the source are not simulated
E.g. instead of modelling a fan by resolving the blades and simulating the rotating motion, a source term is used to add momentum to the flow
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
41

Sources
Release 14.5

3D, 2D and 1D Sources


Sources can be applied at a 3D, 2D or
1D location

Solid heater with energy source term

A Subdomain is a 3D region within a


domain that can be used to specify values for volumetric sources

Boundary sources permit the


specification of sources as fluxes (source per unit area) on boundary condition surfaces

Source points are sources that act on a


single mesh element
Domains
2012 ANSYS, Inc. December 17, 2012

Dispersion of an Additional Variable from a point source

Boundary Conditions
42

Sources
Release 14.5

3D Sources - Subdomains
To add a Subdomain right-click on a
Domain > Insert > Subdomain

A domain can contain many subdomains, if

necessary Subdomains cannot span multiple domains Create separate subdomains for each domain

In Basic Settings the Location is


specified

This can be any 3D mesh region in the

domain, including the whole domain When creating your geometry and mesh you should account for any regions where source terms are required
In general create a separate 3D solid in the geometry, then Form New Part in DesignModeler gives a continuous mesh with distinct 3D regions
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
43

Sources
Release 14.5

3D Sources - Subdomains
On the Sources tab a source term for each
equation can be set

Momentum Sources have their own section on the


Sources panel see next slide

Sources may be constants or expressions


Sinks are just negative sources

The source Option can be:


Source: An amount per unit volume, e.g. [W/m^3] Total Source: The total amount applied to the
subdomain, e.g. [W]

The optional Source Coefficient should be set


(to improve convergence) if the source term is a function of the solved variable

E.g. an energy source which is a function of temperature Set to the derivative of the source with respect to the solved variable
Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
44

Sources
Release 14.5

3D Sources Momentum Sources


Momentum Sources can be set using a:
General Momentum Source: similar to how sources are
set for other equations Loss Model: when modeling porous materials, screens, etc. This is based on Darcys Law and so the parameters are similar to those for a porous domain

P r ui K loss u ui xi K perm 2

Unlike a porous domain, there is no account made for a reduction in flow volume and so there is no velocity option for calculation of pressure gradient

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
45

Sources
Release 14.5

2D Sources Boundary Sources


2D sources are associated with a boundary
condition

Each boundary condition has a Sources tab

Settings are the same as 3D sources except


either a Flux (source per unit area) is specified or a Total Source (total amount over the boundary)

You cannot set momentum sources on


boundaries

Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
46

Sources
Release 14.5

1D Sources Source Points


1D Sources are created by right-clicking on
the appropriate domain > Insert > Source Point or using the toolbar icon

Settings are similar to 3D sources except


that you can only use the Total Source option

You cannot set a momentum Source at a


point

Source points are actually implemented as


3D sources on a single mesh element

Mesh refinement will refine the source point


Domains
2012 ANSYS, Inc. December 17, 2012

Boundary Conditions
47

Sources
Release 14.5

Workshop
Workshop 02 Mixing Tee with Particle Transport
Modelling

Addition of Lagrangian particle tracking to the


previous workshop

OR

Workshop03 Mixing Tube



Mixing of hot and cold fluids Inlet velocity profile using Profile Boundary Condition Temperature-dependent viscosity Use of Instance Transforms in CFD-Post

2012 ANSYS, Inc.

December 17, 2012

48

Release 14.5