Computational Physics (6810): Session 8

Similar documents
Computational Physics (6810): Session 9

Solutions 2: Simple Harmonic Oscillator and General Oscillations

Physics 351 Monday, January 22, 2018

Oscillatory Motion. Simple pendulum: linear Hooke s Law restoring force for small angular deviations. small angle approximation. Oscillatory solution

Oscillatory Motion. Simple pendulum: linear Hooke s Law restoring force for small angular deviations. Oscillatory solution

TP 3:Runge-Kutta Methods-Solar System-The Method of Least Squares

Physics 115/242 Comparison of methods for integrating the simple harmonic oscillator.

The Nonlinear Pendulum

I. THE PENDULUM. y 1 (t) = θ(t) (2) y 2 (t) = dθ(t) dt

CDS 101 Precourse Phase Plane Analysis and Stability

4. Complex Oscillations

28. Pendulum phase portrait Draw the phase portrait for the pendulum (supported by an inextensible rod)

Chaotic motion. Phys 420/580 Lecture 10

Physics 105, Spring 2015, Reinsch. Homework Assignment 1 (This is a five page document. More hints added Feb. 2, 9pm. Problem statements unchanged.

Chapter 14 Oscillations

Linear and Nonlinear Oscillators (Lecture 2)

221B Lecture Notes on Resonances in Classical Mechanics

Theoretical physics. Deterministic chaos in classical physics. Martin Scholtz

Physics 235 Chapter 4. Chapter 4 Non-Linear Oscillations and Chaos

Chapter 2: Complex numbers

Problem 1: Lagrangians and Conserved Quantities. Consider the following action for a particle of mass m moving in one dimension

Linear second-order differential equations with constant coefficients and nonzero right-hand side

Physics 351, Spring 2017, Homework #3. Due at start of class, Friday, February 3, 2017

1 Pushing your Friend on a Swing

Mechanical Resonance and Chaos

Computers, Lies and the Fishing Season

Lecture V : Oscillatory motion and spectral analysis

PHYSICS. Chapter 15 Lecture FOR SCIENTISTS AND ENGINEERS A STRATEGIC APPROACH 4/E RANDALL D. KNIGHT Pearson Education, Inc.

Oscillations. Simple Harmonic Motion of a Mass on a Spring The equation of motion for a mass m is attached to a spring of constant k is

The Nonlinear Pendulum

Identification Methods for Structural Systems. Prof. Dr. Eleni Chatzi Lecture March, 2016

Physics 132 3/31/17. March 31, 2017 Physics 132 Prof. E. F. Redish Theme Music: Benny Goodman. Swing, Swing, Swing. Cartoon: Bill Watterson

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License.

Midterm EXAM PHYS 401 (Spring 2012), 03/20/12

Vibrational Motion. Chapter 5. P. J. Grandinetti. Sep. 13, Chem P. J. Grandinetti (Chem. 4300) Vibrational Motion Sep.

PH 120 Project # 2: Pendulum and chaos

Chapter 2 PARAMETRIC OSCILLATOR

Fourier transforms. c n e inπx. f (x) = Write same thing in an equivalent form, using n = 1, f (x) = l π

Contents. Contents. Contents

Physics GRE Practice

Nonlinear Oscillators: Free Response

Physics 299: Computational Physics II Project II

Analytical Mechanics - Extra Problems

Math 266: Phase Plane Portrait

8 Example 1: The van der Pol oscillator (Strogatz Chapter 7)

x(t+ δt) - x(t) = slope δt t+δt

Introductory Physics. Week 2015/05/29

Transitioning to Chaos in a Simple Mechanical Oscillator

A plane autonomous system is a pair of simultaneous first-order differential equations,

Lab 11. Spring-Mass Oscillations

Physics with Matlab and Mathematica Exercise #1 28 Aug 2012

Chapter 13 Lecture. Essential University Physics Richard Wolfson 2 nd Edition. Oscillatory Motion Pearson Education, Inc.

Logistic Map, Euler & Runge-Kutta Method and Lotka-Volterra Equations

Maps and differential equations

154 Chapter 9 Hints, Answers, and Solutions The particular trajectories are highlighted in the phase portraits below.

Chapter 1, Section 1.2, Example 9 (page 13) and Exercise 29 (page 15). Use the Uniqueness Tool. Select the option ẋ = x

Modeling and Experimentation: Compound Pendulum

Computer Problems for Methods of Solving Ordinary Differential Equations

I ml. g l. sin. l 0,,2,...,n A. ( t vs. ), and ( vs. ). d dt. sin l

MAS212 Assignment #2: The damped driven pendulum

Assignments VIII and IX, PHYS 301 (Classical Mechanics) Spring 2014 Due 3/21/14 at start of class

Symmetries 2 - Rotations in Space

2 Lyapunov Stability. x(0) x 0 < δ x(t) x 0 < ɛ

Lab 1: Damped, Driven Harmonic Oscillator

MAS212 Assignment #2: The damped driven pendulum

Differential Equations 2280 Sample Midterm Exam 3 with Solutions Exam Date: 24 April 2015 at 12:50pm

Lab 1: damped, driven harmonic oscillator

Ordinary Differential Equations

Physics 326 Lab 6 10/18/04 DAMPED SIMPLE HARMONIC MOTION

Solutions for B8b (Nonlinear Systems) Fake Past Exam (TT 10)

Updated 2013 (Mathematica Version) M1.1. Lab M1: The Simple Pendulum

Solutions to Math 53 Math 53 Practice Final

Simple Harmonic Motion

Time Response of Systems

Analytical Mechanics ( AM )

Math 333 Qualitative Results: Forced Harmonic Oscillators

Driven, damped, pendulum

Faculty of Computers and Information. Basic Science Department

Exploring Nonlinear Oscillator Models for the Auditory Periphery

ECE 422/522 Power System Operations & Planning/Power Systems Analysis II : 7 - Transient Stability

Keble College - Hilary 2014 CP3&4: Mathematical methods I&II Tutorial 5 - Waves and normal modes II

Two dimensional oscillator and central forces

Exercises Lecture 15

Lecture XXVI. Morris Swartz Dept. of Physics and Astronomy Johns Hopkins University November 5, 2003

S12 PHY321: Practice Final

[ ] is a vector of size p.

Chapter 3: Second Order ODE 3.8 Elements of Particle Dy

Wave Phenomena Physics 15c

Math 215/255 Final Exam (Dec 2005)

PHY217: Vibrations and Waves

M A : Ordinary Differential Equations

1 Trajectory Generation

Wave Phenomena Physics 15c

(1) Recap of Differential Calculus and Integral Calculus (2) Preview of Calculus in three dimensional space (3) Tools for Calculus 3

4.2 Homogeneous Linear Equations

PHY6426/Fall 07: CLASSICAL MECHANICS HOMEWORK ASSIGNMENT #1 due by 9:35 a.m. Wed 09/05 Instructor: D. L. Maslov Rm.

11/17/10. Chapter 14. Oscillations. Chapter 14. Oscillations Topics: Simple Harmonic Motion. Simple Harmonic Motion

Physics 351, Spring 2015, Homework #3. Due at start of class, Friday, February 6, 2015

Non-Linear Response of Test Mass to External Forces and Arbitrary Motion of Suspension Point

Physics 8, Fall 2011, equation sheet work in progress

Transcription:

Computational Physics (6810): Session 8 Dick Furnstahl Nuclear Theory Group OSU Physics Department February 24, 2014 Differential equation solving Session 7 Preview Session 8 Stuff

Solving differential equations step-by-step Builds on numerical derivatives dx = f (x, t) e.g., dx = ax or dx = bt or... instruction on how to change x from one t value to a nearby one (i.e., t + t = t + h) Goal: Given x(t = t 0 ), find x(t = t f ) Plan: the diff. eq. tells us how to take one step at a time = find x(t 0 + h), then x(t 0 + 2h), then x(t 0 + 3h) until x(t f ) x(t 0 + h) = x(t 0 ) + h dx + O(h 2 ) from Taylor expansion t=t0 = x(t 0 ) + hf (x(t 0 ), t 0 ) + O(h 2 ) How to do better? Explore errors, other strategies, how to pick h, etc. Some tricky parts: look for implementation errors if you get unexpected results

Differential equations graphs and their interpretation The differential equation does not have y(t = 0) on the right side. The approximate solution crosses the exact sometimes. What happens to the error?

Differential equations graphs and their interpretation 1 Comparing Differential Equation Algorithms 0.01 relative error 0.0001 1e-06 1e-08 1e-10 Euler, h=0.1 Euler, h=0.01 4th order Runge-Kutta, h=0.1 4th order Runge-Kutta, h=0.01 1e-12 1e-14 1e-16 Sun Feb 15 18:24:38 2004 0.1 1 t You should not interpret the slope as the diff. eq. error? Why not? How should you look for the global approximation error here? What is the local vs. global error? What are the dips from?

Session 7 recap: Implementation of coupled equations y[0] is not y at time t = 0: it is the zeroth component of a vector Consider Newton s Second Law: d 2 x F(x, v, t) =, 2 M re-express as vector differential equation: dy ( ) y (0) = f where y = if we make the definitions y (1) ( y and f = (1) (t) 1 M F(y, t) y (0) (t) x(t) and y (1) (t) v = dx In the code, at each t y (0) (t) y[0] and y (1) (t) y[1] Euler increment from t to t + h: y[i] += h * f (t, y, i, params_ptr); = dy (0). )

Session 7: Other things to look for What step size h to use? See the Session 7 notes for a discussion of how to make it adaptive (changes as you go to keep the error fixed). Conserved quantites should be constant with time! Are they? Remember to look at the relative error, not the full value Period vs. amplitude: for a harmonic oscillator they are independent. But not for other potentials! Energy diagrams like those used for central potentials can help you understand the observed relation (see next slide) When doing damping: make sure phase space plots are reproduced (see handout) With increasing time, does the phase space trajectory go clockwise, counter-clockwise, or both?

Session 7: Other things to look for Where is the mass moving fastest and where slowest for each of the potential energies shown? To increase the amplitude, you need to increase the energy. What does this do to the speed? By how much does the amplitude increase in each case? Is the round-trip time (period) greater, smaller, the same?

Session 8 Stuff Diff Eqs Session 7 Session 8 Damped, driven harmonic oscillator ẍ + γẋ + ω0x 2 = f (t) ẋ dx/, ẍ d 2 x/ 2 linear equation = only single powers of ẍ, ẋ, x = important for superposition: x total (t) = x homogeneous (t) + x particular (t) x homogeneous (t) will always be damped = transient! particular solution will have x e iωextt = ( ωext 2 + iω ext γ + ω0) 2 e iωextt = A e iωextt so the driving frequency ω ext is the frequency in the linear domain = green dots are on top of each other What if nonlinear? More interesting possibilities!

Chaos Characteristics of chaos (see Session 8 notes) past behavior not repeated (not periodic) deterministic but not predictable, because uncertainty (or imprecision) in initial conditions grows exponentially in time system has distributed power spectrum (see Mathematica notebooks) Necessary conditions for chaos dθ 3 independent variables and the equations have nonlinear terms coupling Three equations for the pendulum (with φ = ω ext t) = ω dω = αω ω 2 0 sin θ f ext cos φ }{{} nonlinear couplings Session 10: Mathematica notebook pendulum.nb dφ = ω ext gives results for Session 8 Looking for Chaos power spectrum: what frequencies are in the θ(t) plot?