MA/CS 375 Fall 20021 MA/CS 375 Fall 2002 Lecture 13.

Slides:



Advertisements
Similar presentations
Lecture on Numerical Analysis Dr.-Ing. Michael Dumbser
Advertisements

Chapter 2: Describing Motion in 1-D
Kinetics of Particles Impulse and Momentum.
Gravitation Ch 5: Thornton & Marion. Introduction Newton, 1666 Published in Principia, 1687 (needed to develop calculus to prove his assumptions) Newton’s.
CS 282.  Any question about… ◦ SVN  Permissions?  General Usage? ◦ Doxygen  Remember that Project 1 will require it  However, Assignment 2 is good.
Free fall with air resistance Forces which resist motion play an important part in everyday life: –Brakes in cars; friction in many forms, damped vibrations.
Linear Motion Chapters 2 and 3.
Conceptual Physics – Chapter 12. Galileo  Inertia (Newton made it a law later)  Mass does not effect acceleration of gravity  Sun and not.
Circular Motion. Circular motion: when an object moves in a two- dimensional circular path Spin: object rotates about an axis that pass through the object.
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 2 : Dynamics & Numerical Methods Goal : To write a simple physics simulation Topics: Intro.
Taking cube roots on a simple “scientific” calculator y x or using shift x  y 27 y x = or 27 shift x  y 3 = 3.
Coulomb’s Law Physics 102 Professor Lee Carkner Lecture 10.
1 MA375 Introduction To Numerical Computing Fall 2003 Prof. Tim Warburton
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 32.
Motion Along a Straight Line
Numerical Solution of Ordinary Differential Equation
A family decides to create a tire swing in their backyard for their son Ryan. They tie a nylon rope to a branch that is located 16 m above the earth, and.
Chapter 4 : Laws of Motion Weerachai Siripunvaraporn Department of Physics, Faculty of Science Mahidol University &FB :
Solving Non-Linear Equations (Root Finding)
Universal Gravitation
Tuesday, June 30, 2015PHYS , Summer 2014 Dr. Jaehoon Yu 1 PHYS 1441 – Section 001 Lecture #11 Tuesday, June 30, 2015 Dr. Jaehoon Yu Newton’s Law.
Typical interaction between the press and a scientist?!
AGENDA 31-OCT Binder check today! Binder check today! Notes - Projectile Motion Notes - Projectile Motion CW - Plotting Projectile Motion Activity &
Forces and Motion Chapters
Ch 2. Motion in a Straight Line Definitions 1. Kinematics - Motion Kinetic Energy - Energy associated with motion 2. Motion in physics is broken down.
Kinetic Energy, Work, Power, and Potential Energy
Kinetic Energy, Work, Power, and Potential Energy
Chapter 9 Numerical Integration Flow Charts, Loop Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Mathematics of Star Trek Lecture 4: Motion in Space and Kepler’s Laws.
1 Tips for solving Project 1 Reactor SO 3 SO 2 +O 2.
Newton’s 1 st Law of Mechanics A particle will continue is a straight line at constant speed unless acted upon by a net push or pull (i.e. force). The.
Review Taylor Series and Error Analysis Roots of Equations
Extensible Simulation of Planets and Comets A Thesis Presentation By: Natalie Wiser-Orozco November 14, 2008 Committee Members: Dr. Keith Schubert Dr.
My Chapter 16 Lecture Outline.
Loop Application: Numerical Methods, Part 1 The power of Matlab Mathematics + Coding.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
Apples and Planets PTYS Feb List of Symbols F, force a, acceleration (not semi-major axis in this lecture) v, velocity M, mass of Sun m,
Gravitation. Gravitational Force and Field Newton proposed that a force of attraction exists between any two masses. This force law applies to point masses.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 12.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
MA/CS 375 Fall 2002 Lecture Summary Week 1  Week 7.
CHAPTER 5. Uniform circular motion is the motion of an object traveling at a constant speed on a circular path. If T (period) is the time it takes for.
Chap. 3: Kinematics in Two or Three Dimensions: Vectors
Chapter 13 Gravitation Newton’s Law of Gravitation Here m 1 and m 2 are the masses of the particles, r is the distance between them, and G is the.
Motion in One Dimension Chapter 2. Mechanics Mechanics is the study of motion. Kinematics is the science of describing the motion of objects with words,
LAW OF UNIVERSAL GRAVITATION F G gravitational force (in two directions) G universal gravitation constant 6.67x Nm 2 kg -2 r distance between the.
Daily Science Pg.30 Write a formula for finding eccentricity. Assign each measurement a variable letter. If two focus points are 450 km away from one another.
Development of Regular & Singular Perturbation Methods Anshu Narang-Siddarth.
Monday, Oct. 8, 2007 PHYS , Fall 2007 Dr. Jaehoon Yu 1 PHYS 1443 – Section 002 Lecture #10 Monday, Oct. 8, 2007 Dr. Jaehoon Yu Uniform and Non-uniform.
1 Two of Newton’s Law of Motions 1) In the absence of any forces applied, an object at rest will stay at rest, and a body moving at a constant velocity.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
USSC2001 Energy Lecture 1 Potential and Kinetic Energy Wayne M. Lawton Department of Mathematics National University of Singapore 2 Science Drive 2 Singapore.
Section 2Forces Section 2: Gravity Preview Key Ideas Bellringer Weight and Mass Law of Universal Gravitation Free Fall Projectile Motion.
Energy, Kinetic Energy, Work, Dot Product, and Power 8.01 W08D1 Fall 2006.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 32.
Physics In Motion 1-D Kinematics Aristotle’s Notion of Motion  All objects will remain at rest unless an external force is acted upon them. If an.
PHY 151: Lecture 6A 6.1 Newton’s Law of Universal Gravity 6.2 Gravitational Formula 6.3 Extending Particle in Uniform Circular Motion Model.
Chapter 2: Describing Motion in 1-D. Frame of Reference Whether or not you are moving depends on your point-of-view. From inside the box car, the woman.
Circular Motion and Gravitation: Velocity = distance/time, so therefore - v = 2  r / T Topic 6: Circular motion and gravitation 6.1 – Circular motion.
Dynamics. The laws and causes of motion were first properly formulated in the book _________ by ____________ ___________ in the year __________. These.
“Motion in a Straight Line” Two types of kinematics' analysis: Scalar: measures magnitude (size) only Examples: mass, distance, speed, Vector: measures.
Grade 9 Review Kinematics (motion) – Velocity and Acceleration Reference Frames and Displacement Average Velocity Instantaneous Velocity Acceleration Motion.
Basic Mechanics. Units Velocity and Acceleration Speed: Time rate of change of position. Velocity: Speed in a specific direction. Velocity is specified.
Shawn Weatherford Saint Leo University
Gravity and Momentum Turk.
Numerical Methods for Partial Differential Equations
Yay for pretests!!! Forces unit pre-test. 24 questions Multiple Choice
UNIT 3 gravitation.
Science Jeopardy! Forces Newton's 1st Law
Presentation transcript:

MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 13

MA/CS 375 Fall Office Hours My office hours –Rm 435, Humanities, Tuesdays from 1:30pm to 3:00pm –Rm 435, Humanities, Thursdays from 1:30pm to 3:00pm Tom Hunt is the TA for this class. His lab hours are now as follow –SCSI 1004, Tuesdays from 3:30 until 4:45 –SCSI 1004, Wednesdays from 12:00 until 12:50 –Hum 346 on Wednesdays from 2:30-3:30

MA/CS 375 Fall Ordinary Differential Equation Example: we should know from intro calculus that: then obviously: Review

MA/CS 375 Fall Forward Euler Numerical Scheme Numerical scheme: Discrete scheme: where: Review

MA/CS 375 Fall Direct Proof of Convergence Fix T and let delta t drop to zero In this case n needs to increase to infinity Review

MA/CS 375 Fall Stable Approximations 0<dt<1 dt dt=0.5 dt=0.25 dt=0.125 Review

MA/CS 375 Fall Application: Newtonian Motion Review

MA/CS 375 Fall Two Gravitating Particle Masses m1m1 m2m2 Each particle has a scalar mass quantity Review

MA/CS 375 Fall Particle Positions x1x1 x2x2 (0,0) Each particle has a vector position Review

MA/CS 375 Fall Particle Velocities v1v1 v2v2 Each particle has a vector velocity Review

MA/CS 375 Fall Particle Accelerations a1a1 a2a2 Each particle has a vector acceleration Review

MA/CS 375 Fall N-Body Newtonian Gravitation For particle n out of N The force on each particle is a sum of the gravitational force between each other particle Review

MA/CS 375 Fall N-Body Newtonian Gravitation Simulation Goal: to find out where all the objects are after a time T We need to specify the initial velocity and positions of the objects. Next we need a numerical scheme to advance the equations in time. Can use forward Euler…. as a first approach. Review

MA/CS 375 Fall Numerical Scheme For m=1 to FinalTime/dt For n=1 to number of objects End For n=1 to number of objects End Review

MA/CS 375 Fall planets1.m Matlab script I have written a planets1.m script. The quantities in the file are in units of –kg (kilograms -- mass) –m (meters – length) –s (seconds – time) It evolves the planet positions in time according to Newton’s law of gravitation. It uses Euler-Forward to discretize the motion. All planets are lined up at y=0 at t=0 All planets are set to travel in the y-direction at t=0 Review

MA/CS 375 Fall Mercury Venus Earth Mercury has nearly completed its orbit. Data shows 88 days. Run for 3 more days and the simulation agrees!!!. Sun Review

MA/CS 375 Fall Team Exercise Get the planets1.m file from the web site This scripts includes: –the mass of all planets and the sun –their mean distance from the sun –the mean velocity of the planets. Run the script, see how the planets run! Add a comet to the system (increase Nsphere etc.) Start the comet out near Jupiter with an initial velocity heading in system. Add a moon near the earth. Extra credit if you can make the comet loop the sun and hit a planet Today

MA/CS 375 Fall This Lecture More accurate schemes More complicated ODEs Variable time step and embedded methods used to make sure errors are within a tolerance.

MA/CS 375 Fall Adams-Bashforth Schemes In the forward Euler scheme we only used the value of the right hand side at the previous time step. i.e. we only used a linear approximation to the time derivative

MA/CS 375 Fall AB Schemes Idea: we set where If interpolates f n,f n-1,f n-2,..,f n+1-Nstages i.e.:

MA/CS 375 Fall f0f0 f1f1 f2f2 f3f3 We interpolate the function through the first 4 points. Then we integrate under the curve between t=3 and t=4.

AB Schemes Essentially we use interpolation and a Newton-Cotes quadrature formula to formulate:

MA/CS 375 Fall Runge-Kutta Schemes See van Loan for derivation of RK2 and RK4. I prefer the following (simple) scheme due to Jameson, Schmidt and Turkel (1981):

MA/CS 375 Fall Runge-Kutta Schemes Beware, it only works when f is a function of y and not t here s is the order of the scheme.

MA/CS 375 Fall Error Estimate Matlab has a number of time integrators built in. ode23 ode45 and others..

MA/CS 375 Fall ode23 For n=1:#timesteps –ode23 uses two estimates for y n+1. –A 2 nd order RK scheme and a 3 rd order RK scheme are used to build two guesses for y n+1. –If the difference between these two estimates are within a tolerance ode23 progresses on to calculating y n+2 –If the difference is greater than the specified tolerance, ode23 reduces the dt and tries again. It repeats until the difference is lower than the tolerance. End

MA/CS 375 Fall Planets Example Using ode23 Idea: replace our home grown Euler Forward scheme with Matlab’s ode23 scheme in the planets1.m script.

MA/CS 375 Fall Parameters for the planets as before

MA/CS 375 Fall Initial velocities Gather X,Y,VX,VY into one vector

MA/CS 375 Fall [T,CoordVel] = ode23(‘forcing’, TimeLimits, CoordVel(:)); Call to Matlab ode23 function function which calculates f(y) [0 FinalTime] Vector holds X,Y,VX,VY Works in Matlab v6.1.0 … at least

MA/CS 375 Fall Call to ode23 Find out the time at each time step Extract final coordinates and velocities Plot planet orbits

MA/CS 375 Fall The routine which calculates the forcing function.

MA/CS 375 Fall Team Exercise Grab planets2.m and forcing.m from the Run the script Use the Tsteps vector to find out the time step for each integration stage. Plot a graph showing the time step (dt) at each time step. Use help to find out how to change the tolerance used by ode23 (hint you will need to use odeset) Rerun the simulation with a tolerance of 0.1

MA/CS 375 Fall Application: One-Dimensional Electrostatic Motion

MA/CS 375 Fall Charge Repulsion Now we will consider the case of charged particles with the same sign charge Instead of attracting each other, the charges repel each other.

MA/CS 375 Fall Particle Accelerations a1a1 a2a2 Each particle has a vector acceleration directly away from the other particle

MA/CS 375 Fall Team Project Q1) Modify the planets2.m and forcing.m to simulate the following: –There are N electrically charged particles confined to move in the x-direction only –Distribute the charges initially at equispaced points in [-1,1] –The equations of motion of the charges are:

MA/CS 375 Fall Team Project Report Required on 9/25/02 Q1cont) Include the following in one project write up per team: –A scatter plot, with x as the horizontal axis and t as the vertical axis, showing the paths of all the charged particles using ode23 –A graph showing the size of each time step used by ode23 –Replace ode23 with ode45 and rerun –Plot the ode23 and ode45 (t,x) paths on the same graph. –Plot the ode23 and ode45 time step sizes on the same graph –Names of team members