This is a demonstration of a method of feeding an arbitrary set of input or inflow values into a model. It is assumed that the reader is able to re-create the model below, using Stella® Systems Simulation Software. If you need to refresh your memory on the basics of Stella, then click this link. This information is intended for students in Dr. David Hansens course, CIVL 4720, Civil Engineering Computations (Part I), Department of Civil Engineering, Dalhousie University.
Start by creating this model:
Give meaningful names to the stocks, flow controllers and
converters, as shown.
Both tanks should have initial values = 0.
Set the equation for the converter "Flow Rule" to
"Tank_1 /100".
Select the converter "Rainfall" as the value of the
flow controller "Rain Flow In".
Select the converter "Flow Rule" as the value of the
flow controller "Flow Between Tanks".
Type time
(which replaces the highlighted
{Place right hand side of equation here... }
),
then click on the "Become Graphical Function
"
button (not the "OK
" button).
In this new dialog box, adjust the time range and the number
of data points to match your desired input data.
For this example, we want to import the following rainfall
data:
Time | Rainfall | ||
---|---|---|---|
0 | 0.00 | ||
15 | 1.25 | ||
30 | 9.75 | ||
45 | 21.60 | ||
60 | 30.50 | ||
75 | 31.90 | ||
90 | 25.85 | ||
105 | 19.30 | ||
120 | 13.20 | ||
135 | 7.60 | ||
150 | 2.40 | ||
165 | 0.00 |
Click on the first non-zero value in the rainfall column
(beside time 15).
The "Edit Output
" box becomes highlighted.
Just type the new value, 1.25
, and press
Enter
.
The "Edit Output
" box will now shift to the
next value of time.
Just keep typing each successive value of rainfall, followed by
Enter
.
When you have entered the last non-zero value, the dialog box
should look like this:
Note how Stella builds up the inflow graph as each value is
edited.
Also note how Stella, by default, interpolates between consecutive
values.
To access later values of time, use the scroll bar at the
base of the graph.
Scroll back to the beginning.
If you do not want Stella to interpolate between consecutive
values, but to use a step-function input, then click on the
graph icon
and note how your graph changes.
In this case, interpolation makes sense, so click the icon
again to return to a continuous input graph.
Click "OK
" to close this dialog box
and to return to the model.
Place a graph on the model, double click to
set its title and the variables to be graphed, rescale
the axes appropriately, then run the model until time
450. This should produce the following output:
Manual entry of a large quantity of these arbitrary values can be a nuisance, especially if the values exist in another application, such as a spreadsheet. Suppose that the values shown in step 5 above exist in a column in an Excel worksheet. Carry out steps 1 to 5 above in Stella, then switch to your spreadsheet.
|
Then select the values, as illustrated, and copy them into the clipboard (by any one of the following methods:
|
Switch back to Stella and click on the header of the column into
which you wish to import these data. The entire column
of values should become highlighted in reversed colours.
However, of the four methods of pasting data that one could choose
in Excel, only one will work here in Stella:
press "Ctrl+V
".
Of the two options, "Paste
" should be
active by default (as illustrated). [If not, click on it.]
Just click on the "OK
" button,
and all the values appear at once.
"Stella" is a registered trademark of
High Performance Systems, Inc.
[Return
to your previous page]
This page was created on 2002 10 09 and last modified on 2002 10 17
by Dr. G.H. George