Lesson 3 Activity 1 - Add a water pump

In this lesson, the students will modify the base Water Pumping model to include additional water pumps. In the first activity, the students will add a second water pump that pulls water from the aquifer. Next, students will add monitors and a line graph that collects and displays the cumulative amount of water pumped by each pump.

Activity #1: Adding a Water Pump
  • CS review: find and decode the procedure that creates the initial pump.
  • Duplicate and alter the procedure to create a new pump.
  • Add monitors and line graphs to display and visualize data.
  • Test your model.

We are going to add another pump to the model, then add output widgets so we can assess the impact of the new pump when we run experiments. What do you predict will happen when we add a new pump? (Practice 1: Asking questions and defining problems) (Practice 2: Developing and using models) (CCC: Cause and Effect)

• Review concepts of infiltration and aquifers.

We’ll be adding a new pump that pulls water from the aquifer.  Review what we know about how the first pump was created.
Remember to remix the project before making any changes.

Description of how the first pump was created: 
  • In the “makePump” procedure a red turtle is created at (0, 3) and is set to head towards the bottom edge of Spaceland.
  • Then the turtle takes 49 steps forward while stamping the grid beneath it red at each step.
  • Next, the turtle sets its color to yellow and continues 5 more steps forward while stamping the grid beneath it yellow at each step.
  • Finally, the turtle is no longer needed so we delete it.

Duplicate the first pump's "makePump" procedure to create a new pump.

  • Start by making a copy of the existing code for creating a water pump
    • use the rectangular lasso to select, copy, and paste a whole code block. Don't forget to rename the procedure.
  • In code, change the x, y location of the turtle to reposition the second pump at a distance from the first pump.
  • Consider how you will be able to distinguish the number of water particles drawn up by each pump so we will need to be able to tell whether a water molecule is pulled up by one pump or another.
  • Brainstorm and attempt a solution to this challenge.

Add monitors and line graphs to display and visualize data

  • Use the Edit Widgets tool to add two output data boxes and a line graph  
  • Start by adding two monitors, one for the water pumped by the first pump head and one from the new pump head.
    • Click the “Edit Widgets” tool in the Spaceland window then click on “Create Widget.”
    • Select “Data Box” and then name the widget “Water pumped by #1” and click “Add Widget.” Reposition the widget where it is clearly visible and does not overlap any existing user interface element. Do the same steps to create a widget called “Water pumped by #2.”
    • These data boxes can now be used as global variables. The value held in the data box can be updated by any agent.
  • Next, add the code that will initialize the values of these data boxes, then increment (or increase) the value anytime an agent interacts with the pump.
  • Don't forget to initialize the values in the setup procedure and increment the values in the “pump” procedure.
  • In order to collect and visualize quantitative data we need to add  line graph in StarLogo Nova. With this information we will be able to compare patterns in the collected data.
  • For this model, what products do we want to monitor? [We’d like the graph to collect data on the time elapsed since the model started running and the cumulative number of water molecules pumped by each pump over time.]
  • Create a new line graph called “Water Pumped over Time.”
  •  Add new series to the graph by double clicking on New Series and changing the name and line color. For example, create a new series called “Pumped_by_1” then select red as its line color then create a new series called “Pumped_by_2” then select black as its line color.
  • Finally, click “Edit Widgets” to leave editing mode and return to play mode.
  • Next, we want “The World” to update the line graph each time through the forever loop, so we need to add a “while forever toggled” loop on the page labeled “The World.”

  • Notice that we need the “clock” along the x-axis and the cumulative number of water pumped on the y-axis. Where can we get a count of water agents pumped? [The value is held in the “Water pumped by #1” data box already, so use it.]
  • Add in similar “Add data to line graph” command blocks to the “while forever toggled” loop for each of the other products you would like to monitor in the line graph.

Test your model:

  • Click the “setup” button. Did the value in the “Water pumped by #1” and “Water pumped by #2” data boxes get reset to zero? Click on “forever.” Does the model behave as expected? Is the line graph displaying data? Are the water molecules getting sucked up by the pumps? (Practice 3: Planning and carrying out investigations)

Additional modifications: (optional)

  • Change the pump depth
  • Change the pump head surface area
  • Add even more pumps


Upload a link to your new model and your model design form to your portfolio in the section "SL Nova projects- Earth" under the heading "Water as a shared resource - multiple pumps".   Reflect on how you could make this model more realistic.  For example, in your community, what would be a relevant example of how water is shared among stakeholders?