9
 6/12/2004 4:37 PM 1 Program 4 Hess-Smith Panel Method The computer program based on the Hess-Smith panel method (HSPM) approximates the body surface by a collection of panels and expresses the flow field in terms of velocity potentials based on sources and vortices in the presence of an onset flow [3]. The input to HSPM comprises (1) the number of panels, N, along the surface of the airfoil,  NODTOT, (2) airfoil coordinates normalized with respect to its chord c , c  x / , c  y / [X(1) and Y(1)], and (3) angle of attack α (ALFA) in degrees. In general, the solution of HSPM becomes more accurate as  N increases. It is usually sufficient to take this number around 100. The output of HSPM includes the dimensionless pressure coefficient  p C  ) ( CP , dimensionless external velocity u u e / ) ( UE lift coefficient l C ) ( CL and  pitching moment coefficient m C ) ( CM about the quarter chord edge of the airfoil. The  pressure coefficient is defined by 2 2 1 = u  p C  p  ρ  ρ (4.1) and is related to the external velocity by 2 1       = u u C e  p (4.2) HSPM contains a MAIN and 4 subroutines, COEF, CLCM, GAUSS, VPDIS given  below MAIN C MAIN (Hess Smith Panel Method) COMMON /BOD/ NODTOT,X(201),Y(201), + XMID(200),YMID(200),COSTHE(200),SINTHE(200) COMMON /NUM/ PI,PI2INV DIMENSION TITLE(20) CHARACTER*80 input_name, output_name PI = 3.1415926585 PI2INV = .5/PI WRITE(6,*) "Enter input file name (include extension name)" READ(5,*) input_name OPEN(unit=55,file=input_name,STATUS="OLD") WRITE(6,*) "Enter output file name" READ(5,*) output_name OPEN(unit=66,file=output_name) READ (55,*) NODTOT READ (55,*)(X(I),I=1,NODTOT+1) READ (55,*)(Y(I),I=1,NODTOT+1) DO 100 I = 1,NODTOT C XMI AND YMI, SEE EQ. (5.3.12)

Document 04HessSmith

Embed Size (px)

Citation preview

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 1/9

 

6/12/2004 4:37 PM 1

Program 4Hess-Smith Panel Method

The computer program based on the Hess-Smith panel method (HSPM) approximates

the body surface by a collection of panels and expresses the flow field in terms of 

velocity potentials based on sources and vortices in the presence of an onset flow [3]. Theinput to HSPM comprises (1) the number of panels, N, along the surface of the airfoil,

 NODTOT, (2) airfoil coordinates normalized with respect to its chord c , c x / , c y /

[X(1) and Y(1)], and (3) angle of attack α  (ALFA) in degrees. In general, the solution of 

HSPM becomes more accurate as  N  increases. It is usually sufficient to take this number 

around 100. The output of HSPM includes the dimensionless pressure coefficient  pC   

)( CP ≡ , dimensionless external velocity ∞uue / )( UE ≡ lift coefficientl

C  )( CL≡ and

 pitching moment coefficient mC  )( CM ≡ about the quarter chord edge of the airfoil. The

 pressure coefficient is defined by

2

21

∞−=

u

 pC  p

 ρ 

 ρ (4.1)

and is related to the external velocity by2

1  

  

 −=

∞u

uC  e p (4.2)

HSPM contains a MAIN and 4 subroutines, COEF, CLCM, GAUSS, VPDIS given

 below

MAIN

C MAIN (Hess Smith Panel Method)COMMON /BOD/ NODTOT,X(201),Y(201),+ XMID(200),YMID(200),COSTHE(200),SINTHE(200)COMMON /NUM/ PI,PI2INVDIMENSION TITLE(20)CHARACTER*80 input_name, output_name

PI = 3.1415926585PI2INV = .5/PIWRITE(6,*) "Enter input file name (include extension name)"READ(5,*) input_name

OPEN(unit=55,file=input_name,STATUS="OLD")WRITE(6,*) "Enter output file name"READ(5,*) output_nameOPEN(unit=66,file=output_name)

READ (55,*) NODTOTREAD (55,*)(X(I),I=1,NODTOT+1)READ (55,*)(Y(I),I=1,NODTOT+1)DO 100 I = 1,NODTOT

C XMI AND YMI, SEE EQ. (5.3.12)

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 2/9

 

6/12/2004 4:37 PM 2

XMID(I) = .5*(X(I) + X(I+1))YMID(I) = .5*(Y(I) + Y(I+1))DX = X(I+1) - X(I)DY = Y(I+1) - Y(I)DIST = SQRT(DX*DX +DY*DY)

C SEE EQ. (5..3.2)SINTHE(I) = DY/DISTCOSTHE(I) = DX/DIST

100 CONTINUEREAD (55,*) ALPHAWRITE (66,1030) ALPHA

1030 FORMAT (//,' SOLUTION AT ALPHA = ',F10.5,/)COSALF = COS(ALPHA*PI/180.)SINALF = SIN(ALPHA*PI/180.)CALL COEF(SINALF,COSALF)CALL GAUSS(1)CALL VPDIS(SINALF,COSALF)CALL CLCM(SINALF,COSALF)STOPEND

Subroutine COEF

SUBROUTINE COEF(SINALF,COSALF)COMMON /BOD/ NODTOT,X(201),Y(201),+ XMID(200),YMID(200),COSTHE(200),SINTHE(200)COMMON /COF/ A(201,201),BV(201),KUTTACOMMON /NUM/ PI,PI2INVKUTTA = NODTOT + 1DO 90 J = 1,KUTTA

90 A(KUTTA,J) = 0.0DO 120 I = 1,NODTOT

A(I,KUTTA) = 0.0DO 110 J = 1,NODTOTFLOG = 0.0FTAN = PIIF (J .EQ. I) GO TO 100DXJ = XMID(I) - X(J)DXJP = XMID(I) - X(J+1)DYJ = YMID(I) - Y(J)DYJP = YMID(I) - Y(J+1)

C FLOG IS LN(R(I,J+1)/R(I,J)), SEE EQ. (5.3.12)FLOG = .5*ALOG((DXJP*DXJP+DYJP*DYJP)/(DXJ*DXJ+DYJ*DYJ))

C FTAN IS BETA(I,J), SEE EQ. (5.3.12)FTAN = ATAN2(DYJP*DXJ-DXJP*DYJ,DXJP*DXJ+DYJP*DYJ)

C CTIMTJ IS COS(THETA(I)-THETA(J))100 CTIMTJ = COSTHE(I)*COSTHE(J) + SINTHE(I)*SINTHE(J)C STIMTJ IS SIN(THETA(I)-THETA(J))

STIMTJ = SINTHE(I)*COSTHE(J) - COSTHE(I)*SINTHE(J)C ELEMENTS OF THE COEFFICEINT MATRIX, A(I,J), SEE EQ. (5.4.1A)

A(I,J) = PI2INV*(FTAN*CTIMTJ + FLOG*STIMTJ)B = PI2INV*(FLOG*CTIMTJ - FTAN*STIMTJ)

C ELEMENTS OF THE COEFFICEINT MATRIX, A(I,N+1), SEE EQ. (5.4.1B)A(I,KUTTA) = A(I,KUTTA) + BIF ((I .GT. 1) .AND. (I .LT. NODTOT))GO TO 110

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 3/9

 

6/12/2004 4:37 PM 3

C ELEMENTS OF THE COEFFICEINT MATRIX, A(N+1,J), SEE EQ. (5.4.3A)A(KUTTA,J) = A(KUTTA,J) - B

C ELEMENT OF THE COEFFICEINT MATRIX, A(N+1,N+1), SEE EQ. (5.4.3B)A(KUTTA,KUTTA) = A(KUTTA,KUTTA) + A(I,J)

110 CONTINUEC ELEMENTS OF VECTOR B FOR I=1,...,N, SEE EQ. (5.4.4A)

BV(I) = SINTHE(I)*COSALF - COSTHE(I)*SINALF120 CONTINUEC ELEMENT OF VECTOR B FOR I=N+1, SEE EQ. (5.4.4B)

BV(KUTTA) = - (COSTHE(1) + COSTHE(NODTOT))*COSALF+ - (SINTHE(1) + SINTHE(NODTOT))*SINALFRETURNEND

Subroutine CLCM

SUBROUTINE CLCM(SINALF,COSALF)COMMON /BOD/ NODTOT,X(201),Y(201),+ XMID(200),YMID(200),COSTHE(200),SINTHE(200)COMMON /CPD/ UE(200),CP(200)CFX = 0.0CFY = 0.0CM = 0.0DO 100 I = 1,NODTOTDX = X(I+1) - X(I)DY = Y(I+1) - Y(I)CFX = CFX + CP(I)*DYCFY = CFY - CP(I)*DXCM = CM + CP(I)*(DX*XMID(I) + DY*YMID(I))

100 CONTINUECL = CFY*COSALF - CFX*SINALFWRITE (66,1000) CL,CM

1000 FORMAT(//,' CL =',F10.5,' CM =',F10.5)RETURNEND

Subroutine GAUSS

SUBROUTINE GAUSS(M)COMMON /COF/ A(201,201),B(201,1),NDO 100 K = 1,N-1KP = K + 1DO 100 I = KP,NR = A(I,K)/A(K,K)

DO 200 J = KP,N200 A(I,J) = A(I,J) - R*A(K,J)DO 100 J = 1,M

100 B(I,J) = B(I,J) - R*B(K,J)DO 300 K = 1,MB(N,K) = B(N,K)/A(N,N)DO 300 I = N-1,1,-1IP = I + 1DO 400 J = IP,N

400 B(I,K) = B(I,K) - A(I,J)*B(J,K)

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 4/9

 

6/12/2004 4:37 PM 4

300 B(I,K) = B(I,K)/A(I,I)RETURNEND

Subroutine VPDIS

SUBROUTINE VPDIS(SINALF,COSALF)COMMON /BOD/ NODTOT,X(201),Y(201),+ XMID(200),YMID(200),COSTHE(200),SINTHE(200)COMMON /COF/ A(201,201),BV(201),KUTTACOMMON /CPD/ UE(200),CP(200)COMMON /NUM/ PI,PI2INVDIMENSION Q(200)WRITE (66,1000)DO 50 I = 1,NODTOT

50 Q(I) = BV(I)GAMMA = BV(KUTTA)DO 130 I = 1,NODTOT

C CONTRIBUTION TO VT(I) FROM FREESTREAM VELOCITY, SEE EQ. (5.3.8B)VTANG = COSALF*COSTHE(I) + SINALF*SINTHE(I)DO 120 J = 1,NODTOTFLOG = 0.0FTAN = PIIF (J .EQ. I) GO TO 100DXJ = XMID(I) - X(J)DXJP = XMID(I) - X(J+1)DYJ = YMID(I) - Y(J)DYJP = YMID(I) - Y(J+1)

C FLOG IS LN(R(I,J+1)/R(I,J)), SEE EQ. (5.3.12)FLOG = .5*ALOG((DXJP*DXJP+DYJP*DYJP)/(DXJ*DXJ+DYJ*DYJ))

C FTAN IS BETA(I,J), SEE EQ. (5.3.12)FTAN = ATAN2(DYJP*DXJ-DXJP*DYJ,DXJP*DXJ+DYJP*DYJ)

C CTIMTJ IS COS(THETA(I)-THETA(J))100 CTIMTJ = COSTHE(I)*COSTHE(J) + SINTHE(I)*SINTHE(J)C STIMTJ IS SIN(THETA(I)-THETA(J))

STIMTJ = SINTHE(I)*COSTHE(J) - COSTHE(I)*SINTHE(J)C AA IS BT(I,J)=AN(I,J), SEE EQ. (5.3.9A)

AA = PI2INV*(FTAN*CTIMTJ + FLOG*STIMTJ)C B IS -AT(I,J), SEE EQ. (5.3.10A)

B = PI2INV*(FLOG*CTIMTJ - FTAN*STIMTJ)C CONTRIBUTION TO VT(I) FROM SINGULARITIES, SEE EQ. (5.3.8B)

VTANG = VTANG - B*Q(J) +GAMMA*AA120 CONTINUE

CP(I) = 1.0 - VTANG*VTANGUE(I) = VTANG

C WRITE (6,1050) I,XMID(I),YMID(I),Q(I),GAMMA,CP(I),UE(I)WRITE (66,1050) I,XMID(I),YMID(I),CP(I),UE(I)

130 CONTINUE1000 FORMAT(4X,'J',4X,'X(J)',6X,'Y(J)',6X,'CP(J)',6X,'UE(J)',/)C1000 FORMAT(/,4X,'J',4X,'X(J)',6X,'Y(J)',6X,'Q(J)',5X,'GAMMA',5X,C + 'CP(J)',6X,'V(J)',/)

1050 FORMAT(I5,4F10.5)1055 FORMAT(3F10.5)C1050 FORMAT(I5,6F10.5)

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 5/9

 

6/12/2004 4:37 PM 5

RETURNEND

Applications of HSPM

To demonstrate the use of HSPM, we consider a NACA 0012 airfoil that is

symmetrical with a maximum thickness of 0.12c. Table 4.1 defines the airfoil coordinates

for 184 points in tabular form. This corresponds to NODTOT = 183. Note that the c x /

and c y / values are read in starting on the lower surface trailing edge (TE), traversing

clockwise around the nose of the airfoil to the upper surface TE. The calculations are

 performed for angles of attack of o0=α  ,

o8 ando16 . In identifying the upper and lower 

surfaces of the airfoil, it is necessary to determine the c x / -locations where

0)/( =≡ ∞uuu ee . This location, called the stagnation point, is easy to determine since the

eu values are positive for the upper surface and negative for the lower surface. In general

it is sufficient to take the stagnation point to be the c x / -location where the change of 

sign to eu occurs. For higher accuracy, if desired, the stagnation point can be determined

 by interpolation between the negative and positive values of  eu as a function of thesurface distance along the airfoil.

Table 4.1. Tabulated coordinates for the NACA 0012 airfoil1.000000 .996060 .991140 .984290 .975520 .964880.952400 .938140 .922150 .904490 .885240 .864460.842250 .818680 .793860 .767880 .740840 .712850.684010 .654460 .624290 .593630 .562610 .531330.499930 .482486 .465056 .447665 .430339 .413103.395971 .378964 .362108 .345420 .328917 .312618.296550 .280736 .265190 .249928 .234965 .220333.206040 .192102 .178538 .165366 .152604 .140264.128362 .116914 .105932 .095430 .085421 .075921

.066938 .058480 .050557 .043180 .036365 .030116

.028319 .026575 .024883 .023245 .021660 .020130

.018656 .017237 .015874 .014568 .013316 .012120

.010980 .009895 .008867 .007894 .006977 .006116

.005310 .004561 .003868 .003232 .002653 .002132

.001667 .001260 .000910 .000617 .000380 .000201

.000078 .000012 .000012 .000078 .000201 .000380

.000617 .000910 .001260 .001667 .002132 .002653

.003232 .003868 .004561 .005310 .006116 .006977

.007894 .008867 .009895 .010980 .012120 .013316

.014568 .015874 .017237 .018656 .020130 .021660

.023245 .024883 .026575 .028319 .030116 .036366

.043183 .050557 .058480 .066938 .075922 .085424

.095432 .105933 .116916 .128364 .140266 .152607.165370 .178541 .192106 .206043 .220334 .234966

.249926 .265191 .280738 .296555 .312622 .328918

.345423 .362109 .378968 .395977 .413111 .430347

.447669 .465060 .482490 .499930 .531330 .562610

.593630 .624290 .654460 .684010 .712850 .740840

.767880 .793860 .818680 .842250 .864460 .885240

.904490 .922150 .938140 .952400 .964880 .975520

.984290 .991130 .996060 1.000000

.000000 -.000570 -.001290 -.002270 -.003520 -.005020

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 6/9

 

6/12/2004 4:37 PM 6

-.006760 -.008700 -.010850 -.013170 -.015650 -.018260-.020990 -.023800 -.026670 -.029590 -.032500 -.035350-.038180 -.040920 -.043590 -.046150 -.048590 -.050860-.052940 -.054006 -.055004 -.055926 -.056766 -.057516-.058179 -.058748 -.059216 -.059580 -.059836 -.059980-.060015 -.059934 -.059734 -.059412 -.058965 -.058401-.057710 -.056893 -.055952 -.054892 -.053715 -.052415-.050992 -.049452 -.047799 -.046040 -.044167 -.042199-.040134 -.037974 -.035719 -.033376 -.030954 -.028454-.027674 -.026887 -.026093 -.025292 -.024484 -.023670-.022849 -.022023 -.021192 -.020355 -.019512 -.018663-.017809 -.016949 -.016084 -.015213 -.014336 -.013454-.012567 -.011676 -.010783 -.009883 -.008977 -.008066-.007149 -.006228 -.005303 -.004373 -.003439 -.002503-.001565 -.000626 .000626 .001565 .002503 .003439.004373 .005303 .006228 .007149 .008066 .008977.009883 .010783 .011676 .012567 .013454 .014336.015213 .016084 .016949 .017809 .018663 .019512.020355 .021192 .022023 .022849 .023670 .024484.025292 .026093 .026887 .027674 .028454 .030954

.033376 .035717 .037972 .040132 .042198 .044170

.046040 .047803 .049453 .050994 .052414 .053714

.054894 .055953 .056895 .057710 .058398 .058963

.059409 .059734 .059934 .060015 .059980 .059834

.059580 .059217 .058748 .058177 .057513 .056763

.055926 .055003 .054006 .052940 .050860 .048590

.046150 .043590 .040920 .038180 .035350 .032500

.029590 .026670 .023800 .020990 .018260 .015650

.013170 .010850 .008700 .006760 .005020 .003520

.002270 .001290 .000570 .000000

Figures 4.1 and 4.2 show the variation of the pressure coefficient  pC  and external

velocity eu on the lower and upper surfaces of the airfoil as a function of  c x / at threeangles of attack starting from o0 . As expected, the results show that the pressure and

external velocity distributions on both surfaces are identical to each other at o0=α  .

With increasing incidence angle, the pressure peak moves upstream on the upper surfaceand downstream on the lower surface. In the former case, with the pressure peak 

increasing in magnitude with increasing α  , the extent of the flow deceleration increases

on the upper surface and, we shall see in the following section, increases the region of flow separation the airfoil. On the lower surface, on the other hand, the region of 

accelerated flow increases with incidence angle which leads to regions of more laminar 

flow than turbulent flow.

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 7/9

 

6/12/2004 4:37 PM 7

 Fig. 4.1 Distribution of dimensionless presure coefficients on the

 NACA 0012 airfoil at 0

, 8

and 16

.

Fig.4.2 Distribution of dimensionless external velocity distribution

∞uue / on the NACA 0012 airfoil at o0=α  , o8 and o16 .

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 8/9

 

6/12/2004 4:37 PM 8

 Fig.4.3. Comparison of calculated (solid lines) and experimental

(symbols) lift coefficients for the NACA 0012 airfoil.

These results indicate that the use of inviscid flow theory becomes increasingly less

accurate at higher angles of attack since, due to flow separation, the viscous effectsneglected in the panel method become increasingly more important. This is indicated in

Fig. 4.3, which shows the calculated inviscid lift coefficients for this airfoil together with

the experimental data reported in [4] for chord Reynolds numbers, c R )/( ν cu∞≡ , of 6103× and 6106× . As can be seen, the calculated results agree reasonably well with the

measured values at low and modest angles of attack. With increasing angle of attack, the

lift coefficient reaches a maximum, called the maximum lift coefficient, max

)(lc , at an

angle of attack, α  , called the stall angle. After this angle of attack, while the

experimental lift coefficients begin to decrease with increasing angle of attack, the

calculated lift coefficient, independent of Reynolds number, continuously increases with

increasing α  . The lift curve slope is not influenced byc

 R , but max

)(lc is dependent

upon c R .

Figure 4.4 shows the moment coefficient about the aerodynamic center ac m ,C  . In

general, moments on an airfoil are a function of angle of attack. However, there is one

 point on the airfoil about which the moment is independent of α  ; this point is referred to

as the aerodynamic center. As illustrated by Fig. 4.4, the moment coefficient is

insensitive to c R except at higher angles of attack.

7/28/2019 Document 04HessSmith

http://slidepdf.com/reader/full/document-04hesssmith 9/9