Welcome to Part 2 of the Fluid Library orientation, which showcases an example model of chocolate production. Mainly, the model illustrates how to use different tanks, including Regular tank, Mix tank, and Process tank. Also, it shows how to design a branch fluid flowchart with Split, Merge, Select Input, and Select Output blocks. Transportation is performed with pipelines and conveyors. Finally, each 0.5 kilogram of prepared mass forms a chocolate bar, an agent of the Process Modeling Library.
Almost every model has three basic blocks: Source, Pipeline, and Tank. Source block creates a flow, at a certain rate, and pushes it. If the front block cannot accept the flow (has a rate equal to 0, or a full Tank with a closed output valve), then Source block stops generating the flow. Its ouput port becomes orange, indicating that the rate is equal to 0. Tank acts like a bath because it has capacity and an output valve. Tank pushes its materials like Source block, but unlike Source, its capacity is limited. If the incoming rate is not greater than outcoming, then Tank will be empty. Otherwise, Tank will accumulate the materials at the incoming rate. On full capacity, Tank becomes a bottleneck because both rates become equal. Pipeline is like a horizontal Tank. It has capacity and rate (throughput), but it does not push its contents, it just transports materials in case the behind blocks push the flow. If, for example, the Tank is empty, the following Pipeline will not transport the materials that remain inside it after the Tank becomes empty.
Sourse block
Tank block
Pipeline block
Going back to the model, there are three Source blocks that create a material flow, according to the rate. The first two branches accumulate a certain buffer in Regular tanks and then transport materials to the first Mix tank. The third branch has a Split block. This block acts like a rudder, routing materials to the top or bottom branch, as well as splitting the flow among both branches in a certain proportion. In the model, a Split block forwards the flow to the top branch if the Mix tank has space. Otherwise, the flow is forwarded to the bottom branch.
Split block
A Split block may limit the throughput. In the model, it does not limit throughput, so the flow moves at conveyor speed. This feature is very similar to the pull protocol of the Process Modeling Library: the flow moves until there is a block that pulls agents and space for these agents. In a fluid flowchart, it is determined by the space in tanks and pipelines. Conveyors do not have capacity, they just move a certain amount of material at the specified speed. If the front blocks do not have space, a conveyor will freeze, unlike the accumulating conveyor of the Process Modeling Library. The speed of the warmed-up flow is limited by the block with the lowest rate. Maximal rate is 10 billion of cubic meters per second. This is the native limitation of all blocks in unlimited rate mode.
Our next point in the model exploration is the Process tank in the bottom flow branch. A Process tank accumulates the flow until a certain amount is collected and its output valve is closed. Then, the tank closes its embedded input valve and processes the materials. On delay, the end tank opens the output valve, releases the entire amount, closes the output valve, and opens the input valve. Then the cycle starts from the beginning.
Process tank
The next block is Select Output which is similar to Split block because it routes the entire flow to the top or bottom, depending on the specified selection or incoming batch.
Select Output
Our next blocks for review are Mix tank and Convert. Mix tank is an extended process tank. It mixes up to five components, processes, and releases a new batch. You can specify an absolute or relative number of each component for the output batch.
Mix Tank
Convert block allows manipulation of the batch after certain processing. It can increase or decrease the amount, as well as change the batch type. In chocolate production, it just changes the batch type, leaving the amount unchanged. This reflects a rolling process that is performed at a rate of 0.4 kilograms per second (rates of pipeline and conveyor).
Convert block
So, after the successful mix of sugar, milk powder, and liquor paste, they should be conched. There are three agitators (Process tanks). The tank is selected according to Select Output, and output flow is chosen with Select Input blocks. The switch is performed inside, On Full and On Empty actions of tanks. Initially, the first tank accumulates input. When it is full, the flow is forwarded in the second tank (then third, and back to the first one). On Empty actions have the same logic. Initially the first tank is used, then the second, then the third, and then the first once again.
This logic requires 10 additional lines of code (call of select function). It is possible to simplify the logic and get the same result without additional coding. Try to guess how to replace Select blocks!
Now, the remaining part of the flowchart should not cause any problems with decomposit on. The only nondiscussed block, Merge, is an antipode of Split block because it creates a batch from two input flows. In the model, it mixes the batches in a certain proportion (paste and filling are batches). Similar to Split block, it can automatically take in the flow according to priorities. If the priority flow has 0 rate, then only the second flow can be taken.
Merge properties
At this point, we have covered more than half of the Fluid Library. Let's go to another model and continue exploring. Next time, we will discuss the working process of gas station and how to use the rest of the library's blocks.