unit20.mws

ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL

Unit 20 -- Application: Rocket Flight

Prof. Douglas B. Meade

Industrial Mathematics Institute

Department of Mathematics

University of South Carolina

Columbia, SC 29208

URL: http://www.math.sc.edu/~meade/

E-mail: meade@math.sc.edu

Copyright © 2001 by Douglas B. Meade

All rights reserved

-------------------------------------------------------------------

>

Outline of Unit 20

>

Initialization

> restart;

> with( DEtools ):

> with( plots ):

> with( linalg ):

Warning, the name changecoords has been redefined

Warning, the name adjoint has been redefined

Warning, the protected names norm and trace have been redefined and unprotected

>

20.A Rocket Flight

Problem Statement

A model rocket having initial mass m[0] kg is launched vertically from the ground. The rocket expels gas at a constant rate of alpha kg/sec and at a constant velocity beta m/sec relative to the rocket. Assume the magnitude of the gravitational force is proportional to the mass with proportionality constant g and that the rocket contains m[gas] kg of gas.

>

20.A-1 Model Formulation

Let x denote the height above ground in meters and t denote the time since lauch in seconds. Then v = Diff(x,t) is the velocity of the rocket. The rocket's mass at time t is m[0]-alpha*t until alpha*t = m[gas] ; thereafter, the mass is a constant m[0]-m[gas] .

Recall that Newton's second law states that force is equal to the time rate of change of momentum. Thus, for t < m[gas]/alpha ,

> mass := m[0] - alpha*t;

> F[gravity] := - mass * g;

> F[thrust] := alpha * beta;

mass := m[0]-alpha*t

F[gravity] := -(m[0]-alpha*t)*g

F[thrust] := alpha*beta

> eomX1 := mass * diff( x(t), t$2 ) - F[thrust] = F[gravity];

eomX1 := (m[0]-alpha*t)*diff(x(t),`$`(t,2))-alpha*b...

> icX1 := x(0)=0, D(x)(0)=0;

icX1 := x(0) = 0, D(x)(0) = 0

>

After all of the gas has been released, the equation of motion simplifies to

> mass2 := eval( mass, t=m[gas]/alpha );

> F[gravity2] := - mass2 * g;

mass2 := m[0]-m[gas]

F[gravity2] := -(m[0]-m[gas])*g

> eomX2 := mass2 * diff( x(t), t$2 ) = F[gravity2];

eomX2 := (m[0]-m[gas])*diff(x(t),`$`(t,2)) = -(m[0]...

>

with "initial conditions" at t = m[gas]/alpha chosen to ensure continuity with the solution at the end of stage 1.

>

20.A-2 Stage 1: Solution

Note that the second-order ODE for the height reduces to a first-order linear ODE for the velocity

> eomV1 := eval( eomX1, diff( x(t), t )=v(t) );

eomV1 := (m[0]-alpha*t)*diff(v(t),t)-alpha*beta = -...

> icV1 := v(0)=0;

icV1 := v(0) = 0

>

The solution to this IVP is

> solV1a := dsolve( { eomV1, icV1 }, v(t) );

solV1a := v(t) = -t*g-beta*ln(m[0]-alpha*t)+beta*ln...

>

which simplifies (somewhat) to

> combine( solV1a, ln, anything, symbolic );

v(t) = -t*g+ln((m[0]-alpha*t)^(-beta)*m[0]^beta)

>

Further simplifications are difficult for Maple perform, but hand manipulations quickly lead to

> solV1b := v(t) = -g*t + beta*ln( m[0]/(m[0]-alpha*t) );

solV1b := v(t) = -t*g+beta*ln(m[0]/(m[0]-alpha*t))

>

To check that this function is a solution to the equation of motion for the velocity,

> odetest( solV1b, eomV1 );

0

>

Integration of the velocity, with x(0) = 0 , is most easily obtained as the solution to a trivial IVP

> solX1a := dsolve( { eval( solV1b, v(t)=diff(x(t),t) ), x(0)=0 }, x(t) );

solX1a := x(t) = -1/2*g*t^2-beta*m[0]*ln(m[0]/(m[0]...

>

which simplifies nicely to

> solX1b := collect( solX1a, ln );

solX1b := x(t) = (-beta*m[0]/alpha+beta*t)*ln(m[0]/...

>

The only additional modifications that one is likely to want to make to this solution are factoring -beta from the coefficient of the first term and rewriting the argument of the logarithm as m[0]/(m[0]-alpha*t) .

> solX1c := x(t) = beta*t - 1/2*g*t^2 - beta*(m[0]/alpha-t)*ln( m[0] / (m[0]-alpha*t) );

solX1c := x(t) = beta*t-1/2*g*t^2-beta*(m[0]/alpha-...

>

20.A-3 Stage 2: Solution

The equations of motion for the rocket after all gas has been expelled are simpler than those for Stage 1.

> eomX2;

(m[0]-m[gas])*diff(x(t),`$`(t,2)) = -(m[0]-m[gas])*...

> eomV2 := eval( eomX2, diff(x(t),t)=v(t) );

eomV2 := (m[0]-m[gas])*diff(v(t),t) = -(m[0]-m[gas]...

>

The only difficulty to finding the height above ground and velocity of the rocket is finding appropriate initial conditions. The initial conditions for Stage 2 are chosen to ensure continuity with the solutions at the end of Stage 1. That is, at time t^`*` = m[gas]/alpha :

> tstar := m[gas]/alpha;

tstar := m[gas]/alpha

> icV2 := eval( solV1b, t=tstar );

icV2 := v(m[gas]/alpha) = -m[gas]*g/alpha+beta*ln(m...

> icX2 := eval( solX1b, t=tstar );

icX2 := x(m[gas]/alpha) = (-beta*m[0]/alpha+beta*m[...

>

The velocity of the rocket is

> solV2 := collect( dsolve( { eomV2, icV2 }, v(t) ), alpha );

solV2 := v(t) = -t*g+beta*ln(m[0]/(m[0]-m[gas]))

>

while the height above ground is

> solX2 := dsolve( { eval( solV2, v(t)=diff(x(t),t) ), icX2 }, x(t) );

solX2 := x(t) = -1/2*g*t^2+beta*ln(m[0]/(m[0]-m[gas...

>

The fact that the velocity of the rocket is linear and the height above ground is quadratic is consistent with the observation that the equation of motion dictates that the acceleration is constant. Moreover, note that the velocity is a decreasing function and the height is concave down. The maximum height above ground occurs when t = t[max] where

> Tmax := solve( eval( solV2, v(t)=0 ), t );

Tmax := beta*ln(m[0]/(m[0]-m[gas]))/g

>

assuming that t[max] > t^`*` . If this condition is met, then the maximum height of the rocket is

> Xmax := simplify( eval( solX2, t=Tmax ) );

Xmax := x(beta*ln(m[0]/(m[0]-m[gas]))/g) = -1/2*bet...

>

[Back to ODE Powertool Table of Contents]

>