Page 94 - ExtendSim User Guide
P. 94

Removing overflow from the Holding Tank
mum Reservoir Depth allowed (B). If yes, it will assign a value of 1 to the Y output connector. If no, it will assign a value of 0 to the N output connector.
Comparing contents to overflow limit
To calculate the difference between the capacity limitation and the tank’s contents:
Add a Math block to the right of the Constant block, set its function to Subtract, and label the block Subtract excess.
☞ In addition to selecting functions directly in the Math block’s dialog, you can choose settings by right-clicking near the sensitized area (looks like a partially turned page) on the lower right of the block’s icon.
Add a Contents named connection to the top input of the Subtract block.
Calculating the excess water
Connect the output of the Constant block to the bottom input of the Subtract block.
Validating intermediate results
When building a model, it is good practice to frequently test if the model is working correctly. Even though this model isn’t yet finished, validate that model elements are calculating as you would expect them to.
Run the simulation.
Click the model window to make it the active window.
Hover the cursor over the connectors of the blocks you’ve added to see the results.
For example, the top input of the Math block shows the current con- tents from the Holding Tank, the bottom input shows the Constant value (50), and the output connector shows the result of the subtrac- tion. (Note that your results may be slightly different from those at right because the Stream source is random.)
Calculating how much water to remove
Subtraction results
The Decision block’s Y connector outputs 1 (one) if the tank’s contents exceeds the limit, but outputs 0 (zero) if it doesn’t. This information can be used in a calculation.
Add another Math block to the model, set its function to Multiply, and label the block Then overflow.

   92   93   94   95   96