2. The model

advertisement

SIMULATING FLUID DYNAMICS USING A NUMERICAL VARIATIONAL

PRINCIPLE

A. Yahalom a , b

and G.A. Pinhasi a a )

Flow-sim LTD, Israel b ) The College of Judea and Samaria - Faculty of Engineering – Ariel 44837, Israel asya@ycariel.yosh.ac.il

, gadip@eng.tau.ac.il

ABSTRACT. Over the last few years, finite element algorithms for solution of the Euler flow equations have gained increased popularity. The current work is considered with a new way to solve the flow equations using a variational technique. A computer code named FLUIDEX was developed to analyze Barotropic fluid dynamics. The solution of the flow problem is obtained by using numerical algorithm to find the extremum value of an “Action” i.e. by a variational principle.

Predictions of the FLUIDEX numerical model were analyzed for particular cases of potential flow (compressible and incompressible). The results were successfully compared against exact analytical solutions for potential flow test problems and for approximate linearized analytical solution for compressible irorational flow at low Mach numbers. The proposed method obtains fast and stable solutions without the need to integrate the equations in time and space, and thus enables a considerable reduction of the time and cost of the solution.

3 - 1

1.

Introduction

It is well known that a presentation of a physical problem in terms of a variational principle can lead to a better understanding of the problem. Moreover, a variational principle combined with a numerical technique can lead to improved solution, especially for complicated geometries.

Early attempts have been made to formulate Eulerian fluid dynamics in terms of a variational principle (Herivel, 1955; Serrin, 1959; Lin, 1963;). However, the variational principles developed by the above authors are very cumbersome containing quite a few

“Lagrange multipliers” and “potentials”. The range of the total number of independent functions in the above formulations ranges from eleven to seven which exceeds by many the four functions appearing in the Eulerian and continuity equations of a baratropic flow. Therefore they did not have any practical use or applications. A compact 4 function variational principle was obtained by Seliger and Whitham (1968) and thus a new way of simulating fluid dynamics was made possible.

The objective of the current research is to develop a new method to solve the

Euler flow equations numerically using Seliger & Whitham Variational technique. A numerical implementation of their formulation of Eularian variational principle is suggested, and results for analysis of flows around various geometries including wing profiles are presented. Using the proposed method one can obtain improved solutions, especially for complicated geometries.

2.

The model

2.1.

Mathematical model

Consider the motion of a compressible invicid baratropic fluid. The motion is described in the Eulerian approach by the time evolution of the velocity and density fields. The evolution is given by the dynamical Euler equation coupled with the continuity equation and with the equation of state. For a Barotropic flow, the equation of state is in the form of P = P (

), where P is the pressure,

is the density.

The problem can be represented by using the variational principle and solved numerically. In this section a general formulation of the variational principle is

3 - 2

presented, followed by a formulation for a special case of steady irotational compressible flow.

2.1.1.

Simplified form of the variational principle

An equivalent set to the equation of Euler, describing the flow was given by Clebsch

(Lamb, 1945) by introducing three scalars

,

,

to obtained the velocity vector u : u

      

(1)

The variational principle can be presented with only four independent functions in term of Clebsch variables and the density,

(Seliger and Whitham, 1968; Yahalom,

2000). For a compressible flow the variational principle is given in terms of the action,

A , and the Lagrangian, L , which are given respectively by the following time and volume integrals:

A

 t

1  t

0

Ldt

L

  

V

 

 t

 

 t

1

2

     

2  e

 

 

 dV

(2) where e (

) is the specific internal energy and

is the potential relating to an external force.

Taking the variation of the action to be zero,

A =0, with respect to

,

,

and

 one can obtained the set of equations of fluid dynamics in terms of Clebsch representation (Seliger and Whitham, 1968). Thus, this formulation of the variational principle can be used to find directly the flow field solution by looking for the field variables that would lead to an extremum value of the action in (2).

3 - 3

2.1.2.

Steady irrotational compressible flow

Consider the case of steady, irotational compressible flow problem. The variational principle can be presented with only two independent functions: the density,

, and the flow potential,

, where u =

 

, as.

L

  

V



1

2

 ˆ 2

 e

C

B

 dV (3) where C

B

is the Bernoulli’s constant

Taking the variation of

L =0 with respect to

and

leads to

L

 

V

  ˆ 

1

2

 ˆ 2  

 

 

C

B



 dV

(4)

From the thermodynamic relation de = Tds Pd (1/

) and from the specific enthalpy, h, relation h = e + P /

, one can get: h

 

(5) and thus to obtain the known flow equations: continuity equation, Bernulli’s equation and the conditions at the flow domain boundaries

 

0 h

1

2

 ˆ 2 

C

B

On the domain boundary

(6)

   

0

For incompressible flow,

is constant, equation (6) reduces leading to Laplace’s equation,

 2 

=0.

3 - 4

2.2.

Numerical implementation of the variational principle

The numerical techniques used involve some method of discritization of the physical fields in space and time coupled with integration of the flow equations. The current method avoids the integration stage and instead finds the solution by searching for the extremum of the Action with respect to the discrete variable fields, without the need to integrate the equations directly.

Using the finite element approach for the variational principle in (3), one can obtain the action in the form of sum of integrals over each element domain, V e

:

L

    el V el



1

2

 ˆ 2

 e

C

B

 dV el

(7) where the index el represents the element. The integral over each element domain is calculated using the finite element approximation, where the potential value is defined at each node and the density is defined within each element.

The solution of the flow problem is obtained by using numerical algorithm. The algorithm finds the flow variables that would lead to extremum value of the action. The variational principle and the numerical algorithm are discussed further by Yahalom,

(2000).

From the volume occupied by the body there is no contribution to the action term, as a result the normal components of the velocity, u, vanish relative to the body surface.

Therefore, by using such an integral algorithm the user is free from specifying the boundary conditions on the body surface. This fact gains more flexibility in using the algorithm and allows dealing easily with complexes geometries.

The numerical algorithm was implemented using finite-element considerations for various grid types within FLUIDEX computer code. FLUIDEX allows the usage of triangular or rectangular elements in 2D and in hexahedral elements 3D.

3 - 5

3.

Results

The above algorithm was tested against particular cases of potential flow both compressible and uncompressible. The results of two problems for a two-dimensional flow are presented.

3.1.

Potential Flow

The algorithm was tested with respect to geometries, for which analytical solutions are available, like: the flow over a circular cylinder and over Joukowski’s profile. The results obtained using FLUIDEX were in excellent agreement with respect to analytical results.

The algorithm was also tested with NACA 0012 airfoil for various angles of attacks.

Figure 1 shows details of the mesh used for the airfoil computation: a

structured rectangular mesh of 4320 nodes. The surface pressure distribution at zero

angle of attack is shown in Figure 2 . The figure presents the comparison between the

computed pressure coefficient, C p, (in dots) and the pressure coefficient calculated from potential theory (Anderson, 1989). The calculated pressure coefficient was found to be in good agreement with the theory.

3.2.

Compressible flow

For the case of irrotational compressible flow the algorithm was tested against linearized flow analytical solutions (Anderson 1991). These linearized analytical solutions are restricted to relatively low Mach numbers M 

0.8.

For comparison, the case of a flow over ellipse cylinder was solved analytically.

The solution obtained by using transformation of variable and conformal mapping of the known potential solution for flow over a circular cylinder. The ellipse cylinder is defined by the relation x

2

+(1M 

2

) y

2

= R

2

.

Figure 3 presents the comparison between the computed pressure coefficient

distribution and the pressure coefficient distribution calculated from linearized theory for the case of M  =0.29. The calculated pressure coefficient was found to be with good agreement with the linearized analytical model.

3 - 6

Figure 1: The NACA12 airfoil grid using FLUIDEX

Figure 2: Pressure Co. of NACA12 airfoil

3 - 7

M  y x

Figure 3: Pressure Co. of an ellipse cylinder

4.

Summery and Conclusions

A new method was developed for solving the Euler equations for a Barotropic fluid. The method combined the variational principle with a numerical technique. This method leads to improved solution, especially for complicated geometries. To illustrate the performance of the proposed algorithm, results of two problems of a two-dimensional flow were presented.

The new method has mainly two advantages. The first is that the proposed algorithm has very low requirements for computer recourses, like memory, and in a fact it operates on PC under FLUIDEX code. The second is the flexibility of algorithm in the definition of boundary conditions. This flexibility allows performing fast calculation with complex geometries and number of bodies presented in the flow field.

3 - 8

While conventional CFD simulation software requires very long processing times to resolve the fluid flow equations, FLUIDEX deals directly with the final scenario, when the flow has reached the minimal configuration of the potential functional – thereby reducing processing time. It is therefore in our mind an important computational tool for many engineering and scientific studies. The FLUIDEX code is under development and will be able soon to perform full solution of Euler equations in both

2D and 3D.

Acknowledgments

This research was supported by Flow-sim LTD, ISRAEL the developer of the FLUIDEX package.

5.

References

Anderson, J.D. (1991 ) Modern Compressible Flow , McGraw-Hill, New York.

Anderson, J.D. (1989 ) Fundamentals of Aerodynamics , McGraw-Hill, New York.

Herivel, J.W. (1955) Proc. Camb. Phil. Soc.

, 51 , 344.

Lamb, H. (1945) Hydrodynamics , P. 248 Dover Publications.

Lin, C.C. (1963) “Liquid Helium”, in:

Proc. Int. School Phys., XXI, Academic Press.

Serrin, J. (1959) “Mathematical Principles of Classical Fluid Mechanics”, in:

Handbuch der Physik , 8 , 148.

Seliger, R.L. and Whitham, G.B. (1968) ”Variational Principles in continuum mechanics”,

Proc. Roy. Soc. London , A 305 , 1.

Yahalom, A., (2000) "Method and System for Numerical Simulation of Fluid Flow", US

Patent No.: 09/247,588.

3 - 9

Download