Portfolio 08: Distribution of residence times

CHEN3010/ CHEN5040: chemical reaction engineering

Modified

May 29, 2024

Solutions

Answers to the portfolio questions are uploaded at Portfolio 8 answers

Introduction

The ethylene epoxydation is to be carried out using a cesium-doped silver catalyst in a packed-bed reactor.

The feed enters the reactor at 250 °C and a pressure of 2 atm. The reactor contains 3.5 kg of catalyst.

A pulse test was carried out at two different flow rates (\upsilon) to assess the residence time distribution in the reactor.

The concentration of the tracer was measured at the outlet is reported in Table 1. The data is also available in Excel .csv format at portfolio_8_data.csv.

Table 1: Tracer concentration at outlet
\upsilon = 0.6 \, \text{dm}^3/\text{s} \upsilon = 0.2 \, \text{dm}^3/\text{s}
Time (s) Tracer Concentration (ppm) Time (s) Tracer Concentration (ppm)
————– —————————————— ————– ——————————————
0 0 0 0
0.5 8 0.5 0
1 640 1 0
1.5 951 1.5 0
2 495 2 0
2.5 215 2.5 61
3 103 3 270
4 34 3.5 475
5 11 4 605
6 7 4.5 659
7 0 5 614
6 396
7 227
8 130
9 80
10 47
12 26
14 12
16 0

Questions

  1. What are the mean residence time t_m, the variance, \sigma^2, and mean internal age \alpha_m? (6 marks)
t_m \sigma^2 \alpha_m
\upsilon = 0.6 \, \text{dm}^3/\text{s} _______ _______ _______
\upsilon = 0.2 \, \text{dm}^3/\text{s} _______ _______ _______
  1. Comment on the results obtained (4 marks)
  1. For \upsilon = 0.2 \, \text{dm}^3/\text{s}, what fraction of the material spends between 4 and 6 s in the reactor? (2 marks)
  1. For \upsilon = 0.6 \, \text{dm}^3/\text{s}, what fraction of the material spends less than 2 s in the reactor? (2 marks)
  1. For \upsilon = 0.6 \, \text{dm}^3/\text{s} what fraction of the material spends longer than 1 s in the reactor? (2 marks)
  1. What is the reactor volume? (2 marks)
  1. If you were to repeat the experiments, what would you do differently? (2 marks)

Appendix

The code is also available as ipython notebook. Download the file portfolio_8.ipynb from blackboard. Open Google colab. From menu, click on File > Upload notebook. Upload the downloaded file and modify as per needed.

import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import quad
from scipy.interpolate import interp1d

# Given data
column_names = ["time (s)", "Tracer concentration (ppm)"]

data_v_p6 = [  # Data for v = 0.6 dm^3/s
    (0, 0),
    (0.5, 8),
    (1, 640),
    (1.5, 951),
    (2, 495),
    (2.5, 215),
    (3, 103),
    (4, 34),
    (5, 11),
    (6, 7),
    (7, 0),
]
data_v_p6 = np.array(
    data_v_p6, dtype={"names": column_names, "formats": [float, float]}
)

data_v_p2 = [  # Data for v = 0.2 dm^3/s
    (0, 0),
    (0.5, 0),
    (1, 0),
    (1.5, 0),
    (2, 0),
    (2.5, 61),
    (3, 270),
    (3.5, 475),
    (4, 605),
    (4.5, 659),
    (5, 614),
    (6, 396),
    (7, 227),
    (8, 130),
    (9, 80),
    (10, 47),
    (12, 26),
    (14, 12),
    (16, 0),
]
data_v_p2 = np.array(
    data_v_p8, dtype={"names": column_names, "formats": [float, float]}
)


# working with data for v = 0.6 dm^3/s
# replace data_v_p6 with data_v_p2 to change the data set
# to v = 0.2 dm^3/s (also need to change Q)

# Flow rate
Q = 0.6  # dm^3/min

t = data_v_p6["time (s)"]
c = data_v_p6["Tracer concentration (ppm)"]

# Normalize concentration to calculate E(t)
integral_c = np.trapz(c, t)
et = c / integral_c

# Interpolation functions
et_interp = interp1d(t, et, kind="cubic", fill_value="extrapolate")

# Define cumulative distribution F(t)
def f_interp(t):
    return np.array([quad(et_interp, 0, ti, limit=1000)[0] 
    for ti in np.atleast_1d(t)])

# Mean residence time function
tau_func = lambda t: t * et_interp(t)

# Variance function
variance_func = lambda t, tm: (t - tm) ** 2 * et_interp(t)

# Skewness function
skewness_func = lambda t, tm: (t - tm) ** 3 * et_interp(t)

# Calculate mean residence time (t_m)
tau, _ = quad(tau_func, 0, np.max(t))

# Calculate variance (σ²)
variance, _ = quad(variance_func, 0, np.max(t), args=(tau,))

# Calculate skewness (
sigma = variance**0.5
fac = 1.0 / (sigma**1.5)
integral, _ = quad(skewness_func, 0, np.max(t), args=(tau,))
skewness = fac * integral

# Calculate specific time fractions
# uncomment and adopt the following line as per required
# When you need to find integral till infinity,
# in place of infinity use np.max(t)
# fraction_2_to_4, _ = quad(et_interp, 2, 4)

internal_age = lambda t, tm: (1 / tm) * (1 - f_interp(t))
mean_internal_age, _ = quad(lambda t: internal_age(t, tau), 0, np.max(t))

# Reactor volume calculation

t_plot = np.linspace(0, np.max(t), 1000)
et_plot = et_interp(t_plot)

plt.scatter(t, et, label='E(t) experimental')
plt.plot(t_plot, et_plot, label='E(t) fitted')
plt.xlabel('Time (s)')
plt.ylabel('E(t)')
plt.xlim(np.min(t_plot), np.max(t_plot))
plt.legend()
plt.show()

it_plot = internal_age(t_plot, tau)

plt.plot(t_plot, it_plot, label='I(t)')
plt.xlabel('Time (min)')
plt.ylabel('I(t)')
plt.xlim(np.min(t_plot), np.max(t_plot))
plt.legend()
plt.show()

Citation

BibTeX citation:
@online{untitled,
  author = {},
  title = {Portfolio 08: {Distribution} of Residence Times},
  url = {https://cre.smilelab.dev//content/portfolio/08-distribution-of-residence-time},
  langid = {en}
}
For attribution, please cite this work as:
“Portfolio 08: Distribution of Residence Times.” n.d. https://cre.smilelab.dev//content/portfolio/08-distribution-of-residence-time.