Step 2: Adding variables and influences

 

Adding variables

We shall now assume that there is a continuous discharge of pollutant into Lake1 in addition to the initial dumping incident.
We will define the discharge as a variable component, where Discharge = 25*sin(t*π/365).

A variable is a value which is calculated as the model is run, according to its equation. Before adding the variable, we will add a new parameter, π (pi), to our model.

To follow this example load the model "tutor1.mod"

  • Activate the Parameters view by selecting it in the Model Explorer
  • Add a new parameter with the symbol pi and the approximate value 3.1415927
Now we can define the variable, Discharge:
  • Activate the Diagram view (Main) by selecting it in the Model Explorer
  • Add a variable, V1, to your model
  • Double click the variable to open the Variable Definition dialog box
  • Enter Discharge in the Symbol edit box and 25*sin(t*pi/365) in the Equation edit box
  • Click OK
The next step in our model definition is to tell ModelMaker that Lake1 will use the value of the Discharge variable. This is done by using an influence.

Adding influences

  • Select the Influence icon
  • Click Discharge followed by Lake1
The influence is inserted between the two components.

Next we must update the equation of the Lake1 compartment to take account of the Discharge variable.
  • Double click Lake1 to open its definition dialog box
  • Update the Equation edit box to read Discharge - River
Select the graph of Lake1 and Lake2 and re-run the model. The amount of pollutant now increases towards the end of the run, as the pollutant discharge increases.

The completed model for this step is "tutor2.mod"

Return to the main tutorial page
  
ModelKinetix is a trade name of FamilyGenetix, managed by AP Benson.
© FamilyGenetix 2001-2003