Euler, Euler Predictor Corrector, and Midpoint Methods - Homework 6 | PHYS 5350, Assignments of Physics Fundamentals

Material Type: Assignment; Professor: Scherliess; Class: Methods of Theoretical Physics II; Subject: Physics; University: Utah State University; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 07/30/2009

koofers-user-own-1
koofers-user-own-1 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Homework 6 - Methods in Theoretical Physics (Physics 5350 )
I. DUE DATE: March 25, 10:30 AM (PLEASE SHOW YOUR WORK)
Euler, Euler Predictor-Corrector, and Midpoin t Methods
1) The Stefan-Boltzmann law tells us that the total energy radiated by a black body is related to
the 4th power of the temperature T (in Kelvins). Consider an object at 1200 K is allowed to cool
down in air at an ambient temperature of 300 K. Assuming that heat is lost only due to radiation,
the differential equation for the temperature of the object is given by
!
dT
dt ="2.2067 #10"12 T4"3004
( )
.
a) Write a program that solves the above ODE using the Euler, Euler Predictor-Corrector,
and the Midpoint methods.
The user should be able to choose (by typing from the keyboard) which method to use, the
timestep dt, and the total time of the integration.
b) Using your new program for the Euler, Euler Predictor-Corrector, and the Midpoint
methods calculate the temperature of the black body described above after 480 s.
Compare the results for all three methods using 11 different timestep:
480s, 240s, 120s, 60s, 30s, 10s, 1s, 0.1s, 0.01s, 0.001s, 0.0001s.
c) The above ODE can be solved analytically and the exact solution is given by
!
0.92593ln T"300
T+300 "1.8519tan"10.00333 #T
( )
="0.22067 #10"3t"2.9282
.
The solution of this nonlinear equation at t=480 s is: T(480s) = 647.5729 K.
For the three methods above determine the maximum timestep to match the exact result to
within 0.005%.
Compare your results with those given in class for the 4th order Runge-Kutta method.
pf3
pf4
pf5

Partial preview of the text

Download Euler, Euler Predictor Corrector, and Midpoint Methods - Homework 6 | PHYS 5350 and more Assignments Physics Fundamentals in PDF only on Docsity!

Homework 6 - Methods in Theoretical Physics (Physics 5350) I. Euler, Euler Predictor DUE DATE : March 25, 10:3 - Corrector, and Midpoint Methods 0 AM (PLEASE SHOW YOUR WORK) 1) the 4 down in air at an ambient temperature of 300 K. Assuming that heat is lost only due to radiation, The Stefanth (^) power of the temperature T (in Kelvins). Consider an object at 1200 K is allowed to cool-Boltzmann law tells us that the total energy radiated by a black body is related to the differential equation for the temperature of the object is given by

!

dT dt = "2.2067 # 10 " 12 ( T 4 " 3004 ).

a) Write a program that solves the above ODE using the and the The user should be able to choose (by typing from the keyboard) which method to use, Midpoint methods. Euler, Euler Predictor-Corrector the , timestep dt, and the total time of the integration. b) Using your new program for the Euler, Euler Predictor-Corrector , and the Midpoint methods calculate the temperature of the black body described above after 480 s. Compare the results for all thre 480s, 240s, 120s, 60s, 30s, 10s, 1s, 0.1s, 0.01s,e methods using 11 different timestep: 0.001s, 0.0001s. c) The above ODE can be solved analytically and the exact solution is given by

!

0.92593ln T T^ "+^300300 "1.8519tan"^1 (0.00333 # T ) = "0.22067 # 10 "^3 t " 2..

The solution of this nonlinear For the three methods above determine the maximum timestep to match the exact result to within 0.005%. equation at t=480 s is: T(480s) = 647.5729 K. Compare your results with those given in class for the 4th^ order Runge-Kutta method.

Orbital Motion 2) Use the Euler-Cromer Method to study the orbit of comets. (See attachment).

Hand in your work and email your source code of the programs, functions, and subroutines to [email protected]

Since orbital motion is an ossillatory problem, we can attempt to solve these equations using the Euler-Cromer method. (The method works in fact well for low eccentricity orbits) Before we proceed, it is however useful to consider the choi problem in SI units. However, this is not convenient because of the large numbers involved. A more common choice is to use astronomical units. One astronomical unit of length (1 AU) is thece of units. We could solve this average distance between the Earth complete the system, we also need a measure of mass. Recall that the orbit of the Earth is nearly circular. For this motion we know that the force must be equal to and the Sun. Time is commonly measured in years. In order to

!

M rev^2 = Fg = GM rS 2 Me where v is the velocity of the Earth. With this we find

! where we have used that the velocity of the Earth is 2^ GMs^ =^ v^2 r^ =^4 "^2 AU^^3 π^ /^ r/(1yr) = 2 yr^2 π (since r = 1AU). In the equations of motion above, G and M e With this our ODEs become:xpress them individually. s always appear as a product, so we don’t need to

!

dv dtx = " 4 # r 32 x !

dx dt = vx !

dv dty = " 4 # r 32 y !

dy dt = vy The only thing left to specify, before solving these equations are the con We have seen before that for a circular orbit we haveditions are the position (x, y) and the velocity (vx, vy) at some time t initial conditions. 0. The initial

!

v^2 r = 4 " 2 AU^3 / yr^2

Problem Part a) Determine the orbit of the Earth using the Assume that the orbit of the Earth is circular. Euler-Cromer method. As a first step you need to specify the initial conditions. Next you need to find an appropriate time step, different values of Δt. Keeping in mind that on the year Δt. You can do this by running your program with-mark the orbit of the Earth should return to its initial condition, you can determine an ‘acceptable’ value for your time step. Document your results. Part b) Elliptical Orbits So far, we have used a circular orbit. This is a good choice to test your program. Howeve interesting orbits are those that are elliptical (like those of comets). r the more For these orbits, we need to change our calculation of the initial conditions a little bit. Let’s look at the total energy of the planet (comet)

!

E = 12 mv^2 " GM rsm For a circular orbit, we have seen that

! or^ mv^ r^^2 =^ GM^ r^2 S^ m ! With this, the total energy in a circular orbit is^ v^ =^ GMs^ / r

!

E = " GM 2 rsm In an elliptical orbit, the semimajor and semiminor axis, a and b, are unequal (Figur eccentricity is defined as e 2). The

! and the distance from the sun at perihelion (closest approach) is^ e^ =^1 "^ b^2 / a^2 !

q = ( 1 " e ) a

Table 1 Comet Name. Orbital data for selected comets T (yrs) e q (AU) Encke Biela Schwassmann (^) - Wachmann 1 16.103.306.62 0.8470.7560.132 0.3390.8615. Halley Grigg Hale-Bopp- (^) Melli sh 76.03164.32508. 0.9670.9690.995 0.5870.9230.

Figure 2. Elliptical orbit around the Sun.

r

x

y

2a

q

2b Q