*In a dogfight, energy is key. The winner of the battle is often determined by which pilot best manages the available kinetic and potential energy of the aircraft. Run low on energy and you're going down in flames!*

# Learning Objectives

- Define the terms work, potential energy, and kinetic energy.
- Recall the Law of the Conservation of Energy.
- Explain the difference between conservative and non-conservative forces.
- Use the potential energy gradient to find the net force on an object.

# Introduction

When determining the motion of an object, one can certainly use Newton's Laws of Universal Motion to determine the acceleration, but its not always simple. Often the forces acting on an object can be very dynamic and will vary depending upon the orientation of the object itself or the surface the object is on. A useful tool when analyzing the motion of an object is its energy. When a force acts on an object over some distance, it may add energy to that object. This change in energy is called the work done on the object,

(1)The amount of work done, or the change in energy of the object, can be found by taking the dot product of the force vector and the displacement vector,

(2)The unit for work is a Newton-meter (N-m) or simply called a Joule (J). Notice in Equation 2 that when the force and displacement vectors are perpendicular, no work is done.

When work is done on an object, the type of energy that changes may be either or both of two types, potential energy and kinetic energy. Potential energy is energy that is stored somehow. Imagine lifting a weight from the floor to over your head. You exerted a vertical force over a vertical distance, therefore you did work on it. The energy you put into the weight becomes potential energy. The weight has the potential to move if you let go of it. Since the weight is over your head, I wouldn’t recommend it. You can also add energy to an object by causing its speed to change. Kinetic energy is the energy of motion. Any object that’s moving with any amount of speed has kinetic energy. The more mass the object has and the faster its moving, the more kinetic energy the object has. When you throw a ball, you exert a roughly horizontal force over a roughly horizontal distance. This work goes to increasing the speed and therefore the kinetic energy of the ball. There are many types of potential and kinetic energies. For now we will use the following formulas for gravitational potential energy and kinetic energy,

where h is the height of the object, and

(4)Some forces, like gravity and elastic forces, conserve the total amount of potential and kinetic energy. For these forces, no work is done as the object moves. The type of energy may change from potential energy to kinetic energy and back again, but the total amount of energy does not change. Let’s take a look at how Equation 1 changes for a conservative force,

(5)The motion resulting from conservative forces is path independent, meaning that one only needs to know information about the initial and ending points. We don’t need any information about the path taken between the two points. This simplifies things significantly. Forces like friction, air resistance, and applied forces can add or remove energy from an object, therefore doing work on them. These are called non-conservative forces. Non-conservative forces are path-dependent. The amount of energy they add or remove depends upon the exact path the object takes. Dissipative forces like friction and air resistance take the kinetic energy of an object and convert it to heat energy. One way of dealing with this type of energy loss in your program is to remove a certain small fraction of the kinetic energy from the object at each time-step. This will result in a slow decrease of total energy, and the rate of energy loss will be dependent upon the speed of the object.

The potential energy for an object can be very useful when trying to determine the net force on an object. Often calculating and evaluating the forces acting on an object can be complex and computationally expensive. If you have a global function that describes the potential energy for an object throughout your environment, you can find the net force by examining how the potential energy changes with distance. This is called the potential energy gradient. The net force will point in the direction of the greatest decrease of potential energy. You can do this for each of the three components of the net force using the following equations:

Let’s start out simple by thinking of the one-dimensional case of a roller coaster. You might argue that a roller coaster is actually a two-dimensional case, but since the car is constrained to move along the track, it only has one degree of freedom and is therefore a one-dimensional problem. The potential energy of the car depends on its height, which can be expressed as a function of its position on the track. Let’s take the car’s position on the track as being $s$. Here, $s$ represents the distance along the track, not an x-y coordinate. We need to look at the change in potential energy at $s$ minus some small amount and $s$ plus some small amount. Let’s call this small amount epsilon, $\varepsilon$. The net force on the car in the direction of the track can be found by applying equation 7,

(8)The size of $\varepsilon$ is arbitrary, so long as it’s smaller than the typical change in position from one time-step to the next.

One area where this method is extremely useful is in evaluating the motion of an object in space where there may be multiple gravitational forces. The formula for potential energy given in Equation 3 is only good for motion near the surface of Earth, or for the surface of any object if you change the value of $g$ appropriately. For an object in orbit where the distance between the object and the Earth or other gravitating bodies changes significantly, the potential energy is given by

where $G = 6.67 \times 10^{-11} \frac {N \cdot m^2 } { kg^2 }$, and $r$ is the distance between the object and the gravitating body. Since the potential energy will be calculated often, its best to define the potential energy as a function you can call rather than coding in the calculation each place in your program where you need it.

# Laboratory Procedures

## Part I: 1D Motion

Please choose one of the following options to perform as your 1D simulation. In either case, use the gradient of the potential energy function to calculate the force and use the Velocity Verlet method to integrate the object's motion.

### Option 1: Box on an Incline

Using the conservation of energy, create a program that simulates the motion of a cart to move down a simple ramp given by the equation

(10)The height of the ramp as a function of the distance along the ramp therefore becomes

(11)Use the following parameters for your simulation:

- mass of the cart = 100 kg
- initial velocity = user supplied
- % KE loss per step = user supplied
- time-step = 0.05 s

Output the potential, kinetic, and total energies to the screen.

### Option 2: Marble in a Bowl

This option highlights one of the basic motions seen in nature, simple harmonic motion. The behaviour of a marble sliding back and forth on the inside of a bowl, the swinging of a pendulum, or the oscillation of a mass on a spring are all similar owing to the fact that the structure of their potential energy functions are all similar. They all vary with the square of the displacement from some equilibrium position. For our marble in our bowl, the potential energy is described by the following function:

(12)Use the following parameters for your simulation:

- mass of the marble = 0.050 kg
- initial velocity = 0.0 m/s
- initial position = user supplied
- time-step = 0.02 s

Output the position, potential energy, kinetic energy, and total energy to the screen. Terminate the simulation after a total elapsed time of 10.0 s.

## Part II: 2D Motion

Model the motion of a spacecraft around the Earth given the following initial conditions:

- mass of spacecraft = 225 kg
- initial position = (0, 6778 km)
- initial velocity = (user supplied, 0)
- time-step = 10.0 s

Output the speed, altitude, and total energy of the spacecraft to the screen. Report the speed in km/s and the altitude in km. Be sure to check for a collision with the atmosphere. If the spacecraft reaches an altitude below 100 km, it will disintegrate. The Earth has a mass of $5.98 \times 10^{24} kg$ and has a radius of 6378 km. Stop the simulation after a total elapsed time of 36,000 s.

# Postlab Questions

- In Part I, the loss of kinetic energy by removing a given percentage models wind resistance very well, but does not do as good of a job with surface friction. Why not? What will a large amount of friction do that cannot be modeled with the scheme in Part I?
- Most terrain is not a uniform slope like we assumed in Part I. However, one can assume that over the immediate space around the object, the terrain slopes uniformly. Explain how one might tackle the problem of modeling motion down a real slope such as a roller coaster.
- In Part II, what happened to the total energy as the simulation ran? Explain what causes this result.
- How could you alter your code in Part II to take into account the gravitational effects of the Moon and Sun?