About
Developed by A. Titus
Easy JavaScript Simulation by Fremont Teng and Loo Kang Wee
The goal of these exercises is to control a primitive version of an Apollo lander and land on a target on the Moon using vertical and horizontal thrusters. The three thrusters can provide a constant force in the , , and directions, respectively. Only one thruster can be engaged at a time.
Besides modeling the motion of the Apollo lander, the exercises are a “game” in which the user attempts to control the lander and meet the challenge of landing on a given target with minimal speed.
Subject Area | Mechanics |
---|---|
Levels | First Year and Beyond the First Year |
Available Implementation | Glowscript Easy JavaScript Simulation |
Learning Objectives | Students will be able to:
|
Time to Complete | 120 min |
This exercise is named after a late-70s Atari game called Lunar Lander. By employing thrusters in the , , and directions that are aligned with the center of mass of the lander, we do not have to consider rotation. The goal is to control the spaceship using brief impulses. For simplicity, the first two exercises neglect mass loss due to fuel exhaust and are appropriate for introductory students. In Exercises 3-5, students incorporate fuel burn rate. Exercise 5 is intended for intermediate level students who can derive an analytic solution for the y-velocity of a rocket with constant fuel burn rate in a constant gravitational field and can compare numerical and analytic solutions.
Students should view a landing rocket such as the landing of a SpaceX CRS-8 first-stage rocket booster on a floating drone ship.
Students may also want to play the original Atari Lunar Lander game.
Because keyboard interactions are essential to Exercises 1-4, a minimal working program is provided in which the keyboard interactions work, but the lander travels with constant velocity. Students must add the appropriate code inside the while
statement to correctly compute the velocity of the lander.
The attached programs are written in GlowScript and require a free account at GlowScript.org.
You will model the motion of a lunar lander and then control the lander so it lands on a given target on the Moon. At first, you will neglect fuel loss. However, this is not realistic, so in later exercises you will include it. Our lunar lander has similar mass and thrust as the Apollo lander, but that’s where the similarities end.
The direction is defined in the direction of the gravitational force by the Moon (downward). The lander has three thrusters that provide a constant thrust in the , , and directions, respectively. Thrust is provided by the expulsion of gases (exhaust). Thus, the righward thrust, showing both the exhaust and the force vector, looks like:
The leftward thrust looks like:
A free-body diagram showing all thrusters engaged simultaneously along with the gravitational force by the Moon is shown below. However, we will assume for these exercises that thrusters cannot be engaged simultaneously. After completing the exercises, you are welcome to explore additional features of your model, such as allowing simultaneous thrusters for example.
At any instant, the net force on the rocket is
where can be any of the following:
- if no engines are firing.
- if a thruster exerts a force to the right.
- if a thruster exerts a force to the left.
- if a thruster exerts a force upward.
The motion of the rocket is computed using the Momentum Principle:
For speeds much less than the speed of light:
Technically, the expulsion of gases means that the lander loses mass when a thruster is firing. Initially, let’s neglect mass loss due to burning fuel. However, in Exercises 3-5, we will include mass loss due to burning fuel. If including mass loss for the rocket (due to burning fuel), then in each time step:
where is the fuel burn rate in kg/s and is negative. For the special case of a vertically descending or ascending rocket with thruster engaged, an analytic expression for the y-velocity of the rocket can be derived. An analytic calculation can be compared to the numeric calculation for this special case in order to test the computational model.
EXERCISE 1: LANDING ON A GIVEN TARGET
Your goal is to control the lander and land on the target within the safe landing speed and within the safe landing zone.
Use the following parameters:
Parameter | Value |
---|---|
Total initial mass including fuel | kg |
Initial mass of fuel | kg |
Fuel burn rate | 0 kg/s |
Height of lander | 3 m (CM is 1.5 from the bottom of the lander) |
g | 1.6 N/kg |
Thrust of an engine | N (3 times the initial weight) |
Initial velocity | m/s |
Initial position | m |
Target position | m |
Safe landing speed | less than 1 m/s |
Safe landing zone | m of center of target |
It is best to use keys on the keyboard to turn on or off the thrusters.
Define the position of the lander as its center of mass (CM) position. Define “landing” as when the bottom of the lander reaches the surface of the Moon. Thus, if the lander starts at m and lands with the CM at 1.5 m, then its displacement is actually 48.5 m.
EXERCISE 2: ADDING A THIRD DIMENSION
Add two engines in the directions. Use the following initial conditions for the lander.
Parameter | Value |
---|---|
Initial velocity | (m/s) |
Initial position | (m) |
Repeat the challenge of landing on the target within the safe landing zone and safe landing speed. You will need to define two more keys to control the two additional engines.
EXERCISE 3: ADDING LOSS OF FUEL
Suppose that the burn rate of fuel is constant and non-zero. This represents the change in mass of the system (lander structure and fuel) per second as an engine is firing. Edit your simulation to include a burn rate of kg/s. If the lander burns all of its fuel, be sure to make the thrust zero. To make the game more interesting, you can increase the absolute value of the burn rate and see if you can land within the safe limits before running out of fuel.
Use your simulation to answer the following questions:
-
As thrusters fire in various directions while you control the lander, does the magnitude of the gravitational force on the lander increase, decrease, or remain the same? Explain your answer.
-
Suppose the vertical thruster is constantly firing for a long time. As it is firing, does the y-acceleration of the lander increase, decrease, or remain the same? Explain your answer.
EXERCISE 4: GRAPHING DATA
Create a graph to plot either or as a function of time. Check your answers to the questions in Exercise 3 by viewing the graph as you operate the lander. Explain whether your answers in Excercise 3 were correct or incorrect and how you determined this.
EXERCISE 5: COMPARING TO AN ANALYTIC SOLUTION
For the simple case of a lander traveling vertically using only its vertical thruster as it lands, you can derive an analytic function for the lander’s y-velocity as a function of time. Use the following initial conditions for the lander.
Parameter | Value |
---|---|
Initial velocity | (m/s) |
Initial position | (m) |
Mass burn rate | kg/s |
If the vertical thrust is constant and is engaged during the entire vertical descent, what is the y-velocity of the lander when it hits the surface of the Moon? Solve the problem analytically. Then, simulate it. Compare the numerical result to the analytic result.
What is the necessary minimum speed of the rocket at its initial position m so that firing its vertical thruster for the entire descent will cause the rocket to land with nearly zero velocity?
EXERCISE 1: LANDING ON A GIVEN TARGET
Your goal is to control the lander and land on the target within the safe landing speed and within the safe landing zone.
Use the following parameters:
Parameter | Value |
---|---|
Total initial mass including fuel | kg |
Initial mass of fuel | kg |
Fuel burn rate | 0 kg/s |
Height of lander | 3 m (CM is 1.5 from the bottom of the lander) |
g | 1.6 N/kg |
Thrust of an engine | N (3 times the initial weight) |
Initial velocity | m/s |
Initial position | m |
Target position | m |
Safe landing speed | less than 1 m/s |
Safe landing zone | m of center of target |
It is best to use keys on the keyboard to turn on or off the thrusters.
Define the position of the lander as its center of mass (CM) position. Define “landing” as when the bottom of the lander reaches the surface of the Moon. Thus, if the lander starts at m and lands with the CM at 1.5 m, then its displacement is actually 48.5 m.
EXERCISE 2: ADDING A THIRD DIMENSION
Add two engines in the directions. Use the following initial conditions for the lander.
Parameter | Value |
---|---|
Initial velocity | (m/s) |
Initial position | (m) |
Repeat the challenge of landing on the target within the safe landing zone and safe landing speed. You will need to define two more keys to control the two additional engines.
EXERCISE 3: ADDING LOSS OF FUEL
Suppose that the burn rate of fuel is constant and non-zero. This represents the change in mass of the system (lander structure and fuel) per second as an engine is firing. Edit your simulation to include a burn rate of kg/s. If the lander burns all of its fuel, be sure to make the thrust zero. To make the game more interesting, you can increase the absolute value of the burn rate and see if you can land within the safe limits before running out of fuel.
Use your simulation to answer the following questions:
-
As thrusters fire in various directions while you control the lander, does the magnitude of the gravitational force on the lander increase, decrease, or remain the same? Explain your answer.
-
Suppose the vertical thruster is constantly firing for a long time. As it is firing, does the y-acceleration of the lander increase, decrease, or remain the same? Explain your answer.
EXERCISE 4: GRAPHING DATA
Create a graph to plot either or as a function of time. Check your answers to the questions in Exercise 3 by viewing the graph as you operate the lander. Explain whether your answers in Excercise 3 were correct or incorrect and how you determined this.
EXERCISE 5: COMPARING TO AN ANALYTIC SOLUTION
For the simple case of a lander traveling vertically using only its vertical thruster as it lands, you can derive an analytic function for the lander’s y-velocity as a function of time. Use the following initial conditions for the lander.
Parameter | Value |
---|---|
Initial velocity | (m/s) |
Initial position | (m) |
Mass burn rate | kg/s |
If the vertical thrust is constant and is engaged during the entire vertical descent, what is the y-velocity of the lander when it hits the surface of the Moon? Solve the problem analytically. Then, simulate it. Compare the numerical result to the analytic result.
What is the necessary minimum speed of the rocket at its initial position m so that firing its vertical thruster for the entire descent will cause the rocket to land with nearly zero velocity?
http://www.glowscript.org/#/user/lookang/folder/Public/program/lunarlander
GlowScript 2.7 VPython
##add keyboard control
def process(event):
global Fthrust
if event.type=='keydown':
k = event.which
if k == 38 and mfuel>0: #up arrow turns on the vertical thruster
Fthrust=thrust*vector(0,1,0)
fireU.visible=True
FarrowU.visible=True
elif k == 39 and mfuel>0: #right arrow turns on the rightward thruster
Fthrust=thrust*vector(1,0,0)
fireR.visible=True
FarrowR.visible=True
elif k == 37 and mfuel>0: #right arrow turns on the leftward thruster
Fthrust=thrust*vector(-1,0,0)
fireL.visible=True
FarrowL.visible=True
elif event.type=='keyup': #releasing the key turns off the thruster
Fthrust=vector(0,0,0)
fireR.visible=False
FarrowR.visible=False
fireL.visible=False
FarrowL.visible=False
fireU.visible=False
FarrowU.visible=False
FthrustArrow.axis=scale*Fthrust
scene=canvas(title="Lunar Lander")
scene.append_to_title("<h2>Instructions</h2>")
scene.append_to_title("<br>1. Click the scene to begin.")
scene.append_to_title("<br>")
scene.append_to_title("2. Hold down the up arrow or right arrow or left arrow to turn the corresponding thruster.")
scene.append_to_title("<br>")
scene.append_to_title("3. Land on the red target. To succeed, the lander's speed must be less than 1 m/s, and it <br>must land within 1 m of the center of the target.")
scene.append_to_title("<br>")
scene.append_to_title("<br>")
scene.bind('keydown keyup', process)
scene.range=40
scene.background=color.black
scene.camera.pos=scene.camera.pos+vector(0,20,-10)
L=3
ground = box(pos=vector(0,-1.1,0), size=vector(50.0,2,50), color=color.white)
lander = box(pos=vector(-10,50,0), size=vector(L,L,L), color=color.yellow)
target = cylinder(pos=vector(10,0,0), axis=vector(0,-1,0), radius=L/2+1, color=color.red)
m_i=1e4
lander.m = m_i
mfuel=8e3
mdot=-500
lander.v = vector(0,0,0)
g=1.6*vector(0,-1,0)
thrust=3*m_i*mag(g)
scale=2*L/m_i/mag(g)
sw=0.5
vstr="Speed: {0:.2f}".format(mag(lander.v))
vlabel=label(pos=vector(0,-10,0), text=vstr)
mfuelstr="Mass of Fuel: {0:.0f} kg".format(mfuel)
mfuellabel=label(pos=vector(-30,-10,0), text=mfuelstr)
fireR=cone(pos=lander.pos-vector(L/2,0,0), radius=L/4, axis=L/2*vector(-1,0,0), color=color.orange, visible=False)
FarrowR=arrow(pos=lander.pos, axis=scale*thrust*vector(1,0,0), color=color.orange, shaftwidth=sw, visible=False)
fireL=cone(pos=lander.pos+vector(L/2,0,0), radius=L/4, axis=L/2*vector(1,0,0), color=color.orange, visible=False)
FarrowL=arrow(pos=lander.pos, axis=scale*thrust*vector(-1,0,0), color=color.orange, shaftwidth=sw, visible=False)
fireU=cone(pos=lander.pos-vector(0,L/2,0), radius=L/4, axis=L/2*vector(0,-1,0), color=color.orange, visible=False)
FarrowU=arrow(pos=lander.pos, axis=scale*thrust*vector(0,1,0), color=color.orange, shaftwidth=sw, visible=False)
Farrowgrav=arrow(pos=lander.pos, axis=scale*lander.m*g, color=color.white, shaftwidth=sw, visible=True)
dt = 0.01
t = 0
Fthrust=vector(0,0,0)
aGraph=graph(title="", xtitle='t (s)', ytitle='a_y (m/s/s)', xmin=0, x=500, y=0, width=400, height=150)
ayPlot=series(color=color.blue, graph=aGraph)
scene.waitfor("click")
while 1:
rate(100)
if(mag(Fthrust)>0):
dm=mdot*dt
mfuel=mfuel+dm
lander.m=lander.m+dm
Fgrav=lander.m*g
Fnet=Fgrav+Fthrust
lander.v =lander.v+Fnet/lander.m*dt
lander.pos = lander.pos + lander.v*dt
if(lander.pos.y-lander.height/2<ground.pos.y+ground.height/2):
print("The lander has landed")
break
t = t+dt
ayPlot.plot(t,Fnet.y/lander.m)
vstr="Speed: {0:.2f}".format(mag(lander.v))
vlabel.text=vstr
mfuelstr="Mass of Fuel: {0:.0f} kg".format(mfuel)
mfuellabel.text=mfuelstr
Farrowgrav.pos=lander.pos
Farrowgrav.axis=scale*Fgrav
FarrowR.pos=lander.pos
FarrowL.pos=lander.pos
FarrowU.pos=lander.pos
fireR.pos=lander.pos-vector(L/2,0,0)
fireL.pos=lander.pos+vector(L/2,0,0)
fireU.pos=lander.pos-vector(0,L/2,0)
if(mag((lander.pos-vector(0,L/2,0))-target.pos)<1):
print("You landed on the target within the allowed landing zone (+- 1 m).")
else:
print("You did not land within the allowed landing zone (+- 1 m). You are "+"{0:.1f}".format(mag(lander.pos-target.pos))+" from the target.")
if(mag(lander.v)<1):
print("You landed on the target within the allowed landing speed (+- 1 m/s).")
else:
print("You landed too fast.")
Exercise 1
There is no right answer, except having a working program and controlling the lander so it lands within the target and within the safe landing speed.
Students should be encouraged to play with the simulation and add game-like elements to it. Landing within the safe landing speed (less than 1 m/s) is fairly difficult.
Exercise 2
In the code template, there is a function def process(event)
that handles keyboard interactions. There is a commented line to print the key when it is pressed, as shown below.
k = event . which# print(k)
If this line is uncommented, then you can type any key and get its associated integer. Choose two other keys, like “a” and “s” for example, and edit this function.
In addition, you will want to add cones (for fire) and arrows for the thrust vectors in the z direction.
Exercise 3
It is best to add a graph so you can see how variables such as mass, gravitational force, and acceleration change as thrusters are firing.
- The gravitational force on the lander decreases as thrusters are firing due to the loss of mass.
- The y-acceleration increases as the vertical thruster is firing. The y-acceleration when the vertical thruster is firing is:
As mass decreases due to fuel loss, the denominator decreases less than the numerator decreases. As a result, the fraction increases.
Exercise 4
Here is a graph of vs. time. During the flat parts of the graph, the thruster is off. During the upwardly sloped part of the graphs, the vertical thruster is firing and the lander is losing mass.

Here is a graph of vs. time. Each peak corresponds to the vertical thruster firing. It increases as the thruster fires. The flat parts correspond to the engine being off (free-fall). The y-acceleration in free-fall is constant even though the lander loses mass because mass cancels.

Exercise 5
The y-velocity of a rocket with constant thrust and constant burn rate in a constant gravitational field is:
where is the exhaust speed of the fuel.
With the given initial conditions, the landing speed of the lander computed numerically is 7.000 m/s or 7.17 m/s (Runge Kutta 4 solver in EJSS) and computed analytically is 7.048 m/s. A graph of y-velocity computed numerically (blue) and analytically (red) is shown below. Because the curves overlap, the numerically determined curve is not seen.

To land with a landing speed less than 1 m/s, the initial y-velocity at a height of 50 m must be -18.88 m/s or -18.86 m/s (Runge Kutta 4 solver in EJSS) .
Chapter 3 in Classical Mechanics by John R. Taylor (University Science Books, 2005).
Translations
Code | Language | Translator | Run | |
---|---|---|---|---|
![]() |
Credits
Fremont Teng; Loo Kang Wee; based on glowscript by A.Titus
This document provides a detailed review of the "PICUP Lunar Lander Game JavaScript Simulation Applet HTML5" resource, focusing on its main themes, important ideas, and factual content. This open educational resource, developed by A. Titus with Easy JavaScript Simulation by Fremont Teng and Loo Kang Wee, offers a simulation of a lunar lander designed for educational purposes, primarily in introductory and beyond-first-year mechanics courses. The resource includes a web-embeddable applet, learning objectives, exercises, theoretical background, and links to related materials.
2. Main Themes:
The central themes of this resource revolve around:
- Modeling Rocket Motion: The core focus is on simulating the motion of a lunar lander under the influence of gravity and thrust. This involves applying principles of Newtonian mechanics, specifically the Momentum Principle.
- Interactive Learning through Simulation: The resource utilizes a game-like approach to engage students in controlling the lander, fostering intuitive understanding of physics concepts through hands-on interaction.
- Gradual Introduction of Complexity: The exercises progressively introduce more realistic elements to the simulation, starting with basic motion under constant thrust and gravity (neglecting fuel loss) and advancing to incorporate fuel burn rate and its effects on mass.
- Connecting Theory and Computation: The resource emphasizes the link between theoretical physics and computational modeling, encouraging students to compare numerical simulations with analytical solutions in later exercises.
- Understanding Key Physics Concepts: Students are expected to grasp concepts such as force, mass, acceleration, velocity, gravity, thrust, and the impact of mass loss on rocket motion.
3. Most Important Ideas and Facts:
- Simulation Overview: The applet simulates a simplified Apollo lander with three thrusters providing constant force in the +x, -x, and +y directions. Only one thruster can be engaged at a time. The goal is to land on a target with minimal speed.
- "The goal of these exercises is to control a primitive version of an Apollo lander and land on a target on the Moon using vertical and horizontal thrusters. The three thrusters can provide a constant force in the + x , − x , and + y directions, respectively. Only one thruster can be engaged at a time."
- Learning Objectives: The resource outlines specific learning objectives for students, including modeling rocket motion with constant thrust and gravity, incorporating user input into simulations, modeling fuel burn rate, and comparing numerical and analytical solutions.
- Neglecting Rotation: For simplicity, the model assumes thrust is aligned with the center of mass, eliminating the need to consider rotational motion. "By employing thrusters in the + x , − x , and + y directions that are aligned with the center of mass of the lander, we do not have to consider rotation."
- Newton's Laws in Action: The simulation is based on the Momentum Principle (a restatement of Newton's Second Law) and the relationship between momentum, mass, and velocity.
- "The motion of the rocket is computed using the Momentum Principle: d p ⃗ d t = F ⃗ n e t . (2)"
- "For speeds much less than the speed of light: d r ⃗ d t ≈ p ⃗ m . (3)"
- Fuel Burn Rate: Later exercises introduce the concept of mass loss due to fuel expulsion, using the formula:
- "m f = m i + d m d t Δ t (4) where d m d t is the fuel burn rate in kg/s and is negative."
- Exercises with Increasing Complexity:Exercise 1: Focuses on basic landing on a target using vertical and horizontal thrusters without fuel loss. Specific parameters for mass, thrust, gravity, initial conditions, target, and safe landing criteria are provided.
- Exercise 2: Introduces a third dimension by adding thrusters in the ±z directions, requiring students to control motion in 3D space.
- Exercise 3: Incorporates a constant fuel burn rate, prompting students to observe and explain how gravitational force and acceleration change as mass decreases.
- Exercise 4: Requires students to graph gravitational force or y-acceleration over time to verify their explanations from Exercise 3.
- Exercise 5: Challenges students to derive an analytical solution for the y-velocity of a vertically descending rocket with constant thrust and fuel burn rate and compare it to a numerical simulation.
- Key Parameters (Exercise 1 Example): The resource provides specific values for initial mass, fuel mass, fuel burn rate (initially 0), gravity on the Moon (1.6 N/kg), thrust, initial velocity and position, target position, and safe landing criteria.
- Definition of Landing: Landing is defined as when the bottom of the lander reaches the surface, meaning the center of mass will be at a height equal to half the lander's height (1.5 m in the given parameters). "Define “landing” as when the bottom of the lander reaches the surface of the Moon. Thus, if the lander starts at y = 50 y = 50 m and lands with the CM at 1.5 m, then its displacement is actually 48.5 m."
- Analytic Solution (Exercise 5): For a vertically descending rocket with constant thrust and burn rate, an analytical solution for velocity is given:
- "v y = v y 0 + v e x h a u s t ln ( m 0 m 0 + m ˙ t ) − g t (6) where v e x h a u s t = ∣ ∣ ∣ F ⃗ t h r u s t d m / d t ∣ ∣ ∣ is the exhaust speed of the fuel."
- GlowScript Implementation: The provided program is written in GlowScript (VPython), requiring a free account at GlowScript.org to run and edit. The code snippet demonstrates how keyboard input is used to control the thrusters and update the lander's motion based on the physics principles.
4. Educational Applications:
This resource offers significant educational value for teaching mechanics and computational modeling:
- Hands-on Learning: The interactive simulation allows students to actively experiment with the controls and observe the consequences of their actions on the lander's trajectory.
- Visual Representation of Physics Concepts: The visual nature of the simulation helps students develop a more intuitive understanding of abstract physics concepts like force, acceleration, and velocity vectors.
- Problem-Solving Skills: The exercises encourage students to think critically about how to control the lander to achieve the desired outcome, developing problem-solving skills.
- Introduction to Numerical Methods: The simulation implicitly introduces the idea of numerical computation in solving physics problems, which is further explored in the comparison with analytical solutions.
- Real-World Relevance: The connection to the Apollo missions and the suggestion to view SpaceX landings helps contextualize the physics principles in real-world engineering applications.
- Adaptability: The open-source nature of the resource and the use of GlowScript allow for modifications and extensions to suit different learning objectives and levels.
5. GlowScript Code Snippet Highlights:
The provided GlowScript code illustrates key aspects of the simulation:
- Keyboard Input Handling (process function): Demonstrates how to capture keyboard events (key press and release) to activate and deactivate the thrusters based on specific arrow keys.
- Force and Acceleration Calculation: Shows how the net force (including gravity and thrust) is calculated and used to update the lander's velocity and position using numerical integration (Euler's method in this simplified example).
- Visual Representation: Utilizes VPython objects (box, cylinder, cone, arrow, label, graph) to create a visual representation of the lander, target, thruster flames, force vectors, and data plots.
- Fuel Consumption: Implements a basic model of fuel consumption where the mass decreases when a thruster is active.
- Landing Condition: Checks if the lander has reached the ground and evaluates if the landing speed and position are within the safe limits.
- Graphing: Includes functionality to plot the y-acceleration as a function of time, allowing students to visualize the effect of the thrusters.
6. Conclusion:
The "PICUP Lunar Lander Game JavaScript Simulation Applet HTML5" is a valuable open educational resource for teaching fundamental concepts in mechanics. Its interactive nature, progressively challenging exercises, and connection to real-world scenarios make it an engaging and effective tool for student learning. The inclusion of theoretical background and the opportunity to compare numerical and analytical solutions in later exercises further enhance its educational value, promoting a deeper understanding of the underlying physics principles and the power of computational modeling.
Lunar Lander Simulation Study Guide
Quiz
- What are the three directions in which the lunar lander's thrusters can exert force? Explain which thruster corresponds to each direction based on the provided information.
- According to the "About" section, what is the primary goal of the exercises involving the lunar lander simulation? What secondary goal is mentioned, related to the lander's speed?
- Explain the simplification made in Exercises 1 and 2 regarding the lunar lander's mass. Why is this considered a simplification, and in which later exercises is this aspect addressed?
- State the Momentum Principle as it is presented in the "theory" section. Briefly explain how this principle relates the net force acting on the lander to its motion.
- What condition defines "landing" in the context of these exercises, based on the lander's height and center of mass? How does this definition affect the calculation of the lander's displacement?
- In Exercise 3, how does the simulation change with the inclusion of a fuel burn rate? What happens to the thrust if the lander runs out of fuel according to the instructions?
- According to the answer to the first question in Exercise 3, how does the magnitude of the gravitational force on the lander change as the thrusters fire? Explain the reasoning behind this change.
- Based on the answer to the second question in Exercise 3, how does the y-acceleration of the lander change when the vertical thruster is constantly firing? Provide the equation for \(a_y\) given in the solution and explain how the changing mass affects the acceleration.
- In Exercise 5, what specific type of motion and thruster usage is considered for deriving an analytic solution for the y-velocity? What are the initial conditions given for this exercise?
- What is the purpose of comparing the numerical simulation results to an analytic solution, as described in Exercise 5? What does a close match between these results indicate about the computational model?
Quiz Answer Key
- The three directions are +x (rightward), -x (leftward), and +y (upward). The rightward thruster provides force in the +x direction, the leftward thruster provides force in the -x direction, and the upward thruster provides force in the +y direction.
- The primary goal is to control a primitive Apollo lander and land on a target on the Moon. The secondary goal is to meet the challenge of landing on the target with minimal speed.
- In Exercises 1 and 2, mass loss due to fuel exhaust is neglected, meaning the lander's mass is considered constant. This is a simplification because in reality, burning fuel expels mass, reducing the total mass of the lander. This aspect is included in Exercises 3-5.
- The Momentum Principle is stated as \(\frac{d \vec{p}}{d t} = \vec{F}{net}\). This principle states that the rate of change of the lander's momentum (\(\vec{p}\)) is equal to the net force (\(\vec{F}{net}\)) acting on it.
- "Landing" is defined as when the bottom of the lander reaches the surface of the Moon. Since the center of mass (CM) is 1.5 m from the bottom, if the lander starts at y = 50 m and lands with the CM at 1.5 m, its displacement is 48.5 m.
- With the inclusion of a fuel burn rate, the lander's mass decreases while the thrusters are firing. According to Exercise 3, if the lander burns all of its fuel, the thrust becomes zero.
- The magnitude of the gravitational force on the lander decreases as thrusters are firing due to the loss of mass. The gravitational force is given by \(F_g = mg\), where \(m\) is the mass. As fuel is burned and mass decreases, the gravitational force also decreases.
- The y-acceleration of the lander increases as the vertical thruster is constantly firing. The y-acceleration is given by \(a_y = \frac{F_{thrust} - mg}{m}\). As mass (\(m\)) decreases due to fuel loss, the denominator decreases, and even if the numerator also decreases slightly (due to reduced \(mg\)), the overall value of \(a_y\) increases.
- Exercise 5 considers the simple case of a lander traveling vertically using only its vertical thruster as it lands. The initial conditions for this exercise are: initial velocity \(<0, -20, 0>\) m/s, initial position \(<0, 50, 0>\) m, and mass burn rate \(-500\) kg/s.
- The purpose of comparing numerical and analytic solutions is to test the accuracy and validity of the computational model. A close match suggests that the simulation accurately models the physical principles governing the lander's motion under the specified conditions.
Essay Format Questions
- Discuss the role of Newton's laws of motion, specifically the Momentum Principle, in the development and operation of the lunar lander simulation. Explain how forces like gravity and thrust are incorporated into the model and how they affect the lander's motion in both horizontal and vertical directions.
- Analyze the increasing complexity of the lunar lander simulation across the five exercises. Describe the key physical parameters and interactions that are introduced in each subsequent exercise, and discuss how these additions contribute to a more realistic model of a spacecraft landing.
- Evaluate the importance of user interaction and feedback in the lunar lander game. Explain how keyboard inputs control the lander's motion and discuss the significance of the visual elements (like the lander, target, and thrust indicators) and output data (like speed and fuel mass) for the user's learning experience.
- Compare and contrast the numerical and analytic approaches to solving physics problems, as exemplified in Exercise 5. Discuss the advantages and limitations of each method, and explain why comparing the results from these two approaches is a valuable way to validate a computational model.
- Based on the provided exercises, discuss the key challenges involved in landing a spacecraft safely on the Moon. Consider factors such as controlling horizontal and vertical motion, managing fuel consumption, achieving a low landing speed, and the role of thrust and gravity in the descent.
Glossary of Key Terms
- Thrust: A force exerted on the lunar lander by its engines, produced by the expulsion of exhaust gases. In this simulation, thrust is constant when a thruster is engaged.
- Gravity (g): The force of attraction exerted by the Moon on the lunar lander, directed downwards (-y direction). It is modeled as a constant gravitational field with a value of 1.6 N/kg.
- Net Force (\(\vec{F}_{net}\)): The vector sum of all forces acting on the lunar lander at any given time, including gravity and thrust.
- Momentum Principle: A fundamental law of physics stating that the rate of change of an object's momentum is equal to the net force acting on it (\(\frac{d \vec{p}}{d t} = \vec{F}_{net}\)).
- Velocity (\(\vec{v}\)): The rate of change of the lander's position with respect to time, indicating both its speed and direction.
- Acceleration (\(\vec{a}\)): The rate of change of the lander's velocity with respect to time, determined by the net force and the lander's mass (\(\vec{a} = \vec{F}_{net} / m\)).
- Fuel Burn Rate (\(\frac{dm}{dt}\)): The rate at which the lander consumes and expels fuel, resulting in a decrease in the lander's mass over time when a thruster is firing.
- Center of Mass (CM): A point representing the average position of the mass of the lunar lander. Its motion is what the simulation primarily models.
- Safe Landing Speed: The maximum allowed speed at which the lunar lander can touch down on the surface to avoid damage (less than 1 m/s in Exercise 1).
- Safe Landing Zone: The allowed area around the target within which the lunar lander must land (within ± 1 m of the center of the target in Exercise 1).
- Analytic Solution: A mathematical solution to a problem expressed in terms of known functions and variables, often derived through algebraic or calculus-based methods.
- Numerical Computation: An approximate solution to a problem obtained through step-by-step calculations using a computational model or simulation.
Video
[text]
Version:
- https://www.compadre.org/PICUP/exercises/exercise.cfm?I=122&A=lunarlander
- http://weelookang.blogspot.com/2018/07/lunar-lander-game-javascript-simulation.html?m=1
- http://www.glowscript.org/#/user/lookang/folder/Public/program/lunarlander
Other Resources
[text]
end faq
{accordionfaq faqid=accordion4 faqclass="lightnessfaq defaulticon headerbackground headerborder contentbackground contentborder round5"}
Frequently Asked Questions: PICUP Lunar Lander Simulation
1. What is the main goal of the PICUP Lunar Lander game?
The primary objective of the Lunar Lander game is to pilot a simulated Apollo-style lander to a designated target on the Moon and achieve a safe landing. This involves controlling the lander's vertical and horizontal motion using thrusters, aiming for minimal landing speed within a defined landing zone.
2. How does the simulation model the lander's movement?
The simulation models the lander's motion based on Newton's laws of motion, specifically the Momentum Principle. It considers forces acting on the lander, including the Moon's gravity and the thrust generated by the lander's engines. Initially, the simulation neglects mass loss due to fuel burn, but later exercises incorporate this factor. The net force determines the rate of change of the lander's momentum, and subsequently, its velocity and position.
3. What types of thrusters does the lunar lander have in the simulation, and how are they controlled?
The lunar lander in the simulation is equipped with three thrusters that provide constant force in the +x (rightward), -x (leftward), and +y (upward) directions. Only one thruster can be engaged at a time. In the provided GlowScript code, these thrusters are controlled using keyboard inputs: the up arrow for the +y thruster, the right arrow for the +x thruster, and the left arrow for the -x thruster.
4. What are the initial conditions and parameters for the first landing exercise?
In the first exercise, the lander starts with a total mass of 1 × 10⁴ kg (including 8 × 10³ kg of fuel), an initial velocity of <0, 0, 0> m/s, and an initial position of <-10, 50, 0> m. The Moon's gravitational acceleration (g) is 1.6 N/kg, and each thruster provides a thrust of 4.8 × 10⁴ N. The target is located at <10, 0, 0> m, and a safe landing requires a speed less than 1 m/s and landing within ±1 m of the target's center. Fuel burn is initially neglected.
5. How is fuel consumption modeled in the later exercises, and what effect does it have on the lander's motion?
Exercises 3-5 introduce a constant fuel burn rate (dm/dt), representing the mass of fuel expelled per second when a thruster is firing. This causes the lander's total mass to decrease over time. As the mass decreases, the gravitational force on the lander also decreases. For a constant thrust, a decreasing mass leads to an increase in the lander's acceleration according to Newton's second law (a = F/m). The simulation updates the lander's mass and adjusts the calculations of net force and acceleration accordingly.
6. How can students test and analyze their model's accuracy in the simulation?
The exercises encourage students to test their model in several ways. Exercise 4 involves graphing quantities like gravitational force or acceleration over time to visually verify the effects of thruster firings and fuel burn. Exercise 5 requires students to derive an analytical solution for the vertical motion of the lander with constant thrust and fuel burn and then compare this to the numerical result obtained from the simulation. This comparison helps assess the accuracy of the computational model.
7. What is the significance of the "safe landing speed" and "safe landing zone" parameters in the game?
The "safe landing speed" (less than 1 m/s in the first exercise) and the "safe landing zone" (±1 m of the target) define the criteria for a successful landing. These parameters introduce a challenge to the game, requiring players to carefully control the lander's descent to avoid crashing (landing too fast) or missing the designated target area. They emphasize the need for precise maneuvering and an understanding of the forces acting on the lander.
8. What are some of the learning objectives intended for students using this Lunar Lander simulation?
The learning objectives for this simulation include enabling students to:
- Model rocket motion under constant thrust, constant mass (initially), and a constant gravitational field.
- Integrate keyboard interactions into a physics simulation for real-time control.
- Incorporate the concept of fuel burn rate and its effect on mass into the model.
- Validate the numerical simulation by comparing its results to an analytically derived solution for a specific scenario (vertical descent).
- Develop an intuitive understanding of the forces involved in spaceflight and the challenges of achieving a controlled landing.
- Details
- Written by Fremont
- Parent Category: 02 Newtonian Mechanics
- Category: 08 Gravity
- Hits: 9189