Donald Fussell. October 28, Computer Science Department The University of Texas at Austin. Point Masses and Force Fields.

Similar documents
Physically Based Modeling CS Notes Spring 1997 Particle Collision and Contact

Ph 20.3 Numerical Solution of Ordinary Differential Equations

Kinematics and dynamics, a computational approach

ma x = -bv x + F rod.

PHY307F/407F - Computational Physics Background Material for Expt. 3 - Heat Equation David Harrison

HORIZONTAL MOTION WITH RESISTANCE

Note-A-Rific: Mechanical

Some Perspective. Forces and Newton s Laws

lecture 36: Linear Multistep Mehods: Zero Stability

NB1140: Physics 1A - Classical mechanics and Thermodynamics Problem set 2 - Forces and energy Week 2: November 2016

Lesson 24: Newton's Second Law (Motion)

Physics 201, Lecture 15

Force and dynamics with a spring, analytic approach

26 Impulse and Momentum

Chapter 1: Basics of Vibrations for Simple Mechanical Systems

12 Towards hydrodynamic equations J Nonlinear Dynamics II: Continuum Systems Lecture 12 Spring 2015

PY /005 Practice Test 1, 2004 Feb. 10

Frame with 6 DOFs. v m. determining stiffness, k k = F / water tower deflected water tower dynamic response model

Today s s topics are: Collisions and Momentum Conservation. Momentum Conservation

I. Understand get a conceptual grasp of the problem

lecture 37: Linear Multistep Methods: Absolute Stability, Part I lecture 38: Linear Multistep Methods: Absolute Stability, Part II

Finite fields. and we ve used it in various examples and homework problems. In these notes I will introduce more finite fields

Support Vector Machines MIT Course Notes Cynthia Rudin

Lecture 21. Interior Point Methods Setup and Algorithm

One Dimensional Collisions

CHAPTER 15: Vibratory Motion

OSCILLATIONS AND WAVES

Projectile Motion with Air Resistance (Numerical Modeling, Euler s Method)

CHAPTER 1 MOTION & MOMENTUM

SIMPLE HARMONIC MOTION: NEWTON S LAW

2.003 Engineering Dynamics Problem Set 2 Solutions

Comparison of Stability of Selected Numerical Methods for Solving Stiff Semi- Linear Differential Equations

Vector Spaces in Physics 8/6/2015. Chapter 4. Practical Examples.

XI PHYSICS M. AFFAN KHAN LECTURER PHYSICS, AKHSS, K.

Model Fitting. CURM Background Material, Fall 2014 Dr. Doreen De Leon

Dimensions and Units

Analyzing Simulation Results

2 Q 10. Likewise, in case of multiple particles, the corresponding density in 2 must be averaged over all

Chapter VI: Motion in the 2-D Plane

NUMERICAL MODELLING OF THE TYRE/ROAD CONTACT

USEFUL HINTS FOR SOLVING PHYSICS OLYMPIAD PROBLEMS. By: Ian Blokland, Augustana Campus, University of Alberta

Figure 1: Equivalent electric (RC) circuit of a neurons membrane

An Approximate Model for the Theoretical Prediction of the Velocity Increase in the Intermediate Ballistics Period

National 5 Summary Notes

Honors Lab 4.5 Freefall, Apparent Weight, and Friction

Now multiply the left-hand-side by ω and the right-hand side by dδ/dt (recall ω= dδ/dt) to get:

Energy and Momentum: The Ballistic Pendulum

Solving initial value problems by residual power series method

lecture 35: Linear Multistep Mehods: Truncation Error

Name Period. What force did your partner s exert on yours? Write your answer in the blank below:

(a) Why cannot the Carnot cycle be applied in the real world? Because it would have to run infinitely slowly, which is not useful.

Definition of Work, The basics

Physics 221A: HW3 solutions

EE5900 Spring Lecture 4 IC interconnect modeling methods Zhuo Feng

EN40: Dynamics and Vibrations. Midterm Examination Tuesday March

1 Brownian motion and the Langevin equation

BALLISTIC PENDULUM. EXPERIMENT: Measuring the Projectile Speed Consider a steel ball of mass

Lecture 23: Central Force Motion

On the role of quadrature rules and system dimensions in variational multirate integrators

Analysis of Impulsive Natural Phenomena through Finite Difference Methods A MATLAB Computational Project-Based Learning

Understanding the coefficient of restitution (COR) using mass/spring systems

ANALYSIS OF HALL-EFFECT THRUSTERS AND ION ENGINES FOR EARTH-TO-MOON TRANSFER

EULER EQUATIONS. We start by considering how time derivatives are effected by rotation. Consider a vector defined in the two systems by

Problem Set 2. Chapter 1 Numerical:

Momentum. February 15, Table of Contents. Momentum Defined. Momentum Defined. p =mv. SI Unit for Momentum. Momentum is a Vector Quantity.

U V. r In Uniform Field the Potential Difference is V Ed

The path integral approach in the frame work of causal interpretation

What is the instantaneous acceleration (2nd derivative of time) of the field? Sol. The Euler-Lagrange equations quickly yield:

Ch 12: Variations on Backpropagation

Page 1. Physics 131: Lecture 22. Today s Agenda. SHM and Circles. Position

Chaotic Coupled Map Lattices

8.1 Force Laws Hooke s Law

27 Oscillations: Introduction, Mass on a Spring

Physics 221B: Solution to HW # 6. 1) Born-Oppenheimer for Coupled Harmonic Oscillators

A Self-Organizing Model for Logical Regression Jerry Farlow 1 University of Maine. (1900 words)

PhysicsAndMathsTutor.com

Tactics Box 2.1 Interpreting Position-versus-Time Graphs

Tutorial Exercises: Incorporating constraints

Numerical Studies of a Nonlinear Heat Equation with Square Root Reaction Term

CHECKLIST. r r. Newton s Second Law. natural frequency ω o (rad.s -1 ) (Eq ) a03/p1/waves/waves doc 9:19 AM 29/03/05 1

Physics Circular Motion: Energy and Momentum Conservation. Science and Mathematics Education Research Group

Simple Schemes of Multi anchored Flexible Walls Dynamic Behavior

Massachusetts Institute of Technology Quantum Mechanics I (8.04) Spring 2005 Solutions to Problem Set 4

16.333: Lecture # 7. Approximate Longitudinal Dynamics Models

Feedforward Networks

Boosting with log-loss

Principles of Optimal Control Spring 2008

Feedforward Networks

COS 424: Interacting with Data. Written Exercises

Bayesian inference for stochastic differential mixed effects models - initial steps

1 Generalization bounds based on Rademacher complexity

Physics 2107 Oscillations using Springs Experiment 2

Feedforward Networks. Gradient Descent Learning and Backpropagation. Christian Jacob. CPSC 533 Winter 2004

m potential kinetic forms of energy.

On Lotka-Volterra Evolution Law

THERMAL ENDURANCE OF UNREINFORCED UNSATURATED POLYESTERS AND VINYL ESTER RESINS = (1) ln = COMPOSITES & POLYCON 2009

Physics 2210 Fall smartphysics 20 Conservation of Angular Momentum 21 Simple Harmonic Motion 11/23/2015

Feature Extraction Techniques

We last left off by talking about how the area under a force vs. time curve is impulse.

PY241 Solutions Set 9 (Dated: November 7, 2002)

Transcription:

s Vector Moving s and Coputer Science Departent The University of Texas at Austin October 28, 2014

s Vector Moving s Siple classical dynaics - point asses oved by forces Point asses can odel particles They can be grouped to odel acroscopic objects Forces can ove particles Forces can constrain point asses to be part of larger objects Used in particle systes, cloth, rigid bodies, etc.

s At tie t, a particle has s Vector Moving s A position A velocity x(t) = v(t) = ẋ(t) = An acceleration [ ] x(t) y(t) a(t) = ẍ(t) = d v(t) dt [ dx(t) ] dt dy(t) dt = d2 x(t) dt 2 = d 2 x(t) dt 2 d 2 y(t) dt 2 y x And a ass

Vector s Vector Moving s Ignore acceleration and ass for now and let the velocity be dictated by a function g of position and tie, so ẋ(t) = g( x(t), t). At any tie t, the function g defines a vector field over x. This vector field specifies the velocity of a particle located at position x(t) at tie t. y x

s Vector Moving s The equation ẋ(t) = g( x(t), t) is a first-order ordinary differential equation (ODE). We need to use it to copute the path that a particle takes through the vector field if it starts at a given initial position. This path is called an integral curve. The proble is called an initial value proble, a special case of a boundary value proble. y x

Moving s s Vector Moving s Given ẋ(t) = g( x(t), t), we want to solve for x(t), the particle s trajectory. We can do this nuerically. Euler s Method Choose a discrete tiestep t. Iterate, taking linear steps in the direction of the velocity at the beginning of each step. x(t + t) = x(t) + ẋ(t) t = x(t) + g( x(t), t) t In sipler tiestep iteration notation x i+1 = x i + v i t This is the siplest (but not the best) way to nuerically integrate a first-order ODE.

s Vector Moving s Proble: discrete steps in instantaneously valid directions Bigger steps, bigger errors Tiestep error O( t 2 ), global error O( t) Need to take pretty sall steps, so aybe not efficient Step size needed depends on rate of velocity change ethods allow bigger tiesteps, we ll see soe later y x

s Vector Moving s For particle dynaics, we won t have a g( x(t), t) to specify velocities directly, rather we ll copute velocities fro the forces acting on particles Since particles obey Newton s Law: f = a = ẍ And since in general force (and thus acceleration) can depend on the position and velocity of a particle We have a(t) = ẍ(t) = f( x(t), ẋ(t), t)

s Vector Moving s Equations with a second derivative in the (like ẍ) are called second-order ODEs. Euler s Method and related techniques handle first-order ODEs. Turning higher-order ODEs into first-order ODEs We have ẍ(t) = f( x(t), ẋ(t), t) If we introduce the velocity variable v(t), we can rewrite this as a pair of coupled first-order ODEs [ ] ẋ(t) = v(t) v(t) = f( x(t), v(t),t) We can treat this as a first-order ODE in phase space [ẋ(t) ] [ ] = v(t) v(t) f( x(t), v(t),t)

s Vector Moving s We can concatenate vectors to for vectors in higher-diensional space, called phase space. If x and v are each 3-diensional, we get a 6-diensional phase space. [ ] x(t) v(t)

s Vector Moving s We can concatenate vectors to for vectors in higher-diensional space, called phase space. If x and v are each 3-diensional, we get a 6-diensional phase space. We can take tie derivatives in phase space. [ ] x(t) v(t) [ẋ(t) ] v(t)

s Vector Moving s We can concatenate vectors to for vectors in higher-diensional space, called phase space. If x and v are each 3-diensional, we get a 6-diensional phase space. We can take tie derivatives in phase space. We can have vector fields in phase space, like our force field. (Yes, I know it sounds like Star Trek.) [ ] x(t) v(t) [ẋ(t) ] v(t) f( x(t), v(t), t)

s Vector Moving s We can concatenate vectors to for vectors in higher-diensional space, called phase space. If x and v are each 3-diensional, we get a 6-diensional phase space. We can take tie derivatives in phase space. We can have vector fields in phase space, like our force field. (Yes, I know it sounds like Star Trek.) We can have ODEs in phase space too. [ ] x(t) v(t) [ẋ(t) ] v(t) f( x(t), v(t), t) [ẋ(t) ] [ = v(t) v(t) f( x(t), v(t),t) ]

s Vector Moving s [ẋ(t) ] [ We can solve = v(t) v(t) f( x(t), v(t),t) Euler s Method in ] using Euler s Method. Choose a discrete tiestep t and iterate, as before. With tiestep indices x(t + t) = x(t) + v(t) t v(t + t) = v(t) + f( x(t), v(t), t) x i+1 = x i + v i t v i+1 = v i + f i( x i, v i) t t This is just what we did before except we re updating v iteratively along with x.

s Vector Moving s Euler s Method is first-order, so The error per tiestep (local error) is proportional to t 2. The cuulative (global) error is proportional to t. This isn t very good, sall tiesteps are often needed to keep the coputation fro diverging. This is a particular proble for stiff systes. For our purposes, these are roughly systes with really stiff springs in the, or soething exerting very strong forces that can change rapidly. That s not a definition, which is uch harder. A related proble is that Euler s Method is not syplectic. It does not conserve energy (or coe close to doing so) as the siulation proceeds.

s Vector Moving s We said Euler s Method is local order O( t 2 ) and global order O( t). What do we ean? We siulate fro t 0 to T by taking n tiesteps of size t. The total error at tie T, e( t, T ) = x(t ) x n, the difference between the correct position at T and the siulated position after the nth tiestep. e( t, T ) is a function of both the tiestep size t and the total siulation tie T. The order of an integration ethod describes how e( t, T ) changes as a function of t, holding T constant.

s Vector Moving s Local order O( t 2 ) eans changing t changes the worst-case truncation error proportionally to t 2. Global order O( t) eans a change in t changes the worst case cuulative truncation error of the entire siulation proportionally to t. This doesn t tell you uch about how the siulation error grows as the overall siulation tie T grows. This depends on any factors, what ODEs you re integrating, the initial conditions, etc. A ethod with a higher global order is better than a lower-order ethod because it gets worse ore slowly as you increase the tiestep size, not because you have any idea how far off the right answer it will get in the actual siulation.

s Vector Moving s Assue that f is only a function of position and not of velocity, i.e. it is f( x(t), t). We don t odel wind resistance, for exaple, but we can still handle a lot of interesting forces. Now we can easily fix Euler s Method to ake it syplectic. Sei-iplicit Euler Integration We can use v i+1 instead of v i to copute x i+1 v i+1 = v i + f i( x i) t x i+1 = x i + v i+1 t Alternatively, we can use x i+1 instead of x i to copute v i+1 x i+1 = x i + v i t v i+1 = v i + f i( x i+1) t

s Vector Moving s Euler s Method can be obtained fro the Taylor series for x(t + t) and v(t + t). x(t + t) = x(t) + ẋ(t) t + O( t 2 ) v(t + t) = v(t) + v(t) t + O( t 2 ) We just throw away the quadratic and higher order ters, which is why the local error is proportional to t 2. We can use siilar derivations to get better ethods. For instance, the techniques we ve seen so far aren t tie-reversible, which proper physics should be. Let s try for that property.

s Vector Moving s We can do Taylor series in both tie directions x(t + t) = x(t) + ẋ(t) t + 1/2ẍ(t) t 2 + 1/6... x(t) t 3 + O( t 4 ) x(t t) = x(t) ẋ(t) t + 1/2ẍ(t) t 2 1/6... x(t) t 3 + O( t 4 ) Integration Add the and apply soe algebra to get x(t + t) = 2 x(t) x(t t) + ẍ(t) t 2 + O( t 4 ) Throw away the O( t 4 ) local error ter, write as an iteration, put in the forcing function for the acceleration, and we have x i+1 = 2 x i x i 1 + f i( x i) t2 We re given initial x 0 and v 0, but we also need x 1, so x 1 = x 0 + v 0 t + 1 2 fi( x 0) t2

s Vector Moving s advantages It is tie-reversible, syplectic, local O(t 4 ) and global O(t 2 ), or second-order. Easy to use for constraints between particles (e.g. infinitely stiff springs), especially for rigid bodies, cloth, etc. See Jakobsen s faous GaaSutra article http://www.gaasutra.co/resource guide/20030121/jacobson pfv.ht disadvantages Multistep ethod, needs adjustent for non-constant t. x i+1 = x i + ( x i x i 1 ) t i + f i ( x i ) t i 1 t i + t i 1 t i 2 Doesn t calculate velocities.

s Vector Moving s If we need velocities, we can just calculate the fro the point positions. v i = xi+1 xi 1 + O( t 2 xi+1 xi ) or v i+1 = + O( t) t i + t i 1 t i More coonly, they are incorporated into the iteration as the Method Expand x(t + t) = x(t) + v(t) t + 1 2 a t2 + O( t 3 ) Expand forward v(t + t) = v(t) + a(t) t + O( t 2 ) and reverse v(t) = v(t + t) a(t + t) t + O( t 2 ) Add the latter two to get v(t + t) = v(t) + 1 ( a(t) + a(t + t)) t 2 So we have x i+1 = x i + v i t + 1 2 fi( x i) t2 v i+1 = v i + f i( x i) + f i+1( x i+1) t 2