excel in engineering parametric modeling of aircraft geometry

39
1 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com EXCEL in Engineering Parametric modeling of aircraft geometry Notes / Options: Slideshow animated (F5) Also view ~ “notes page” J. Philip Barnes 01 November 2013

Upload: dunne

Post on 23-Feb-2016

92 views

Category:

Documents


7 download

DESCRIPTION

EXCEL in Engineering Parametric modeling of aircraft geometry. J. Philip Barnes . 01 November 2013 . Notes / Options: Slideshow animated (F5) Also view ~ “notes page”. Presentation Contents. Getting started: EXCEL as a scientific spreadsheet - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: EXCEL in Engineering Parametric modeling of aircraft geometry

1 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

EXCEL in EngineeringParametric modeling of aircraft geometry

Notes / Options:Slideshow animated (F5)Also view ~ “notes page”

J. Philip Barnes 01 November 2013

Page 2: EXCEL in Engineering Parametric modeling of aircraft geometry

2 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why go parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 3: EXCEL in Engineering Parametric modeling of aircraft geometry

3 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Getting started: EXCEL as a scientific spreadsheet

• Purpose (typical):• Read input and/or data from spreadsheet• Edit & run algorithm; generate new data• Write to spreadsheet cells & plot results• Copy all data & plots as new sheet; re-run

• One-time setup:1) EXCEL Options ~ Formulas ~ R1C1 ...2) Trust Ctr. ~ settings ~ macro ~ enable & trust3) Toolbar ~ more... ~ all ... ~ Visual Basic ~ Add4) Set VB editor window to float on spreadsheet

• Typical operations:1) Type in the column headers, i.e. t, x, y, z2) VB ~ insert ~ module ~ Type: sub example 3) Enter or edit code ~ save file as *.xlsm4) Click “run” (note: module remains part of file) 5) Highlight applicable columns & plot the results6) New case: Copy sheet, revise inputs, repeat 4)

Microsoft Office Excel Macro-Enabled Wor

Page 4: EXCEL in Engineering Parametric modeling of aircraft geometry

4 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 5: EXCEL in Engineering Parametric modeling of aircraft geometry

5 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Miscellaneous Geometry & curve-fit tools ~ Cartesian or parametric

Pseudo-Cosine

0.0 0.2 0.4 0.6 0.8 1.00.0

0.2

0.4

0.6

0.8

1.0

e y / ymax

= cos m (hp/2)

h x / xmax

m = 2.0 1.0 0.5

Exponential

0.0 0.2 0.4 0.6 0.8 1.00.0

0.2

0.4

0.6

0.8

1.0

e = e-5h m

Pseudo-Sine

0.0 0.2 0.4 0.6 0.8 1.00.0

0.2

0.4

0.6

0.8

1.0

e = sin (hm p)

h

Varabola

0.0 0.2 0.4 0.6 0.8 1.00.0

0.2

0.4

0.6

0.8

1.0

e = h m

h

0.5 m=1.0 2.0

0.5 m=1.0 2.0

0.5 m=1.0 2.0

EXCEL Exercise:Generate & plot

Page 6: EXCEL in Engineering Parametric modeling of aircraft geometry

6 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

“Algebratross” math-modeled aircraft • Modeled entirely with Cartesian functions of earlier slide• Iterative solution for wing-body intersection (next topic)

Microsoft Excel Macro-Enabled Worksheet

-0.75 -0.50 -0.25 0.00 0.25 0.50 0.75-1.50

-1.25

-1.00

-0.75

-0.50

-0.25

0.00

0.25

0.50

0.75

1.00

1.25

1.50

-0.75 -0.50 -0.25 0.00 0.25 0.50 0.75-0.25

0.00

0.25

-1.50 -1.25 -1.00 -0.75 -0.50 -0.25 0.00 0.25 0.50 0.75 1.00 1.25 1.50-0.25

0.00

0.25

Page 7: EXCEL in Engineering Parametric modeling of aircraft geometry

7 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 8: EXCEL in Engineering Parametric modeling of aircraft geometry

8 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

x

yy=

x

x1y1

y1

x2

Reverse step to stabilize:x2 = x1 +(x1-y1)

=2x1-y1

dy/dx > 1

f(x)

Iterative solution for x = f(x) ~ stabilized and accelerated

x

yy=

xf(x)

x1y1

y1

x2

Half step to accelerate:

x2 = x1 - ½(x1-y1)= ½(x1+y1)

dy/dx < 0

x

yy=

xf(x)

x1y1

y1

x2

Double step to accelerate:x2 = x1 - 2(x1-y1)

= 2y1 - x1

0 < dy/dx < 1

• Basic: Guess x1 ; get y1 ; then set x2 = y1

• Refined: watch dy/dx ; modify "step" to (x2)

- Step mod aids convergence & stabilizes

• Newton-Raphson may be faster or slower

• Probability of convergence appears similar

' ALGORITHM, accel-stabilized iteration, x=f(x)' guess = ... ' 1st guess' i = 0 ' initialize iteration counter' ,-> i = i + 1 ' increment iteration counter' | if i = 1: x2 = guess ' 1st guess' | if i = 2: x2 = 1.02 * guess ' 2nd guess' | if i >= 3:' | if dydx < 0: x2=(x1+y1)/2 ' half step' | if 0<=dydx<=1: x2=2*y1 - x1 ' double step' | if dydx > 1: x2=2*x1 - y1 ' reverse step' | get y2 at x2' | test for exit criteria --> exit ' | if i >= 2 & x1#x2: dydx = (y2-y1)/(x2-x1)' `- x1 = x2: y1 = y2 ' setup for next pass

Page 9: EXCEL in Engineering Parametric modeling of aircraft geometry

9 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Iterative solution for x = f(x) ~ example with six steps

Microsoft Office Excel Macro-Enabled Wor

Page 10: EXCEL in Engineering Parametric modeling of aircraft geometry

10 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 11: EXCEL in Engineering Parametric modeling of aircraft geometry

11 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

“Pseudo-Gaussian” ~ First try to linearize ; then fit a polynomial

y ≈ exp(-axb)Take ln twice:ln (-ln y) = ln a + b ln x

y = a + b c

Apply (given x, get y):(1) c ln x(2) y = f (c) ~ line or polynomial(3) y = exp (-exp y)

• Physics are preserved• Meaningful

extrapolation

“Real life” data

EXCEL Exercise:Fit polynom. y(c) Add 2 new columnsRe-generate y(x)

Microsoft Office Excel Macro-Enabled Wor

polynomial?

Page 12: EXCEL in Engineering Parametric modeling of aircraft geometry

12 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 13: EXCEL in Engineering Parametric modeling of aircraft geometry

13 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Why go parametric?

• “Time” marches fwd; never encounter infinite rate• Let coordinates be parametric in “time” as x(t) & y(t)

• Or, parametric with (q), as a circle x=rcosq ; y=rsinq• No problem with “wrap around” or curve crossing• Extend to 3 or more dimensions when applicable

• Let all coordinates (x,y,z,w...) be parametric in (t)• Simply set (x = t) if (y, z, w) depend only on (x)

t x

yEXCEL Exercise:Generate data (approx. this shape)t (0→1) ; tab & polynom. fit x(t), y(t)Plot x(t), y(t), y(x)

Page 14: EXCEL in Engineering Parametric modeling of aircraft geometry

14 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 15: EXCEL in Engineering Parametric modeling of aircraft geometry

15 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Polynomial ~ Parametric u(t) or Cartesian y(x)

• Objective: Fit nth-order polynomial through (0_to_n) points• EXCEL is limited to (n=6) ; higher order is included herein• Use “0_to_n” VB arrays; shift the origin to the “0th point”• Then for coordinate u(t) with polynomial coefficients (c):• u-uo = c1(t-to) + c2(t-to)2 + ... ci(t-to)i ...+ cn(t-to)n • Shorthand: u = c1t + c2t2 + ... cit i ... + cntn

• Matrix notation with polynomial applied at points 1 to n:

u

u

u

u

tttt

t

tttt

tttt

n

i

n

i

nnnnn

ji

n

n

c

c

c

c

:

:

:

:

...

..........

......

...

2

1

2

1

32

232

222

131

211

t

u

01

n2

t ≡ t-to

u ≡ u-uo

1

n2

• Solve linear system for coefficients (c); apply for, say, n=10:

Page 16: EXCEL in Engineering Parametric modeling of aircraft geometry

16 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Solution for 10th-order polynomial ~ Demo

Microsoft Office Excel Macro-Enabled Wor

EXCEL Exercise:Experiment first by shifting one or more points, and second by increasing the order of the polynomial

Page 17: EXCEL in Engineering Parametric modeling of aircraft geometry

17 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Solution for 10th-order polynomial ~ Demo, right-to-left

Page 18: EXCEL in Engineering Parametric modeling of aircraft geometry

18 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 19: EXCEL in Engineering Parametric modeling of aircraft geometry

19 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

De Casteljau-Bézier Curve ~ History,* Review & Renew

• P. De Casteljau first conceived (1963) today’s “Bézier Curve”• His notes & algorithm remained proprietary at Citroën • Set (Np) Control points for control polygon near, not on, curve• (Np-1, Np-2,...) interpolation series on polygon-sides for x(t), y(t)

• De Casteljau’s Algorithm is represented by the Bernstein Basis• as discovered by A.R. Forrest ~ Geometric construct → math

• S. Bernstein’s polynomial (B) derivative (dB/dt) introduced herein• P. Bézier independently conceived (1966) the control polygon

• Bézier’s algorithm is not used in today’s “Bezier Curve,” but his work at Rénault was the foundation of UNISURF & CATIA

* R.T. Farouki, The Bernstein polynomial basis: a centennial retrospective, UC Davis, Mar 2012* G. Farin, A History of Curves and Surfaces in CAGD, Arizona State University, 2007

t = 1/3 p1

p2

pNp

p3

x

y 1/3

1/31/3 x,y

)(B(t)c ; )(B(t)c

)(Bc(t)

:parametric is )( rate"" & w...z,y,x,c(t) coordinate any

(p) "points, control" 2N For

pp

p

N

1ii

N

1ii

N

1ii

p

pipi

pi

ctct

ct

tc

11

2

11

1

11

1

11

iNip

iNi

ii

Niii

p

pi

p

p

p

ttiN

ttiatB

ttatB

iNiN

a

)()(

)()()(

)()(

)!()!()!(

Page 20: EXCEL in Engineering Parametric modeling of aircraft geometry

20 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

De Casteljau Algorithm in action ~ close-up

t = 1/3 p1

p2

pNp

p3

x

y1/3

1/3

1/3 x,y

Animated graphic (shift F5)

Page 21: EXCEL in Engineering Parametric modeling of aircraft geometry

21 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

0.0 0.2 0.4 0.6 0.8 1.00.0

0.2

0.4

0.6

0.8

1.0Np = 6 points, Yp(Xp)

Xp

Yp

p2

p3p4

p5 p6 p1

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.00.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0 Bernstein PolynomialsB1B2B3B4B5B6

t

Bi

Area = 1/Np

SB i = 1

t

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.00.0

0.2

0.4

0.6

0.8

1.0Resulting x(t), y(t)

t

x = S Bi Xpi

y = S Bi Ypi

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0-2.0

-1.0

0.0

1.0

2.0

3.0 "Velocities" dx/dt, dy/dt

t

dx/dt = S (dB/dt)i Xpi

dy/dt = S (dB/dt)i Ypi

De Casteljau-Bézier-Bernstein (CBB) System in 2D ~ Demo

V = (dx/dt) i + (dy/dt) j

N=VxkV

Page 22: EXCEL in Engineering Parametric modeling of aircraft geometry

22 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Airfoil geometry modeling ~ “manual” C-B-B polygon

p1p2

pNp

p3

Microsoft Office Excel Macro-Enabled Wor

Page 23: EXCEL in Engineering Parametric modeling of aircraft geometry

23 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Inverse solution for the De Casteljau-Bezier control polygon• Thus far we have “manually” set (Np) control-polygon points (P)• The C-B curve of (Nt) points approximates the desired trajectory• Solve for (P) so the C-B curve passes through (N) points (C)• Write C-B-B system with a square Bernstein Matrix (Np = Nt = N)• Approach: invert the Bernstein and Bernstein Rate Matrices• [C]=[B][P] ; [P]=[B]-1[C] ; [dC/dt]=[dB/dt][P] ; [P]=[dB/dt]-1 [dC/dt]

p1

p2

pN

p3

x

y

c

c1

cN

NcNN

Nc

NNN

N

NcNN

Nc

CC

CCCCCC

BB

BB

BBBB

PP

PPPPPP

,,

,,

,,,,

,,

,,

,,,

,,

,,

,,,,

1-

tpc

1-

...... .........

.....

....

....

....

...... .........

.....

int)]polygon_po[B(t,

Polygon

points) (curve times"" N points polygon N N ; scoordinate N[C][B][P] :[C] specified yielding [P] polygon for

...

,

1

2212

1312111

111

122

112

11

131

121

1

1

2212

1312111 11

w y z x w y z x

points setCurve InverseMatrix Bernstein

Solution Inverse

NcNpNp

Nc

NpNtNt

Np

NcNtNt

Nc

PP

PPPPPP

BB

BB

BBBB

CC

CCCCCC

PBC

,,

,,

,,,,

,,

,,

,,,,

,,

,,

,,,,

tc

p

...........................

.....

...............................

...

...

.....................

.....

coords. curve BCC points) (curve times"" N ; point per scoordinate N

points polygon-control N :curve resulting yields

1

2212

1312111

1

2212

1312111

1

2212

1312111

w y z x oint) polygon_p(t, B w y z x PolygonControl Matrix Bernstein

Solution Basic

[B] usuallynot square

[B] & [B]-1 made square

For matrix inversion compact method & code, see:J.T. Golden, FORTRAN iV Programming and Computing,

Prentice-Hall, 1965, p.114

“time” t

Page 24: EXCEL in Engineering Parametric modeling of aircraft geometry

24 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

De Casteljau-Bezier-Bernstein Inverse Solution ~ First attempts

5-vertex circle 12-vertex airfoil

Intent(via manual polygon)

Result (via computed polygon)

In each case, the computed polygon faithfully drove the curve through the specified points, but with unexpected side effects

• Computed polygon (red)• BCC curve (black)• Specified points (white)

Polygon not shown

-2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0-3.00

-2.50

-2.00

-1.50

-1.00

-0.50

0.00

0.50

1.00

1.50

x

y t

c

p2 pN-1

p3

pN p1

Page 25: EXCEL in Engineering Parametric modeling of aircraft geometry

25 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 26: EXCEL in Engineering Parametric modeling of aircraft geometry

26 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Cubic spline ~ Parametric u(t) or Cartesian y(x)• Get smooth curve passing through (1_to_n) points• VB array dim. (n) elements: 0_to_n ~ ignore 0th elem.• 1st & 2nd derivative Continuity (3rd is not continuous)• Independently control L/R-end slope or 2nd derivative • Internal-node continuity yields tri-diagonal system• End constraints are applied in first and last rows• Parametric x(t) ; v “velocity”; a “acceleration”

t

x

12

n3

• Set ends; Solve linear EQs. for internal-knot accelerations (a)

t

t

t

i+1ii-1

a ≡ d2x/dt2

vdx/dt

x

cubic

parabolic

linear

+

0

:

:

0

aa:aaa:

aa

.........

...:...p ...

:...p

...p...

n

1-n

1i

i

1-i

2

1

1-n

2-n

i

3

2

1

2

3

2

11

22

33

22

100000000000

0000

0000

00000000000001

n

n

i

nn

nn

ii

ss

s

ss

rqprqp

rq

rqrq

Microsoft Office Word Document

Page 27: EXCEL in Engineering Parametric modeling of aircraft geometry

27 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Parametric cubic spline ~ Various end constraints

“Stiff” ends “Flexible” ends “Flat” endsMicrosoft Office Excel Macro-Enabled Wor

Page 28: EXCEL in Engineering Parametric modeling of aircraft geometry

28 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Parametric cubic spline ~ Existing airfoil “fast & close match”

Fast, smooth & efficient design/characterization; 3 upper, 4 lower points; Add more points if req’d

L.E. radius T.E. slopes

t

Microsoft Office Excel Macro-Enabled Wor

“velocity” for tangentand normal vectors

“velocity” for tangentand normal vectors

Page 29: EXCEL in Engineering Parametric modeling of aircraft geometry

29 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

f

Laminar airfoil study ~ integrated geometric/aero design

Parametric cubic spline

• Pressure coefficient

Discontinuous 3rd-deriv.of cubic spline does notdisrupt smooth airflow

• Velocity ratio

Theodorsen Angle (f)

Page 30: EXCEL in Engineering Parametric modeling of aircraft geometry

30 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Radius of curvature ~ Two coordinates parametric with “time” (t)

||

:to Reducing

//)/(

'')'(:

//)'()'('':

/)'(:

//':'')'(:

/

//

/

xyyxyxr

xxyxyxy

yyrand

xxyyx

dtdxdtyd

dxydyThen

xxyyxdtyduTherefore

xydxdyyuLetyyrGiven

+

+

+

+

2322

32

232232

3

2

232

11

1

• Velocities & accelerations determine parametric curvature radius• Velocity is the tangent vector ; cross product yields normal vector

x

y

dy/dt

dx/dt

v

n

r

• Application: Parametric-modeled airfoil leading-edge radius

Page 31: EXCEL in Engineering Parametric modeling of aircraft geometry

31 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 32: EXCEL in Engineering Parametric modeling of aircraft geometry

32 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

“Trigonosoar” ~ 3D parametric model of aircraft geometry

xyz

Aero axes

p ∫ds ≈ S [(Dy)2 + (Dz)2 ] 0.5

Chord, thickness, twist, etc. are parametric with spar coord. (p) from the centerline to winglet tip

Page 33: EXCEL in Engineering Parametric modeling of aircraft geometry

33 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Rotation Matrix Concatenation ~ Review and Renew

) j(i, between"" ) (k subscript 3 Note

;

:matrices 3x3 two econcatenat to 1st, ) , ,( yaw & pitch, roll, Manuever

rd

yc

3

1kkjikij BACBAC

nApplicatio&Review product-Matrix

elmaneuver

k LLjkLikij

zyx

Tzyx

whereT

mod

:

:[T] transform, maneuver edConcatenat][ ],[ ],[ :matrices rot. yaw pitch, Roll,

rotation.of order the on depend Resultsmaneuver rotation3

cy

yc

3

1

3

1

:nApplicatio

3

1

3

1

3

1

3

1

3

1

k LLjkLik

k LLjkLikij

kkjikij

CBACBAD

BCAD

BCACBAD

)(

:left-to-right matrices, 3 eConcatenat

3

1

3

1

3

1

3

1

3

1

3

1

3

1

)(

)()(

kmjLm

L mkLikij

mjk L m

LmkLikij

kkjikij

DCBAE

DCBAE

BCDAE

BCDADCBAE

:therefore and

:left-to-right matrices, 4 eConcatenat

yy

yyy

y

ccccc

c

1 0 00 cos sin0 sin- cos

][

:axis-z about )( rotate Last,cos 0 sin-0 1 0sin 0 cos

][

:axis-y about )( rotate Then,cos sin 0sin- cos 00 0 1

][

:axis-x about ) ( rotate First,

xy

z

Aero axes

c

y

Optionally include 90o rotation to translate from structural axesto aero axes

• Define geometry only once• Apply maneuver transform

Page 34: EXCEL in Engineering Parametric modeling of aircraft geometry

34 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

“Regenosoar” ~ math-modeled & visualized with tools herein

-1.5

-1.25

-1

-0.75

-0.5

-0.25

0

0.25

0.5

0.75

-2.5 -1.5 -0.5 0.5 1.5 2.5-2.5

-1.5

-0.5

0.5

1.5

2.5

Microsoft Office Excel Macro-Enabled Wor

Page 35: EXCEL in Engineering Parametric modeling of aircraft geometry

35 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 36: EXCEL in Engineering Parametric modeling of aircraft geometry

36 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Rendering in EXCEL ~ using the "shapes" feature

1. Anchor optional background graphic top left at cell(1,1)2. Generate object geometry (include normals & colors)3. Render the object, pixel-by-pixel (via EXCEL "shapes")

Microsoft Excel Macro-Enabled Worksheet

EXCEL Exercise:"Render" a circle with 5-pixel line thickness and red, green, & blue parametric with theta

Page 37: EXCEL in Engineering Parametric modeling of aircraft geometry

37 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

• Getting started: EXCEL as a scientific spreadsheet

• Misc., powerful Cartesian or parametric functions

• Alternative iterative solution for x=f(x)

• Linearize data before curve fit ~ “Pseudo-Gaussian”

• Why parametric?

• High-order polynomial ~ theory & numerical method

• De Casteljau-Bézier-Bernstein ~ history, review & renew

• Parametric cubic spline ~ theory & airfoil application

• 3D visualization ~ concatenate maneuver rotations

• Sneak preview: Rendering within EXCEL

• Summary

Presentation Contents

Page 38: EXCEL in Engineering Parametric modeling of aircraft geometry

38 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Summary ~ EXCEL in Engineering / Geometry modeling

• EXCEL & VB provide capable scientific spreadsheet• Trigonometric functions ~ versatile & powerful• Suggestion: linearize data before fitting a curve• Iteration, x=f(x) ~ Alternative to Newton-Raphson • Parametric: multi-dimensions, wrap-around OK • De Casteljau-Bézier: labor-intense pass thru all pts.

• Inverse Bézier runs thru all points ~ but with wild end effects

• Polynomial passes thru all pts (no control at ends)• Polynomial advantages include simplicity & continuity• High-order polynomial can be quite robust

• The cubic spline also passes through all points• With comprehensive control of start & end constraints• One application: efficiently design & characterize an airfoil• 3rd derivative not continuous, but geom. is “aero smooth”

• EXCEL’s “shape” feature for graphics & rendering

t x

y

Page 39: EXCEL in Engineering Parametric modeling of aircraft geometry

39 Pelican Aero Group EXCEL in Engineering – Parametric Curve Fitting and Aircraft Geometry Modeling J. Philip Barnes 17 Sept 2013 www.HowFliesTheAlbatross.com

Phil Barnes has a Bachelor’s Degree in Mechanical Engineering from the University of Arizona and a Master’s Degree in Aerospace Engineering from Cal Poly Pomona. He has 32-years of experience in performance analysis and computer modeling of aerospace vehicles, engines, and subsystems, primarily at Northrop Grumman. He has authored SAE technical papers on aerodynamics, dynamic soaring, and regenerative soaring. This latest presentation brings together Phil’s knowledge and passions for computer graphics, and geometry math modeling.

About the Author