SIMUL8 Corp


 
support.SIMUL8.com
  Back Issues
Learning Zone
Cafe
Templates
Components
Training
Register
support.SIMUL8.com
 
What do you think of this issue?

Poor
Good
Great
Learning Guide


Welcome to this month's newsletter! In this issue you'll find:


Tanks and Pipes 2 - Run Time Control by Andrew Rooney

In the last Newsletter we showcased the SIMUL8's Tanks and Pipes and introduced some new features, like Auto Adjust Tanks and the Constrained Rate Property of pipes. This newsletter builds on this and shows how to exert run time control by changing the properties of pipes in a model, depending on current stock levels in Tanks.

SIMUL8 tanks let you set a Capacity and a start level, and allow run time control through the Visual Logic tab. This means that you can make changes to the simulation when key events happen in the tank, like it gets full or empty, or passes certain key levels.

The best way to illustrate this is through an example.

Lets say that a Tank has a capacity of 100 gallons and is filled from 2 sources. Each source delivers 10 gallons per minute into the tank and the outflow from the tank is 15 gallons per minute, meaning that, as more is being delivered than can leave, stock will build up in the Tank. The objective is to maintain the stock in the tank at no more than 75 gallons and no less than 25 gallons, and this is maintained by turning on and off one of the infeeds by opening and closing a valve. SIMUL8 doesn't have a Valve object so we will simulate the valve by changing the flow rate on a pipe.

This example gives us 3 Tank levels to monitor: more than 75 gallons; between 25 and 75 gallons; less than 25 gallons. What the simulation will need to is to maintain the level between 25 and 75 gallons by opening and closing a valve - setting the flow rate on a pipe to either 0 or 10 gallons per minute.

 

So what needs to happen is that whenever the tank reaches or rises above 75 gallons then a command needs to run to shut the valve and when it falls to 25 gallons then the valve is reopened. No other controls need to be added.

To do this enter the upper and lower limits into the Visual Logic Rise Through and Fall Through limits in the tank that is fed by the 2 sources. This means that any Visual Logic entered into the On Pass Up or On Pass Down buttons will run whenever the limits are reached. The controls in this case are simple: turn the pipe representing the vale on or off by changing its flow rate - on Pass Up set the flow rate to 0 and on Fall Through set the flow rate to 10.

Whenever a pipe has its flow rate altered you will need remember to set it back to its starting rate when the simulation is Reset. Simply add this to the Reset Visual Logic.

This simple approach allows the model to maintain the volume in the tank, but lets add some more complication. When the level in the tank falls to 50 gallons then the valve gets turned on to a rate of 2.5 gallons per minute. This means that there is now an intermediate event needed.

The sequence needs to be:
If the Tank has 75 gallons or more then turn off the valve
If the Tank falls to 50 gallons turn the valve on to 2.5 gallons per minute
If the Tank falls to 25 gallons turn the valve up to 10 gallons per minute.

This can be done by using Visual Logic to change the Fall Through level and the flow rate through the Valve pipe. The Fall Through code needs to be changed so that it checks the current contents of the Tank and sets the Flow Fate based on the amount of fluid in the Tank. If the Tank contains 50 gallons then it changes the Fall Through level to 25 gallons.

So, using the Rise Through and Fall Through levels in Tanks is a quick and easy way to monitor levels and to change the simulation. You can even make changes to the Fall Through or Rise Through levels in a Tank so that you can apply different logic at different levels.

Download An Example

If you have any questions on this topic please email support@SIMUL8.com, we're here to help!


Free Downloads

Our website is always being updated with new support resources. Here are details on some of the downloads that were added this month.

New Learning Zone Models

Groups and Display +. A small model that shows an image depending on a work items location in a group of work-centers.
Download the Example

Segregate Work Center Results. Records the time a Work Center spent processing work items by Label Value.
Download the Example

Compare Text Labels. This example shows how to compare a text label with text values held in a spreadsheet
Download the Example

New SIMUL8 Service Pack Version 11 Build 739
A new service pack for SIMUL8 R11 has been released. SIMUL8 10.0.0 739 fixes a few issues and enhances the auto adjust replicate feature.
Download the Service Pack | Full Details of What's in the Service Pack


Hints and Tips

As part of keeping in touch with our users I often do support. Last week I was helping a user debug a simulation, they'd spent hours trying to debug. Debugging is easy for us because all our support team use SIMUL8 Pro! If you are a power user using a lot of Visual Logic then maybe you should consider upgrading this year.

We're going to repeat September's Master Class on debugging, if you'd like to attend click here.

Value Tips

Whilst in debug mode whenever you hover your mouse over any 'variable' or 'object property' in Visual Logic the value is displayed in the status bar. This makes time spent debugging much more productive.

Watch Window

This debugging aid shows you the state of any part of your simulation at any time.  Any formula or property reference can be added to the window.  Its value is updated as it changes.

And the watch window's dockable so you can leave it visible as your simulation runs

Click right in Visual Logic windows has Watch Window options for use during debugging. You can even add values to be watched directly from the Visual Logic window.

Stop When Value Changes

Any variable in the watch window can be set to stop the simulation when it is changed through VL. You can then view the logic which caused the change.

These features are only available with SIMUL8 Professional


SIMUL8 Master Classes

Master Classes give you a chance to get access to our most experienced consultants. You learn lots of non-documented hints and tips and get a chance to make suggestions on how we can improve SIMUL8. Master Classes cover different technical support topics each month and include a Question and Answer session.

Master Classes are free and are conducted over the internet via WEBEX Conferencing software. The next scheduled Master Class is on 18th November 10am (EST) and will be presented by Mark Elder our CEO who has over 20 years experience in simulation modeling. The topic will be 'Debugging Simulations'. This class will show Professional & Standard debugging features.

This is a repeat of Septembers masterclass - for Pro & Standard users after popular request!

See our support website for more details and to sign up


If you have any questions generated from, or comments about this newsletter then email Newsletter@SIMUL8.com

You are receiving this e-mail because you subscribed or are a registered SIMUL8 user. To unsubscribe click here.