VlachosGroup / pMuTT

Python Multiscale Thermochemistry Toolbox (pMuTT)
https://vlachosgroup.github.io/pMuTT/
40 stars 23 forks source link

Gas phase reactions for cantera/openmkm #191

Closed francescalb closed 2 years ago

francescalb commented 2 years ago

question #help_wanted

Hi,

I would like to compare a non-catalysed reaction with its catalysed counterpart by doing microkinetic modelling with openmkm. I have started setting up the the non-catalysed reaction first, but get into problems as there is no surface with a surface siste density.

Is it possible to run a purely gas/liquid phase problem with pmutt and openmkm/cantera? If so, are there any examples for how to do this? I would like to do both cases in similar ways to ensure a correct comparison.

jonlym commented 2 years ago

Thanks for your interest!

I believe OpenMKM can run pure gas-phase reactions since there is an example YAML file that shows only a gas phase. I also think pMuTT's write_cti and write_yaml functions shouldn't throw an error if there are no surface phases. I haven't been involved with the development process since graduating so @skasiraj or @wittregr will have to give a more definitive answer.

Is there a specific error you were facing?

francescalb commented 2 years ago

Thank you, this sounds promising!

My problem (now) arises when making the cti/xml files with the pmutt.io.omkmk.write_cti function: ''' write_cti(reactions=reactions, species=all_species_list, phases=phases, units=units, filename=cti_path, T=T, P=1.) '''

Now, this requires the reactions to be of type SurfaceReaction. They are not surface reactions, but I thought I could circumvent this by defining is_adsortion=False.

Apparently the error arises when calculating the preexponential factor where I get the error message: ValueError: At least one species requires a catalytic site with site density to calculate A.

len(site_dens) == 0 as I don't have a catalyst there at all, but I do not understand how any of the reaccction require a catalytic site.

jonlym commented 2 years ago

Ah, I see how that's problematic. We'll have to change that so it'll allow gas phase reactions.

For now unfortunately pMuTT can't support that so you'd have to create that section of the cti file manually. Sorry about that.

francescalb commented 2 years ago

With pure gas phase systems now I can set the preexponential manually. I will therefore close this question from my side now.