Mathematical Pathways From Simple to Complex and Back

35
Mathematical Pathways From Simple to Complex and Back Dynamics Peter Oswald (Mathematical Sciences) Subdivision Surfaces Multilevel Solvers

description

Peter Oswald (Mathematical Sciences). Mathematical Pathways From Simple to Complex and Back. Multilevel Solvers. Subdivision Surfaces. Dynamics. The Complex World of Math(ematicians). ?? Seldomly exercised. Sciences Qualitative and Quantitative Models. - PowerPoint PPT Presentation

Transcript of Mathematical Pathways From Simple to Complex and Back

Page 1: Mathematical Pathways From Simple to Complex and Back

Mathematical PathwaysFrom Simple to Complex and Back

Dynamics

Peter Oswald (Mathematical Sciences)

Subdivision SurfacesMultilevel Solvers

Page 2: Mathematical Pathways From Simple to Complex and Back

The Complex World of Math(ematicians)

Ever ChangingReal World

Sciences Qualitative and Quantitative Models

Mathematics Exact and Abstract Models and Language

?? Seldomly exercised

Complicated and dirty

Full of life

Dynamic: Truth is questionedfrom time to time

Clean and beautiful

Looks dead (to some)

Absolute truth withinstated assumptions

Success remains interdisciplinary challenge

Page 3: Mathematical Pathways From Simple to Complex and Back

Complex NumbersCounting: Naturals, Integers1,2,3,...,n,... ; 0 (zero) ; -1(=1-2),-2,-3,... ;

Comparing in size: Rationals1/2, -2/3, ... , p/q, ...

Filling the gaps: Real lineSqrt(2), pi, e, ...

Still: Cannot solve simple quadratic equations such as

x + x + 1 = 0

(World of Calculus: Limits,Derivatives, Integrals, ... )

z = x + i y

x

y

i = sqrt(-1)

Complex is also used for sets with structure such as the set of points,line segments, polygons, polyhedra, ... , with incidence relationships(polyhedra have vertices (=points), edges (=line segments), faces(=polygons)) Algebraic Topology

2

Page 4: Mathematical Pathways From Simple to Complex and Back

All you need to know about derivatives

Functions of one variable x = x(t) :

The ordinary derivative x‘(t) describes• Instantaneous rate of change of dependent variable (x) with respect to change in the independent variable (t)• Geometry: Slope of tangent, x’’(t) related to curvature• Mechanics: Velocity, x’’(t) is acceleration

Functions of several variables u = u(t,x,y,z) :

Partial derivatives and differential operators such as gradient or Laplacian

Δt

x(t)Δt)x(tlim

dt

dx(t)x' 0Δt

,u,Δt

x,...)u(t,x,...)Δt,u(tlim

t

uu x0Δtt

Page 5: Mathematical Pathways From Simple to Complex and Back

Complex Behavior in Dynamical Systems

State „Next“ StateTransition rule

F

Discrete time: Recursively defined sequences

givenx0,1,...,n),F(xx 0n1n

Initial state

Example: Conway‘s Game of Life ( Cellular Automata)

Continuous time: Differential equations such as Selkov model

Examples: Van der Pol and Lorenz systems

z)y,h(x,z'z),y,g(x,y'z),y,f(x,x'

y)g(x,y'y),f(x,x' State space2D

3D

Page 6: Mathematical Pathways From Simple to Complex and Back

The Game of Life (Conway 1970)State space: Infinite grid of square cells, each cell „live“ or „dead“ State is pattern of marked live cells (or doubly-indexed 0-1 sequence)

Transition rules: Look at the 8 neighbors of a cell 1. A live cell with < 2 live neighbors dies (loneliness)2. A live cell with > 3 live neighbors dies (overcrowding)3. A live cell with 2 or 3 live neighbors survives4. A dead cell with = 3 live neighbors becomes alive (birth process)

Initial state: Finite pattern of marked live cells

period 2 patternno moving

constant pattern

zero pattern

n=0 n=1 n=2 n=3

period 4 patternmoving

n=4

Page 7: Mathematical Pathways From Simple to Complex and Back

A Nonlinear Oscillator (Van der Pol 1920-27)

b=0

x(t)xcos(ct),axx')xb(1'x' 2 State variablePeriodic force

|x|>1 damping|x|<1 excitation

cos(ct)axy'y,/3)xb(xx' 3

b=30b=3

or rewritten as system with state variable (x,y)

Limit cycles, quasi-periodic solutions, frequency locking ...

Page 8: Mathematical Pathways From Simple to Complex and Back

Lorenz system (Lorenz 1963)

z(t)z8z/3,y xz'

y(t)yz, x-y -x r y'

x(t)xx),y ( 10 x'

Rayleigh coefficient: r > 0

Smallest system (3 equations) that shows a completely new behavior:Bounded solution trajectories approach a special region (called strange attractor) in a fractal, non-periodic fashion (some kind of deterministic chaos)

Application area: Weather forecasting, reduced model for so-called convection rolls in the lower atmosphere

Page 9: Mathematical Pathways From Simple to Complex and Back

What have we seen so far?• Complex (dynamic) behavior can be described by simple setups, both in discrete time (recursive algorithms) and continuous time (systems of ordinary differential equations).

• Similar systems can behave quite differently. In particular, types of nonlinearity, dimension, parameter changes influence the behavior. Understanding requires deep Mathematics.

• Math and simulation is not all. We don’t know whether our simple models explain any real mechanism of nature. This needs good experimentation, data collection and analysis.

• Can use the knowledge gained from simple models to analyse and simulate larger and more complex systems, a common approach is multi-scale or hierarchical modelling. Some toy versions of multi-scale algorithms Solving PDE problems (large small or fine-to-coarse) Creating shapes (small large or coarse-to-fine) will be discussed next.

Page 10: Mathematical Pathways From Simple to Complex and Back

Terrain Triangulation (Multiple Spatial Scales)Terrain Triangulation (Multiple Spatial Scales)

Courtesy of Prof. Griebel (Scientific Computing, Uni Bonn)

Page 11: Mathematical Pathways From Simple to Complex and Back

Terrain Triangulation ( Zoom-In Application)Terrain Triangulation ( Zoom-In Application)

Courtesy of Prof. Griebel (Scientific Computing, Uni Bonn)

Page 12: Mathematical Pathways From Simple to Complex and Back

Multiple Scales in Physical SystemsExample: Flow problems

Example: Integrated circuits

Nanoscale: Quantum effects, particle models, MC simulations

I/O models:Simplified circuitdescription (ODEs)

Macroscopic fields:velocity, pressure, density, temperature,... as functions of space and time (PDEs)

Micro/mesoscopic scales: Statistical thermodynamicsturbulence particle simulations

Engineering formulas:Drag, peak velocity

Macroscopic fields:Electron/hole densities,Potential fields (PDEs)

Page 13: Mathematical Pathways From Simple to Complex and Back

Example: Flow simulations

u0

f puuΔu(Re)u -1t

u=(u1,u2,u3)

velocity vectorp pressure function

Most famous system of partial differential equations (PDEs).Describes incompressible fluid motion at constant temperature,and is trusted by 99.999% of scientists (as macroscopic model).PDEs are everywhere (e.g., spatio-temporal effects in bio-systems).

Re Reynolds number

Courtesy of Prof. Griebel (Scientific Computing, Uni Bonn)

f external forces

Page 14: Mathematical Pathways From Simple to Complex and Back

Example: Electrostatics of ICs

Γ Q U(P)da

|Q-P|

q(Q)

1 U given electrostatic potential („voltages attached to surface“)

q unknown charge density on conductor surface

Example of an integral equation (IE), also heavily used in engineeringsimulations. PDEs and IEs of this kind do not possess simpleanalytic solutions computational methods computer simulations

SG

SSV

V

SS SSVV VV SSGG

Page 15: Mathematical Pathways From Simple to Complex and Back

Numerical Discretization• Unknown functions Vectors of function values on grid

• Derivatives Differences

• Integrals Sums

• PDEs Sparse systems of (linear) equations• IEs Dense systems of (linear) equations

dt x(t)

x(t)

Tn21 )x,,x,(x

)(tx' 213

13

23

23

tt

xxor

tt

xx

nn2211 xcxcxc

Page 16: Mathematical Pathways From Simple to Complex and Back

Toy Problem: Temperature Distribution

T = 200 (hot surface)

T = 0 (cool surface)

T = 20(Air)

T = 20

x

y

y)T(x,T0,TT yyxx

T describes stationary temperaturefield in a square layer (insulatedfrom both sides), with temperaturefixed at the edges.

Use a (m+1)x(m+1) square grid,each interior grid point carries adiscrete temperature value.

The PDE (Laplace‘s equation)is discretized by finite differences.

This leads altogether to an unknown vector of length n=m*m,and a very sparse, nicely structuredlinear system of dimension n.

Cornersingularity

Page 17: Mathematical Pathways From Simple to Complex and Back

Discrete solution

m = 20 m = 40

Page 18: Mathematical Pathways From Simple to Complex and Back

Solving: Gaussian elimination killsThe classical solution method (Gaussian elimination) leads to fill-inand becomes impractical for m>100:

Before elimination After 3 steps After m=6 steps

mxm fill-in block

Due to the mxm fill-in block each of the remaining elimination stepsNeeds roughly ~ m*m = n CPU cycles, i.e., the overall method needsRoughly ~ n*n cycles: Accuracy 0.0001 m~100 ~10 flops (doable but slow) Single precision m~3000 ~10 flops (kills you)

Need new ideas: Reordering, FFT, Multi-scale (multi-grid) approach

8

14

Page 19: Mathematical Pathways From Simple to Complex and Back

Multiscale Solver: Basic IdeaTwo ideas: 1) Solve the dicretized problem approximately, not exactly (only within the accuracy of the numerical model which obviously depends on the chosen grid size, i.e., on m) 2) Solve it not only on the given grid but also on a whole hierarchy of coarser grids, and combine cleverly!

Multigrid idea (1960-80) for IEs and PDEs: Fedorenko, Bachvalov, Brandt, Hackbusch,...

Size n Size n/4 Size n/16

# flops ~ n

Page 20: Mathematical Pathways From Simple to Complex and Back

Linear Algebra Interpretation

badly conditioned nicely conditioned~ n non-zero entries ~ n log n non-zero entries fast matrix-vector multiplication

Page 21: Mathematical Pathways From Simple to Complex and Back

Subdivision schemes: Coarse to Fine

• Have evolved from the recursive evaluation of spline curves and surfaces into a tool for

hierarchical surface generation • Surfaces are created by local topology

refinement and geometric rules for inserting new and moving old points in space. They are rendered (displayed) as triangulated surfaces.

• Process similar to creating fractal objects• Twist: Result should look smooth (since most

shapes consist of smooth pieces)

Page 22: Mathematical Pathways From Simple to Complex and Back

Dyadic or 2-refinement

Insert edge midpoints

Quadrisect triangles

Page 23: Mathematical Pathways From Simple to Complex and Back

Geometric rules (2-subdivision)Interpolating Schemes(old points not moved)

Approximating Schemes(old points slightly moved)

1/2 1/2

1/2 1/2

-w 2w -w

-w -w2w

(Butterfly scheme, Dyn et al. 1990)

w(k)

1

1

1

1

31

3

1

1

(Quartic boxspline, Loop 1987)

w(6)=10

(Linear interpolation polyhedra)

Page 24: Mathematical Pathways From Simple to Complex and Back

Sqrt(3)-refinement (slower topology refinement)

Insert face midpoints

Create rotated triangulation by joining new and old vertices

Page 25: Mathematical Pathways From Simple to Complex and Back

How it works (sqrt(3) scheme by Guskov)

Step 1 Step 2

Step 6

Pumpkin?

Art?

To me: Not so great,artifacts that are notcoming from initialshape!

Initial configuration

Page 26: Mathematical Pathways From Simple to Complex and Back

More Pumpkins: Other Geometric Rules

Butterfly: Interpolating Approximating Geometric Rules

Slightly different initial configuration

Page 27: Mathematical Pathways From Simple to Complex and Back

Sqrt(7)-refinement (faster topology refinement)

Insert 3 points per triangle

Connect new points with each other and old vertices

(each such pointhas its “closest” old edge resp.vertex)

in a consistent way (requires orientable triangulation)

Page 28: Mathematical Pathways From Simple to Complex and Back

Triangular versus Hexagonal Refinement

Page 29: Mathematical Pathways From Simple to Complex and Back

Example: Composite Schemes

1. Trivial upsampling: oV 7*oV, nV 0

2. V2F: 3. F2F:

4. F2V:

Repeat 2. – 4.(5.) another (n-1) times

(5. V2V)

a1/3

1/31/3

1/k1/k

1/k

1/k

1/k

c/kc/k

c/k

c/kc/k

1-c

1-3a

aa

Page 30: Mathematical Pathways From Simple to Complex and Back

Irregular vertices: Combined scheme for n=2

Tetrahedron: k = 3 (not C )

Double pyramid: k = 3 (not C ) k = 4 (barely C )

Double pyramid: k = 12 (C but too flat) k = 4 (already “treated”)

11 1

1

Page 31: Mathematical Pathways From Simple to Complex and Back

V2V-modification: Tetrahedron

before after

Page 32: Mathematical Pathways From Simple to Complex and Back

V2V-modification: k=3,4

before after

Page 33: Mathematical Pathways From Simple to Complex and Back

V2V-modification: k=12

before after

Page 34: Mathematical Pathways From Simple to Complex and Back

Thank you for your attention!

Acknowledgements go (in no specific order) to: Wikipedia (Game of Life, Demonstration for Van der Pol equation and Lorenz system, etc.)

Matlab (Numerical simulation and visualization support)

Prof. Michael Griebel, Dr. Alex Schweitzer, and Group, Institute of Scientific Computing, Uni Bonn (PDE simulations)

MS Powerpoint (Hacking it together)

Detailed references on request!

Page 35: Mathematical Pathways From Simple to Complex and Back

http://www.ibiblio.org/lifepatterns/

Useful URLs:(Game of Life implementations)

http://www.cmp.caltech.edu/~mcc/Chaos_Course/

(many demos, in particular forced nonlinear oscillator)

http://to-campos.planetaclix.pt/fractal/lorenz_eng.html

(simulations for Lorenz and Rössler systems)

http://wissrech.iam.uni-bonn.de/main/index.html

(homepage of Griebel‘s Scientific Computing Group at Uni Bonn, with project descriptions and software for flow problems and many other simulations)

http://www.faculty.iu-bremen.de/poswald/teaching/teaching.html

(temporary download of today‘s USC talk)