34
© 2012 ANSYS, Inc. December 12, 2013 1 Release 14.5 14. 5 Release Introduction to ANSYS CFD Professional Lecture 09 Domains, Boundary Conditions and Sources

CFD Pro 14.5 L09 Domains BCs Sources

Embed Size (px)

DESCRIPTION

CFD

Citation preview

© 2012 ANSYS, Inc. December 12, 2013 1 Release 14.5

14. 5 Release

Introduction to ANSYS CFD Professional

Lecture 09 Domains, Boundary Conditions and Sources

© 2012 ANSYS, Inc. December 12, 2013 2 Release 14.5

Domains • Domains are regions of space in which the equations of fluid flow

or heat transfer are solved

• Only the mesh components which are included in a domain are included in the simulation

e.g. A simulation of a copper heating coil in water

will require a fluid domain and a solid domain.

© 2012 ANSYS, Inc. December 12, 2013 3 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

© 2012 ANSYS, Inc. December 12, 2013 4 Release 14.5

Domain Creation

• Basic Settings panel:

– Location: Assemblies and 3D primitives

– Domain Type: Fluid or Solid

– Coordinate Frame: select coordinate frame to which all domain inputs will be referred

• The default Coord 0 frame is usually used

– Fluids and Particles Definitions: select the participating materials

© 2012 ANSYS, Inc. December 12, 2013 5 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

Ex. 2: Preference= 100,000 Pa

Pressure Pressure

Ex. 1: Preference= 0 Pa

Pref

Prel,min=99,999 Pa

Prel,max=1 Pa

Prel,min=-1 Pa

Pref

© 2012 ANSYS, Inc. December 12, 2013 6 Release 14.5

Domain Types • The additional domain tabs/settings

depend on the Domain Type selected

© 2012 ANSYS, Inc. December 12, 2013 7 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 (None, Isothermal, Thermal Energy, Total Energy)

• Turbulence

– Specify whether flow is turbulent (k-Epsilon model) or Laminar

– For the Wall Function to be valid, y+ should be in the range 20 – 200.

© 2012 ANSYS, Inc. December 12, 2013 8 Release 14.5

Domain Type: Solid Models

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

• Heat Transfer (Conjugate Heat Transfer)

© 2012 ANSYS, Inc. December 12, 2013 9 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

© 2012 ANSYS, Inc. December 12, 2013 10 Release 14.5

Materials • A Material can be created/edited by right clicking “Materials” in

the Outline tree

© 2012 ANSYS, Inc. December 12, 2013 11 Release 14.5

14. 5 Release

Introduction to ANSYS CFD Professional

Boundary Conditions

© 2012 ANSYS, Inc. December 12, 2013 12 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

© 2012 ANSYS, Inc. December 12, 2013 13 Release 14.5

Available Boundary Condition Types

Inlet

Opening

Outlet

Wall

Symmetry

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

–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

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

© 2012 ANSYS, Inc. December 12, 2013 14 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

© 2012 ANSYS, Inc. December 12, 2013 15 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

• The same concept applies to outlets

Velocity Specified Condition Pressure or Mass Flow Condition

Inlet Inlet

Inflow

allowed

Inflow

allowed

Outflow

allowed Artificial wall

prevents outflow

© 2012 ANSYS, Inc. December 12, 2013 16 Release 14.5

Openings • The opening type boundary allows both inflow and outflow

• You have to provide information on conditions, e.g. temperature, turbulence, that apply to fluid flowing into the domain

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

Pressure Specified Opening

Inlet

Inflow

allowed

Outflow

allowed

© 2012 ANSYS, Inc. December 12, 2013 17 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

© 2012 ANSYS, Inc. December 12, 2013 18 Release 14.5

Specifying Well Posed Boundary Conditions • If possible, select boundary location

and shape such that flow either goes in or out

– Not necessary, but will typically observe better convergence

• Should not observe large gradients in direction normal to boundary

– Indicates incorrect boundary condition location

Upper pressure boundary modified to ensure that flow always enters domain.

This outlet is poorly located. It should

be moved further downstream

© 2012 ANSYS, Inc. December 12, 2013 19 Release 14.5

Specifying Well Posed Boundary Conditions • Boundaries placed over recirculation zones

– Poor Location: Apply an opening to allow inflow

– Better Location: Apply an outlet with an accurate velocity/pressure profile (difficult)

– 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

Opening

Outlet

Outlet

© 2012 ANSYS, Inc. December 12, 2013 20 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

© 2012 ANSYS, Inc. December 12, 2013 21 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

h

5h

10H At least 2H

10w

Concentrate mesh in

regions of high

gradients

© 2012 ANSYS, Inc. December 12, 2013 22 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

No Symmetry Plane Symmetry Plane

Coanda effect

not allowed

© 2012 ANSYS, Inc. December 12, 2013 23 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)

© 2012 ANSYS, Inc. December 12, 2013 24 Release 14.5

Specifying Well Posed Boundary Conditions • At least one boundary should specify Pressure (either Total or Static)

– Unless it’s 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]

© 2012 ANSYS, Inc. December 12, 2013 25 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

© 2012 ANSYS, Inc. December 12, 2013 26 Release 14.5

14. 5 Release

Introduction to ANSYS CFD Professional

Source Terms

© 2012 ANSYS, Inc. December 12, 2013 27 Release 14.5

Source Terms • Sources add additional terms to the transport equations

• They provide a source (or sink) of the solved variable, e.g.

– 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

Source

Viscous work Convection Transient

Conduction

Energy Transport Equation

© 2012 ANSYS, Inc. December 12, 2013 28 Release 14.5

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

1D location

• 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

Solid heater with

energy source term

Dispersion of an

Additional Variable

from a point source

© 2012 ANSYS, Inc. December 12, 2013 29 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

© 2012 ANSYS, Inc. December 12, 2013 30 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

• 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

© 2012 ANSYS, Inc. December 12, 2013 31 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 Darcy’s Law

ilossi

permi

uuKuKx

P

2

© 2012 ANSYS, Inc. December 12, 2013 32 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

© 2012 ANSYS, Inc. December 12, 2013 33 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

© 2012 ANSYS, Inc. December 12, 2013 34 Release 14.5

Workshop

• 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