Wednesday, October 24, 2012

Generation of Equilibrium Curve for the Use of McCabe-Thiele method

As I did separation homework, questions sometimes asked to plot given data points to construct equilibrium curve before doing anything. This can produce errors because hand construction of curve is not accurate enough. In order to avoid this and get to the real question faster, I developed a .m Matlab file to generate the curve automatically.

Users need to input liquid and vapor compositions. Then curve will be plotted for further use. I am not sure if this is actually helping you. But I feel the joy doing it.

Below is an example and the consequent curve.

Step 1. Open and run the Equilibrium.m file


Step 2. Input liquid compositions from lowest to highest. Remember to enter 0 in the beginning and 1 at the end. This should be in a vector form, which is in a pair of [ ] and separated by a space. For example,

Step 3. Input vapor compositions in the same manner as Step 2. For example,

Step 4. An equilibrium curve should be generated like the following graph.

If you need to download the .m file. You can do so by going to the following link. Thank you.

Sunday, October 21, 2012

Non-Elementary Reaction with Elementary Rate Law

There are many non-elementary reactions following the elementary rate law. How can someone spot them? This is an application of PSSH (Pseudo-Steady-State Hypothesis).

For example:

(CH3)2O à CH4 + H2 + CO

We can say this is a reaction follows the form of
AàP
rp = -k[A]
The mechanism of this reaction consists of 3 elementary reactions.

1. Activation of A: A + M àA* + M          (K1 as rate constant)
2. Deactivation of A*: A* + M àP + M     (K2 as rate constant)
3. Decomposition of A*: A*àP                  (K3 as rate constant)

Here: M is inert species that does not react at all. A* is denoted as the active intermediate of A. Its presence is due to collision of A molecules. When collision occurs, kinetic energy of one A molecule is transferred to internal rotational and vibrational energies of the other A molecule, so it is activated and being highly reactive. 

From 1. r1A* = k1[A][M]
From 2. r2A* = -k2[A*][M]
From 3. r3A* = -k3[A*]
             rp = k3[A*]

Now we will apply PSSH, which states that the net rate of formation of an active intermediate is zero.
rA* = r1A* + r2A* + r3A*
rA* = k1[A][M] - k2[A*][M] - k3[A*]

Apply PSSH, rA* = k1[A][M] - k2[A*][M] - k3[A*] = 0

Solve for [A*]

Since rp = k3[A*], by substitute this, we get the following.
Because concentration of M is constant, we say the following.
 So, rA = -rp = k[A]

This shows the reaction follows first order rate law, and it is elementary. But, again, the reaction is not an elementary reaction. However, it is a series of elementary reactions.

PS: In a rate law, if there is a concentration in the denominator, it is probably the species that is colliding with the active intermediate. If there is a constant in the denominator, that probably implies there is a reaction step which is the decomposition of the active intermediate. If there is a concentration in the numerator, that probably says there is a step to produce the active intermediate.

Saturday, October 20, 2012

Feedback Control Closed-Loop Transfer Function


Figure source:

B. Bequette, Process control: modeling, design. and simulation, Prentice Hall Press, Upper Saddle River, NJ 2002

Block diagram (Laplace domain) variables:
c(s) = controller output
e(s) = error
r(s) = setpoint (reference signal)
u(s) = manipulated variable
l(s) = load disturbance
y(s) = process output
ym(s) = measured output

Transfer functions:
gc(s) = controller
gv(s) = valve
gp(s) = process
gm(s) = measurement
gCL(s) = closed-loop
gd(s) = disturbance

Calculations:

y(s) = l(s)gd(s) + u(s)gp(s)
u(s) = c(s)gv(s)
c(s) = e(s)gc(s)
e(s) = r(s) – ym(s)
ym(s) = y(s)gm(s)

Lump all expressions together, we can get the following:

y(s) = l(s)gd(s) + c(s)gv(s)gp(s)
y(s) = l(s)gd(s) + e(s)gc(s)gv(s)gp(s)
y(s) = l(s)gd(s) + (r(s) – ym(s))gc(s)gv(s)gp(s)
y(s) = l(s)gd(s) + (r(s) – y(s)gm(s))gc(s)gv(s)gp(s)

then:
Equation (1)

If there is no disturbance:

Equation (2)


Equation (3)

Sunday, September 23, 2012

L'Hospital's Rule

I found the L'Hospital's rule extremely useful when I was doing process control homework tonight. So if you are not familiar with it, or can't recall it clearly, here it is.


In words, if taking limit directly doesn't work out, one thing you can do is to take derivative of the numerator and the denominator at the same time. Then take limit. Remember, after this step, if the limit still doesn't work, you can apply the L'Hospital's rule again and again until you find a way that the limit can be taken.

This can be simply applied to the initial value theorem and final value theorem in process control.

                    Initial Value Theorem
                    Final Value Theorem
                                                   
                    where F(s) is the Laplace transformation of f(t).

Hope this will help someone who are looking for a way to solve the limit problems.

Saturday, September 8, 2012

Raining (Steady State?)

So, it's raining heavily outside.

This morning, I got an email saying NYC will have tornado and thunderstorm. I called my mom immediately for regarding it, and told her not to go out today. Couple hours later, the rain came to Troy which is 160 miles north of NYC. These couples hours are the residence time for the rain travelling from NYC to Troy.

But, in the afternoon, I got another email from nyc.gov that eastbound of Grand Central Parkway closed due to severe flooding. Obviously, this whole system (the world) becomes non-steady state. In - Out != ZERO. Last summer, as I read news of Beijing flooding, the Forbidden City didn't have any negative effect. Even flooding in the city caused more than 50 people's deaths, the Forbidden City did not have any flooding, not at all. Are we smarter than our ancestors? More than 600 years of history, this old city is even better than our modern "civilization"? One reason can explain why. Modern technology "destroys" our environment. The effect will be the following: human beings, the modern inventors, will suffer from our great projects.

No Contradiction Between Protecting the Environment and Developing New Technology!

Thursday, September 6, 2012

First Post

This is my first post in the blog. After doing all 4000 level chemical engineering homework together with Ken, Chris and Hisham, I think this blog will be interesting for people to share their chemical engineering experiences.

As usual, we were doing ChmE homework again in library. After spending almost 4 hours trying to solve one single problem, we found that the problem statement could be wrong. More ironically, when we did the same question yesterday, we found that the question was different in 2nd edition and 3rd edition textbook. With common sense, we followed the newer version. But, today we found that the 2nd edition was correct?

First lesson: 

Get the "real" book or you will regret.

Question:


Are the molecular sieves used in pressure-swing adsorption?


Since this is the first post of the blog, I do not want to make it so intense.