Packed Bed Reactor - Toluene methylation to produce P-Xylene
Version 1.1 (9.97 KB) by
Kush Kotecha
Simulation of packed bed reactor. Main reaction is toluene + methanol -> xylene + water. Uses Mg-ZSM-5 catalyst to increase para-selectivity
This simulation was created as part of my 3rd year design project. It is for the production of para-xylene and is isothermal with a pressure drop, and axial flow. The design, including reaction kinetics, assumes the use of an Mg-ZSM-5 catalyst. It has been found that at low residence times, the activity of this catalyst is roughly one [1], with low residence resulting in higher selectivity to p-xylene [2]. This catalyst has been chosen due to its good performance and data availability.
There are 3 files which I will refer to in their abbreviated names (RD, RDD, RSA). RD contains the function to be solved - including the design equations. RDD is the main file that solves RD and can plot desired variables including conversion, selectivity, and species flowrates; against length or catalyst weight. This file also contains a small bit of code on enthalpy so that the exact energy requirement from utilities is known (cooling as main reaction is exothermic). RSA is for sensitivity analysis and is essentially RDD with a for loop, and some other slight modifications. Here, you can change the initial pressure, temperature, flowrates, and reactor diameter. More can be added if the code is further modified. The plots here are of the same desired variables against the independent variable (not length or weight). Therefore, the weight (length) must be predetermined - can be done using RDD - and set as a constant, as the code here uses the final iteration from each solved case.
Comments have been added throughout, to make the code user friendly
!! Image is not mine !!
[1] - Sotelo, J.L. et al. (1996) ‘Deactivation kinetics of toluene alkylation with methanol over magnesium-modified ZSM-5’, Industrial & Engineering Chemistry Research, 35(4), pp. 1300–1306. doi:10.1021/ie9500836.
[2] - Breen, J. et al. (2005) ‘Enhanced para-xylene selectivity in the toluene alkylation reaction at Ultralow Contact Time’, Journal of the American Chemical Society, 127(14), pp. 5020–5021. doi:10.1021/ja046421o.
Cite As
Kush Kotecha (2026). Packed Bed Reactor - Toluene methylation to produce P-Xylene (https://www.mathworks.com/matlabcentral/fileexchange/132078-packed-bed-reactor-toluene-methylation-to-produce-p-xylene), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2022b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
