Matthew S. Norton PHY 112 Lab Report CL-4 Damped Oscillator: Feynman-Newton Method for Solving First-Order Differential Equations March 2, 2006

Similar documents
Physics lab Hooke s Law and Pendulums

PHYSICS 211 LAB #8: Periodic Motion

The dimensions of an object tend to change when forces are

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

C. points X and Y only. D. points O, X and Y only. (Total 1 mark)

Physics 1021 Experiment 1. Introduction to Simple Harmonic Motion

Lab 10: Harmonic Motion and the Pendulum

Physical Properties of the Spring

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

Physics 41 HW Set 1 Chapter 15 Serway 8 th ( 7 th )

PreLab 2 - Simple Harmonic Motion: Pendulum (adapted from PASCO- PS-2826 Manual)

Unit 7: Oscillations

Introduction to Simple Harmonic Motion

Simple Pendulum. L Length of pendulum; this is from the bottom of the pendulum support to center of mass of the bob.

Rutgers University Department of Physics & Astronomy. 01:750:271 Honors Physics I Fall Lecture 20 JJ II. Home Page. Title Page.

Simple Harmonic Motion Investigating a Mass Oscillating on a Spring

17 M00/430/H(2) B3. This question is about an oscillating magnet.

Second-Order Linear Differential Equations C 2

Chapter One Introduction to Oscillations

Experiment 5. Simple Harmonic Motion

These will be no tutorials for Math on Tuesday April 26.

The Spring-Mass Oscillator

Lab 11 - Free, Damped, and Forced Oscillations

General Physics I Spring Oscillations

The object of this experiment is to study systems undergoing simple harmonic motion.

These will be no tutorials for Math on Tuesday April 26.

PHYSICS 289 Experiment 1 Fall 2006 SIMPLE HARMONIC MOTION I

Periodic Motion. Periodic motion is motion of an object that. regularly repeats

Oscillations - AP Physics B 1984

Lab 14. Simple Harmonic Motion and Springs: What Is the Mathematical Model of the Simple Harmonic Motion of a Mass Hanging From a Spring?

Physics General Physics. Lecture 24 Oscillating Systems. Fall 2016 Semester Prof. Matthew Jones

Chapter 13. Simple Harmonic Motion

BSc/MSci MidTerm Test

2.004 Dynamics and Control II Spring 2008

Structural Dynamics. Spring mass system. The spring force is given by and F(t) is the driving force. Start by applying Newton s second law (F=ma).

Waves & Oscillations

Experiment 9: Simple Harmonic M otion

Math 308 Exam I Practice Problems

Harmonic Motion. Mass on a Spring. Physics 231: General Physics I Lab 6 Mar. 11, Goals:

Assignment #1 Chemistry 314 Summer 2008

Name: Lab Partner: Section: Simple harmonic motion will be examined in this experiment.

LAB 10 - HARMONIC MOTION AND THE PENDULUM

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

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

Applications of Second-Order Differential Equations

Simple Harmonic Motion Practice Problems PSI AP Physics B

Chapter 15. Oscillatory Motion

Energy in a Simple Harmonic Oscillator. Class 30. Simple Harmonic Motion

Physics 4A Lab: Simple Harmonic Motion

Chapter 5 Oscillatory Motion

Physics I Exam 1 Spring 2015 (version A)

Theoretical physics. Deterministic chaos in classical physics. Martin Scholtz

Simple Harmonic Motion

Driven Harmonic Oscillator

PHYSICS LAB Experiment 9 Fall 2004 THE TORSION PENDULUM

Chapter 1. Harmonic Oscillator. 1.1 Energy Analysis

Experiment 4 Oscillations

Double Spring Harmonic Oscillator Lab

PHY 123 Lab 9 Simple Harmonic Motion

Section 3.7: Mechanical and Electrical Vibrations

Harmonic Oscillator. Outline. Oscillatory Motion or Simple Harmonic Motion. Oscillatory Motion or Simple Harmonic Motion

Section Mass Spring Systems

Simple Harmonic Motion ===============================================

AHL 9.1 Energy transformation

Lab/Demo 5 Periodic Motion and Momentum PHYS 1800

Modelling Elastic Cord as an Ideal Spring: The Relationship Between Spring Constant k and Equilibrium Length l Kalady Osowski

Introduction. Pre-Lab Questions: Physics 1CL PERIODIC MOTION - PART II Fall 2009

Lab 10 - Harmonic Motion and the Pendulum

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

Lab 8: Centripetal Acceleration

LAB 11: FREE, DAMPED, AND FORCED OSCILLATIONS

LAB 10: HARMONIC MOTION AND THE PENDULUM

EXPERIMENT 4 ONE DIMENSIONAL MOTION

Fundamentals Physics. Chapter 15 Oscillations

Thursday, August 4, 2011

Numerical Methods for Initial Value Problems; Harmonic Oscillators

PHYS 1401General Physics I Hooke s Law, Simple Harmonic Motion

4 A mass-spring oscillating system undergoes SHM with a period T. What is the period of the system if the amplitude is doubled?

Final Exam Sample Problems, Math 246, Spring 2018

a. Follow the Start-Up Procedure in the laboratory manual. Note the safety rules.

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

CHAPTER 12 OSCILLATORY MOTION

Harmonic Motion: Exercises

Chapter 14 Oscillations

Measuring Newton's Constant of Universal Gravitation using a Gravitational Torsion Balance

Civil Engineering Computation. Initial Meeting and Class Setup EXCEL Review Problems

Linear Second-Order Differential Equations LINEAR SECOND-ORDER DIFFERENTIAL EQUATIONS

m k F = "kx T = 2# L T = 2# Notes on Ch. 11 Equations: F = "kx The force (F, measured in Newtons) produced by a spring is equal to the L g T = 2#

Hooke s Law. Equipment. Introduction and Theory

Simple Harmonic Motion and Damping

2: SIMPLE HARMONIC MOTION

PHY 123 Lab 10-Simple Harmonic Motion

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

Numerov s Method for Approximating Solutions to Poisson s Equation

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

Numerical Methods for Initial Value Problems; Harmonic Oscillators

2.2 The derivative as a Function

LAB #8: SIMPLE HARMONIC MOTION

Chapter 14. PowerPoint Lectures for University Physics, Thirteenth Edition Hugh D. Young and Roger A. Freedman. Lectures by Wayne Anderson

Oscillations. PHYS 101 Previous Exam Problems CHAPTER. Simple harmonic motion Mass-spring system Energy in SHM Pendulums

Transcription:

Matthew S. Norton PHY 112 Lab Report CL-4 Damped Oscillator: Feynman-Newton Method for Solving First-Order Differential Equations March 2, 2006 Norton 0

Norton 1 Abstract In this lab, I used the Feynman-Newton method for solving first-order differential equations to simulate the motion of a damped oscillator. I did this lab to increase my knowledge of FORTRAN programming, to gain a better understanding of the motion of a damped oscillator, and to study another method for solving first-order differential equations, the Feynman-Newton method. I studied the results from the Feynman-Newton methods for a Δt = 0.25s and Δt = 1.0s and then integrate from t = 0 to t = 25 with an initial displacement of 1m and an initial velocity of 0 m/s. Introduction This lab was designed to relate to the class discussion of harmonic motion, especially in regard to the motion of a damped oscillator. The oscillator modeled in this experiment was a spring with a mass attached to one end. This is demonstrated in figure 1. Equilibrium Wall m F r F f Table Fig. 1. An example setup for a spring as a damped oscillator In this lab, we started with the equation for the drag force, F damp, which is directed in the opposite direction of the direction of motion. F damp = c v, (1) where c is the damping coefficient and v is the velocity of the oscillating mass. Since F damp is a force, it can be written in the form of Newton s second law with a mass, m, acted upon by a linear restoring force with a spring constant, k, which is. F( t) = m a( t) = m d 2 x dt = k x ( t ) c v( t), 2 (2) and is a second-order differential equation. Equation 2 can be rewritten as two first-order differential equation, ( ) dv dt = F t m, (3)

Norton 2 and dx dt = v t ( ). (4) One could try and use the Euler method to solve these first-order differential equations, but the results are erroneous at best. Therefore, a better way of solving first-order differential equations was needed, the Feynman-Newton method, or half step method. Using the Feynman-Newton method, the solution to a first-order differential equation, df ( t) (5) = q( t), dt is obtained by using the value of the function q(t) halfway between t and t + Δt. This is shown in the following equation,, 2 f ( t + Δt) f ( t) + Δt q t + Δt (6) which is the algorithm for the Feynman-Newton method. IMPLICIT NONE! Declare variables 1 INTEGER :: I, Icnt 2 Double Precision X, V, A, dt, Xold, Vold, Xint, Vint, C1, C2, Time, TimeX, TimeV, K, C, M 3 OPEN (30, FILE = "F-N.txt")! Open the output file for Feynman-Newton method 4 OPEN (40, FILE = "Euler.txt")! Open the output file for Euler method 5 Dt =.25 6 Time = 0 7 WRITE (30, '(A5, T15, A1, T30, A5, T45, A1, T60, A1, T75)') "TimeX", "X", "TimeV", "V", "A" 8 WRITE (40, '(A5, T15, A1, T30, A5, T45, A1, T60, A1, T75)') "TimeX", "X", "TimeV", "V", "A" 9 PRINT *, "Please input the mass, m" 10 READ *, M 11 PRINT *, "Please input the spring constant, k" 12 READ *, K 13 PRINT *, "Please input the damping coefficient, c" 14 READ *, C 15 PRINT *, "Please input the initial position" 16 READ *, Xint 17 PRINT *, "Please input the initial velocity" 18 READ *, Vint

Norton 3 19 C1 = K / M 20 C2 = C / M 21 A = -(C1 * Xint + C2 * Vint) 22 Xold = Xint 23 Vold = Vint + Dt * A / 2. 24 DO I = 1, 100 25 X = Xold + dt * Vold 26 A = -(C1 * X + C2 * Vold) 27 V = Vold + Dt * A 28 TimeX = TimeX + Dt 29 Timev = TimeX + Dt / 2. 30 WRITE (30, 1000) TimeX, X, TimeV, V, A 31 Xold = X 32 Vold = V 33 END DO! Reset variables 34 A = -(C1 * Xint + C2 * Vint) 35 Xold = Xint 36 Vold = Vint 37 Icnt = 0 38 X = 0 39 V = 0 40 A = 0 41 TimeX = 0 42 TimeV = 0 43 DO I = 1, 100 44 X = Xold + dt * Vold 45 V = Vold + Dt * A 46 A = -(C1 * X + C2 * V) 47 TimeX = TimeX + Dt 48 Timev = TimeX + Dt / 2. 49 WRITE (40, 1000) TimeX, X, TimeV, V, A 50 Xold = X 51 Vold = V 52 END DO 53 1000 FORMAT (5(E12.5, 3X)) 54 CLOSE (30)! Close the output file 55 CLOSE (40)! Close the output file 56 PRINT *, "Output files, F-N.txt and Euler.txt have been closed, program is complete!" 57 PRINT *, "Have a great day!" 58 END PROGRAM Fig. 2. Source code for a FORTRAN program for the motion of a damped oscillator

Norton 4 Figure 2 shows the source code for the program that I used to solve the first-order differential equations. In lines 1 and 2 of the program, I declare my variables. Then in lines 3 and 4 I open the output files. In lines 5 and 6, I initialize the change in time and the time. In lines 8 and 9, I write to the first line of the output files the column labels to be read into KaleidaGraph. Then in lines 9 through 18, I prompt the user for the mass on the end of the spring, the spring constant, the damping coefficient, the initial position, and the initial velocity. In lines 19 through 23, I initialize the initial conditions for the spring. In lines 24 through 33, I perform a DO loop that calculates the first-order differential equations using the Feynman-Newton method. In lines 34 through 42, I reinitialize the conditions to their initial state. Then in lines 43 through 52, I perform a DO loop that calculates the first-order differential equations using the Euler method. In line 53, I have the format statement for writing the data calculated the DO loops to their respective files. In lines 54 and 55, I close the output files. Then in lines 56 through 58, I tank the user for using the program and I end the program. Results and Discussion Figure 3 shows the position versus time for the Euler method for a Δt of 0.25s and 1.0s. For this figure, both values for Δt appear to produce similar results until time reaches about 13 seconds. Then the values for Δt = 1.0s just appears to blow up and seemingly gain energy, which defies the second law of thermodynamics. While the graph of Δt = 0.25s also seems to gain energy, it not as drastic at the graph of Δt = 1.0s. The graph of Δt = 0.25s appears to be more accurate that the graph of Δt = 1.0s. The graph of Δt = 0.25s is more accurate because it provides more data points and the time interval between the data points is lessened. Figure 4 shows the position versus time for Δt = 0.25s and Δt = 1.0s, this is the same graph as in figure 3, but it is zoomed in to show the movement of the Δt = 0.25s curve. This graph shows how the Euler method, even for a relatively small time step, produces results that cannot be trusted. While, it is better than the results for Δt = 1.0s, Δt = 0.25s does not produce good results.

Fig. 3. Position vs. Time for a Δt of 0.25s and a Δt 1.0s for the Euler method Norton 5

Norton 6 Fig. 4. Position vs. time for Δt = 0.25s and 1.0s for Euler Method, zoomed in to show Δt = 0.25s At this point in the experiment, I switched from the Euler method to the Feynman-Newton method for solving first-order differential equations. Figure 5 depicts the position versus time for Δt = 0.25s and 1.0s for the Feynman-Newton method. The different values for Δt produce similar results until time reached about 13 seconds. At that point, the graph of Δt = 1.0s gets out phase with the graph of Δt = 0.25s. The graph of Δt = 0.25s appears to be more accurate than the graph of Δt = 1.0s. This is because the graph of Δt = 0.25s contains more data points than the graph of Δt = 1.0s and the graph of Δt = 0.25s appears to be smoother than the graph of Δt = 1.0s. Because there was only 25 data points for the graph of Δt = 1.0s, it appears to be more jagged and rough. Therefore, the graph of Δt = 0.25s should be more accurate than the graph of Δt = 1.0s. Figure 6 shows the plot of velocity versus acceleration.

Fig. 5. Position vs. time for Δt = 0.25s and 1.0s for Feynman-Newton method Norton 7

Norton 8