COMP 208: Computers in Engineering Winter 2011 Assignment 5 Whiskey Production using a Batch Distillation Column Integrity This assignment is to be done individually. You can collaborate on understanding the problem but you must write the solution individually. Your submission might be subject to plagiarism detection software.
Due Date Assignment 5 is due on Thursday, November 28th, 2014 at 23:59 . The cutoff is automated and is exactly at this time. Assignments submitted within the next hour will be flagged as late but will be accepted. After that time they will not be accepted.
Introduction Malt whiskey production is essentially a double batch distillation process using pure malt, water, and yeast as the raw materials. Henry II of England first witnessed whiskey as being produced from cereals and called it the ‘water of life’. The separation process known as distillation is a method for separating the various components of a liquid solution, which depends upon the distribution of these components between a vapor phase and a liquid phase. It is desired to produce fine whiskey by batch distillation. Hence, a simple batch, or differential, distillation column is used, where a liquid mixture of water and ethanol is first charged to a heated kettle, boiled slowly, and the vapors are withdrawn as rapidly as they form to a condenser, where the condensed vapor (distillate), which is fine whiskey in this case, is collected. The first portion of vapor condensed will be richest in the more volatile
component A (ethanol), and as vaporization proceeds, the vaporized product becomes leaner in A. Originally, a charge of L1 moles of components A (ethanol) and B (water) with a composition of x1 mole fraction of A is placed in the still. At a given time, there are L2 moles of liquid left in the still with composition x2 and the composition of the vapor leaving in equilibrium is y. A differential amount dL is vaporized.
A material balance on A can be made, where the original amount (L1) equals to the amount left in the liquid (L2) plus the amount of vapor (dL).
x L (x dx) (L dL) y dL
Multiplying out the right side,
x L x L x dL L dx dx dL y dL
Neglecting the term dx dL and rearranging, dL dx L yx
Integrating to get the Rayleigh equation, L2
L1
dL L
x2
x1
L ln( 2 ) L1
x2
dx
yx
x1
Where L1 is the original moles charged, L2 the moles left in the still, x1 the original composition, and x2 the final composition of liquid. ln(
L2 1 ) or ln(a) (for a > 1) may be defined as the area under the graph of from 1 to a, hence x L1 a
dx
yx
ln(a)
1
x dx x2
In order to evaluate
1
dx
y x , usually either x1 or x2 is not known. So, iteration, or a finding
x1
root algorithm, is usually done graphically by choosing a random value of the unknown (x1 or x2) and equating the area under the curve of
1 L to the value of ln( 2 ) . Mohammed Al yx L1
Amer, a former teaching assistant for COMP 208 has kindly generated the following polynomial fitting equation for the equilibrium data for your use: 1 8.38 31.976 x 39.911 x 2 13.542 x 3 yx
Part 1 (20 marks)
In the first part of this assignment, you are to find the natural logarithm, ln( L2
should equal to
L1
L2 ) where it L1
dL for L1 = 1 moles and L2 P L1 (P ranges from 0.99 to 0.50). In order to L
test the accuracy of your code, you can compare it using the function log(number), which can be found in <math.h>. You have to use one of the numerical integration methods you learned in class (midpoint, trapezoidal, etc).
Part 2 (80 marks) In the second part of this assignment, you are to find x1 for x2 = 0.005, L1 = 1 moles and
L2 P L1 (P ranges from 0.99 to 0.50). If you were not able to solve part 1 of the assignment, you can use the function log(number) from <math.h> to complete this part of the assignment.
In order to find x1, a root finding algorithm (bisection, secant, etc) should be used, where the function passed is
1 (mentioned above) and the integration of this function is used to yx
determine the value of x1. You must use a different integration method from part 1. The output of your program should look like this:
L2 = 0.990000 %L1
ln(L2/L1) = -0.010050
x1 = 0.006231
L2 = 0.980000 %L1
ln(L2/L1) = -0.020203
x1 = 0.007470
L2 = 0.970000 %L1
ln(L2/L1) = -0.030459
x1 = 0.008739
L2 = 0.960000 %L1
ln(L2/L1) = -0.040822
x1 = 0.010008
.
.
.
.
.
.
.
.
.
Requirements Your code must meet these requirements:
The program must be written in C
Use sensible variable names
Comment and indent your code
Use 2 integration methods, one for part 1 and the other one for part 2
Submit only one .c file. Don’t submit the .exe (name your source file A5_123456789.c, where 123456789 is your ID)
If any of the above requirements is not respected you will lose marks.
Acknowledgement Thanks to Mohammed Al Amer for his work in preparing this assignment.
Resources Geankoplis, C. J.. Transport Processes and Separation Process Principles. 4 ed. Upper Saddle River, NJ: Prentice Hall Professional Technical Reference, 2007. Print.