A Quasi-two-dimensional code for modeling a catalytic packed-bed membrane reactor
Q2D model can be run using the pre-existing executables or by compiling the code on the user’s local machine from the source. All operating parameters needed to run the model are specified in the `input.dat' file.
- Download the OS-specific compiled versions of the Q2D model from the `run' folder.
- Copy the `input.dat' and chemistry mechanism files in the same folder.
- To run the model, doubleclick or type `./packbedQ2D' in the terminal.
- Compiled Cantera code (Works with Cantera 3.1)
- Python, Boost, and Sundials - The Q2D PackBed code does not use Python or Sundials explicitly, but Cantera needs this software.
- Microsoft Visual Studio (Required on Windows)
- Open the file 'SConstruct' from the `Compile' folder.
- Change the directory paths to the local directory paths where Cantera and Boost suites are installed.
- Open the MSVC command prompt in the Packbed folder and run 'scons'. The code should compile without any error.
- Run the command 'packbedQ2D.exe' to run the program.
- The code can also be run by double-clicking on packbedQ2D.exe.
- Open the file 'Makefile' from the `compile' folder.
- Change the directory paths to the local directory paths where Cantera and Boost suites are installed.
- Open the terminal in the same folder and run 'make all'. The code should compile without any error.
- Run the command './output' to run the program.
- The Q2D model reads input data from the file 'input.dat'.
- The solution is saved in output files 'molefractions_T_P_V.csv' and 'solution_T_P_V.csv'.
- The file 'molefractions_T_P_V.csv' stores mole fractions of gas-phase species, density, pressure, temperature, and surface coverages. T, P, and V correspond to the inlet temperature, pressure, and velocity(or flow rate).
- The file 'solution_T_P_V.csv' stores the variables used in the solution vector (i.e. mass fractions of gas-phase species, density, pressure, temperature, and surface coverages).
- The CSV file starting with "Err_" is saved in case of code failure. It saves the last successful steady-state solution.
- The input file (input.dat) contains a parameter called 'RESTART' to specify if the user wants to use the previous solution as the initial guess.
- If RESTART is set to 1, then the model reads the CSV file named "savedSolution.csv" as the initial guess. The file "savedSolution.csv" gets saved every time the model is run successfully.
- The files 'steadysolve_n_*.csv' store the solution before `n' th refinement.
Please cite this package along with the research articles, when used in a scholarly work.
- `Computationally efficient and robust models of non-ideal thermodynamics, gas-phase kinetics and heterogeneous catalysis in chemical reactors', G. Kogekar, Doctoral dissertation, 2021
- `Quasi-two-dimensional model of catalytic packed-bed membrane reactors', G. Kogekar, H. Zhu, F. Goldsmith, R.J. Kee, In preparation, 2025
Q2D packed-bed model is released under the MIT license; see LICENSE for details.