Alph - A Little Process Helper

Mixing and Component Splitting Tutorial

This is the fourth part of the Alph introduction tutorial. If you did not go through the previous parts, you might want to start with them first, but a completed tutorial 3 case is available.

Alph tutorial pages:

Previously we have worked through the first part of this simple gas plant flow sheet.

Screenshot

We shall now mix the two separator liquids and then feed the result into a component splitter to roughly simulate the stabilizer (we will do a real tower later). Assuming a reboiled absorber, we shall approximate the reboiler duty and finally send a report to our computer.

While mixing two fluids can easily be accomplished with formulas that combine the compound and energy flows, it is a common enough operation that Alph has a mixer tool to make things more convenient.

Continuing from the information diagram, where we left off in part three, tap the Add Tool button and select Mixer from the spinner.

Screenshot

Name the mixer "stabfeed" and then leave a space and follow the name with "Stabilizer Feed" as a description.

Enter the two feed fluids as feed.l and lts.l. If we had more feeds we could tap the plus button on the tool bar to add more fields.

The result should look like the screenshot to the right. The mixer has calculated the combined flow, enthalpy and although not shown, composition. It has also determined the lowest pressure of the feed fluids, but we will not be using it. These values can be referenced in formulas using the # symbol to designate a tool, as we shall see shortly.

Tap the Variables button on the bottom bar to go to the variables list page.

Screenshot

The previous three variables we created are listed.

Tap New to create a new one.

Screenshot

Name the new variable "splits" and follow it with a description "Stabilizer fractions going overhead".

Tap on the Type line and select X as the property type.

Screenshot

Since the property type X represents an array, the result section has been expanded to show the value for each element of the array.

In the Input field supply the following:

[1,1,.99,.95,.05,.01,0,0]

These fractions will represent the fraction of the total feed of each compound that goes overhead in the stabilizer. These fractions are often called the compound recovery in the overhead. When you are done and have dismissed the keyboard with the Done button, you will see the splits listed by compound on the lower part of the screen. Check to see that the main split is indeed between butane and pentane and that all of the compounds have values.

Add a new fluid from either the diagram or the fluids list.

Screenshot

Enter "stabovhd Stabilizer Overheads" into the Name field and change the intensive variables to P and Vf. As discussed in part 3, changing the top button requires that the second button change since both variables cannot be pressure. Set the pressure for the overheads to be 700 kPa and set the vapour fraction to 1, for the overhead of a reboiled absorber will be a saturated vapour and hence at its dew point.

Now tap on the blue icon beside the Flow field to open the formula editor.

Screenshot

The total overhead flow will be the sum of each compound feed flow times the overhead split we defined in variable splits. Multiplying the stabfeed composition array by the stabfeed flow will give us those feed compound flows which we can then multiply by splits.

Here we are using the # to refer to tool variables in the same way that we have been using @ to refer to fluid variables. What variables are available will depend on the type of tool being referenced.

You may have noticed that Alph formulas can handle both scalars and arrays. A scalar operation on an array will result in a new array with that operation having been performed on each element. An operation between two arrays, will result in a new array with each element the result of element wise operations on the elements of the source arrays. Pretty much it just works the way you would expect.

That brings us to the curly braces and the word "sum". Alph uses curly braces to denote a function, with the function type immediately following the opening brace followed by one or more arguments as appropriate for the function. In this case the sum function only takes a single array argument and returns the sum of its elements. The parser is clever enough to figure out the equation used as the argument does in fact resolve to a single value, but parenthesis could be used to make this clearer if you wish.

See the formula documentation for more information on the operators and functions available.

Tap the Save button.

Screenshot

The composition formula is just the stabfeed composition times the splits variable.

Enter it and tap Bulk to see the results.

Screenshot

The results should look like this.

Tap the X line to look at the composition array.

Screenshot

Confirm the composition looks as expected and then return to the diagram and create yet another fluid.

Screenshot

This will of course be the stabilizer bottoms fluid, so we shall proceed much as before. Enter "stabbtms Stabilizer Bottoms" in the Name field, set the pressure to stabovhd plus the dp variable and set the vapour fraction to 0 since this will be a boiling fluid at its bubble point.

Open the equation editor for the flow.

Screenshot

This time we can calculate the flow as simply being the feed flow minus the flow we calculated for the overheads.

Save this and open the formula editor for X. Note that you need to enter at least one character (use #) in the field before tapping the blue icon to have the formula editor come up rather than the composition input form.

Screenshot

What doesn't go up, must come down, so the bottoms composition is simply the feed composition times one minus the splits.

Save this and have a look at the bulk results.

Screenshot

And check that the composition array looks correct.

Screenshot

We have have added a number of new objects without looking at the information flow diagram, so it will need some rearranging.

Go to the information flow diagram and do a little house cleaning.

Screenshot

Here is how I have arranged my diagram. Note that I have panned the whole diagram to the left so I could keep the part I was working with a reasonable size.

We have one task left for our pseudo stabilizer and that is calculating the reboiler duty.

Create a new variable with the Add Var button.

Screenshot

Use "stabduty Stabilizer Duty" for the name, select Q as the property type and then open the formula editor.

Screenshot

This is just a straight forward heat balance. However much the heat leaving exceeds the heat coming in in the feed, must be made up by the reboiler. Essentially the reboiler must provide the energy required for the separation in the stabilizer.

Save and return to the diagram and then select the Session button, and then the Variables button to bring up the variables list page.

Screenshot

The reboiler duty is now displayed. Notice that for the variables that have descriptions, the description colour follows the same rule as for fluids. Green is a simple input, while blue denotes a calculation was needed.

We probably should see how effective our carefully designed stabilizer is.

Create another fluid.

Screenshot

Fill in the input so the normal boiling point temperature is calculated for the stabilizer bottoms composition. Add a description after the name if you want.

Check the results under Bulk

Screenshot

About 59 C, which is much higher than needed, at least here in chilly Canada.

Return to the Session Menu.

Screenshot

Ok, let's see if we can get our results off of the phone and onto our computer. On the Session Menu, tap Case and then Mail Tab Separated Report. You should see a compose mail page like the screenshot to the right. Fill in an appropriate destination address to send yourself the message.

Note that some mail services seem to block messages to yourself, but will allow you to bcc yourself.

Check your mail on your computer and try importing the attached file into your spreadsheet. I am a Mac fan, so I just dragged the file to the Numbers spreadsheet in iWorks and then exported it as this pdf file. Note the only formatting I did in Numbers was to make the page a bit wider than the default and turn on the alternating blue rows. You could also paste this into a Word processing program and adjust the tab stops appropriately to produce a decent report.

Alph is also able to produce reports in the more standard, but less readable CSV (Comma Separated Values) format, which should be importable into a wide range of programs.

In addition, you can mail yourself a PDF version of your information flow diagram. This will roughly reproduce the scaling and panning of your current diagram, but the shape of the device screen is a little different from a standard page, so the pdf might include some stuff that was off screen on the device. If the device is held horizontally when this option is tapped, the pdf will be produced in landscape mode.

That is it for this part of the tutorial. Save your work and then continue with the next tutorial page where we shall replace our component splitter stabilizer with a distillation tower calculation.