Tutorial: How to build a STELLA Model
In this tutorial you will learn how to build two simple STELLA models:
(A) water flow from a faucet into a barrel, and
(B) accumulation of money in a saving account that earns interest.
You already know other ways of modeling these situations (like a mathematical equation).
The purpose of this exercise is to learn how to use STELLA in a situation where you can test what STELLA does as a modeling
tool against other models and prior knowledge.
Barrel-filling
A barrel holds 55 gallons of water when full.
The barrel starts empty.
A faucet is opened to allow water to flow into the barrel at the rate of 4.5 gallons per minute.
Create a model that will allow you to
(a) answer the question: “How long will it take to fill the barrel?” and
(b) is flexible enough to be easily changed to predict how long it will take to fill the barrel if it has a larger or smaller volume
or if the faucet flows at a different rate.
- Start STELLA.
It will open with a new document window, a blank sheet with nothing on it, a bar of icons above it, and a world icon and two
little triangle pointers to the left.
- Click once on the world icon and it changes to X2.
- Click once on the icon resembling a rectangle at the extreme left,
move your pointer (which now looks like the rectangle) to the middle of the screen and click once.
- The pointer deposits the icon, which is a stock, selected (highlighted) and with a question mark in it.
Type a name for the stock, say Water in Barrel. (If your typing does nothing, make sure you have the stock selected.
- Water must flow into the barrel.
Click on the icon resembling a pipe and valve, move your pointer to the left of the stock,
and click and drag your pointer into the stock box until it turns light blue, and release.
- The pointer deposits the flow icon, selected, and with a question mark.
Type a name for the stock, say Faucet flow. Your model should now look like the followingSTELLA diagram :
- This would be a good time to “Save” your model under an appropriate name.
- We have a “concept map,” water flows from the faucet into the barrel,
but we do not have any mathematics in the model yet.
The question marks have to be replaced by mathematics.
Double-click on the stock and a window will pop up.
In the inner window where {Place initial value here…} is highlighted, type:
0 {gallons}
and click OK. Why did we do this?
- We have to specify how much water flows into the barrel each minute.
Double-click on the center circle of the flow icon and a window will pop up.
Where it says { Place right hand side of equation here... }, type:
4.5 {gallons per minute}
and click OK. Why did we do this?
If we typed the right hand side of an equation, what is the whole equation?
Now is a good time to Save.
- Would it be linear? If you build the model and make it linear, is it really?
What would you need to do to determine if you had a good model of barrel emptying?
Interest on Savings Account
$1000 is deposited in a savings account that earns 12% interest per year.
Assume first that the interest is compounded (deposited in the account) annually.
Assume no deposits other than interest are made to the account, and no withdrawals are made.
How much is in the account after 10 years?
How many years does it take the account to double in value?
-
After starting STELLA and changing the world icon to X2, build a STELLA diagram that looks like the following.
Geometric placement of icons is not important, but the direction of arrows and what they connect to is.
[Hint: the converter and connector icons are next to the stock and flow icons at the top of the STELLA worksheet.
Selecting and depositing a converter is like selecting and depositing a stock;
placing a connector between converter and flow or stock and flow is like placing a flow,
except you must click and drag from within the “source” to within the “target.”]

- “Mathematizing” the conceptual model above means replacing the question marks by mathematics.
How you mathematize the model depends upon the information in the problem situation and the knowledge you bring to bear,
including assumptions in the problem statement, of how savings account interest works in the real world.
- What should you place as the initial value in the Savings Account stock?
Do it, and don’t forget to put the units of the stock in curly brackets {dollars}.
- What should you set the Annual interest rate to be?
Double-click on the converter and put that figure, followed by the units {dollars per dollar per year}
where it says { Place right hand side of equation here... }. Did you remember that percents are decimals?
- The flow Amount of Interest is next, and it is really important to get it right.
(What does “right” mean here?) Think about what the red connector arrows say conceptually:
both the Annual interest rate and the Saving Account Balance affect the Amount of Interest.
Double-click on the flow icon. Notice that you have two Required Inputs listed in the subwindow.
Why does STELLA think are they “required?” By what do you think you should replace the phrase
{ Place the right hand side of the equation here…}?
- In the subwindow, click once on Savings Account Balance, then once on the * symbol on the calculator pad next to
the subwindow, then once on Annual interest rate. The right hand side of the flow equation should look like:
Savings_Account_Balance*Annual_interest_rate {dollars per year}
Be sure you included the units in curly brackets {dollars per year}.
Note that to STELLA the * symbol means multiplication.
- Before we set up some output observable, predict the behavior of your model after one and two years.
How much money should be in the savings account at the end of one year? At the end of two years?
Should the same amount be deposited at the end of the second year as was deposited at the end of the first year?
- Under the Run menu, select Time Specs. In the window, make the Length of the Simulation From:
0 To: 10 and set DT to 1. Click on Years under Units of Time. Click OK.
DT=1 tells STELLA to simulate making a deposit (the Amount of Interest flow) to the account once each year.
- We could have STELLA produce a graph of the Savings Account Balance over time in years.
For a change, we will have STELLA produce a table. Next to the Graph Pad icon is a Table Pad icon.
Click on the Table Pad icon and deposit it on the worksheet. A Table Window pops up.
Move it so it doesn’t obscure your model and pin it down.
- Double-click on the surface of the table.
In the window that pops up, move Savings Account Balance and Amount of Interest from the Allowable subwindow
to the Selected subwindow. Click OK.
You can use the hand pointer to change the width of the columns in your table to make it easier to read the titles.
If you want to resize your table, unpin it, resize it, and pin it down again.
- Under the Run menu, select Run. The table fills with values.
You can now answer the questions in the original problem: How much money is in the account after 10 years?
How many years does it take the account to double in value?
- Modify your model to see how much money will be in the account after 20 years.
Try out different interest rates. What interest rate would cause the account to double in 5 years?
- Test your understanding.
Return to the annual interest rate of 12%.
As you can see in the table, the Amount of Interest deposited into the account each year is not the same from year to year.
Use the mathematics in the model to explain why the Amount of Interest deposited into the Savings Account is what it is each
year. What would you expect the graph of the Savings Account Balance to look like?
Describe it in words. Sketch what you think the graph might look like. Use Stella to test your hypothesis.
Graph Savings Account Balance over 20 years.
- Extend your understanding.
Go back to Time Specs and change DT from 1 to 0.25.
This tells Stella to simulate depositing interest in the account every ¼ year.
Leave the interest rate at 12% annual interest.
What do you think will happen to the balance after 10 years compared to the original simulation with DT=1?
The same? More? Less? Test your hypothesis by running the simulation.
(You may not be able to see the whole table at once now;
use the scroll bar in the table to move about the table from final to initial values.)
Use the mathematics in the model to explain the results.