Fluid Exit

Forwards the flow into the connected FluidEnter block. Is designed to set up flow networks dynamically, for example, when the network configuration is read from a database, or when dynamic re-routing is needed between multiple parts of the network, such as replicated fragments, which may not be well managed by FluidSelectOutput and FluidSelectInput blocks.

The initially connected FluidEnter block can optionally be set in the Forward flow to parameter and then changed later by calling connect() and disconnect() functions. 

A FluidExit block can be connected to at most one FluidEnter block at a time, and vice versa.

Demo model: FluidEnter and FluidExit


Forward flow to
The FluidEnter block initially connected to this FluidExit (optional).
Syntax: FluidEnter fluidEnter
Show batches in flowchart
If set, the block icon will display the batches size and color.
Syntax: boolean showBatchesInFlowchart
On new batch [code]
Action executed when a new batch appears at the input. It will not necessarily start flowing into the block.
Local variable: Object batch - the batch
On rate change [code]
Action executed when the flow rate changes. Please note that changing something in the action may result in another immediate rate change and immediately following another call of On rate change, so the user can possibly create a livelock.
Local variable:  double inrate - the current input rate


double amountPassed() - Returns the total amount passed through the block since the start of the simulation.

double amountPassed(AmountUnits units) - Returns the total amount (in given units) passed through the block since the start of the simulation.

double currentRate() - Returns the current flow rate of fluid that goes out.

double currentRate(FlowRateUnits units) - Returns the current flow rate (in given units) of fluid through the block.

void resetStats() - Resets statistics collected for this block, including the statistics collected for its ports.

void disconnect() - Disconnects this block from the connected FluidEnter block, if any.

void connect(FluidEnter fluidEnter) - Connects this block to the given fluidEnter block. Prior to this, disconnects both blocks from previous connections, if any.

FluidEnter getConnection() – returns the FluidEnter block currently connected to this Fluid Exit, or null.

boolean isConnected() - Tests if the block is currently connected to a FluidEnter block. Returns true if the block is connected, and false otherwise.


The input port.