Assignments 2009
Assignments 2009
Assignments 2009
The attractive/repulsive potential energy is a short range square well potential. For a molecular separation distance greater than , the diameter of interaction, the potential energy is zero. For distances between and the potential energy of attraction is . Thus is a fraction, less than 1. (/kB is used in the programs, with dimensions of temperature, where kB is Boltzmanns
constant.) For distances between 0 and the repulsive potential is infinite. In addition, we & need the number density, , which has units of number of molecules per A 2 (angstrom squared). 2. Try the program on the internet site. It has pre-set the parameters to & / k B = 200 K, T = 300 K, = 0.65, = 3 A with 30 R and 30 B initially. Begin the simulation and look at (a) the molecular motion; (b) composition; (c) fraction. As the calculation proceeds, there are wild fluctuations but the average values settle down. (If more molecules were used, the fluctuations would not be as wild.) Note the mole fractions of the 5 species after some time. 3. Run the MATLAB code for the same set of parameters. (Use 0.88 for the initial density.) The results should be close. The theory for the MATLAB code is provided on page 2, and the code depends on the same molecular parameters. 4. Your assignment is to vary parameters and deduce their effect. (a) changing T (b) changing (c) your choice For each case report on the effect of changing that parameter and the values you used. Development of equations The equations that must be solved for chemical equilibrium are described on the internet page. Here they are summarized. For chemical equilibrium of the three reactions, we have the following balances of chemical potential
RR 2 R = 0 RB R B = 0 BB 2 B = 0
The chemical potentials are given by
0 = k B Tln[ 2 (1 2 ) / ] i
In addition, = 1 for RB and 2 for RR and BB since there is no difference if the 2R atoms are exchanged in the RR molecule. Thus we must satisfy the following equations (all f(i) = 0).
RR : f(1) = k B Tln[ 2 (1 2 ) / 2] + k B Tln + k B Tln x RR 2k B Tln 2k B Tln x R RB : f(2) = k B Tln[ 2 (1 2 ) / 1] + k B Tln + k B Tln x RB 2k B Tln k B Tln x R k B Tln x B BB : f(3) = k B Tln[ 2 (1 2 ) / 2] + k B Tln + k B Tln x BB 2k B Tln 2k B Tln x B
f(6) = 1 x R x B x RR x RB x BB
These are the equations solved in the MATLAB code. The molecular parameters are the same ones used in the molecular dynamics calculations. (There is a discrepancy with respect to the density ignore that and use the value given in the MATLAB code.) The equations can be rearranged into the form of the usual equilibrium constant for a reaction.
kB T ln K RR = kB T ln xRR 2kB T ln xR kB T ln kB T ln K RB = kB T ln xRB kB T ln xR kB T ln xB kB T ln kB T ln K BB = kB T ln xBB 2kB T ln xB kB T ln
ln K RR = ln K BB
2 (1 2 ) 2 (1 2 ) + ln , ln K RB = + ln , k BT (= 2) k BT (= 1)
2 (1 2 ) = + ln k BT (= 2)
The subscript indicates that this equilibrium constant depends on the number density, not the pressure. Then the equations governing equilibrium are
xRR
2 xR
Note that the number density takes the place of pressure in the earlier formulations of chemical equilibrium. Thus, it would be possible to calculate the equilibrium constant for chemical equilibrium in form the x 1 x 1 x 1 K RR = RR , K RB = RB , and K BB = BB 2 xR p x Bx R p x2 p B from the molecular value. The molecular calculations can be compared with experiment by comparing the equilibrium compositions.
MATLAB code: % run_dimer.m global eps sigma kappa kT initial energy term1 term2 eps_k = 200; % (negative) energy of attraction/Boltzmann constant (K) sigma = 3; % Angstroms, diameter on interaction kappa = 0.65; % fraction of sigma that is repulsion T = 300;% temperature (K) energy = eps_k/T term2 = log(pi*sigma^2*(1-kappa^2)/2) term1 = log(pi*sigma^2*(1-kappa^2)) energy-term2 energy-term1 initial = [.5 .5 .88];%start at xR xB density(number/area) x0 = [0.37 .37 .1 .06 .1 .04]; %OPTIONS = OPTIMSET('MaxFunEvals',1000) %x=fsolve('dimer',x0,OPTIONS) x=fsolve('dimer',x0) feval('dimer',x) % dimer.m function f=dimer(x) global eps sigma kappa kT initial energy term1 term2 xR = x(1); xB = x(2); xRR = x(3); xRB = x(4); xBB = x(5); rho = x(6); f(1) = energy - term2 + log(xRR)-log(rho)-2*log(xR); f(2) = energy - term1 + log(xRB)-log(rho)-log(xR)-log(xB); f(3) = energy - term2 + log(xBB)-log(rho)-2*log(xB); f(4) = initial(3)*initial(1)-rho*(xR+2*xRR+xRB); f(5) = initial(3)*initial(2)-rho*(xB+2*xBB+xRB); f(6)=1-xR-xB-xRR-xRB-xBB;
purge splitter water mixer ethylene plus water water reactor splitter splitter splitter splitter acetaldehyde 93% ethanol
(5.21)
Water and ethylene is mixed with a recycle stream and sent to a reactor where the reaction in Eq. (5.21) takes place (5% conversion per pass). The ethylene feed is 97% ethylene but also contains acetylene (2.9%) and inert gases (0.1%) and the total stream is 100 lb.mol/hr. The acetylene reacts with water, too, forming acetaldehyde (50% conversion per pass).
C2 H 2 + H 2O CH 3CHO
(5.22)
The reactor effluent is cooled to remove the liquids (ethanol, acetaldehyde, water). The gases (ethylene, acetylene, and inert gases) are recycled, but a purge stream is needed to remove the inert gases. Note: This is a schematic diagram only. Your process is much more sophisticated.
The feed streams are at one atmosphere and room temperature. Since only 5% of the ethylene reacts each pass, the amount of ethylene in the recycle stream must be large. Also, it is desirable to have the water molar flow rate going into the reactor at 60% of the ethylene molar flow rate, and to keep the concentration of inert into the reactor at a few percent of the total flow rate into the reactor. The first of these requirements is met by making sure there is enough water in the recycle stream; you may also use a controller. The second of these requirements is determined by the fraction of the recycle stream that is purged. The reactor operates at 960 psia and 570 F. Thus, you must heat the reactor feed, and after the reaction occurs you must cool the product. All the separation units can be modeled using simple splitters, even though in the real process vapor-liquid separators and distillation towers are used. The first splitter, modeling the vapor-liquid separator, runs at 100 psia and 130 F; all the light gases go to the vapor: acetylene, ethylene, carbon dioxide. The vapor stream has 5% of the acetaldehyde, ethanol, and water; the rest goes out as liquid to the next splitter. The next splitter removes 60% of the water, and all the other components go out the top. The next splitter removes 80% of the acetaldehyde, all the lighter components, and 0.1% of the water and ethanol. The final splitter splits the streams into an overhead that is about 90% ethanol, all the acetaldehyde, and the rest water. If you lower the pressure anywhere, you need to supply compressors. Use either the WILSONRK (Wilson equation) or UNIQUAC-RK thermodynamics. Weve tested both of those for the ethanol-water system by comparison with experimental data and they gave good results. Convergence can be done first with Wegstein (the default choice), but it might require Broyden to finish the convergence. (see pages 100-105) Your report should include a process flow-sheet, a table of stream flow-rates, temperatures, and pressures. In addition, list the operating parameters for any pumps and compressors and the heat duties of heat exchangers and the reactor. Also provide an overall balance: what fraction of the ethylene fed to your process ends up in the ethanol product stream?
Kp =
p p
NH 3 1/ 2 3/ 2 N 2 H2
y y
NH 3 1/ 2 3/ 2 N2 H 2
1 p
(4.20)
1 3 N 2 + H2 NH3 . Use 220 atm for the pressure. First, (a) 2 2 use Excel; then, (b) use MATLAB. (Hint: you will have to derive some equations.)
for the reaction written as: Assignment Three Solve problem 4.7 (modified and restated below) using MATLAB. 4.7. In a steam reformer, steam is added to methane and two (or more) reactions take place.
CH 4 + H 2O CO + 3H 2 endothermic CO + H 2O CO2 + H 2 exothermic
(4.24)
The composition out of the reformer is based mainly on chemical equilibrium (Marsh, et al., 1994, p. 165). Determine the equilibrium composition when the steam/methane ratio of the inlet stream is 3, the pressure is 14 atm, and the equilibrium constants for the two reactions are, K p = 49.0 and 1.31 , respectively.