Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Assignment 1 Questions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Visual Basic for Design Dr. H.

Bock

Assignment

The residence time distribution of a packed column

The Background

The residence time distribution is one of the most important characteristics for
continuously operating chemical engineering equipment, such as reactors, mixing
tanks, distillation and adsorption columns etc. The residence time distribution tells us
what the probability is that a small portion of liquid needs a specific amount of time
to pass through the equipment.

Luckily there are a number of relatively simple methods to measure it. Assume that
your equipment operates at steady state. Now you inject a very small amount of a
“tracer” into the feed stream. At the same time you start measuring the effluent
stream to see at which time your tracer passes through. The result is usually a
concentration distribution over time C(t).

For a small packed column in one of our labs such a measurement has been done. The
tracer was a salt solution and it has been detected using conductance measurements.
The primary result of the measurement looks like this.

In this particular experiment the conductance G(t) is related to the concentration C(t)
via

C(t) = k G(t)
Where the calibration factor k=500 M/S (M=mol/litre and S stands for Siemens).
Classifying equipment according to their residence time behavior is important, but the
entire residence time distribution contains too much information to do that. Therefore
one uses characteristic properties of the distribution such as the mean residence time
and the variance.

The mean residence time is given by the first moment of the residence time
distribution and can be calculated according to

 tC (t )dt
t 0

 C (t )dt
0

The variance is the second central moment of the residence time distribution and is
obtained via

 (t  t )
2
C (t )dt
 0

 C (t )dt
0

Formally the upper limit of the integrations should be infinity, but here we can only
integrate the data we have. (Actually, the students who measured the distribution
should have waited a bit longer, because G(t) has not completely decayed to zero
when they stopped recording it.)

The Tasks

On VISION you will find a spreadsheet “your_username”. It contains two sheets:


“properties” and “data”. Program VB functions to

1. Calculate the total amount of tracer that was used via



n  V  C (t )dt ,
0

where the volumetric flow rate through the column V  3 10 L / s .


2

2. Calculate the mean residence time.


3. Calculate the variance.

You can create as many functions as you like, but you are only allowed three function
calls from the spreadsheet. These calls go into the green column titled “value”. This
means that you are only allowed to edit these three cells; all others are protected. You
are also not allowed to add anything to the data spreadsheet or to add new sheets.
Your functions also need to be documented. This is standard practice. However, here
we will use it to make sure that you are submitting your own work.

To do this prepare a document that contains:

1) A brief but concise explanation of how each of the three problems has been
implemented.
 State and justify your concept
 Briefly explain the method(s) used
 For the calculation of the variance provide the equations that are used
in your code; explain their variables and how the variables are provided
in the code. This could look like:
t(i) time of the i-th measurement read from spreadsheet

2) A copy of your code with line numbers. This should look like:

1 Public Function WS_ideal_gas(P1, P2, V1)


2 a = b
3 c = d + f
4 End Function

3) A brief but concise explanation of the implementation of the function used to


calculate the variance. Use the following table as a template. Note that lines
that conceptually belong together can be combined into one item.

lines WS_ideal_gas

1 function declaration

2 calculation of the surface area of the particle

2-3 calculation of the net fuel usage

4 end of function
Submission

The submission will be online using VISION. Right where you found this document
you will have the opportunity to submit your files. To avoid confusion, no other form
of submission will be accepted.

You need to submit two files: one with the Excel spreadsheet and one with the
documentation. The document must be submitted in pdf format.

The file name of both documents should be your user name. That is the combination
of letters and numbers before the @ in your email address. If your email was
xy27@hw.ac.uk, you would have to submit two files: “xy27.xlsm” and “xy27.pdf”.

Marked versions of your files with some feedback will be returned to you in the same
way.

Marking

Both parts of the submission will receive a maximum of 10 marks. The final result is
the geometric mean of the two parts.

Hint

To reduce work and to keep the structure of your functions simple it might be helpful
for you to know that you can call functions from within functions. It will be obvious to
you that you can call any of the available VBA functions from within one of your
functions, but you can do the same with functions you have programmed. A trivial
example is given in func_in_func.xlsm that is available on VISION.

You might also like