Upload
geordie-mcbain
View
18
Download
0
Embed Size (px)
Citation preview
Skirting subsets of the planewith application to marginal stability curves
G. D. McBain
School of Aerospace, Mechanical, & Mechatronic Engineering
The University of Sydney, AUSTRALIA
CTAC 2003 – p.1/29
The problem
Approximate the margin of a predicate on the plane.
Given a point (x, y) in the plane R2,
and a PREDICATE P : R2 → {T, F},
a MARGINAL POINT of P is one for which everyneighbourhood contains a ‘true point’ and a ‘false point’.
No ‘neutral’ points (the ‘principle of excluded middle’).
Example of a predicate:Is the place at a given longitude and latitude abovesea level?The margin is the coastline.
CTAC 2003 – p.2/29
The problem (cont.)
Assume we can evaluate P (x, y) wherever, but wish tominimize the number of evaluations.
No other information about P required,
nor assumptions about the smoothness of the margin.
For nice examples, the margin consists of one or morecurves each homeomorphic to either:
an infinite line; ora circle.
but may be cusped.
CTAC 2003 – p.3/29
Example: 1 equation in 2 unknowns
One equation in two unknowns can be writtenf(x, y) = 0.
If f , x, and y are real and f is continuous, we can use apredicate like
P (x, y) ⇔ f(x, y) < 0.
Here, the margin of P is the solution curve f(x, y) = 0.
Thus, finding level curves of surfaces is an example ofthis problem.
In the coastline example, we could take here thefunction f as the height above sea level.
CTAC 2003 – p.4/29
Example: marginal stability curves
A specific practical example is a marginal stability curve.
e.g. from the Orr–Sommerfeld equation of linearhydrodynamic stability theory.
Say at Reynolds number R, waves of wavenumber α
amplify likee−iωt = e=ωte−i<ωt
where t is time and ω is (complex) frequency.
Typically ω is obtained from an eigenvalue problem.
Stability requiresmax=ω < 0
for all ω in the spectrum.
CTAC 2003 – p.5/29
Typical simple marginal stability curve
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLE
‘Toy’ example from Drazin (2002).CTAC 2003 – p.6/29
Another marginal stability curve
0.0
0.5
1.0
1.5
2.0
2.5
0 50 100 150 200 250 300 350 400
TO
TA
L W
AV
EN
UM
BE
R, k
REYNOLDS NUMBER, R
STABLE
UNSTABLE
A 3-D natural convection problem.
Note cusps (due to multiple modes).
CTAC 2003 – p.7/29
A preliminary: bisection
Marginal points of a predicate on the real line can be foundby BISECTION.
If ab is TRANSVERSE, so is either ac or cb.
Every transverse segment contains a marginal point.
CTAC 2003 – p.8/29
Parameterization by coordinates
The margin P (x, y) = 0 can be parameterized locally byone of the coordinates: y = g(x) or x = h(y), but. . .
STABLE
UNSTABLE?
STABLE
UNSTABLE
?
Problems:Margin-bounding property of bisection lost! andswitching required at turning points.
CTAC 2003 – p.9/29
Continuation methods
Continuation methods use knowledge of the solution toa nearby problem.
Here, use that part of the margin already calculated.
Allgower & Georg (1990) Numerical ContinuationMethods, Springer.
Two basic classes:predictor–corrector
requires derivative of functionfails at cuspslacks bisection’s bounding property
simplicial decompositiondivide domain into simplexes‘door-in, door-out’ principle retains bounding
CTAC 2003 – p.10/29
Generalizing bisection to R2
Given a and b with P (a) 6⇔ P (b) in the plane, bisectionguarantees one marginal point.
Another transverse segment a′b′ can be obtained byrotating the original.
c = a +
[
cos π6
− sin π6
sin π6
cos π6
]
(b − a)
Then if P (c) ⇔ P (a), use cb; otherwise ac.
Like bisection, but tracks instead of contracts.
CTAC 2003 – p.11/29
Rectangular metric
If R2 is a parameter plane rather than geometric, a
RECTANGULAR METRIC is more appropriate.
Use tolerances as length scales. Metric:[
τ−2
x 0
0 τ−2
y
]
.
Distance:
d2(a, b) =[
b1 − a1 b2 − a2
]
[
τ−2x 0
0 τ−2y
][
b1 − a1
b2 − a2
]
Rotation matrix:
cos θ −√
g22
g11
sin θ√
g11
g22
sin θ cos θ
=
[
1
2− τx
τy
√3
2
τy
τx
√3
2
1
2
]
CTAC 2003 – p.12/29
A minimal implementation
function skirt (u, v, pred, tol)rot = [1, -sqrt(3)*tol(1)/tol(2);
sqrt(3)*tol(2)/tol(1), 1]/2;p_u = feval (pred, u);
while (true)disp (bisect (u, v, pred, tol)’);w = u + rot * (v - u);if (feval (pred, w) == p_u)
u = w;else
v = w;endif
endwhileendfunction
CTAC 2003 – p.13/29
Example: Initial transverse segment
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLE
stable #1 unstable #1
Find a stable and an unstable point.CTAC 2003 – p.14/29
Example: First step
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLEstable ##1-2 unstable #1
unstable #2
Rotate segment and test new point.CTAC 2003 – p.15/29
Example: Second step
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLEstable ##1-2
stable #3
unstable #1
unstable ##2-3
Repeat.CTAC 2003 – p.16/29
Example: nth step
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLE
CTAC 2003 – p.17/29
Increasing resolution
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLE
CTAC 2003 – p.18/29
Increasing resolution
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLE
CTAC 2003 – p.19/29
Increasing resolution
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLE
CTAC 2003 – p.20/29
Refinements
Termination criteria.For line-like margins:
test if margin leaves domain of interest;For circle-like margins:
test if margin returns to starting point;Cheap general alternative:
test if a step count is exceeded.
For P ⇔ f < 0, use BRENT’S METHOD.
Adaptivity.
CTAC 2003 – p.21/29
Adaptivity: measuring accuracy
Adaptivity requires a quantification of accuracy.
Two measures of accuracy:1. How close are output points to margin?2. How close is margin to output points?
How close are output points to margin?Easy: As close as we like, by bisection.
How close is margin to output pointsDiffcult: margin is unknown.All that is known of the margin is the output points.Interpolate with line segments.Also look ahead by extrapolating with line segments.
CTAC 2003 – p.22/29
Adaptivity
excessive deviationfrom linear projection
halve 2nd transverse edge
and try again
CTAC 2003 – p.23/29
Adaptivity example
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLEUNSTABLE
UNSTABLE
Nonpolygonal tolerance: 160. Function evaluations: 185.
CTAC 2003 – p.24/29
Adaptivity example
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLEUNSTABLE
UNSTABLE
Nonpolygonal tolerance: 40. Function evaluations: 265.
CTAC 2003 – p.25/29
Adaptivity example
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLEUNSTABLE
UNSTABLE
Nonpolygonal tolerance: 10. Function evaluations: 596.
CTAC 2003 – p.26/29
Adaptivity example
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLEUNSTABLE
UNSTABLE
Nonpolygonal tolerance: 1. Function evaluations: 1486.
CTAC 2003 – p.27/29
Comparison: Adaptivity without growth
0.25
0.30
0.35
0.40
0.45
0.50
0.55
0 50 100 150 200
WA
VE
NU
MB
ER
, α
REYNOLDS NUMBER, R
STABLE
UNSTABLEUNSTABLE
UNSTABLE
Function evaluations: 63 936 (over 40 times more).
CTAC 2003 – p.28/29
Conclusions
An extremely simple but reasonably robust and efficientalgorithm has been developed for tracing the margins ofpredicates in the plane.
Cusps on the marginal curve present no difficulty.
Directly applicable to finding level curves of real-valuedfunctions of two variables. The derivative is notrequired, and need not exist.
The algorithm has proved most useful in tracingmarginal stability curves for Orr–Sommerfeld typeproblems in linear hydrodynamic stability.
Implementation:minimal (33 lines of code, including bisection); andadaptive (99 lines of code).
CTAC 2003 – p.29/29