
294 Multidimensional Computational Methods
varied, and the airfoil is highly cambered, two such rows may be needed, one to
take care of each problem individually.
A program using the preceding procedure with source panels only to develop the
body shape is given as Program 12.3.1. Once the panel strengths are known, there is
enough information to find the velocity and pressure at any point in the exterior flow.
PROGRAM PANELBOOK
REAL*8 LAMBDA
DIMENSION ACS(40),ASN(40),BETA(40),RHS(40),THETA(40),XCP(40),
& XLEN(40),XP(40),YCP(40),YP(40),VEL(40)
DIMENSION AA(40,40),AA1(40,40),LAMBDA(40),SUM1(40,40),SUM2(40,40)
PI=3.14159265
WRITE(*,*)"This is a panel program designed to calculate the inviscid flow about"
WRITE(*,*)" an arbitrary body. The body shape is determined by the user. "
WRITE(*,*)"The program first asks for the number of panels to be used."
WRITE(*,*)"Next it asks for the X,Y coordinates of the end points of the panels."
WRITE(*,*)" These are called the nodes of the panel. For the program to run"
WRITE(*,*)" properly the nodal points should be numbered in a clockwise manner"
WRITE(*,*)" as one goes around the body."
WRITE(*,*)"'Finally the free stream velocity is requested."
WRITE(*,*)
WRITE(*,*)"The output will consist ofthe velocities calculated at the control points."
WRITE(*,*)"The control points were chosen so as to be located at the center of the panels."
WRITE(*,*)
WRITE(*,*)"Enter the number of panels you wish to use. Maximum allowable is 40. "
READ(*,*) N
WRITE(*,*)"The coordinates of the end points of the panels must now be entered."
WRITE(*,*)"his program is two dimensional, so only x and y coordinates should be entered."
WRITE(*,*)
WRITE(*,*)"You will be told which node you are entering. Panel number"
WRITE(*,*)"one has nodes one and two, panel two has nodes two and three,"
WRITE(*,*)"and the last panel has nodes n and one."
WRITE(*,*)
WRITE(*,*)"Results are in file A:PANELBOOK.DAT"
WRITE(*,*)
!============================================================
! ENTER NODES
!============================================================
DO I=1,N
WRITE(*,*) "Enter node number ",I
READ(*,*) XP(I),YP(I)
END DO
OPEN(1, FILE='A:PANELBOOK.DAT', STATUS='UNKNOWN')
WRITE(*,*) "Your entered points are listed below:"
DO I=1,N
WRITE(*,100)I,XP(I),I,YP(I)
WRITE(1,100)I,XP(I),I,YP(I)
END DO
WRITE(*,*) " Enter the free steam velocity. "
READ(*,*) U
!============================================================
! CALCULATE CONTROL POINTS
!============================================================
L=N-1
WRITE(1,*) "LOCATION OF CONTROL POINTS:"
DO I=1,L
XCP(I)=(XP(I)+XP(I+1))/2.
YCP(I)=(YP(I)+YP(I+1))/2.
WRITE(1,100)I,XCP(I),I,YCP(I)
END DO
XCP(N)=(XP(N)+XP(1))/2.
YCP(N)=(YP(N)+YP(1))/2.
WRITE(1,110)N,XCP(N),I,YCP(N)
Program 12.3.1—Panel method for flow past a nonlifting body (program by the author)