E.5 BUMP This subroutine illustrates a means of ... - dept.aoe.vt.edu

Jan 21, 1997 - The related slope and curvature are given in the next graph. report typos and errors to W.H. Mason. Appendix E: Utility Programs E-13. Tuesday ...
18KB taille 3 téléchargements 216 vues
report typos and errors to W.H. Mason

Appendix E: Utility Programs E-13

E.5 BUMP This subroutine illustrates a means of making smooth changes to airfoil shapes. It is included in PANELv2. It is designed to place a “bump” on the airfoil contour. The shape change starts gradually with zero curvature at point xb1 . The bump is setup to be asymmetric about the bump midpoint, xb2 , and to blend back into the baseline shape with zero curvature at point xb3 . However, if an asymmetric bump is used, the curvature will be discontinuous at the bump maximum. The following plot defines the nomenclature, as well as plotting the output of the sample main program presented below.

1.00 dtc = 0.50 x b1

0.80

x b2

x b3

0.60 y mod 0.40 0.20 0.00 -0.20

0.0

0.1

0.2

0.3

x/c

0.4

0.5

0.6

0.7

The related slope and curvature are given in the next graph.

d(y mod )/dx

d2 (y mod )/dy2

3

60

2 1

40 20

d(y mod ) 0 dx -1 -2 -3 -4 -5

0 -20 -40 -60 0.0

0.1

0.2

0.3

0.4 x/c

Tuesday, January 21, 1997

0.5

0.6

0.7

-80

d2 y mod dx 2

E-14 Applied Computational Aerodynamics The equation of the bump is:  t 3 ymod = −64  ∆  x 3d ( x d −1)  c d ymod  t 2 = −64  ∆  3x 2d ( x d −1) (2x d −1)  c dxd

(

)

d 2 y mod  t = −64  ∆  6x d ( x d −1) 5x 2d − 5x d +1 2  c dxd where xd =

( x − x1) 2(x 2 − x1)

x1 < x < x2

xd =

( x + x3 − 2x2 ) 2(x 3 − x2 )

x2 < x < x3

or

This function is often called a “cubic bump” although it is clearly a sixth order polynomial. The user should examine the subroutine to understand the transformation between the local variable xd and the global variable xin. Listing of subroutine bump.f: subroutine bump(xb1,xb2,xb3,dtc,xmax,xin,ymod,ymodp,ymodpp) c c c c c c c c c c c c c c c c c c

so-called cubic bump function used to make mods to aero surfaces W.H. Mason, December 1989 xb1 xb2 xb3

- start of bump (dimensional) - location of maximum bump height (dimensional) - end of bump (dimensional)

dtc xmax

- magnitude of bump - reference length of geometry

xin ymod ymodp ymodpp

-

input location to get bump value bump height first derivative of bump wrt xin second derivative of bump wrt xin

x x1 x2 x3

= = = =

xin/xmax xb1/xmax xb2/xmax xb3/xmax

Tuesday, January 21, 1997

report typos and errors to W.H. Mason

Appendix E: Utility Programs E-15

xd = 0.0 dxddx = 0.0 if ( x .ge. x1 .and. x .le. x2) then xd = (x - x1)/2.0/(x2 - x1) dxddx = 1./2./(x2 - x1) endif if ( x .gt. x2 .and. x .le. x3) then xd = (x + x3 - 2.0*x2)/2.0/(x3 - x2) dxddx = 1./2./(x3 - x2) endif ymod

= -64.*dtc*xd**3*(xd - 1.0)**3

ymodp

= -64.*dtc*3.0*dxddx*xd**2* (xd - 1.0)**2*(2.0*xd - 1.0) ymodpp = -64.*dtc*6.0*dxddx**2*xd*(xd - 1.0)* 1 (5.0*xd**2 - 5.0*xd + 1.0) 1

return end

This is a sample main program that can be used to check subroutine bump. c c c c

example of use of bump function this is one way to modify an airfoil w.h. mason, Feb. 12, 1994

c

set input parameters xb1 xb2 xb3

= 0.1 = 0.4 = 0.6

dtc

= 0.50

xmax

= 1.0

write(6, 90) xb1,xb2,xb3,dtc 90 format(/3x,'bump example'// 1 3x,'xb1 = ',f7.4,3x,'xb2 = ',f7.4,3x, 2 'xb3 = ',f7.4/3x,'dtc = ',f7.4/ 3 /4x,'i',7x,'x/c',7x,'delta y',4x, 4 'd(dy)/dx'3x,'d2(dy)/dy2') do 10 i = 1,101 xc = 0.01*(i-1) call bump(xb1,xb2,xb3,dtc,xmax,xc,ymod,ymodp,ymodpp) 10 write(6,100) i,xc,ymod,ymodp, ymodpp 100 format(i5,4f12.5) stop end

Tuesday, January 21, 1997

E-16 Applied Computational Aerodynamics sample output from the sample main program and subroutine bump.f bump example xb1 = dtc =

0.1000 0.5000

i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

x/c 0.00000 0.01000 0.02000 0.03000 0.04000 0.05000 0.06000 0.07000 0.08000 0.09000 0.10000 0.11000 0.12000 0.13000 0.14000 0.15000 0.16000 0.17000 0.18000 0.19000 0.20000 0.21000 0.22000 0.23000 0.24000 0.25000 0.26000 0.27000 0.28000 0.29000 0.30000 0.31000 0.32000 0.33000 0.34000 0.35000 0.36000 0.37000 0.38000 0.39000 0.40000 0.41000 0.42000 0.43000 0.44000 0.45000 0.46000 0.47000 0.48000 0.49000

Tuesday, January 21, 1997

xb2 =

0.4000

delta y 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00014 0.00107 0.00343 0.00771 0.01426 0.02333 0.03502 0.04938 0.06633 0.08573 0.10740 0.13107 0.15645 0.18319 0.21094 0.23931 0.26791 0.29635 0.32423 0.35117 0.37679 0.40074 0.42270 0.44237 0.45948 0.47380 0.48515 0.49336 0.49834 0.50000 0.49626 0.48515 0.46700 0.44237 0.41199 0.37679 0.33784 0.29635 0.25361

xb3 =

d(dy)/dx 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.04154 0.15505 0.32490 0.53686 0.77803 1.03680 1.30277 1.56676 1.82070 2.05761 2.27156 2.45760 2.61171 2.73077 2.81250 2.85540 2.85872 2.82240 2.74702 2.63374 2.48430 2.30089 2.08618 1.84320 1.57536 1.28635 0.98010 0.66075 0.33259 0.00000 -0.74625 -1.47015 -2.14989 -2.76480 -3.29590 -3.72645 -4.04253 -4.23360 -4.29304

0.6000

d2(dy)/dy2 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 8.02448 14.41646 19.31666 22.86090 25.18004 26.40000 26.64177 26.02140 24.65000 22.63374 20.07387 17.06667 13.70350 10.07078 6.25000 2.31770 -1.65453 -5.60000 -9.45699 -13.16873 -16.68333 -19.95391 -22.93848 -25.60000 -27.90638 -29.83045 -31.35000 -32.44773 -33.11131 -33.33333 -73.87733 -70.53750 -65.06483 -57.60000 -48.33986 -37.53750 -25.50236 -12.60004 0.74764

report typos and errors to W.H. Mason 51 0.50000 0.21094 52 0.51000 0.16967 53 0.52000 0.13107 54 0.53000 0.09630 55 0.54000 0.06633 56 0.55000 0.04187 57 0.56000 0.02333 58 0.57000 0.01068 59 0.58000 0.00343 60 0.59000 0.00046 61 0.60000 0.00000 62 0.61000 0.00000 63 0.62000 0.00000 64 0.63000 0.00000 65 0.64000 0.00000 66 0.65000 0.00000 67 0.66000 0.00000 68 0.67000 0.00000 69 0.68000 0.00000 70 0.69000 0.00000 71 0.70000 0.00000 (rest of the output deleted)

Tuesday, January 21, 1997

Appendix E: Utility Programs E-17 -4.21875 -4.01368 -3.68640 -3.25169 -2.73105 -2.15332 -1.55520 -0.98183 -0.48735 -0.13547 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000

14.06247 26.81011 38.39995 48.18510 55.46249 59.47264 59.39999 54.37266 43.46253 25.68523 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000