#### Overview

In Tutorial 4 you learned to use Unit Designers to constrain the values in the mass and energy balance. Unit Designers act as constraints to the mass and energy balance, ensuring that particular results are obtained.

In this tutorial we examine topics concerning the use of Unit Designers. In particular, we examine two topics. In the first topic, we examine how Unit Designers fail, and what to do. In the second topic, we examine how to set the order of calculation of Unit Designers.

The tutorial is the same as that in Tutorial 4. For completeness we will repeat much of the set up of that tutorial. If you have completed that tutorial and have saved it, you can straight skip to Step 13.

The tutorial focuses on the leaching of copper sulphide by oxygen. From practice, we know that the exit concentration of acid must be 10 g/L. In addition, not all of the copper dissolves, so that the exit concentration of copper in the solid phase is 10%.

In this tutorial we will use Unit Designers to constrain the solution of the mass balance, so that these two conditions are met.

You will go through the following 16 steps in this tutorial:

#### Step 1: Draw the flowsheet

Draw the flowsheet using a tank so that it looks like that shown in Figure 1.

Figure 1. Flowsheet for a leaching reactor.

Label the streams and the stream flags.

#### Step 2: Add components to the mass balance

Add the following components to the balance:

Cu2S           (s)              chalcocite

H2O            (l)               water

H2O            (g)              water vapour

H2SO4        (aq)             sulphuric acid

CuSO4        (aq)             copper sulphate

N2               (g)              nitrogen

O2              (g)              oxygen

SiO2            (s)              silica

#### Step 3: Setup stream compositions

Change the components flow rate for each of the input streams so that they are the same as those represented in the Figure 2.

Figure 2. Stream compositions

#### Step 4: Setup reactions

Set-up the following reactions:

Cu2S (s) + 2.5 O2 (g) + H2SO4 (aq) -> 2 CuSO4 (aq) + H2O (l), ext = 0.99875

H2O (g) -> H2O (l),

ext = 1.0

#### Step 5: Choose energy balance properties

Choose to calculate the energy balance as a non-isothermal balance.

This is shown in Figure 3.

Figure 3. Choosing the energy balance properties.

#### Step 6: Set the evaporation rate

We do not want evaporation from the Tank at this point, although we may want to add it later.

In the "Calculation” section of the properties for the Tank, set the evaporation rate to 0.0001 t/hr.

This is shown in Figure 4.

Figure 4. Setting the evaporation rate to 0.0001 t/hr.

#### Step 7: Calculate

Press one of the Run buttons on the Calculate process toolbar.

#### Step 8: Examine results

The flows and compositions of the product stream are shown in Figure 5.

Figure 5. Results for the PRODUCT stream.

The temperature has risen to 135°C and most of the copper has been removed.

The acid concentration has dropped from 29 g/L to 11 g/L, and the copper concentration has risen to 27 g/L.

The gas concentrations in the VENT stream are shown in Figure 6.

Figure 6. Results for the VENT stream.

The oxygen concentration has decreased from 98% to 92%.

There is a small amount of water vapour in the gas stream, in line with the specification that the evaporation is     0.0001 t/hr.

#### Step 9: Adding a Unit Designer to constrain the acid concentration

Suppose that the design or the calculation requires that the concentration of acid is 10 g/L.

In this case we wish to adjust the flow rate of SPENT so that the acid concentration is 10 g/L.

This is achieved by using a Unit Designer, which adjusts the flow of the material in the SPENT stream to meet this criterion.

Note that in order to adjust flows, the stream that is being adjusted must be a feed stream.

The calculation engine does not calculate backwards through units, so this strategy makes sense only if the stream is a feed to the entire flowsheet.

Add a Unit Designer and connect it to the measured and manipulated streams.

Activate the DataAndDesignPoints for the streams that you are going to link the Flowsheet Designer to if they are not already activated.

This can be done as follows: select the stream, and in the Properties Viewer, press the ellipsis button (...) in the DataAndDesignPoints property shown in Figure 8.

This will result in a blue diamond and an orange circle appearing on the stream.

Figure 7. Activating the Data and Design Points on a stream.

Add the Unit Designer by dragging it from the Process Library and onto the Page.

Connect the measurement point and design point to the Unit Designer using the DesignConnectorTool.

Connect from the Measurement Point on the Process Stream to the Unit Designer and from the Unit Designer to the Design Point on the design stream.

This is shown in Figure 8.

Figure 8. Adding the unit designer.

#### Step 10: Setting the properties for the Unit Designer

Set the properties for the Unit Designer as shown in Figure 9.

Figure 9. Unit Designer properties.

Follow these steps in changing and checking the Designer properties:

Take care to attach the Unit Designer to the correct ProcessUnit. Setting the value of the ProcessUnitID, highlighted in Figure 11 above, does this.

Look up the ProcessUnitID by selecting the ProcessUnit, and then navigating to the ProcessUnitID property.

Check that the measurement connector is properly connected. Look to see if the MeasurePoint and MeasurementPoinID have values in their property boxes.

Check that the design connector is properly connected. Look to see if the DesignPoint and DesignPointID have values in their property boxes.

Set the Measurement Variable. To set the measurement properties, expand the MeasurementVariable option by clicking on the + sign in the left margin of the Properties Viewer. Under the "Variable" heading, select "Composition" from the drop down menu. Under the "Value" heading, type in the number 10.

In the "Component", click on the ellipsis button, and from the Component Selection Form that is launched select the H2SO4 (aq) component.

Set the Design Variable. Expand the DesignVariable option by clicking on the + sign in the left margin of the Properties Viewer. Under Variable, select "Flow".

Reviewing the properties that have been selected and displayed in the Properties Viewer is important.

These properties are interpreted as follows: Adjust the flow in the stream with a ProcessStreamID of 2 between values of1 and 6 so that the concentration of the component H2SO4(aq) in the process stream with a ProcessStreamID of 5 has a value of 10 g/L.

This must be done in conjunction with the calculation of the Process Unit that has a ProcessUnitID of 1.

Take note to correctly relate the following parameters correctly in the properties windows, as incorrect correlation may lead to wrong calculations.

 Measurements Variables % Copper Reaction [H2SO4] Flow

#### Step 11: Adding a Unit Designer to constrain the copper in the residue

It is also known that the copper in the solid residue is 10%. This constraint affects the amount of leaching or dissolution that occurs, so a Unit Designer must be added that adjusts the reaction conversion.

Add a Unit Designer that connects to the Tank itself.

This is shown in Figure 10.

Figure 10. Adding a Unit Designer that will adjust the reaction conversion.

Select the properties for the Unit Designer so that they are the same as those shown in Figure 11.

Figure 11. Unit Designer Properties for ensuring that the copper in the residue is 10%.

Follow these steps in changing and checking the Designer properties:

Take care to attach the Unit Designer to the correct ProcessUnit.

Setting the value of the ProcessUnitID, highlighted in Figure 13 above, does this.

Look up the ProcessUnitId by selecting the ProcessUnit, and then navigating to the ProcessUnitID property.

Check that the measurement connector is properly connected. Look to see if the MeasurePoint and MeasurementPoinID have values in their property boxes.

Check that the design connector is properly connected. Look to see if the DesignPoint and DesignPoinID have values in their property boxes.

Set the Measurement Variable. To set the measurement properties, expand the MeasurementVariable option by clicking on the + sign in the left margin of the Properties Viewer.

Under the "Variable" heading, select "Element Composition" from the drop down menu. Under the "Value" heading, type in the number 10.

In the "Component", click on the ellipsis button, and, from the Element Selection Form that is launched, select the Cu(s) element.

Set the Design Variable. Expand the DesignVariable option by clicking on the + sign in the left margin of the Properties Viewer.

Under Variable, select "Reaction".

In the Component box, click on the ellipsis, which launches a Reaction Selection Form.

From this form, select the leaching reaction.

#### Step 12: Calculate and examine the results

Run the flowsheet calculation as before.

The results for the PRODUCT stream are shown in Figure 12.

Figure 12. The results for the PRODUCT stream, indicating that both the acid concentration and copper residue constraint have been met.

#### Step 13: Create an identifier for the Unit Designer

You can add an identifier to the Unit Designer, so each Unit designer can be easily identified.

Select the Unit Designer that constrains the acid concentration. Change the “UnitDesignerDescription” property to “acid”.

Select the Unit Designer that constrains the copper content in the solids. Change the “UnitDesignerDescription” property to “Cu(s)”.

The Flowsheet should look like that displayed in Figure 13.

Figure 13. The Unit Designer Description property.

#### Step 14: Change the Required Value for the Unit Designer

Select the Unit Designer that constrains the acid concentration. Set the required Measured Value to 0.01 g/L H2SO4 (aq).

Run the balance. You should see that the Unit Designer has failed.

We need to solve this problem. This is done by changing the method of calculation.

#### Step 15: Use Ridders method or Bisection Method to solve.

Select the Unit Designer that constrains the acid concentration.

Navigate to the property in the Property Viewer called Convergence Method. Change this value to either Bisection or Ridders. Run the calculation again. You should see that the method works.

Why is this so?

If you plot a graph of the acid concentration against the flow rate of the “Spent” solution, the result would look like that shown in Figure 14.

Figure 14. The effect of the flow rate of spent on the acid concentration.

The secant method uses the slope at any point to calculate the next point. In the flat area of the graph, the slope is zero, so the secant method often (but not always) fails.

This type of result arises when a reagent, like acid, is completely consumed, and there is no other way to determine its effect.

The bisection and Ridders first bracket the area in which the root occurs before searching for the exact root.

However, this additional overhead is small in comparison to the overhead incurred by a Unit Designer that does not converge.

#### Step 16: Alter the order of calculation for the Unit Designers.

It is also possible to change the calculation order for Unit Designers. This feature is useful when you wish to achieve multiple objectives on a single Process Unit. For example, you may want to constrain the concentrations of copper and acid achieved by a leaching vessel. If these concentrations are to be altered by changing the conversion of the reaction, there may be more than one reaction that affects the concentrations. Because the reactions are calculated sequentially, it is easy to envisage a situation in which the Unit Designer converges, but the results are different, because the Unit Designer alters reactions too early in the reaction scheme.

In this case, the solution is to order the Unit Designers. This is done by changing the “Order” property of the Unit Designer.

In the current project, select each of the Unit Designers and change their “Order” property in the Property Viewer to 1 and 2, respectively.

Run the project. Take note of which Unit Designer is listed first in the Convergence Form.

Now change the order around and you will see that they are listed in the order of calculation in the Convergence Form.