Spatial Modeling - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Spatial Modeling

Description:

Universit t Stuttgart. Institute of Parallel and. Distributed ... From http://bartok.ucsc.edu/peter/java/ising/keep/ising.html. States are 'White' and 'Blue' ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 32
Provided by: ipvsUnis
Category:

less

Transcript and Presenter's Notes

Title: Spatial Modeling


1
Spatial Modeling
  • Modeling and Simulation of Computer Systems

by Kai Bormann Supervisor Illya Stepanov
22. February 2005
2
Contents
  • Introduction
  • Space-based Approach
  • Cellular Automata
  • Game of Life
  • Margolus Neighborhood
  • Lattice Gas Dynamics
  • Ising Models
  • Entity-based Approach
  • L-Systems
  • Particle Systems
  • Summary

3
Introduction
Spatial Models
Entity-based Models
Space-based Models
Space is the object
Entity in the space is the object
4
Space-based Approach
  • Introduction
  • Space-based Approach
  • Cellular Automata
  • Game of Life
  • Margolus Neighborhood
  • Lattice Gas Dynamics
  • Ising Models
  • Entity-based Approach
  • L-Systems
  • Particle Systems
  • Summary

5
Cellular Automata (CA)
  • Model discrete dynamic systems
  • Consists of
  • N-dimensional infinite grid
  • Regularly ordered cells having m-states
  • Rules applied for each cell

6
Grid of Cellular Automata
Theory N-dimensional infinite grid Praxis 1 or
2 dimensional grid Problem The grid is not
infintite! Solution Form grid to a ring (1D)
or torus (2D)
7
Cells of Automata
  • Regularly ordered cells
  • Cell structure normally rectangular, but
    triangular or n-angular
  • cells are also possible
  • Each cell has neighbors
  • von Neumann Moore Self-defined
  • neighborhood neighborhood neighborhood
  •   

8
Rules of Cellular Automata
  • All rules are applied at each cell at time t
  • The next state t1 depends on
  • The state of the cell at time t
  • The states of the neighboring cells at time t
  • The result is in t1

9
Example of a CA
  • Game of Life developed by the mathematics John
    Horton Conway
  • Consists of
  • n n square board
  • Moore neighborhood
  • 2 states
  • 2 rules
  • birth rule
  • death rule

10
Game of Life
Generation 0
Generation 1
Generation 25
Generation 50
11
Margolus Neighborhood
  • A CA with Margolus neighborhood
  • Each block has a fix cell number
  • The rules are applied for each block
  • Blocks are subdivided into phases
  • The different phases are overlapping
  • Example

Phase 1
Phase 2
12
Lattice Gas Dynamics
Using Margolus neighborhood 6 Rules
With collision detecting
13
Lattice Gas Dynamics
With this 6 rules it is possible to simulate
diagonal movement
Phase 1, t0
14
Lattice Gas Dynamics
With this 6 rules it is possible to simulate
diagonal movement
Phase 2, t1
15
Lattice Gas Dynamics
With this 6 rules it is possible to simulate
diagonal movement
Phase 1, t3
16
Lattice Gas Dynamics
With this 6 rules it is possible to simulate
diagonal movement
Phase 2, t4
17
Ising Model
  • Developed by the german physics Ernst Ising
  • Describes the behavior of magnet materials
  • An increasing temperature leads to a growth of
    the interference factor
  • CA can simulate this model
  • Consists of
  • n n grid
  • 2 states
  • von Neumann neighborhood

Low High interference factor
18
Example of Ising Model
  • From http//bartok.ucsc.edu/peter/java/ising/keep/
    ising.html
  • States are White and Blue

19
Entity-based Approach
  • Introduction
  • Space-based Approach
  • Cellular Automata
  • Game of Life
  • Margolus Neighborhood
  • Lattice Gas Dynamics
  • Ising Models
  • Entity-based Approach
  • L-Systems
  • Particle Systems
  • Summary

20
L-Systems
Developed by the botanist Astrid Lindenmeyer G
(V, ?, P) V Alphabet ? Initial condition P
Production rules Alphabet F Draw a
vertical line with the length d f Does not draw
a line with the lenght d A clockwise rotation
of ? - A counter clockwise rotation of ?
21
L-Systems Example 1
  • G (F,,-, ?, P) ? 90
  • F-F
  • p1 F?F-FFF-F

Initial condition
First iteration
Second iteration
22
L-Systems Example 2
  • Save the current state on the stack.
  • Get the saved state from the stack.
  • G (F, , -, , , ?, P) ? 26
  • F
  • p1 F?F F F -F F

23
Particle Systems
  • Gas Dynamics with Time Slicing
  • Gas Dynamics with Event Scheduling
  • N-body Methods
  • Particle Particle Method
  • Particle Mesh Method
  • Tree Code Method

24
Gas Dynamics with Time Slicing
  • Each molecule has
  • Initial position
  • Velocity
  • Straight trajectory
  • Collisions and gravity are ignored
  • Formula to calculate the new position xnew
    xold vx ?t
  • Positions are updates at every ?t

25
Gas Dynamics with Event Scheduling
  • Event a molecule hits a wall
  • Intersection time is calculated
  • Molecules are entered into the Event List
  • Positions are updated upon each event
  • Advantage Simulation is faster
  • Problem pay attention at events with the same
    timestamp

26
Particle Systems
  • Gas Dynamics with Time Slicing
  • Gas Dynamics with Event Scheduling
  • N-body Methods
  • Particle Particle Method
  • Particle Mesh Method
  • Tree Code Method

27
Particle Particle Method
  • Calculate the force of each particle
  • Calculate for each particle the new position and
    speed
  • Update the timestamp
  • Advantage accurate and simple
  • Disadvantage N(N-1) calculations are needed
  • gt complexity O(N2)
  • gt bad for a high number of particles

28
Optimization with Particle Mesh Method
  • Lay a mesh (regular grid) over the particle space
  • Calculate the forces of the meshpoints
  • Calculate the force of each particle
  • Calculate for each particle the new position and
    speed
  • Update the timestamp
  • Disadvantages
  • Improves only if the number of meshpoints (M) is
    smaller than the number of particles (N)
  • No collision detecting

29
Tree-Code Method
  • Demount the rectangles until all particles have
    their own rectangle
  • Starting in the leafs
  • Calculate the center of
  • mass (COM) of each quad-cell
  • Calculate the force of each particle
  • Calculate for each particle the new position
    and speed
  • Update the timestamp
  • Complexity O(N log N)

3
1
31
311
31
(COM)
1
2
3
4
32
311 312 313 314
3
34
33
30
Summary
Spatial Models
Entity-based Models
Space-based Models
Cellular Automata
L-Systems Particle Systems
31
Questions
Write a Comment
User Comments (0)
About PowerShow.com