Computational Fluid Dynamics - ESSIEslinn/CFD lecture 25.pdf · Computational Fluid Dynamics...

4
Computational Fluid Dynamics Lecture 25 { } 1 J x yz yz x yz yz x yz yz ξ η ζ ζ η η ξ ζ ζ ξ ζ ξ η η ξ = + The metrics can be readily determined if analytical expressions are available for the inverse of the transformation. ( ) ( ) ( ) , , , , , , x x y y z z ξ ηζ ξ ηζ ξ ηζ = = = For cases where the transformation is the result of a grid generation scheme, the metrics are computed numerically using central differences. The problem of grid generation is determining the mapping between the physical domain and the computational domain. Desired Features: 1. One to one mapping. 2. Grid lines should be smooth. 3. Grid points should be closely spaced in physical space where large numerical errors are expected. 4. Excessive grid skewness should be avoided. Grid generation in one dimension is simple, many functions can generate satisfactory grids. There are three basic techniques for 2-D grid generation. 1. Complex variable techniques. 2. Algebraic methods. 3. Differential equation techniques Complex variable techniques are analytic, as opposed to numerical methods. Disadvantage is restricted to 2-D, no 3-D extension. Examples: R.T. Davis. 1979. Numerical Methods for Coordinate Generation based on the Schwartz-Christoffel transformation, AIAA paper 79-1463 Or Moretti, G. 1979. Conformal mappings for the computation of steady three-dimensional supersonic flows; Numerical/Laboratory Computer Methods in Fluid Mechanics, (A.A. Pouring & VI Shah eds.) ASME New York pp13-28. 1

Transcript of Computational Fluid Dynamics - ESSIEslinn/CFD lecture 25.pdf · Computational Fluid Dynamics...

Page 1: Computational Fluid Dynamics - ESSIEslinn/CFD lecture 25.pdf · Computational Fluid Dynamics Lecture 25 J 1{} xξηyzζyζzηxηyξzζyζzξxζyξzηyzηξ The metrics can be readily

Computational Fluid Dynamics

Lecture 25

{ }1J

x y z y z x y z y z x y z y zξ η ζ ζ η η ξ ζ ζ ξ ζ ξ η η ξ

= − − − + −

The metrics can be readily determined if analytical expressions are available for the inverse of the transformation.

( )( )( )

, ,

, ,

, ,

x x

y y

z z

ξ η ζ

ξ η ζ

ξ η ζ

=

=

=

For cases where the transformation is the result of a grid generation scheme, the metrics are computed numerically using central differences. The problem of grid generation is determining the mapping between the physical domain and the computational domain. Desired Features:

1. One to one mapping. 2. Grid lines should be smooth. 3. Grid points should be closely spaced in physical space where large numerical errors are

expected. 4. Excessive grid skewness should be avoided.

Grid generation in one dimension is simple, many functions can generate satisfactory grids. There are three basic techniques for 2-D grid generation.

1. Complex variable techniques. 2. Algebraic methods. 3. Differential equation techniques

Complex variable techniques are analytic, as opposed to numerical methods. Disadvantage is restricted to 2-D, no 3-D extension. Examples: R.T. Davis. 1979. Numerical Methods for Coordinate Generation based on the Schwartz-Christoffel transformation, AIAA paper 79-1463 Or Moretti, G. 1979. Conformal mappings for the computation of steady three-dimensional supersonic flows; Numerical/Laboratory Computer Methods in Fluid Mechanics, (A.A. Pouring & VI Shah eds.) ASME New York pp13-28.

1

Page 2: Computational Fluid Dynamics - ESSIEslinn/CFD lecture 25.pdf · Computational Fluid Dynamics Lecture 25 J 1{} xξηyzζyζzηxηyξzζyζzξxζyξzηyzηξ The metrics can be readily

Algebraic and differential techniques work on 3-D problems, best for use with finite difference schemes. Algebraic example: Nozzle Geometry with is a function describing the nozzle. Equally spaced increments in x, and uniform division in y.

2 , 1 2y x x= < <

max

xy

y

ξ

η

=

=

where is the nozzle boundary. ( )maxy x

max2max

2max

2

and1 1

x

y

dyyy dx

y

ηηξ

ηξ

= − = −

= =

This produces an analytic transformation. The same (approximate) normalizing transformation could be constructed by assigning points in the physical plane along constant and ξ η lines and numerically computing the metrics using second order central differences. This has the advantage of allowing clustering of grid points but the disadvantage is that all the metrics must be determined numerically. If numerical methods are used, the terms , , and x x y yξ η ξ η

y

are determined using finite differences. The quantities , , and x y xξ ξ η η appear in the PDE’s for fluid flow.

2

Page 3: Computational Fluid Dynamics - ESSIEslinn/CFD lecture 25.pdf · Computational Fluid Dynamics Lecture 25 J 1{} xξηyzζyζzηxηyξzζyζzξxζyξzηyzηξ The metrics can be readily

These come from the relations:

x

y

x

y

yJ

xJyJ

xJ

η

η

ξ

ξ

ξ

ξ

η

η

=

= −

= −

=

where J x y y xξ η ξ= − η the determinant of the transformation matrix, i.e.

: x x

yy x y y x

J

x y y x y x y xx x x x

ξξ ξ η ξ ηη η

η η ηξ η ξ η η ξ ξ

= − − = −

∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂− = −

∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂

1y ηη ξ∂ ∂

=∂ ∂

0y yξ ξ∂ ∂

− = −∂ ∂

In most problems, the boundaries are not analytic functions but are simply prescribed as a set of data points. In this case, the boundary must be approximated by a curve fitting procedure first. One approach is using Tension splines (Eiseman and Smith, 1980). Differential Equation Method Gernally this is done be generating a grid by solving the Laplace or Poisson equation. Consider the LaPlace equation, which describes steady state heat conduction. In 2-D with Dirichlet B.C.’s the solution of 2 0T∇ = produces isotherms that are smooth and non-intersecting. The number of isotherms in a given region can be increased be adding a source term on the RHS.

(2 ,T S x y∇ = )

)

which is Poisson’s equation. If the isotherms are used as grid lines, they will be smooth, non-intersecting and can be densely packed in any region by adjusting the strength of the source term. The mapping is controlled by a Poisson equation. The desired ( ,x y grid points on the boundary of the physical domain are specified. The distribution of points on the interior is then determined by solving.

3

Page 4: Computational Fluid Dynamics - ESSIEslinn/CFD lecture 25.pdf · Computational Fluid Dynamics Lecture 25 J 1{} xξηyzζyζzηxηyξzζyζzξxζyξzηyzηξ The metrics can be readily

( )( )

,

,xx yy

xx yy

P

Q

ξ ξ ξ η

η η ξ

+ =

+ = η

)

where ( ,ξ η represent the coordinates in the computational domain, and P&Q control spacing the interior. These equations are then transformed to computational space and solved. Interchanging the variables:

( )

( )

2

2

2 2

2 2

2

and

2

x x x J Px Qx

y y y J Py Q

x y

x x y y

x y

J x y x y

ξξ ξη ηη ξ η

yξξ ξη ηη ξ

η η

ξ η ξ η

ξ ξ

ξ η η ξ

α β γ

α β γ

α

β

γ

− + = − +

− + = − +

= +

= +

= +

= −

η

)

The system is solved on a uniformly-spaced grid in the computational plane, using a method such as Gauss-Siedel, SOR, Multigrid, or Conjugate Gradient. This provides the ( ,x y coordinated of each point in physical space. For simply connected regions, Dirichlet B.C.’s can be used at all boundary points. The resulting grid is smooth; the transform is 1 to 1. Complex boundaries are easily treated. Choice of P & Q is not easy.

4