Git Product home page Git Product logo

openmkm's Introduction

OpenMKM

This is an image

OpenMKM is a multiphysics and multiscale software aimed at Chemical Engineers interested in modeling chemical kinetics for heterogeneous catalytic reactions. OpenMKM is opensource software and is developed at Delaware Energy Institute, University of Delaware.

Documentation

To find more about OpenMKM, visit OpenMKM Documentation.

GitHub Markdown (.md) documentation

  1. Instructions how to install OpenMKM can be found at Installation.
  2. Instructions to run OpenMKM can be found at How-to-run.
  3. More information about the input files required to run OpenMKM can be found at Input-Files.
  4. More information about the output files generated by OpenMKM can be found at Output-Files.
  5. You can find micro-kinetic modeling theory at in the Theory section.
  6. Examples are given here: <OpenMKM_ROOT>/examples/ folder

Developers

Dependencies

OpenMKM is dependent on Cantera.

License

MIT License

Citation

If you use OpenMKM please consider citing the following publication.

  • Bharat Medasani, Sashank Kasiraju, and Dionisios G. Vlachos, OpenMKM: An Open-Source C++ Multiscale Modeling Simulator for Homogeneous and Heterogeneous Catalytic Reactions, JCIM, 2023 63 (11), 3377-3391, DOI.

Funding

Development of OpenMKM is funded by RAPID Manufacturing Institute.

openmkm's People

Contributors

jonlym avatar jtfrey avatar mbkumar avatar skasiraj avatar wittregr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openmkm's Issues

Proximity factors

We know from BEP relationships that activation energies are correlated to heats of reaction. In a microkinetic model heats of reaction can change based on a number of factors that change the surface energies of adsorbed species. The most important of these is lateral interactions. As surface concentrations of species change, adsorption energies change, and heats of reaction change. Therefore, in kinetic models where BEP's are used to determine activation energies, changes in surface reaction energies are reflected properly in the activation energies. Reactions using a "fixed" activation energies (fixed wrt surface heats of reaction) as specified in the surf.inp, gas.inp, EAs.inp, or EAg.inp the changes in surface reaction energies are not reflected in the surface reaction activation barriers. To address this Chemin uses a proximity factor as describer by Grabow, L. C. et al. (2008) (‘Mechanism of the water gas shift reaction on Pt: First principles, experiments, and microkinetic modeling’, Journal of Physical Chemistry C, 112(12), pp. 4608–4617).

The proximity factor ranges from 0 - 1 and represents the reaction coordinate of the transition state for that reaction and functions identically to the BEP slope appling a fraction of the change in heat-of-reaction to the activation energy.

image

Chemkin provides for a default proximity factor in tube.inp (omega) and a flag (Iomega) to enable both proximity factors and a per reaction proximity factor file (omega.inp). The omega.inp file contains a list of reactions and associated proximity factors. If Iomega is True then, for all reactions not using BEP's, Chemkin first looks in the omerga.inp for a proximity factor and, if not found, uses the default value specified in tube.inp.

YAML input for file for reactor parameters

An YAML format for inputting reactor parameters has been implemented.
Pending Issues:

  1. Test all 0d reactors
  2. Test 1d reactors
  3. Test all operating modes
  4. Check heat conducting walls.

Gas phase reactions

It does not seem that gas phase reactions are implemented in omkm, although an example on such a reactor set up is given in the examples: .

With pmutt I am able to write (cti and xml) files that include reactions that occur in the gas phase as well as on the surface. While it is an alternative to stick to pure cantera without openmkm for sole gas phase systems, this is not so easily achievable when I need both surface reactions and gas phase reactions.

It might very well be that I am doing something wrong, so do you have an example on such usage?

The error is get when running OpenMKM is:

'''
Error raised in Cantera. Exiting...


CanteraError thrown by GasKinetics::addReaction:
Unknown reaction type specified: 20


'''
A first test was made by simply adding the direct formation of NH3 from N2 and H2 in the gas phase (in your openmkm example from pmutt) in addition to all the surface interactions.

I would be very grateful on some pointers on how to proceed here.

Are Hform and Sform calculated correctly

Is it correct that Hrxn and Srxn can be calculated accurately from Hform and Sform and the reaction stoichiometry? If not, please explain the differences in the documentation under Hrxn.out and Srxn.out.

PFR Implementation

Implement Ideal PFR.
Background: A series of CSTRs is often used to simulate PFR. However an implementation of an ideal PFR is also desired.

Pressures for Hform and Sform

What pressures are Hform and Sform calculated at? This matters for the gas-phase species. Please add this information to the underlined section in the documentation.

Is Grxn calculated correctly from Hrxn ans Srxn

Is it correct that Grxn can be calculated using the values from Hrxn and Srxn by the formula Grxn = Hrxn – T*Srxn? Is this T the reactor inlet temperature? If any of this is wrong, please correct the documentation for Grxn.out.

Example of what gas_mole_ss.out and accompanying gas_mole_tr.out

Can we have an example of what a gas_mole_ss.out and accompanying gas_mole_tr.out look like for a numerically solved pfr? Currently, the transient file is not outputting meaningful values. Once we have these files, we will elaborate the documentation on them.

Fill out the sections titled “Files with _ss.out extension:” and “Files with _tr.out extension:”

Can you please fill out the sections titled “Files with _ss.out extension:” and “Files with _tr.out extension:” with the appropriate information? While doing this, can you please add an explanation in the documentation on why the first volume change for the numerical PFR is different from all other volume changes? Also, can you please add an explanation in the documentation on why the final volume is not equal to the total reactor volume? There are partially written sections on these for you to complete.

Quantities of Hform and Sform

For the quantities of Hform and Sform, is the temperature these are calculated at the reactor inlet temperature? If not, please correct the documentation.

Formulas used to calculate kf

What are the formulas used to calculate kf? Please add this information to the documentation for kf.out and include the units kf will have for each formula.

Species Production Rate output overhaul

Currently, OpenMKM only prints net production rate of species (both gas and surface species), due to reactions occuring on the surface phase. OpenMKM does't print production rate of species due to gas-phase reactions. Gas-Phase production rates are important and provide valuable insight. This behaviour is inconsistent with CHEMKIN.

Resolution:

  1. OpenMKM should write independent production rate files for reactions occuring in each phase, i.e.,

    • gas_sdot_ss/surf_sdot_ss (for net production of gas/surface species from surface reactions)
    • gas_gdot_ss (for net production of gas species from gas-phase reactions)
  2. Alternatively, OpenMKM could follow CHEMKIN convention and print just two files species_sdot (combination of gas and surf sdot) and species_gdot which is just gas_gdot.

Desired Reactor models for implementation

The following is a list of reactor models to be implemented. Some of them have common implementation and distinguished only with operating conditions.

  1. TPD Surface science
  2. Molecular beam flux
  3. PFR with T profile imposed
  4. PFR with heat and mass transfer
  5. Particle model (BVP)
  6. Fixed bed reactor model (BVP)
  7. Non isothermal PFR
  8. TPD in fixed bed

In the above 1) TPD designates operational mode.
2) PFR with T profile imposed and PFR with heat transfer and non-isothermal PFR require energy equation to be solved.

Homogeneous Catalytic Reactions

Dear all,

In the example of homogeneous catalysis provided in JCIM (J. Chem. Inf. Model. 2023, 63, 3377−3391), the pre-exponential factor (A) is a constant value, and the activation energy (Ea) is replaced using Gibbs free energy (ΔGts), indicating that the pre-exponential factor is calculated using the formula for surface reactions. So for homogeneous catalytic reactions, what do the site density (σ) and the number of surface specifications (m) in the formula represent?

Looking forward to everyone's reply!

Meaning of additional note in rctr_state file documentation

Hi @mbkumar, can you clarify what the Note in the rctr_state file documentation means? It says "Note: Mass flow rate out of the reactor is printed as -ve value. Similarly, if mass produced from surface is -ve, it means surface absorbs more mass than the mass released." What does "-ve" mean? Thank you for the help.

Clarify results for numerical PFR in the _ss.out

Can you please clarify that for a numerical PFR set of results is each row in the _ss.out files a set of values corresponding to the quantities entering the node? Or are they the quantities leaving that node?

rctr_state mass values

Hi @mbkumar, we see you added "mass flow rate into the reactor (in kg/s), mass flow rate out of the reactor (kg/s), mass produced from the surface (in kg/s), net rate of change of mass (kg/s) in the reactor" to the output files documentation for the rctr_state output file. However, we do not see these values in our output file. Can you clarify when we should expect to see these values? Are they for an updated version of OpenMKM, or for specific reactors only?

Supporting YAML format for thermochemistry data

Currently OpenMKM is based on Cantera 2.4. The newer version, Cantera 2.5, supports YAML format to specify the thermochemistry data. This is easy on the eye compared to the XML format. There is also an added advantage of not having to work with CTI file and the associated conversion.

Things to do:

  1. Generate YAML file from pMuTT conforming to dict format required by Cantera for terms already supported by Cantera.
  2. Rebase openmkm branch of Cantera to incorporate updates from upstream
  3. Support YAML format for thermochemistry inside OpenMKM
  4. Define YAML format for BEP and lateral interactions
  5. Support BEPs and lateral interactions to be read from YAML file inside Cantera
  6. Implement the associated code in pMuTT (as part of 1) for BEPs and lateral interactions

Handlers:

Task-1: Jon
Task-2: Bharat,
Task-3: Bharat
Task-4: Bharat, Jon, and Gerhard
Task-5: Bharat
Task-6: Jon.

Reference: https://cantera.org/tutorials/yaml/defining-phases.html

Formula used to calculate Kc

Please provide the formula used to calculate Kc under the kc.out documentation and and include the units Kc will have for each formula.

CSTR Implementation

Implement CSTR.
CSTR can be implemented directly from cantera, but cantera is missing solver for CSTR. Only ReactorNet has integrator implemented.

  1. Attach appropriate components (Inlets, outlets, walls, surfaces) to cantera's Reactor class to define CSTR
  2. Validate the governing equations generated by cantera.
  3. Implement time integrator and steady state solver. Steady state solver is the one we care about. Integrator is to ride out the fast equations.

Why are Hrxn.out values pressure sensitive?

I ran an ammonia model at 1atm and then ran it at 100 atm.
The Hform.out values are all the same between the runs, but the Hrxn.out values change. The biggest change is for this reaction:
At 1atm: -9.002899e-02 NH(T) + RU(T) <=> H(T) + N(T) + RU(B)
At 100 atm: -7.910262e-02 NH(T) + RU(T) <=> H(T) + N(T) + RU(B)
All species involved in these reactions are surface species, which don't even have their Sform.out values affected by pressure.

Why do the Hrxn.out values change when the Sform.out and Hform.out values are identical?

Caviness paths with relevant MKMS:
1atm location: /work/ccei_biomass/users/maxrc/MKM/openmkm/NH3_1atm
100atm location: /work/ccei_biomass/users/maxrc/MKM/openmkm/NH3_100atm

ReNView Integration

Hi Bharat,

Quick question. Can ReNView be called from OpenMKM or do users have to run it manually? If yes to the former, what keywords are required?

Activation barrier input file (EAs.inp, EAg.inp)

Chemkin allows for activation energies to be set for each run in a series as specified in Tflow.inp. These activation energies are usually set to allow a temperature-dependent activation energy. Therefore, a separate activation energy in the EA input file aligned with the temperature of the simulation as specified in Tflow.inp accomplishes this task. Chemkin provides two input files for this purpose; one for the surface reactions (EAs.inp) and one for the gas reactions (EAg.inp). In addition, there is a flag in tube.inp to turn on/off the use of a separate EA input file (lEA). In the EA input file EA's are specified by reaction. If the IEA flag is True then Chemkin looks for an EA in the EA input file otherwise it uses the EA specified in surf.inp or gas.inp.

Output of surf_sdot.out

Hi @mbkumar, we noticed you added this surf_sdot.out file to the outputs documentation. However, we have not seen it output in our runs of OpenMKM. Can you specify when this file is generated, or has it been removed from the outputs now?

“Reactor State Data” section _ss.out and _tr.out files

Do all the files under the “Reactor State Data” section have both _ss.out and _tr.out files output for every type of reactor? For example, I do not see a rates_tr.out file for the numerical PFR. I have added an exception for that case to the documentation. Please add any additional exceptions or necessary clarifications.

Compilation with cantera problematic after lates updates

Hi,

After the latest commits in August I am no longer able to compile OpenMKM with the Cantera from the forked cantera repo as specified in the openmkm instructions.

git clone https://github.com/mbkumar/cantera.git.
cd cantera
git checkout openmkm
```
Has the required cantera installation been updated elsewhere?
With my openmkm fork from prior to August I have no problems with the installation itself. 
I am installing with the Dockerfile as in the pull request I made as a suggestion a few months ago.

Best regards, 
Francesca


```
This is the end of the errors messages during compilation:
#22 102.7 io.cpp:229:18: error: 'class Cantera::Kinetics' has no member named 'getDeltaRefEntropy'; did you mean 'getDeltaEntropy'?
#22 102.7   229 |             mgr->getDeltaRefEntropy(sRxnRef.data());
#22 102.7       |                  ^~~~~~~~~~~~~~~~~~
#22 102.7       |                  getDeltaEntropy
#22 102.7 io.cpp: In function 'void OpenMKM::print_rxn_gibbs(std::vector<Cantera::Kinetics*>, doublereal, std::string)':
#22 102.7 io.cpp:276:18: error: 'class Cantera::Kinetics' has no member named 'getDeltaRefGibbs'; did you mean 'getDeltaGibbs'?
#22 102.7   276 |             mgr->getDeltaRefGibbs(muRxnRef.data());
#22 102.7       |                  ^~~~~~~~~~~~~~~~
#22 102.7       |                  getDeltaGibbs
#22 113.5 scons: *** [io.o] Error 1
#22 113.5 scons: building terminated because of errors.



Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.