Page 362 - ExtendSim User Guide

P. 362

```
336 Tutorial for Discrete Rate Systems
A basic discrete rate model
Verifying results
This is a good opportunity to verify the results. There is never any change to the rate of flow, so there is no need for the model to recalculate the effective rate. This means that the simulation is finished in two events: the start event and the end event. The plotter indicates that the effec- tive rate is 100 and a total of 48,000 gal- lons of product (shown on the Y2 axis) have been produced in the process. This makes sense because the assumptions were that 100 gallons of yogurt would be produced per minute and the simulation time is 480 minutes.
Add a dynamic constraint
Plot of simulation
While the preceding model used a con-
stant maximum rate, a more common situation is for a Valve’s maximum rate to change with time. The model assumptions are that the liquid is processed into yogurt at a rate of 100 gallons per minute for most of the day, but that during the lunch period the rate is reduced to 60 gallons per minute. To show this in the model:
Add a Lookup Table block (Value library) to the model.
Connect the Lookup Table block’s output to the R (maximum rate) input connector on the
Valve.
In the Lookup Table block’s dialog, select Lookup the: time.
In the block’s Options tab, enter the column labels Minute;Gallons/Minute.
In the block’s Table tab, enter the values shown at the right for the Minute and Gallons/Minute col- umns. This will cause the Valve’s maximum rate to be 100 gallons/minute for the entire model except for the period from time 240 to time 300, when it will be 60 gallons/minute.
Label the block Variable Constraint Rate.
The model should now look like the screenshot at the right. When the simulation is run, the plot shows that the Valve’s maximum rate (from the Lookup Table block) is 100 gallons/minute for most of the day, but changes to 60 gallons/min- ute for 60 minutes, as expected. It also shows that the yogurt output is reduced from the 48,000 gallons achieved in the previous model. This occurs because the Valve’s maximum rate reduced from the constant 100 gallons/minute in the previous model.
Values for Lookup Table’s dialog
Adding a variable constraint
Discrete Rate
```