Application of Environment Spatial Information System HW – Boundary Conditions

36
Application of Environment Spatial Application of Environment Spatial Information System Information System HW – Boundary Conditions HW – Boundary Conditions Minkasheva Alena Thermal Fluid Engineering Lab. Department of Mechanical Engineering Kangwon National University 2007.05.18 HOMEWORK

description

HOMEWORK. Application of Environment Spatial Information System HW – Boundary Conditions. Minkasheva Alena Thermal Fluid Engineering Lab. Department of Mechanical Engineering Kangwon National University 2007.05.18. Contents. 1. - PowerPoint PPT Presentation

Transcript of Application of Environment Spatial Information System HW – Boundary Conditions

Page 1: Application of Environment Spatial Information System HW – Boundary Conditions

Application of Environment Spatial Application of Environment Spatial Information SystemInformation System

HW – Boundary ConditionsHW – Boundary Conditions

Minkasheva Alena

Thermal Fluid Engineering Lab.Department of Mechanical Engineering

Kangwon National University

2007.05.18

HOMEWORK

Page 2: Application of Environment Spatial Information System HW – Boundary Conditions

ContentsContents

1. Boundary Condition Types1. Boundary Condition Types

2. Boundary Conditions in CFD2. Boundary Conditions in CFD

Introduction

Inlet Boundary Conditions

Outlet Boundary Conditions

Wall Boundary Conditions

The Constant Pressure Boundary Condition

Symmetry Boundary Condition

Periodic or Cyclic Boundary Condition

Boundary Conditions in CFD - Final Remarks

11

Page 3: Application of Environment Spatial Information System HW – Boundary Conditions

ContentsContents

3. Boundary Conditions in PHOENICS3. Boundary Conditions in PHOENICS

Nomenclature

The Algebraic Equations

The Source Term

The Types of Boundary Condition in PHOENICS

Fixed Value Boundary Condition

Fixed Flux / Fixed Source Boundary Condition

Linear Boundary Condition

Non-Linear Boundary Condition

Laminar Wall Boundary Condition

Turbulent Wall Boundary Condition

Inflow Boundary Condition

Boundary Conditions in PHOENICS - Final Remarks

22

Page 4: Application of Environment Spatial Information System HW – Boundary Conditions

1. Boundary Condition Types1. Boundary Condition TypesFive types of boundary conditions are defined at physical boundaries.The “zeroth” type designates those cases with no physical boundaries. In the equations below the coordinate at the boundary is denoted ri and i indicates one of the boundari

es.

Type 1. Prescribed temperature (Dirichlet condition)specify the value of the function on a surface:

Type 2. Prescribed heat flux (Neumann condition)specify the normal derivative of the function on a surface:

here ni is the outward-facing normal vector on the body surface.

(T (), ift ), tri ri

(i

ri

fn

Tk

i

), tri

11

Page 5: Application of Environment Spatial Information System HW – Boundary Conditions

Type 3. Convective boundary condition (sometimes called the Robin condition):

   here hi is the heat transfer coefficient and specified function fi is usually equal to hiT∞ where T∞

is a fluid temperature.

Type 4. Thin, high-conductivity film at the body surface:

here product (ρ cb)i are properties of the surface film (density, specific heat, and thickness), and t

he surface film must have a negligible temperature gradient across it (“lumped”).

(Thn

Tk i

rii

(), ift ), tri ri

(i

ri

fn

Tk

i

ri

iri t

Tcbt

)(),

1. Boundary Condition Types1. Boundary Condition Types 22

Page 6: Application of Environment Spatial Information System HW – Boundary Conditions

Type 5. Thin, high-conductivity film at the body surface, with theaddition of convection heat losses from the surface:

Type 0. No physical boundary. The number 0 (zero) is used where there is no physical boundary, which arises in some body shapes.

ri(Thn

Tk i

rii

(), ift

iri t

Tcbt

)(), ri

1. Boundary Condition Types1. Boundary Condition Types 33

Page 7: Application of Environment Spatial Information System HW – Boundary Conditions

2. Boundary Conditions in CFD2. Boundary Conditions in CFD

All CFD problems are defined in terms of initial and boundary conditions. In transient problems the initial values of all the flow variables need to be specified at all solution points in the flow domain.

The most common boundary conditions in the discretised equations of the finite volume method:

• inlet

• outlet

• wall

• prescribed pressure

• symmetry

• periodicity (or cyclic boundary condition)

Introduction

Page 8: Application of Environment Spatial Information System HW – Boundary Conditions

Fig. 2 v-velocity cell at the inlet boundary

Fig. 1 u-velocity cell at the inlet boundary

The distribution of all flow variables needs to be specified at inlet boundaries Figures 1 and 2 show the grid arrangement in the immediate vicinity of an inlet for u- and v- momentum, scalar and pressure correction equation cells. The grid extends outside the physical boundary and the nodes along the line I=1 (or i = 2 for u-velocity) are used to store the inlet values of flow variables (uin, vin p’in)

Inlet Boundary Conditions 11

Page 9: Application of Environment Spatial Information System HW – Boundary Conditions

Fig. 3 Pressure correction cell at inlet boundary

Fig. 4 Scalar cell at inlet boundary

The diagrams show the “active” neighbours and cell faces which are represented in the discretised equation for the shaded cell. All links to neighbouring nodes remain active for the first u-, v- and φ-cell, so to accommodate the inlet boundary condition for these variables it is unnecessary to make any modifications to their discretised equations. Figure 3 shows that the link with the boundary side is cut in the discretised pressure correction equation by setting the boundary side (west) coefficient aW equal to zero.

22Inlet Boundary Conditions

Page 10: Application of Environment Spatial Information System HW – Boundary Conditions

Outlet Boundary Conditions

Fig. 6 v-velocity cell at an outlet boundary

Fig. 5 u-velocity cell at an outlet boundary

11If the location of the outlet is selected far away from geometrical disturbances the flow often reaches a fully developed state where no change occurs in the flow direction. In such a region we can place an outlet surface and state that the gradients of all variables (except pressure) are zero in the flow direction. Figures 5 to 8 show the grid arrangements near such an outlet boundary. We have shaded the last cells upstream of the outlet, for which a discretised equation is solved, and highlighted the active neighbours and faces.

Page 11: Application of Environment Spatial Information System HW – Boundary Conditions

Outlet Boundary Conditions

Fig. 7 Pressure correction cell at outlet boundary

Fig. 8 Scalar cell at outlet boundary

22If NI is the total number of nodes in the x-direction, the equations are solved for cells up to I (or i) = NI -1. Before the relevant equations are solved the values of flow variables at the next node (NI), just outside the domain, are determined by extrapolation from the interior on the assumption of zero gradient at the outlet plane.For the v- and scalar eqs. this implies setting vNI,j = vNI-1,j and φNI,j = φNI-1,j Calculation of u-velocity at the outlet plane i = NI by assuming zero gradient gives

uNI,J = uNI-1,J

Page 12: Application of Environment Spatial Information System HW – Boundary Conditions

Wall Boundary Conditions

Fig. 9 u-velocity cell at a wall boundary

The wall is the most common boundary in confined fluid flow problems. Figures 9 to 11 illustrate the grid details in the near wall regions for the u-velocity component (parallel to the wall), for the v-velocity component (perpendicular to the wall) and for scalar variables.

11

Page 13: Application of Environment Spatial Information System HW – Boundary Conditions

Wall Boundary Conditions

Fig. 10 v-velocity cell at a wall boundary (a) j=3 and (b) j=NJ

The no-slip condition (u = v =0) is the appropriate condition for the velocity components at solid walls. The normal component of the velocity can simply be set to zero at the boundary ( j = 2) and the discretised momentum equation at the next v-cell in the flow ( j = 3) can be evaluated without modification.

For all other variables special sources are constructed, the precise form of which depends on whether the flow is laminar or turbulent.

22

Page 14: Application of Environment Spatial Information System HW – Boundary Conditions

Wall Boundary Conditions

Fig. 11 Scalar cell at a wall boundary

33

There are several types of wall boundary conditions:

Laminar Flow/Linear Sub-layer

Turbulent Flow

Rough walls

Moving walls

Page 15: Application of Environment Spatial Information System HW – Boundary Conditions

Wall Boundary Conditions 44

Inflowboundary

Density,velocity andtemperaturegiven

Flow

Outflowboundary

Velocity=0, temperature or heat flux given

Velocity=0, temperature or heat flux givenSolid wall

Fig. 12 Boundary conditions for an internal flow problem

Page 16: Application of Environment Spatial Information System HW – Boundary Conditions

Wall Boundary Conditions 55

Fig. 13 Boundary conditions for external flow problem

Inflowboundary

Density,velocity andtemperaturegiven

Flow

Outflowboundary

Solid object

As inflow be where flow into domain through open boundary

Open boundary

Velocity = 0, temperature or heat flux given

Open boundary

Or as outflow be where flow out of domain

Page 17: Application of Environment Spatial Information System HW – Boundary Conditions

Wall Boundary Conditions 66

Fig. 14 Example of flow boundaries with symmetry conditions

Inletboundary condition

Solution region Symmetry boundary condition

Wall boundary condition

Outletboundary condition

Page 18: Application of Environment Spatial Information System HW – Boundary Conditions

Wall Boundary Conditions 77

Fig. 15 Examples of flow boundaries with cyclic conditions

Wall boundarycondition

Cyclicboundary conditions

Outflowbc

Inflowbc

Cyclicbc

Page 19: Application of Environment Spatial Information System HW – Boundary Conditions

The Constant Pressure Boundary Condition

Fig. 16 p’-cell at an intlet boundary

Fig. 17 p’-cell at an outlet boundary

The constant pressure condition is used in situations where exact details of the flow distribution are unknown but the boundary values of pressure are known. The pressure correction is set to zero at the nodes.

The grid arrangement of the p’-cells near a flow inlet and outlet is shown in Figures 16 and 17.

Page 20: Application of Environment Spatial Information System HW – Boundary Conditions

The conditions at a symmetry boundary are:

(1) no flow across the boundary

(2) no scalar flux across the boundary.

In the implementation, normal velocities are set to zero at a symmetry boundary and the values of all other properties just outside the solution domain (say I or i= 1) are equated to their values at the nearest node just inside the domain (I or i = 2):

φ1,J = φ2,J

In the discretised p’- equations the link with the symmetry boundary side is cut by setting the appropriate coefficient to zero; no further modifications are required.

Symmetry Boundary Condition

Page 21: Application of Environment Spatial Information System HW – Boundary Conditions

Consider for example swirling flow in a cylindrical furnace is shown in Figure 18. In the burner arrangement gaseous fuel is introduced through six symmetrically placed holes and swirl air enters through the outer annulus of the burner.

Periodic or Cyclic Boundary Condition

Fig. 18 An example of a cyclic boundary condition

11

Page 22: Application of Environment Spatial Information System HW – Boundary Conditions

This problem can be solved in cylindrical polar co-ordinates (z, r,θ).

The pair of boundaries k = 1 and k =NK are called periodic or cyclic boundaries.

To apply cyclic boundary conditions we need to set the flux of all flow variables leaving the outlet cyclic boundary equal to the flux entering the inlet cyclic boundary. This is achieved by equating the values of each variable at the nodes just upstream and downstream of the inlet plane to the nodal values just upstream and downstream of the outlet plane. For all variables except the velocity component across the inlet and outlet planes (say w) we have

φ1,J = φNK-1,J and φNK,J = φ2,J

For the velocity component across the boundary we have

w1,J = wNK-1,J and wNK,J = w3,J

Periodic or Cyclic Boundary Condition 22

Page 23: Application of Environment Spatial Information System HW – Boundary Conditions

Flows inside a CFD solution domain are driven by the boundary conditions. In a sense the process of solving a field problem (e.g. a fluid flow) is nothing more than the extrapolation of a set of data defined on a boundary contour or surface into the domain interior. It is, therefore, of paramount importance that we supply physically realistic, well-posed boundary conditions.

The single most common cause of rapid divergence of CFD simulations is the inappropriate selection of boundary conditions.

The “main” boundary conditions for viscous fluid flows include inlet, outlet and wall condition; three further conditions are constant pressure, symmetry and periodicity. They are physically realistic and very useful in practical calculations.

Boundary Conditions in CFD - Final Remarks

Page 24: Application of Environment Spatial Information System HW – Boundary Conditions

In PHOENICS, boundary conditions and sources appear on the r.h.s. of the differential equation for a variable . Thus:

where: - the variable in question

ρ - density

U - vector velocity

S - conventionally recognised source terms, such as pressure gradients or

viscous heating terms.

- diffusive exchange coefficient for .

Sbc1 etc. - various boundary conditions. These may be present only in certain regions of the domain. More terms of this ki

nd may be also be present in other regions of the domain, and these regions may overlap.

3. Boundary Conditions in PHOENICS3. Boundary Conditions in PHOENICS

bcnbcbch

hh

SSSSx

Uxt

...

)(21

Page 25: Application of Environment Spatial Information System HW – Boundary Conditions

NomenclatureA compass-point notation:

P = Cell center

T = Cell center at previous time step 

N,S,E,W,H,L = Neighbour-cell centers

S → N = Positive IY

W → E = Positive IX

L → H = Positive IZ

Page 26: Application of Environment Spatial Information System HW – Boundary Conditions

The differential equation is integrated over a control volume to yield the finite-volume equation actually solved. The integral of the boundary source is represented in linearized form:

The finite-volume discretization of the differential equation thus yields, for each cell P in the domain, the following algebraic equation:

where: S - the “true” source

C - the coefficient

V- the value

T - the type, a geometrical multiplier

The Algebraic Equations

)( VTCSbc

TLHWESN patches

PhhPP VTCSaa,,,,,,

)(

Page 27: Application of Environment Spatial Information System HW – Boundary Conditions

As a consequence of the integration procedure, the source is required per cell. The units of the source are ( kg/s). The type is used to convert the source from any given set of units.

Thus, if the source is defined as “per unit volume”, type supplies the cell volumes. If the source is “per unit area”, type is an appropriate cell face area.

Note that TCV is added to the numerator, and TC to the denominator. As will be shown, this allows for easy manipulation of the solution.

The Source Term

TCa

TCVSa

P

hhP

Page 28: Application of Environment Spatial Information System HW – Boundary Conditions

The types of boundary conditions in PHOENICS are:

• Fixed value

• Fixed flux / fixed source

• Linear boundary condition

• Non-linear boundary condition

• Wall conditions

• Inflows and outflows

• General sources

The Types of Boundary Condition in PHOENICS

Page 29: Application of Environment Spatial Information System HW – Boundary Conditions

Practical example: we wish to fix the temperature in one corner of a cube to 0.0, and to 1.0 in the diagonally opposite corner.

Numerical practice: the value of can be fixed in any cell by setting C to a large number, and V to the required value.

The equation then becomes:

Fixed Value Boundary Condition

TCa

TCVSa

P

hhP

VTC

TCV

TCnumbersmall

TCVnumbersmall

Page 30: Application of Environment Spatial Information System HW – Boundary Conditions

Practical example: heat is being generated at a constant (fixed) rate.

Numerical practice: a fixed source can be put into the equation by setting C to a small number, so that the denominator is not changed, and by setting V to (source/C). T then ensures that the final source is per cell.

The equation then becomes:

Fixed Flux / Fixed Source Boundary Condition

TCa

TCVSa

P

hhP

tinyTatiny

sourcetinyTSa

P

hh

)(

P

hh

a

sourceSa

Page 31: Application of Environment Spatial Information System HW – Boundary Conditions

Practical example: One of the domain boundaries is losing heat to the surroundings. The external heat transfer coefficient, H (W/m2/K), and the external temperature, Text (K), are both known and constant.

Numerical practice: The heat source for a cell with area A is:

This is obviously in TC(V - ) form if T = A, C = H and V=Text.

Non-Linear Boundary Condition

The non-linear source can always be linearized into TC(V - ) form by arranging to update C and/or V during the course of the calculation.

Linear Boundary Condition

)( Pext TTAHQ

Page 32: Application of Environment Spatial Information System HW – Boundary Conditions

Laminar shear stress at stationary wall is expressed by:

where area is the cell face area, Δy is the distance from the cell face to the cell centre

This can be put into TC(V - ) form if T = area, and V=0.

The problem with this approach is that the density and laminar viscosity may be varying, whilst the distance to the wall will change as the grid is refined, and indeed may change from cell to cell in a BFC grid.

A special PATCH type is provided which automatically sets:

The coefficient is then a further multiplier, which is usually set to 1.0.

Laminar Wall Boundary Condition

y

Warea

dy

dvA P

W

11

0

yC

1

y

areaT

1

Page 33: Application of Environment Spatial Information System HW – Boundary Conditions

In a turbulent flow, the near-wall grid node normally has to be in the fully-turbulent region, otherwise the assumptions in the turbulence model are invalid. The wall shear stress and heat transfer can no longer be obtained from the simple linear laminar relationships.

Unless a low-Reynolds number extension of the turbulence model is used, the normal practice is to bridge the laminar sub-layer with wall functions. These use empirical formulae for the shear stress and heat transfer coefficients.

Three types of wall function are available, selected by the COVAL settings:

• Coefficient GRND1 for Blasius power law

• Coefficient GRND2 for equilibrium Logarithmic wall function

• Coefficient GRND3 for Generalised (non-equilibrium) wall function

• Coefficient GRND5 for Fully-rough equilibrium Logarithmic wall function

Turbulent Wall Boundary Condition

Page 34: Application of Environment Spatial Information System HW – Boundary Conditions

All mass flow boundary conditions are introduced as linearized sources in the continuity equation, with pressure (P1) as the variable. A mass source is thus:

where Cm and Vm are coefficient and value for P1.

At an inflow boundary, the mass flow is fixed irrespective of the internal pressure. This effect is achieved by setting Cm to FIXFLU, and Vm to the required mass flow.

The sign convention is that inflows are +ve, outflows are -ve. A fixed outflow rate can thus be fixed by setting a negative mass flow.

Inflow Boundary Condition

)( 1Pmmm PVTCS

Page 35: Application of Environment Spatial Information System HW – Boundary Conditions

Boundary conditions and sources are treated in PHOENICS as linearized sources having the form TC(V - ) .

For a variable , the main kinds of boundary conditions are:

• Fixed-value boundary condition (coefficient = FIXVAL)

• Fixed-flux boundary condition (coefficient = FIXFLU)

• Wall-type boundary condition (patch type = *WALL)

• Linear boundary condition (coefficient = proportionality constant)

Boundary conditions for mass and pressure are both treated as linearized sources in the continuity eq., with pressure as the variable in the linear source: TCm(Vm – P1p) .

FIXFLU is used as coefficient for the specification of mass fluxes, and FIXVAL or FIXP for fixing the pressure.

Boundary conditions must be supplied for all the variables when there is an inflow mass into the domain. This is done by using ONLYMS as coefficient in the COVAL command for the property, and the inflowing value as value.

Boundary Conditions in PHOENICS - Final Remarks

Page 36: Application of Environment Spatial Information System HW – Boundary Conditions

THE ENDTHE END