VlachosGroup / openmkm

Opensource software to model heterogeneous catalytic reactions. Based on Cantera
MIT License
14 stars 12 forks source link

Gas phase reactions #51

Closed francescalb closed 2 years ago

francescalb commented 3 years ago

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.

mbkumar commented 3 years ago

Hmm. Both gas phase and surface phase reactions are supported in openmkm. Could you please share your input file? I'd like to check it for its correctness.

Bharat

On Thu, Oct 21, 2021, 4:30 AM francescalb @.***> wrote:

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: https://github.com/VlachosGroup/openmkm/blob/master/examples/rctr_input_files/batch_gasonly.yaml .

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/VlachosGroup/openmkm/issues/51, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62VEHZ4VXAX5B5ZTD3ECDUH7FSNANCNFSM5GNQXYKA .

francescalb commented 3 years ago

Sure,

I have uploaded a thermo.xml file (renamed with .txt as github does not support .xml uploads). It has been generated with the openmkm example in pmutt, only with the change of adding a direct reaction between N2 and H2 to form NH3 in the gas phase (I know, not very likely to occur...), with a completely invented Ea and A. The error message is the same.

thermo.xml.txt

skasiraj commented 3 years ago

@francescalb I just checked by adding a gas phase reaction to the "CTI" file from the (pmutt-openmkm) example, and then used the CTML thermodynamic input file for an OpenMKM run, and it seems to run okay for me. As @mbkumar suggested it would help to check the input file for correctness.

Couple of pointers for the CTI file.

skasiraj commented 3 years ago

Sure,

I have uploaded a thermo.xml file (renamed with .txt as github does not support .xml uploads). It has been generated with the openmkm example in pmutt, only with the change of adding a direct reaction between N2 and H2 to form NH3 in the gas phase (I know, not very likely to occur...), with a completely invented Ea and A. The error message is the same.

thermo.xml.txt

Just remove the type="surface" for the reaction 14. Since this is not a surface reaction.

francescalb commented 3 years ago

Ah, thank you very much! You can then disregard my comment. Indeed you are right, the gas phase reaction was set to be a surface_reaction and in the xml, it worked with setting type="" for that particular reaction.

Thank you for the quick and very helpful reply! (Now going back to find out how to do it correctly with pmutt :) )