Skip to content

Commit

Permalink
- Increased version number for 4.2g for better tracking with another …
Browse files Browse the repository at this point in the history
…repo.

- Added additional iteration types for Alpha*.
- Changed "STATISTICS" output ordering.
- Updated some code references (comments).
- Updated ./src/test/results-gfortran files/
  • Loading branch information
m-selig committed Oct 6, 2024
1 parent 30f4367 commit 2a91994
Show file tree
Hide file tree
Showing 14 changed files with 1,508 additions and 169 deletions.
3 changes: 2 additions & 1 deletion src/PROFOIL.INC
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ C-----setup for call to BL subroutine
$ TMAP(NARGP),
$ AX(NARGP), BX(NARGP), CX(NARGP), DX(NARGP),
$ AY(NARGP), BY(NARGP), CY(NARGP), DY(NARGP),
$ SX
$ SX,
$ SY
COMMON/ NRM/
$ XLE(4),
Expand All @@ -299,6 +299,7 @@ C-----setup for call to BL subroutine
$ XTMP(NARGP),
$ YTMP(NARGP),
$ ALFA0,
$ ALFA0_BUMP,
$ CHORD,
$ IMAX,
$ INORMMETHOD
Expand Down
28 changes: 28 additions & 0 deletions src/alfainc.f
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,34 @@ SUBROUTINE ALFAINC(ICASE, DELTA)
DO I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) + DELTA
ENDDO
ELSEIF (ICASE .EQ. 500) THEN
DO I = 1, ILE
ALFAS(I) = ALFAS(I) + DELTA
ENDDO
ALFAS(1) = ALFAS(1) - DELTA
ELSEIF (ICASE .EQ. 600) THEN
DO I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) + DELTA
ENDDO
ALFAS(ISEG) = ALFAS(ISEG) - DELTA
ELSEIF (ICASE .EQ. 700) THEN
DO I = 1, ILE
ALFAS(I) = ALFAS(I) + DELTA
ENDDO
ALFAS(1) = ALFAS(1) - DELTA
DO I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) - DELTA
ENDDO
ALFAS(ISEG) = ALFAS(ISEG) + DELTA
ELSEIF (ICASE .EQ. 800) THEN
DO I = 1, ILE
ALFAS(I) = ALFAS(I) + DELTA
ENDDO
ALFAS(1) = ALFAS(1) - DELTA
DO I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) + DELTA
ENDDO
ALFAS(ISEG) = ALFAS(ISEG) - DELTA
ELSE
WRITE(LU06,*) ' WARNING: BUMPALFAS case not found (alfainc.f)'
ENDIF
Expand Down
5 changes: 3 additions & 2 deletions src/coord.f
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ SUBROUTINE COORD
ENDIF
FACTOR = 0.041666666666666666*DEL_PHI*DTOR
IF (LTEZERO) THEN
C... Trailing edge is closed.
C... Otherwise TEY and/or TEX are specified by NEWT1* line
C... Trailing edge is closed, LTEZERO=TT.
C... Otherwise with LTEZERO=FF, then TEY, TEX, ... are specified by NEWT1G0 line(s)
C... with Newton iteration types: 155, 156, 157, and 158.
DELSX = SX/FLOAT(IARGP-1)
DELSY = SY/FLOAT(IARGP-1)
ENDIF
Expand Down
4 changes: 4 additions & 0 deletions src/deflt.f
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ SUBROUTINE DEFLT
C INORMMETHOD = 1 ... Legacy 3-pt parabola. Default.
C INORMMETHOD = 2 ... Cubic spline. Recommended setting.
INORMMETHOD = 1
C---- Offset calculation of ALFA0 in norm.f
C Used to make closer match to Eppler airfoil coordinates when
C converting Eppler TRA data to PROFOIL data
ALFA0_BUMP = 0.0
C---- no trailing edge thickness wedge
LWEDGE = FF
C---- flip airfoil over
Expand Down
2 changes: 1 addition & 1 deletion src/echo.f
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SUBROUTINE ECHO(ICASE)
IF (ICASE .EQ. 0) THEN
OPEN (UNIT=LU85,FILE=FILE85,STATUS='unknown')
WRITE(LU85,1000)
1000 FORMAT(//8X,'PROFOIL Version 2.0 March 2022' //
1000 FORMAT(//8X,'PROFOIL Version 4.2g October 2024' //
& 2X,'ITERATION 0'/)
ELSE
OPEN (UNIT=LU85,FILE=FILE85,STATUS='OLD',ACCESS='APPEND')
Expand Down
2 changes: 2 additions & 0 deletions src/norm.f
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ SUBROUTINE NORM
YLE(4) = - XMAX * DSING(-THETA) + YMAX * DCOSG(-THETA)
C-------rotate airfoil from zero lift angle of attack ALFA0
ALFA0 = DATAN(YLE(4)/XLE(4)) * RTOD
ALFA0 = ALFA0 + ALFA0_BUMP
CHORD = DSQRT(XLE(4)**2 + YLE(4)**2)
ELSEIF (INORMMETHOD .EQ. 2) THEN
C-------Use a cubic spline (natural cubic spline / second derivative is zero at the endpoints)
Expand Down Expand Up @@ -108,6 +109,7 @@ SUBROUTINE NORM

C-------rotate airfoil from zero lift angle of attack ALFA0
ALFA0 = DATAN(RMAXY/RMAXX) * RTOD
ALFA0 = ALFA0 + ALFA0_BUMP
CHORD = DSQRT(RMAXX**2 + RMAXY**2)

ENDIF
Expand Down
4 changes: 4 additions & 0 deletions src/probl.f
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ SUBROUTINE PROBL
C Eppler, Richard, "Practical Calculations of Laminar and Turbulent
C Bled-Off Boundary Layers," NASA TM-75328, Sept 1978
C https://ntrs.nasa.gov/citations/19780024110
C Boundary Layer integration tests are also included in:
C Miley, Stanley, "An Analysis of the Design of Airfoil Sections
C for Low Reynolds Numbers," PhD Dissertation, Mississippi State Univ,
C January 1972, p169-170.
C
C Copyright (c) 1990-2022 Michael Selig
C***********************************************************************
Expand Down
10 changes: 8 additions & 2 deletions src/profoil.f
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PROGRAM PROFOIL

C**********************************************************************
C PROFOIL Version 2.1 September 2024
C PROFOIL Version 4.2g October 2024 / MIT License"
C Multi-Point Inverse Airfoil Design
C Copyright (c) 1990-2024 Michael Selig
C Copyright (c) 1995 Ashok Gopalarathnam
Expand All @@ -22,7 +22,8 @@ PROGRAM PROFOIL
1005 FORMAT(2X,' Airfoil/Comment: ',A)
C---- Write current version number to a file
OPEN (UNIT = 61, FILE = 'version.txt', status='unknown')
WRITE(61,*) "PROFOIL v2.1 September 2024 / MIT License"
WRITE(61,*) "PROFOIL v4.2g October 2024 / MIT License"

C-----set the constants
CALL SETUP
C-----set the default values
Expand Down Expand Up @@ -56,8 +57,10 @@ PROGRAM PROFOIL
call stoptst
ELSEIF (LINE(1:1) .EQ. ' ') THEN
C--- skip this line
C--------********************************************
ELSEIF (LINE(1:1) .EQ. '*') THEN
C--- finished reading in data from input file unit LU10
WRITE(LU06,*) "PROFOIL v4.2g October 2024 / MIT License"
CLOSE(LU10)
LEND = TT
C--------AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Expand All @@ -76,6 +79,9 @@ PROGRAM PROFOIL
WRITE(LU06,1005) LINE(9:50)
WRITE(LU06,*) ' ********************************************'
WRITE(LU06,*)
ELSEIF (LINE(1:10) .EQ. 'ALFA0_BUMP') THEN
WRITE(TLINE, 1000) LINE(11:50)
READ(TLINE,*) ALFA0_BUMP
ELSEIF (LINE(1:6) .EQ. 'ALFASP') THEN
WRITE(TLINE, 1000) LINE(7:50)
READ(TLINE,*) IALF
Expand Down
28 changes: 28 additions & 0 deletions src/setnew.f
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,34 @@ SUBROUTINE SETNEW(JVAR1,ISIGN1,ISIGN2)
DO 242 I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) + DELTAJ
242 CONTINUE
ELSEIF (ICASE .EQ. 5) THEN
DO 212 I = 1, ILE
ALFAS(I) = ALFAS(I) + DELTAJ
212 CONTINUE
ALFAS(1) = ALFAS(1) - DELTAJ
ELSEIF (ICASE .EQ. 6) THEN
DO 222 I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) + DELTAJ
222 CONTINUE
ALFAS(ISEG) = ALFAS(ISEG) - DELTAJ
ELSEIF (ICASE .EQ. 7) THEN
DO 233 I = 1, ILE
ALFAS(I) = ALFAS(I) + DELTAJ
233 CONTINUE
ALFAS(1) = ALFAS(1) - DELTAJ
DO 234 I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) - DELTAJ
234 CONTINUE
ALFAS(ISEG) = ALFAS(ISEG) + DELTAJ
ELSEIF (ICASE .EQ. 8) THEN
DO 243 I = 1, ILE
ALFAS(I) = ALFAS(I) + DELTAJ
243 CONTINUE
ALFAS(1) = ALFAS(1) - DELTAJ
DO 244 I = ILE+1, ISEG
ALFAS(I) = ALFAS(I) + DELTAJ
244 CONTINUE
ALFAS(ISEG) = ALFAS(ISEG) - DELTAJ
ELSE
WRITE(LU06,*) 'Error 202: ICASE not found (setnew.f)'
ENDIF
Expand Down
26 changes: 13 additions & 13 deletions src/stats.f
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ SUBROUTINE STATS
WRITE(lu06,*) 'Finished case:', JFOIL
WRITE(lu06,*) '***************************'
ENDIF
WRITE(lu06,1001) IARGP, CHORD, -ALFA0, CM0, 100.*THKMAX,
WRITE(lu06,1001) IARGP, -ALFA0, CM0, 100.*THKMAX,
$ 100.*THKMAXE,
$ 100.*CMBMAX,
$ 100.*XCMAXE,
$ 100.*XCMAX, SX, SY,
$ 100.*XCMAX, CHORD, SX, SY,
$ FSB0, FSA1, FSB1
WRITE(lu06,*)
1001 FORMAT(2X,' **** STATISTICS ****'/
$ 2X,' IARGP = ', I10,/
$ 2X,' CHORD = ',F10.3,/
$ 2X,' ALFA0 = ',F10.3,/
$ 2X,' CM0 = ',F10.4,/
$ 2X,' THKMAX = ',F9.2,'%',/
$ 2X,' THKMAXE= ',F9.2,'%',/
$ 2X,' CMBMAX = ',F9.2,'%',/
$ 2X,' XCMAX = ',F9.2,'%',/
$ 2X,' XCMAXE = ',F9.2,'%',/
$ 2X,' SX = ',F10.3,/
$ 2X,' SY = ',F10.3,/
$ 2X,' POINTS = ', I10,/
$ 2X,' ALFA_0 = ',F10.3,/
$ 2X,' CM_0 = ',F10.4,/
$ 2X,' THKMAX = ',F9.3,'%',/
$ 2X,' THKMAXE= ',F9.3,'%',/
$ 2X,' CMBMAX = ',F9.3,'%',/
$ 2X,' XCMAX = ',F9.3,'%',/
$ 2X,' XCMAXE = ',F9.3,'%',/
$ 2X,' CHORD = ',F5.3,'(MAP)'/
$ 2X,' SX = ',F10.6,/
$ 2X,' SY = ',F10.6,/
$ 2X,' B0 = ',F10.6,/
$ 2X,' A1 = ',F10.6,/
$ 2X,' B1 = ',F10.6,/
Expand Down
10 changes: 7 additions & 3 deletions src/stoptst.f
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ subroutine stoptst
c***********************************************************************
include 'PROFOIL.INC'
write(lu06,*) ' **************************************'
write(lu06,*) ' Do you wish to stop (1 = yes; 0 = no)?'
read(lu05,*) istop
if(istop .eq. 1) stop

c... write(lu06,*) ' Do you wish to stop (1 = yes; 0 = no)?'
c... read(lu05,*) istop
c... if(istop .eq. 1) stop

c... Simply stop and let user read the error message
stop
return
end ! stoptst

Loading

0 comments on commit 2a91994

Please # to comment.