Description
The process is the hypothetical production of pepper from salt; the alchemic recipe is based on a proprietary spell which transform the commodity inorganic “salt” in the high-valued spice “pepper”.
The incomplete reaction takes place is the watery phase, where the reactant is soluble. The reaction educt is insoluble in water and precipitates, which makes possible to recover most of the product on a belt filter.
The mother liquor is recycled to recover the unreacted salt and increase the overall yield.
The process flowsheet is portrayed in the figure:
Main data
The feed to the process is 1000 kg/h of watery solution with 5% of salt.
The reaction converts 1 kg salt into 1 kg pepper, but the one-pass yield is 90 %.
The solid pepper is filtered with a 99 % recovery to obtain a cake with 10 % imbibition solution.
The mother liquor is assumed to have the same salt content as the cake imbibition solution.
The mother liquor purge is 5 %.
Resolution
The connectivity is represented within LIBPF as a Directed Cyclic Graph: 
The command addcut("S06") in the setup method cuts stream S06 and makes the graph a Directed Acyclic Graph shown in figure 3.
Stream S06bis is a new feedstream, whose values are initialized to default values (10000 kg/h equimolar); the DAG can be then solved sequentially.
For maximum speed only two sequential iterations are performed, then the solution proceeds simultaneously.
For the simultaneous solver this problem exposes 15 unknowns, and gets solved in 9 iterations; the sparse jacobian structure is shown in figure, where the blue cells represent tiny elements:![]()
The timings in typical modern hardware are 2 s for the initial resolution and 1 s for the subsequent resolutions.

