simulators - skolan för datavetenskap och …cgjoh/preview/part10.pdfin world of games you have...

27
Part X Simulators 781

Upload: hoangphuc

Post on 07-Apr-2018

218 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

Part X

Simulators

781

Page 2: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 782Printer: Opaque this

Page 3: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 783Printer: Opaque this

164Tools and Perspective

I want to describe an unrealistic reality in a realistic way. (Fer-nando Botero)

A painted landscape is always more beautiful than a real one,because there’s more there. Everything is more sensual, andone takes refuge in its beauty. And man needs spiritual expres-sion and nourishing. It’s why even in the prehistoric era, peoplewould scrawl pictures of bison on the walls of caves. Man needsmusic, literature, and painting-all those oases of perfection thatmake up art-to compensate for the rudeness and materialism oflife. (Fernando Botero)

In World of Games you have constructed simulations and simulatorsmainly based on particle-spring models. We now expand the scope to in-clude differential equation models using the following basic tools:

• mathematical modeling of physical phenomemna by differential equa-tions,

• G2 for computational solution of differential equations,

• FEnICS/Unicorn as realization of G2.

Ultimately, all models of physical reality can be seen as different forms ofparticle-mass models, because physics ultimately consists of (some form of)particles interacting by (some form of) forces.

Page 4: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

784 164. Tools and Perspective

In particular, a differential equation model becomes a discrete particle-mass model after discretization by FEM. The advantage of using thismethodology is that the assignment of particle masses and spring con-stants (related to a given mesh), is automatized by G2 from a differentialequation model with few material parameters.In direct particle-spring modeling, on the other hand, spring constants

and particle masses have to be specified manually, which can be very time-consuming.Differential equation models automatically discretized by G2 thus offer

a very efficient tool for simulation, because differential equations expressbasic laws understandable to humans often with few material parameters,yet allow a very rich output. This is nothing but Leibniz’:

• Best of all Possible Worlds = most complex world governed by mostsimple laws.

We shall now illustrate some of the capabilities with focus on phenomenaof fluid and stucture/solid dynamics including fluid-structure interaction.As illustration we shall consider the following activities:

1. flying (fluid, fluid-structure)

2. sailing (fluid, fluid-structure)

3. jumping (structure)

4. shooting (fluid)

5. speaking (fluid-structure acoustics)

6. predicting weather and climate.

With this inspiration you will be able to construct simulators (and relatedgames if you want) for a very large variety of applications.

Page 5: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

164. Tools and Perspective 785

FIGURE 164.1. Combined digital and mechanical simulator.

Page 6: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 786Printer: Opaque this

Page 7: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 787Printer: Opaque this

165Flying

165.1 To Read

• Why It Is Possible to Fly

• Why Paragliding Is Possible

• Why Birds Can Fly

• Why Bumblebees Can Fly

• Why Wingsuit Flying Is Possible

165.2 To Browse

• The Mathematical Secret of Flight

• Mathematical Theory of Flight

165.3 Watch

• Early attempts

• Wingsuit flying

Page 8: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

788 165. Flying

• First take-off Airbus 380

• Simulated Airbus 380 landing

• Airplane spin

• Crash of JAS Gripen.

165.4 Model: Incompressible NS with Slip

Flight in air at subsonic speeds (up to say 300 km/s) is described by theincompressible Navier-Stokes equations. G2 for incompressible NS is pre-sented in Navier-Stokes: Quick and Easy and implemented in Unicorn. Itis natural to start by computing the flow of air around a fixed 3d wingto find the distribution of forces on the wing surface at different angles ofattack. The results of the computations can be condensed into curves ortables of lift, drag and pitching moment as functions of the angle of attackand flight velocity.The Reynolds number wings of airplanes (and bigger birds) is so large

(> 105) that a slip boundary condition can be used as simple model for aturbulent boundary layer. Lift, drag and pitching moment can then becomputed on meshes with about 100.000 mesh-points, using e.g. FEn-iCS/Unicorn.

165.5 Simulator Based on Lift/Drag Curves

A simple flight simulator can be designed from the lift/drag/moment curvesof a single wing.

165.6 Direct Simulation

A more advanced simulator for extreme operations like take-off and land-ing at maximal angle of attack, and dynamics of spin et cet, requiresreal-time solution of the NS-equations. For this purpose you can use FEn-iCS/Unicorn.

165.7 Flapping Wings

Extend to flapping wing using fluid-structure modeling.

Page 9: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

165.7 Flapping Wings 789

FIGURE 165.1. Forces on an airplane

FIGURE 165.2. In the cockpit.

Page 10: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

790 165. Flying

FIGURE 165.3. Forces on a glider.

FIGURE 165.4. Hang glider.

Page 11: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

165.8 Bird/Insect Flight 791

FIGURE 165.5. Forces on bird in flight.

165.8 Bird/Insect Flight

Watch:

• Why Birds Can Fly

• Bird Flight Slow Motion

• Blender Bird Wing Test

Construct a simulator for gliding and flapping flight of small and largebirds and insects, using e.g. FEniCS/Unicorn for fluid-structure interaction.Determine if a bumble bee can fly.

Page 12: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 792Printer: Opaque this

Page 13: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 793Printer: Opaque this

166Sailing

166.1 To Read

• Why It Is Possible to Sail

166.2 To Browse

• Sailing 1

• sailing 2

166.3 Watch

• Americas Cup 1930 vs 2010

• Alinghi vs Oracle 2010

• Americas Cup start tactics at Turning Torso

• Volvo Ocean Race

Page 14: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

794 166. Sailing

FIGURE 166.1. Vasa tipping over. Why?

166.4 Fluid Dynamics of Sailing

The sail and keel of a sailboat both act as wings creating lift which powers asailboat to overcome drag from sail, keel and hull, and in particular makesit possible to sail upwind. Compare Sailing Game.

166.5 Model: Incompressible NS with Slip

Both the flow of air and water can be modeled by the incompressible Navier-Stokes equations with slip boundary condition on the sail and hull com-bined. Air and water can be modeled as a variable density fluid with thefree water surface represented by a transition zone from high to low density(water).

166.6 Stability of Floating Bodies

The motion of the boat through the water is determined by bouyancy forcesconnecting to Archimedes Principle and the forward thrust from the sail.The stability of floating bodies (in 2d say) connects to the relative ho-

risontal motion of the of centers of gravity for the body and its submergedpart under tilting from horisontal forces (e.g. wind).

Page 15: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

166.7 Simulator 795

The forces (and moments) acting on a floating body may be computedby direct summation (integration) of gravity forces and fluid forces actingon little pieces of the body, or from centers of gravity and bouyancy as justindicated.

166.7 Simulator

Construct a Sailing Simulator using experience from designing a flight sim-ulator. Start using given lift/drag curves for sail and keel, and take theheeling into account using Archimedes principle. Follow up with real timedirect fluid-structure simulation e.g. using FEniCS/Unicorn.

166.8 Investigations

• Determine the performance of different designs of sail and hull.

• Why did Vasa tip over? Who was responsible for the design? Wasthe instability a surprise? What was the verdict of the judiciary pro-cess following the catastrophy? Was the ship “well built but badlydesigned”?

166.9 BMW ORACLE Americas Cup 2010

The 33rd Americas Cup 2010 was won by the US challenger BMW OR-ACLE with rigid wing-sail, see BMW ORCACLE vs ALINGHI. Can youexplain the outcome?

Page 16: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 796Printer: Opaque this

FIGURE 166.2. BMW ORACLE wins Americas Cup 2010.

Page 17: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 797Printer: Opaque this

167Jumping and Falling

If there be light, then there is darkness; if cold, heat; if height,depth; if solid, fluid; if hard, soft; if rough, smooth; if calm,tempest; if prosperity, adversity; if life, death. (Pythagoras)

167.1 To Watch

• Passive Fall of Cow

• Hexapod Simulator

• Walking Robot

• Walking Humanoid

• Humanoid Assistant

• High Jump Simulation

167.2 Passive Structure Dynamics

Model the passive dynamics of elastic bodies subject to gravity and contactforces by using a Navier/Lagrange model. Passive dynamics means that nointerior extra forces, like muscle forces, are added.

Page 18: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

798 167. Jumping and Falling

FIGURE 167.1. Gillian Murphy overcoming gravity in grand jete.

167.3 Active Structure Dynamics

Model active dynamics by inserting suitable interior (muscle) forces in theabove model.

167.4 Simulators

Construct a simulator for passive/active structure dynamics, e.g. usingFEniCS/Unicorn.

167.5 Investigation

• simulate ballet jump

• simulate high jump.

Page 19: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 799Printer: Opaque this

168Shooting

168.1 Spinning Balls

A spinning ball in flight will be subject to a lift force transversal to theflight trajectory, which will add to the gravity force and give additionalcurvature to the trajectory.The flight of a spinning ball can be modeled by the (incompressible)

Navier-Stokes equations with a mixture of no-slip and slip boundary con-ditions resulting in unsymmetric separation and lift.Spinning balls are important in soccer, baseball, tennis, table-tennis...See

Why A Topspin Tennis Ball Curves Down.

168.2 Bow and Arrow

Model the action of bow and arrrow, with an elastic model of the bow anda fluid model for the flight of the arrow.

168.3 Read More

• String Theory

Page 20: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 800Printer: Opaque this

Page 21: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 801Printer: Opaque this

169Racing

169.1 Watch

• Panda ODE Car

169.2 Simulator

Model the dynamics of a (stock-car) vehicle using a Navier/Lagrange elasto-plastic model.

Page 22: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 802Printer: Opaque this

FIGURE 169.1. Cross road racing.

Page 23: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 803Printer: Opaque this

170Roulette and Chaos

170.1 To Watch

• Roulette wheel simulation

170.2 Simulator

A roulette is a mechanical system with outcome which is so difficult to pre-dict that it can be used as a random number generator or chaos machine ina game of chance. This is an effect of sensitive dependence of initial condi-tions which means that very small changes in the way the ball is launchedin each play will change the final position of the ball. Over very many playswe can expect that each of the 37 numbers will come up approximately witha frequency of 1/37.Construct a chaos machine e.g. as an elastic ball interacting with a jagged

solid surface.

170.3 Investigation

Is the motion chaotic?

Page 24: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 804Printer: Opaque this

FIGURE 170.1. Roulette: Pointwise unpredictable, mean-value predicatble sys-tem.

Page 25: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 805Printer: Opaque this

171Predicting Weather and Climate

171.1 To Read

• Global Circulation Models

• On Climate Sensitivity 1, 2, 3

171.2 To Watch

• Desktop climate simulation

• Supercomputer climate simulation

• Thermohaline circulation

• Global Circulation

• Atmospheric winds

• Coriolis forces.

171.3 Simulator

Construct a combined ocean-atmosphere simulator based on the Navier-Stokes equations with the ocean incompressible and the atmosphere com-

Page 26: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

806 171. Predicting Weather and Climate

pressible subject to incoming radiative forcing and outgoing blackbody ra-diation.

171.4 Investigation

Seek to determine climate sensitivity as the increase of global temperatureupon a doubling of CO2 in the atmosphere.

Page 27: Simulators - Skolan för datavetenskap och …cgjoh/preview/Part10.pdfIn World of Games you have constructed simulations and simulators mainly based on particle-spring models. We now

This is page 896Printer: Opaque this