modeling & simulation topical lecture cs 101 arif zaman
Post on 21-Dec-2015
217 views
TRANSCRIPT
Create a modelUsually a simplified descriptionUsing a few rules
Solve the modelUsing algebra, calculus, differential
equationsUsing simulation
Improve the modelAdding more parameters, equations
Modeling
Physics
Physics was spectacularly successful.F = m a = G m1m2 /r 2
explains sun-moon-planets-stars-galaxies…But not quite right, so we add
Friction (static and dynamic)RotationCollisionRigid and non-rigid bodies…
Physics Envy
Economics Psychology Sociology Biology Political Science Agriculture Chemistry … and even Physics
No simple equations No exact equations Probability needed Interactions of
1000’s of individuals can’t be accurately modeled by a simple composite number.
Computers to the Rescue
Benefits Numerical solutions
to complex differential equations that have no closed form solutions
Possible to model millions of individuals
Loss No longer able to
“understand” the model, or to solve it (e.g. Two-body problem is an ellipse).
Solution may take a long time to find.
Nothing random other than starting point
According to rules.
Add Response to threat
Another example of flocking
Herd behavior of animals
Note that many things “modeled” here.
Flock of Birds (Boids)
Separation: steer to avoid crowding local flockmates
Alignment: steer towards the average heading of local flockmates
Cohesion: steer to move toward the average position of local flockmates
http://www.red3d.com/cwr/ boids/ Craig Reynolds
Water
Navier-Stokes (1800) used PDE’s to “solve”.
u(x,y,z,t) is velocity,v is viscosity, ρ is density, p is the pressure vectorg is the gravity vector.
Hydrodynamics Computers use Finite
Element or Finite Difference Methods to solve with “voxels”.
Simplifications are needed to be able to do this in any reasonable amount of time. (4-7 mins per frame)
Nick Foster & Ronald Fedkiw http://www.cis.upenn.edu/~fostern/
0
1( ) ( )v
u
u u u u p g
The Forest for the Trees
For each tree there are curves:
Tree growth rate (as a function of light)
Tree transparency Spread of seeds Death rate as a function
of growth. Disasters or logging.
http://www.sciencemag.org/feature/data/deutschman/index.htm
Total tree density climbs quickly from the sparse initial conditions, reaching a peak around year 200. Fast-growing species like black cherry, white pine, and red oak reach the canopy first. As the light reaching the forest floor declines, these species’ seedlings fail to recruit into the canopy, and the more shade-tolerant species (mainly beech, hemlock, and, to a lesser extent, yellow birch) increase in relative abundance. By the end of the 1000-year simulation, beech reaches almost 100% dominance in the forest.
With no logging
the same suite of species (white pine, red oak, and black cherry) dominate the early growth.
But continued opening of the canopy leads to enhanced performance of yellow birch. Yellow birch has the longest dispersal and high growth in moderate light, which allows it to expand quickly throughout the forest.
Beech and hemlock are common and show little sign of being displaced.
The apparent paradox of higher density in disturbed simulations …
With periodic logging
NASA and Muslims
Rely on simulation of solar system to predict the times for prayer, the visibility and location of the moon.
Solar system simulation (including several 100 asteroids) can be done extremely accurately, in a reasonable amount of time on a home computer.
Take small time stepsEverything moves, so
re-compute forces.This approach does
not work well. Errors accumulate. Linear Algebra and Numerical Analysis come to the rescue.
Small time-step problem
Weather Prediction
Far harder than anyone suspected. “Chaotic” (a butterfly in China affects a
hurricane in Louisiana). NEC Earth Simulator (now #4 after three years
as #1) is 640 processors, each with 8 vector arithmetic processors. Each processor is 8Gflop, total 10Tb memory.
NOAA feeds 2 million observations/day for weather prediction.
Currently 1-3 day is so so, trying for 7 days.
Fire
To understand why two firefighters died.
To understand what to do in case of fire. For firefighters. For residents.
Simulations can help in…
Training and teaching Providing cheaper, less
dangerous labs Policy planning Design and prototyping Design of Pseudo-
experiments. Movie/Game making Prediction and
approximation
Flight simulator Space flight simulation Business Game Nuclear power plant
emergency War Games Medical Simulation Car, aircraft, wing
design Political planning
Diet, Smoking and Heart Disease
Researchers in Turkey … constructed a computer model of the adult population of England and Wales, looking at the effect of reducing smoking, cholesterol, and blood pressure in those with and without heart disease. This showed that primary prevention has a four fold bigger impact on mortality than secondary prevention.
A Living Cell
Researchers are taking on a project that will attempt to create a detailed computer model of a living cell that includes all of the cell's genes and proteins, their function and their relationships to one another.
The researchers will use Saccharomyces cerevisiae, a single-celled yeast, which, they say, shares many genetic traits with humans, making it a useful model.
The work is part of a $4.88 million grant from the National Science Foundation.
Over the next five years, Keck Graduate Institute of Applied Life Sciences will lead a team of biochemists and computer scientists including a team from the University of Rochester Medical Center to build the computer model of gene and protein function within the cell, and then test predictions against real-world experiments.
Eye Injuries
Stitzel and his colleagues have been working on the computer simulation model for several years and already have reported that the model tracks the actual results of a series of experiments in which foam particles, BBs and baseballs strike the human eye. The model predicts when the globe of the eye will rupture from high-speed blunt trauma.
In an accompanying editorial, Paul F. Vinger, M.D., of Concord, Mass., said the Virginia Tech-Wake Forest center's project to create the computer simulation "is a formidable undertaking that is bound to change the course of eye trauma research."
He said that when the model predictions were compared with actual results, there was "excellent correlation between the calculated and experimental results."
New Orleans Hurricane
As the hurricane hit, John Pardue sat in his home in Baton Rouge, nervously tracking the storm’s progress on his computer for three hours until the power was cut. As director of the Louisiana Water Resources Research Institute and an expert in the detection of levee flaws, he and his team had produced a computer model showing the calamitous consequences of a major hurricane striking the New Orleans region.
The model was widely applauded when first developed five years ago, yet the federal government effectively refused to act on the warnings. Critically, the major civil engineering works needed to build a new sea wall which would have greatly limited the hurricane’s devastating effect, did not transpire.
“We knew that it was going to be catastrophic,” Pardue says. “It was not a surprise; it was in the New York Times, National Geographic, Scientific American. This exact scenario: water will be 20 feet high in parts of the city, people will die, all the things that have happened. It’s eerie because we’ve been thinking about this for a number of years, and to see it unfold before your eyes is just unbelievable.”