A Python framework for simulating industrial adiabatic styrene reactors using the kinetic model proposed by Lee & Froment (2008) and program structure by Leite et al (2021) also featured in Leite et al (2023).
Install / Usage / Citation / References / Contact
First, make sure you have a Python 3 environment installed.
To install from github:
pip install -e git+https://github.com/bruscalia/styrene#egg=styrene
Note: It might be useful to write "git+https://github.com/bruscalia/styrene#egg=styrene" if installing directly from a Python interpreter as # can be interpreted as a comment.
import numpy as np
import matplotlib.pyplot as plt
from styrene.reactor import MultiBed
test_reac = MultiBed()
test_reac.add_radial_bed(72950)
test_reac.set_inlet(T=886, P=1.25)
test_reac.add_radial_bed(82020)
test_reac.add_radial_bed(78330)
test_reac.add_resets(2, T=898.2)
test_reac.add_resets(3, T=897.6)
test_reac.solve()
profiles = test_reac.get_dataframe()
fig, ax = plt.subplots(figsize=[7, 4], dpi=100, sharex=True)
ax.plot(profiles.index * 1e-3, profiles["Fst"], color="darkgreen", label="Styrene")
ax.plot(profiles.index * 1e-3, profiles["Feb"], color="black", label="Ethylbenzene")
ax.set_ylabel("$F$ [kmol/h]")
ax.set_xlabel("$W$ [kg x 10³]")
ax.legend()
fig.tight_layout()
plt.show()
e-mail: [email protected]