Tutorial 3: Flowsheets with Recycle

This section provides a tutorial on working with flowsheets containing recycle. Sections Tutorial 1: Creating a Flowsheet and Tutorial 2: Creating a Flowsheet with Linked Simulations provide tutorials for creating flowsheets, in this section a pre-constructed flowsheet is used.

The file for this tutorial is Mass_Bal_Test_02.foqus, and this file is located in examples/tutorial_files/Flowsheets/Tutorial_3.

Note

The examples/ directory refers to the location where the FOQUS examples were installed, as described in Install FOQUS Examples.

  1. Open FOQUS.

  1. Open the examples/tutorial_files/Flowsheets/Tutorial_3/Mass_Bal_Test_02.foqus file.

    1. Open the Session drop-down menu on the right side of the Session button (Figure Flowsheet with Recycle).

    2. Select Open Session from the drop-down menu.

    3. Locate Mass_Bal_Test_02.foqus in the file browser, and open it.

  2. Click Flowsheet button from the toolbar at the top of the Home window.

The flowsheet is shown in Figure Flowsheet with Recycle. The flowsheet consists of two reactors in recycle loops. The flowsheet contains mixers, reactors, separators, and splitters. Each node uses a set of simple calculations in the node script section. The tear edges are shown in light blue.

Flowsheet with Recycle

Flowsheet with Recycle

  1. Inspect a node.

    1. Make sure the Selection tool is selected (Figure React_01 Node.

    2. Open the Node Editor by clicking the Node Edit button in the left toolbar in the Flowsheet view.

    3. Click the “React_01” node.

    4. Click Input Variables table. Note: Some input rows are colored red. This denotes that their values are set by output of the previous flowsheet node by the edge connecting “Mix_01” to “React_01.”

    5. Click the Node Script tab.

    6. Note the equations. Input Variables are stored in the x dictionary and Output Variables are stored in the f dictionary.

  2. Click the gear icon in the left toolbar (see Figure React_01 Node. The tear solver settings are shown in Figure Tear Solver Settings.

React_01 Node

React_01 Node

Tear Solver Settings

Tear Solver Settings

  1. Remove the tear edges.

    1. Close the Node Editor.

    2. Open the Edge Editor. Click the Edge Editor icon in the left toolbar (see Figure Edge Edit.

    3. Click the edge between “React_01” and “Sep_01.”

    4. In the Edge Editor, clear the Tear checkbox.

    5. Repeat for the other tear edge.

  2. Close the Edge Editor.

Edge Edit

Edge Edit

There should now be no tear edges in the flowsheet. The user can select tear edges or FOQUS can automatically select a set. If there is not a valid set of tear edges marked when a flowsheet is run, tear edges will automatically be selected.

  1. Automatically select a tear edge set by clicking the Tear icon in the left toolbar (see Figure Edge Edit).

  2. Open the Node Editor and look at node “Sep_01.” In the Input Variables table, notice that some of the input lines are colored yellow. The yellow inputs serve as initial guesses for the tear solver. The final value will be different from the initial value.

  3. Click the Run button on the left toolbar. The flowsheet should solve quickly.

  4. The results of the completed run are in the flowsheet. An entry will also be created in the Flowsheet Results data table (see Section Tutorial 4: Flowsheet Result Data.