o introduction to walsh functions in numerical...
TRANSCRIPT
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Walsh Functions in Numerical SimulationA New Framework for Solving Nonlinear Systems of
PDEs
Peter A. Gno↵o
NASA Langley Research CenterHampton, Virginia
April 22, 2014
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
First eight Walsh functions
x0 0.25 0.5 0.75 1
-1
0
1
g1(x)
x0 0.25 0.5 0.75 1
-1
0
1
g5(x)
x0 0.25 0.5 0.75 1
-1
0
1
g2(x)
x0 0.25 0.5 0.75 1
-1
0
1
g6(x)
x0 0.25 0.5 0.75 1
-1
0
1
g3(x)
x0 0.25 0.5 0.75 1
-1
0
1
g7(x)
x0 0.25 0.5 0.75 1
-1
0
1
g4(x)
x0 0.25 0.5 0.75 1
-1
0
1
g8(x)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Walsh Function Philosophical Perspectives
I Particle - wave duality in nature is intrinsic to a Walshseries representation of a function.
I Fractal patterns in nature (infinitely self-similar) arereflected in the fractal derivation of Walsh functions.
I “Continuity” is a powerful mathematical construct butan illusion in nature. Taylor series require continuity.Walsh series do not assume continuity.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Walsh Function Practical Perspectives
I Closure of non-linear problems is enabled by theself-mapping property under multiplication.
I Global support (interior and boundary) of every solutioncomponent imparts complexity and simplicity to thesolution of PDEs.
I Walsh functions utilize a grid-free approach in anexplicit sense though segment lengths implicitly define adiscretization of space and time.
I A “derivative” is a global construct in Walsh functionsas opposed to a local construct in Taylor series.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Preliminaries
I Let g
n
(x) be a basis function over the domainx
a
x x
b
with n piecewise constant segments. Theorthonormal basis function requires:
Zx
b
x
a
g
n
(x)gm
(x)dx = �nm
I A constraint of equal segment lengths leads to analgorithm that rapidly becomes intractable for large n;fractional overlap of segments complicates the algebra.
I A more productive approach is to let index p � 0 definea segment size dx
p
.
dx
p
= (xb
� x
a
)/2p
I Apply a new constraint on segment lengths such that atmost two segment lengths (dx
p
and 2dx
p
) are allowedto create n segments spanning the domain.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Fractal Derivation: Segment Counts
Let n1 equal the number of segments with length dx
p
and n2
equal the number of segments with length 2dx
p
in thedistribution vector g
n
. Then
n1 + n2 = n
n1 + 2n2 = 2p
so that
n1 = 2n � 2p
n2 = 2p � n
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Fractal Derivation: Origami Analogy
I Starting with flat strip of paper, sequentially fold it inhalf p times.
I The first fold produces 1 crease at the center of thestrip (x = 1/2); the second fold produces 2 creases atx=1/4 and 3/4; the third fold produces 4 creases at x= 1/8, 3/8, 5/8, and 7/8; ...
I Assign segments in order of increasing crease number.If the number of remaining segments is odd then placea segment of length 2dx
p
across the crease. If thenumber of remaining segments is even then place twosegments of length dx
p
on both sides of the crease.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Segment Size Distribution for First 32 Functionsn p
1................................ 1 01 1............................... 2 1
1 2 1.............................. 3 21 1 1 1............................. 4 2
1 2 2 2 1............................ 5 31 2 1 1 2 1........................... 6 3
1 1 1 2 1 1 1.......................... 7 31 1 1 1 1 1 1 1......................... 8 3
1 2 2 2 2 2 2 2 1........................ 9 41 2 2 2 1 1 2 2 2 1....................... 10 4
1 2 1 1 2 2 2 1 1 2 1...................... 11 41 2 1 1 2 1 1 2 1 1 2 1..................... 12 4
1 1 1 2 1 1 2 1 1 2 1 1 1.................... 13 41 1 1 2 1 1 1 1 1 1 2 1 1 1................... 14 4
1 1 1 1 1 1 1 2 1 1 1 1 1 1 1.................. 15 41 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1................. 16 4
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1................ 17 51 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 1............... 18 5
1 2 2 2 1 1 2 2 2 2 2 2 2 1 1 2 2 2 1.............. 19 51 2 2 2 1 1 2 2 2 1 1 2 2 2 1 1 2 2 2 1............. 20 5
1 2 1 1 2 2 2 1 1 2 2 2 1 1 2 2 2 1 1 2 1............ 21 51 2 1 1 2 2 2 1 1 2 1 1 2 1 1 2 2 2 1 1 2 1........... 22 5
1 2 1 1 2 1 1 2 1 1 2 2 2 1 1 2 1 1 2 1 1 2 1.......... 23 51 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1......... 24 5
1 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 1........ 25 51 1 1 2 1 1 2 1 1 2 1 1 1 1 1 1 2 1 1 2 1 1 2 1 1 1....... 26 5
1 1 1 2 1 1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 1 2 1 1 1...... 27 51 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1..... 28 5
1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1.... 29 51 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1... 30 5
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.. 31 51 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1. 32 5
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Segment Layout and Fractal Patterns
bi-section
n
4 4
8 8
12 12
16 16
20 20
24 24
28 28
32 32
36 36
40 40
44 44
48 48
52 52
56 56
60 60
64 64
12 20 03 3 3 3
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Color Coded Segments by Sign
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Walsh Function Definition
g
n
(x) =
8>>>><
>>>>:
(�1)(m+1)(xb
� x
a
)�1/2 for x
m�1 < x < x
m
0 for x = x
m
(xb
� x
a
)�1/2 for x = x
a
(�1)(n+1)(xb
� x
a
)�1/2 for x = x
b
where
x
m
= x
a
+mX
i=1
g
n
(i)dx
p
and i , m, and n are positive integers.
g
n
(i) =
(1 if x
i
� x
i�1 = dx
p
2 if x
i
� x
i�1 = 2dx
p
where 1 i n.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Recursion Relations on the Half Domain
g
n
(x) =hg
L
k
(x), (�1)(k+n)g
R
k
(x)i/p
2
k = (n + modulo(n, 2))/2
g1 = [gL
1 , gR
1 ]/p
2
g2 = [gL
1 ,�gR
1 ]/p
2
g3 = [gL
2 ,�gR
2 ]/p
2
g4 = [gL
2 , gR
2 ]/p
2
g5 = [gL
3 , gR
3 ]/p
2
g6 = [gL
3 ,�gR
3 ]/p
2
g7 = [g l
4,�gR
4 ]/p
2
g8 = [gL
4 , gR
4 ]/p
2
g9 = [gL
5 , gR
5 ]/p
2
g10 = [gL
5 ,�gR
5 ]/p
2
g11 = [gL
6 ,�gR
6 ]/p
2
g12 = [gL
6 , gR
6 ]/p
2
g13 = [gL
7 , gR
7 ]/p
2
g14 = [gL
7 ,�gR
7 ]/p
2
g15 = [gL
8 ,�gR
8 ]/p
2
g16 = [gL
8 , gR
8 ]/p
2
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Multiplication Table P(n, m) - Closure
1p(x
b
�x
a
)g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 g16
g1 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 g16
g2 g1 g4 g3 g6 g5 g8 g7 g10 g9 g12 g11 g14 g13 g16 g15
g3 g1 g2 g7 g8 g5 g6 g11 g12 g9 g10 g15 g16 g13 g14
g4 g1 g8 g7 g6 g5 g12 g11 g10 g9 g16 g15 g14 g13
g5 g1 g2 g3 g4 g13 g14 g15 g16 g9 g10 g11 g12
g6 g1 g4 g3 g14 g13 g16 g15 g10 g9 g12 g11
g7 g1 g2 g15 g16 g13 g14 g11 g12 g9 g10
g8 g1 g16 g15 g14 g13 g12 g11 g10 g9
g9 g1 g2 g3 g4 g5 g6 g7 g8
g10 g1 g4 g3 g6 g5 g8 g7
g11 g1 g2 g7 g8 g5 g6
g12 g1 g8 g7 g6 g5
g13 g1 g2 g3 g4
g14 g1 g4 g3
g15 g1 g2
g16 g1
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Series Expansion of a FunctionA function f (x) may be represented by an infinite series
1X
n=1
A
n
g
n
(x)
over the interval x
a
x x
b
. The coe�cients A
n
arecomputed
A
n
=
Zx
b
x
a
f (x)gn
(x)dx
Because g
n
(x) is a constant on any given segment andchanges sign across segments, the integral may be expressedas
A
n
= (xb
� x
a
)�1/2nX
i=1
(�1)(i+1)
Zx
i+1
x
i
f (x)dx
(Eventually replaced by a Fast Walsh Transform!)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Series Expansion of a FunctionA function f (x) may be represented by an infinite series
1X
n=1
A
n
g
n
(x)
over the interval x
a
x x
b
. The coe�cients A
n
arecomputed
A
n
=
Zx
b
x
a
f (x)gn
(x)dx
Because g
n
(x) is a constant on any given segment andchanges sign across segments, the integral may be expressedas
A
n
= (xb
� x
a
)�1/2nX
i=1
(�1)(i+1)
Zx
i+1
x
i
f (x)dx
(Eventually replaced by a Fast Walsh Transform!)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: f (x) = x
x
f(x)
-1 -0.5 0 0.5 1-1
-0.5
0
0.5
1
An gn(x)f(x) = x
n
An
8 16 24 32 40 48 56 64-1
-0.8
-0.6
-0.4
-0.2
0
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: f (x) = 12x
2
x
f(x)
-1 -0.5 0 0.5 1-1
-0.5
0
0.5
1
An gn(x)f(x) = 0.5 x2
n
An
8 16 24 32 40 48 56 640
0.05
0.1
0.15
0.2
0.25
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: f (x) = cos(x)
x
f(x)
-2 0 2-1
-0.5
0
0.5
1
An gn(x)f(x) = cos(x)
n
An
8 16 24 32 40 48 56 64
-1.5
-1
-0.5
0
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: f (x) = 1� H(x � 13)
x
f(x)
-1 -0.5 0 0.5 1-0.5
0
0.5
1
1.5
An gn(x)f(x) = 1 - H(x-1/3)
n
An
8 16 24 32 40 48 56 64-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
(No Gibbs phenomenon!)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Series Expansion of Function ReciprocalIf a function f (x) is represented by the truncated series
2pX
n=1
A
n
g
n
(x)
and its reciprocal, r(x) = 1/f (x), is represented by the series
2pX
m=1
B
m
g
m
(x)
then the coe�cients B
m
can be computed as a function ofcoe�cients A
n
.
B
m
=⇥AP(n,m)
⇤�1�(n, 1)(x
b
� x
a
)
(Execute with Fast Walsh Reciprocal Transform!)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Series Expansion of Function ReciprocalIf a function f (x) is represented by the truncated series
2pX
n=1
A
n
g
n
(x)
and its reciprocal, r(x) = 1/f (x), is represented by the series
2pX
m=1
B
m
g
m
(x)
then the coe�cients B
m
can be computed as a function ofcoe�cients A
n
.
B
m
=⇥AP(n,m)
⇤�1�(n, 1)(x
b
� x
a
)
(Execute with Fast Walsh Reciprocal Transform!)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: r(x) = 1/x from f (x) = x
x
r(x)
-0.1 -0.05 0 0.05 0.1 0.15 0.2-100
-50
0
50
100
Bm gm(x)r(x) = 1/x
p = 6, n = 64
x
r(x)
-0.1 -0.05 0 0.05 0.1 0.15 0.2-100
-50
0
50
100
Bm gm(x)r(x) = 1/x
p = 10, n = 1024
A value of 0 in the domain is not a problem!
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: r(x) = 1/x2 from f (x) = x
2
x
r(x)
-0.1 0 0.1 0.20
200
400
600
800
1000Bm gm(x)r(x) = 1/x2
p = 6, n = 64
x
r(x)
-0.1 -0.05 0 0.05 0.1 0.15 0.20
200
400
600
800
1000Bm gm(x)r(x) = 1/x2
p = 10, n = 1024
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Integrals of Series Expansions
Let@f
@x
(x) = f
x
(x) =1X
n=1
A
n
g
n
(x).
It follows that
f (x) = f (xa
)+
Zx
x
a
1X
n=1
A
n
g
n
(s)ds = f (xa
)+1X
n=1
A
n
Zx
x
a
g
n
(s)ds.
Define an integrating matrix �(n,m) such that
Zx
x
a
g
n
(s)ds = (xb
� x
a
)1X
m=1
�(n,m)gm
(x)
This integral looks like a saw with the pointed teeth locatedat every segment boundary.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Integrating Matrix �(n, m)
�(n,m) =
2
66666666666664
12
�14 0 �1
8 0 0 0 �116 · · ·
14 0 �1
8 0 0 0 �116 0 · · ·
0 18 0 0 0 �1
16 0 0 · · ·18 0 0 0 �1
16 0 0 0 · · ·0 0 0 1
16 0 0 0 0 · · ·0 0 1
16 0 0 0 0 0 · · ·0 1
16 0 0 0 0 0 0 · · ·116 0 0 0 0 0 0 0 · · ·...
......
......
......
.... . .
3
77777777777775
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Coe�cients of Integral from Integrand
f (x) = f (xa
)+(xb
�x
a
)1X
m=1
1X
n=1
A
n
�(n,m)gm
(x) =1X
m=1
A
m
g
m
(x)
where
A
m
= (xb
� x
a
)�T (m, n)An
+ �1m
(xb
� x
a
)1/2f (x
a
)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: f (x) = cos(x) from f
x
(x) = � sin(x)
n
An
8 16 24 32 40 48 56 64-2
-1
0
1
2
3
p = 6p = 6 integrating matrixp = 7 integrating matrixp = 8 integrating matrix
Series coe�cients computeddirectly and indirectly with
the integrating matrix.
n|∆
An|/
|An
8 16 24 32 40 48 56 640.0000
0.0005
0.0010
0.0015
p = 6p = 7p = 8
Di↵erence between seriescoe�cients computed directly
and indirectly.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Derivatives of Series Expansions
A
m
= (xb
� x
a
)�T (m, n)An
+ �1m
(xb
� x
a
)1/2f (x
a
)
The truncated series coe�cients for f
x
(x) are now derivedfrom the truncated series coe�cients of f (x).
A
n
= (xb
� x
a
)�1[�T (m, n)]�1hA
m
� �1m
(xb
� x
a
)1/2f (x
a
)i
A
n
= (xb
� x
a
)�1Dp(n,m)hA
m
� �1m
(xb
� x
a
)1/2f (x
a
)i
The derivative has global support. A local, divided di↵erencehas no meaning in the context of a Walsh function
representation.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
The Di↵erentiating Matrix Dp(n, m)
D2 =
2
664
0 0 0 �80 0 �8 00 8 0 �168 0 16 32
3
775
D3 =
2
66666666664
0 0 0 0 0 0 0 �160 0 0 0 0 0 �16 00 0 0 0 0 �16 0 00 0 0 0 �16 0 0 00 0 0 16 0 0 0 �320 0 16 0 0 0 �32 00 16 0 0 0 32 0 �64
16 0 0 0 32 0 64 128
3
77777777775
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
The Role of the Integration Constant
Di↵erentiate the series representation of
f (x) = sin(x) =2pX
m
A
m
g
m
(x)
with C = f (xa
) to compute the series coe�cients for
f
x
(x) = cos(x) =2pX
n
A
n
g
n
(x).
Set C = 0.
x
f(x
)
-3 -2 -1 0 1 2 3
-2
-1
0
1
2
An gn(x)f(x) = cos(x)
~
C = 0
Choose C such that
˜A2p
= 0.
x
f(x
)
-3 -2 -1 0 1 2 3-1
-0.5
0
0.5
1
An gn(x)f(x) = cos(x)
A32(C) = 0~
~
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Series Expansions of Functions of Two Variables
A function f (x , y) may be represented by an infinite series
1X
n=1
1X
m=1
A
mn
g
m
(y)gn
(x)
over the interval x
a
x x
b
and y
a
y y
b
. Thecoe�cients A
mn
are computed
A
mn
=
Zx
b
x
a
Zy
b
y
a
f (x , y)gm
(y)gn
(x)dxdy
Use Fast Walsh transform in two dimensions.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Example: f (x , y) = (x � y)3 + (x + y)2
x
-1
-0.5
0
0.5
1
y
-1-0.5
00.5
1
f
-5
0
5
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Burger’s Equation: u
t
+ 12(u
2)x
= ⌫u
xx
The basis function series representation of u(x , t) is
u(x , t) =N↵X
j=1
N⌧X
i=1
U(i , j)gi
(t)gj
(x).
The basis function series for @u(x ,t)@x
= u
x
(x , t) is
u
x
(x , t) =N↵X
j=1
N⌧X
i=1
U
x
(i , j)gi
(t)gj
(x).
The coe�cients U
x
(i , j) may be expressed as a function ofthe coe�cients U(i , j).
U
x
(i , j) = L�1x
[Dp↵(j , ↵)U(i , ↵)�D
p↵(j , 1)Ux0(i)]
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Burgers Equation(2)
The basis function series for @u(x ,t)@t
= u
t
(x , t) is
u
t
(x , t) =N↵X
j=1
N⌧X
i=1
U
t
(i , j)gi
(t)gj
(x).
The coe�cients U
t
(i , j) are expressed as a function of thecoe�cients U(i , j) and constant of integration U
t0(j).
U
t
(i , j) = L�1t
[Dp⌧ (i , ⌧)U(⌧, j)�D
p⌧ (i , 1)Ut0(j)]
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Burgers Equation(3)
The non-linear component u
2(x , t) is
u
2(x , t) =
N⌧X
⌧1=1
N↵X
↵1=1
U(⌧1, ↵1)g⌧1(t)g↵1(x)
!⇥
N⌧X
⌧2=1
N↵X
↵2=1
U(⌧2, ↵2)g⌧2(t)g↵2(x)
!
u
2(x , t) =N⌧X
⌧1=1
N↵X
↵1=1
N⌧X
⌧2=1
N↵X
↵2=1
U(⌧1, ↵1)U(⌧2, ↵2)⇥
(g⌧1(t)g⌧2(t))(g↵1(x)g↵2(x))
u
2(x , t) = (Lt
Lx
)�1/2U(⌧1, ↵1)U(⌧2, ↵2)⇥
(�(i ,P(⌧1, ⌧2))gi
(t))(�(j ,P(↵1, ↵2))gj
(x))
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Burgers Equation(4)Each component factor of g
i
(t)gj
(x) must equal zerobecause the functions are mutually orthogonal.Consequently, there are N⌧N↵ residual equations defined by
r(i , j) = U
t
(i , j) + F
x
(i , j)
= [Dp⌧ (i , ⌧)U(⌧, j)�D
p⌧ (i , 1)Ut0(j)] /Lt
+ [Dp↵(j , ↵)F (i , ↵)�D
p↵(j , 1)Fx0(i)] /Lx
= [Dp⌧ (i , ⌧)U(⌧, j)�D
p⌧ (i , 1)Ut0(j)] /Lt
+ [Dp↵(j , ↵)U(⌧1, ↵1)U(⌧2, ↵2)
⇥ �(i ,P(⌧1, ⌧2))�(↵,P(↵1, ↵2))] /(2L3/2x
L1/2t
)
� ⌫Dp↵(j , ↵) [D
p↵(↵,↵3)U(i , ↵3)
� Dp↵(↵, 1)U
x0(i)] /L2x
� Dp↵(j , 1)F
x0(i)/Lx
Its easier than it looks!
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Burgers Equation(4)Each component factor of g
i
(t)gj
(x) must equal zerobecause the functions are mutually orthogonal.Consequently, there are N⌧N↵ residual equations defined by
r(i , j) = U
t
(i , j) + F
x
(i , j)
= [Dp⌧ (i , ⌧)U(⌧, j)�D
p⌧ (i , 1)Ut0(j)] /Lt
+ [Dp↵(j , ↵)F (i , ↵)�D
p↵(j , 1)Fx0(i)] /Lx
= [Dp⌧ (i , ⌧)U(⌧, j)�D
p⌧ (i , 1)Ut0(j)] /Lt
+ [Dp↵(j , ↵)U(⌧1, ↵1)U(⌧2, ↵2)
⇥ �(i ,P(⌧1, ⌧2))�(↵,P(↵1, ↵2))] /(2L3/2x
L1/2t
)
� ⌫Dp↵(j , ↵) [D
p↵(↵,↵3)U(i , ↵3)
� Dp↵(↵, 1)U
x0(i)] /L2x
� Dp↵(j , 1)F
x0(i)/Lx
Its easier than it looks!
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Derived Types and Operator Overloading
The intimidating algebra of the previous slides and its myriadpotential for programming error are eliminated in Fortranwith the use of derived types and operator overloading.
uxw = intx(q1w(m),fa=q1aw(m),diff=.true.)
tauxw = nu*uxw
resw(1) = intt(q1w(m),fa=q10w(m),diff=.true.) &
+ intx(0.5_dp*q1w(m)**2-tauxw,fa=q1bw(m),diff=.true.)
I Each of the variable names ending in “w” above is oftype(walsh).
I Each walsh variable includes all wave components andtheir Jacobians with respect to the wave components ofevery dependent variable and boundary condition.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Steady Burgers Equation Convergence, ⌫ = 0.1
p = 4, n = 16
x
u
-1 -0.5 0 0.5 1-1
-0.5
0
0.5
1
Residual History
iteration
L1
0 10 20 30 4010-16
10-14
10-12
10-10
10-8
10-6
10-4
10-2
100 2 3 4 5 6 7 8 9 10
Enrichment trigger
p
p = 9, n = 512
x
u
-1 -0.5 0 0.5 1-1
-0.5
0
0.5
1
Error Norm Historyp n L
p
1 L
p�11 /L
p
12 4 5.44 10�1
3 8 1.31 10�1 4.15
4 16 1.33 10�2 9.85
5 32 2.63 10�3 5.05
6 64 6.01 10�4 4.37
7 128 1.44 10�4 4.17
8 256 3.55 10�5 4.06
9 512 8.81 10�6 4.03
10 1024 2.19 10�6 4.02
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Steady Burgers Equation, ⌫ = 0.0001
p = 9, n = 512, under-resolved shock
x
u
-1 -0.5 0 0.5 1-1.5
-1
-0.5
0
0.5
1
1.5 ν = 1. 10-4
L1
9= 3.92 10
-3
Detail, full series
x
u
-1 -0.5 0 0.5 10.95
0.96
0.97
0.98
0.99
1
1.01
1.02
1.03
1.04
1.05 ν = 1. 10-4
L1
9= 3.92 10
-3
Detail, truncated series
x
u
-1 -0.5 0 0.5 10.95
0.96
0.97
0.98
0.99
1
1.01
1.02
1.03
1.04
1.05 ν = 1. 10-4
L1
9t= 2.46 10
-4
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Run Times for Advection Test
u
t
+ u
x
= 0, u(x , 0) = u0(x), periodic boundaryProcessor 2.93 GHz Intel Core 2 Duo
p↵ p⌧ N↵N⌧ (N↵N⌧ )
2interior FWT boundary linear solve
3 3 64 4,096 1.8 10
�42.6 10
�41.0 10
�66.9 10
�5
4 4 256 65,536 1.9 10
�32.6 10
�33.4 10
�56.8 10
�4
5 5 1024 1,048,576 8.1 10
�26.2 10
�25.7 10
�41.6 10
�2
6 6 4096 16,777,216 2.8 10
�01.7 10
�09.8 10
�34.2 10
�1
7 6 8192 67,108,864 1.2 10
+16.5 10
�05.8 10
�22.5 10
�0
Problem is too big for laptop (4 GB 1067 MHz DDR3) ifp↵ + p⌧ > 13
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Riemann Problem - Sod Test Case
I Calorically perfect gas with � = 1.4 in a tube of length2 (�1 x 1) with a diaphragm at x = 0.
I Left state: p
L
= 1, ⇢L
= 1, u
L
= 0
I Right state: p
R
= .1, ⇢R
= .125, u
L
= 0
I Diaphragm breaks at t = 0.
I Shock moves to right with speed V
shock
= 1.75215.
I Contact discontinuity moves to right with speedV
contact
= 0.927452.
I Head of expansion fan moves to left with speedV
head
= �1.183216.
I Tail of expansion fan moves to left with speedV
tail
= �0.0702728.
I Waves reflect o↵ of end walls.
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Riemann Problem - Density
Density, p↵ = 7, p⌧ = 0, 8 subdomains in x
x
ρ
-0.5 0 0.50
0.2
0.4
0.6
0.8
1
1.2
Walsh Series SolutionExact Solution
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Near Term Goals
I Document and release Walsh function module includingderived types and operator overloading.
I Complete multi-dimensional Riemann problem analysis.
I Replace Hyp-FUN3D reconstruction with Walshfunction algorithm. (HEDL support to address issues ofheating solution quality on tetrahedral grids.)
Walsh Functions inNumericalSimulation
Peter A. Gno↵o
Introduction toWalsh functions
Preliminaries andperspectives
Fractal derivation
Walsh Functiondefinition
Series expansionsof functions
Series expansion offunction reciprocal
Integrals of seriesexpansions
Derivatives ofseries expansions
Series expansionsof functions of twovariables
Partial di↵erentialequation solutions
Burger’s Equation
Advection run times
Riemann Problem -Sod
Future work
Observations and Speculations
I Taylor series expansions are built on a requirement oflocal continuity.
I Newton relaxation and the Jacobian derive from C1
continuity assumptions in the Taylor series.
I Are new, useful insights and algorithms possible if werevisit classical derivations based on assumptions oflocal continuity (Taylor series) expansions and replacethem with Walsh series expansions requiring globalsupport?