Page 169 - Aerodynamics for Engineering Students
P. 169

152  Aerodynamics for Engineering Students
                Therefore to obtain the components of this velocity vector perpendicular and tangential
                to panel i take the scalar product of the velocity vector with ii; and Z;  respectively to obtain
                                                       .
                                          -+
                                     Nu = VPQ . ii; = vXQn; tj + vraii; . iij     (3.99a)
                                                     A
                                                        *
                                                       .
                                                        tj
                                                              *
                                                                A
                                     T.. - ?PQ . Z;  = ~,~t; + vYQti . nj         (3.99b)
                                      II-
                     A computational routine in FORTRAN 77
                In order  to  see how the calculation of  the influence coefficients works in practice, a
                computational routine written in standard FORTRAN 77 is given below, with a descrip-
                tion of each step.
                SUBROUTINEINFLU(XC, YC, AN,  AT,  NHAT,  THAT,  N,  NM)
                   Onexit XCandYCare columnmatrices oflengthNcontainingtheco-ordinatesof
                   thecollocation points; ANandATaretheN*Ninfluencecoefficientmatrices; and
                   NHATandTHATaretheN*2matricescontain~ngtheco-ord~natesoftheun~tnormal
                   and tangent vectors, the first andsecondcolumns contain thexandy co-ordinates
                   respectively.NisthenumberofpanelsandNMisthemaximumnumberofpane1s.
                   PARAMETER(NMAX=200,PI=3.141592654)
                   REAL NHAT,NTIJ,NNIJ
                   DIMENSION XC  (NM), YC (NM ),  AN (NM, NM ),  AT (NM, NM)
                   DIMENSION XP (NMAX),YP (NMAX),NHAT (NM, 2),
                  &        THAT (NM, 2) , S (NMAX)
                   OPEN(7,FILE='POINTS.DAT',STATUS='OLD')
                   DO 10 I=l,N              Readinginco-ordinatesofpanel
                10   READ(7,*) XP(I), YP(1)   end-points.
                   CLOSE (7
                          )
                   DO 20 J=l,N
                    IF (J.EQ.1) THEN
                      XPL=XP(N)
                      YPL=YP(N)
                              ELSE
                      XPL=XP (J - 1)
                      YPL=YP  (J - 1)
                    ENDIF
                    XC  (J) = 0.5* (XP (J) +XPL)   Calculating co-ordinates of
                    YC(J) =0.5*(YP(J)+YPL)    collocationpoints.
                    S(J)=SQRT((XP(J)-XPL)**2+(YP(J)-YPL)**2) Calculatingpanel length.
                            = (XP(J)-XPL) /S(J) Calculatingxco-ordinateof  unit tangent vector.
                    THAT(J,l)
                            = (YP(J)-YPL)/S(J) Calculatingyco-ordinateof unit tangentvector.
                    THAT(J,2)
                    NHAT (J, 1)  = -THAT (J, 2 )   Calculatingxco-ordinateof unitnormal vector.
                    NHAT(J,2)  THAT(J,l)      Calculatingyco-ordinateofunitnormalvector.
                             =
                20  CONTINUE
                   Calculationofthe influence coefficients.
                   DO 30 I=l,N
                    DO  40 J=l,N
                      IF (I. EQ. J) THEN
                       AN(1,J) =PI    Case of i= j.
                       AT(1,J)  =O.O
                                 ELSE
                       DX=XC(I)-XC(J)  Calculatingxandycomponentsofline
                       DY=YC(I)-YC(J)  joining collocationpoint iand j
   164   165   166   167   168   169   170   171   172   173   174