Skip to main content
Version: 26.0

FlowTank

Inherits from FlowObject

Description​

The main class for FloWorks content-holding objects, such as Tanks.

Properties​

PropertyDescription
contentGets or sets the current content.
maxContentGets or sets the maximum content.
isEmptyReturns a value indicating whether the object is empty.
isFullReturns a value indicating whether the object is full.
statsAllows access to a FloWorks object's statistics.

Details​

FlowTank.content​

double content

Description​

Gets or sets the current content.

This property will return the current content of the object.

You can also use it to set the current content, however you should use this functionality with caution!

An error will occur if you try to set the current content lower than 0 or above the current maximum content.

FlowTank.maxContent​

double maxContent

Description​

Gets or sets the maximum content.

This property will return or change the maximum content of the object.

An error will occur if you try to set the maximum content lower than 0 or below the current actual content.

FlowTank.isEmpty​

readonly isEmpty

Description​

Returns a value indicating whether the object is empty.

This property returns 0 if the object has any content, and non-zero if it is empty.

if(tank.isEmpty) else

FlowTank.isFull​

readonly isFull

Description​

Returns a value indicating whether the object is full.

This property returns 0 if the content of the object is below the maximum content, and non-zero if it is empty.

if(tank.isFull) else

FlowTank.stats​

readonly stats

Description​

Allows access to a FloWorks object's statistics.

This property provides the following properties and methods:

input - returns the input tracked variable

output - returns the output tracked variable

content - returns the content tracked variable

state(Variant& profile = nullvar) - returns a state tracked variable. If no profile argument is given, or if it is 1, then the default FloWorks state profile is returned. If the profile argument is equal to 0, the default FlexSim state profile is returned (note that most FloWorks objects do not use this). Other state profiles can be returned by providing the profile number or name.

// Get the state of a pump FlowObject obj = model().find("FlowPump1"); int curState = obj.stats.state().value;