A plug flow reactor with both homogenous and heterogenous reactions

64 views
Skip to first unread message

Barry Schizzel

unread,
Jan 20, 2022, 9:44:43 AM1/20/22
to Cantera Users' Group
Dear all,
Completely new to cantera here. 
I have some basic understanding of the 0-D reactor models. as given in the pages:
homogenous (h2o2.yaml) - https://cantera.org/examples/python/reactors/pfr.py.html
heterogeneous (methane_pox_on_pt.yaml) - https://cantera.org/examples/python/reactors/surf_pfr.py.html

I want to build a surf_pfr with both heterogeneous and homogeneous reactions, I tried to simply have two phases and combine the phases with the respective kinetics. I copies some of the reactions and species properties from the h2o2.yaml file into the methane_pox_on_pt.yaml file. My new yaml file looks like - 
-------------------------------------------------------------------
phases:
- name: gas
  thermo: ideal-gas
  elements: [O, H, C, N, Ar]
  species: [O, H, H2O2, OH, HO2, H2, O2, H2O, CH4, CO, CO2, AR]
  skip-undeclared-elements: true
  kinetics: gas
  reactions: declared-species
  transport: mixture-averaged
  state:
    T: 300.0
    P: 1.01325e+05
    X: {CH4: 0.095, O2: 0.21, AR: 0.79}
- name: Pt_surf
  thermo: ideal-surface
  elements: [Pt, H, O, C]
  species: [PT(S), H(S), H2O(S), OH(S), CO(S), CO2(S), CH3(S), CH2(S), CH(S),
    C(S), O(S)]
  skip-undeclared-elements: true
  kinetics: surface
  reactions: declared-species
  state:
    T: 900.0
    coverages: {O(S): 0.0, PT(S): 0.01, H(S): 0.99}
  site-density: 2.72e-09
-------------------------------------------------------------------

On running the simulation with my own yaml file, there is an error in the surf_pfr.py fle at
for n in range(NReactors): # Set the state of the reservoir to match that of the previous reactor gas.TDY = r.thermo.TDY upstream.syncState()
--->>> sim2.reinitialize() which says the first phase of any kinetic manager must be gas. Can you please help resolve this error. Seems this is something that should be fairly easy easy but I am making some kind of syntactic mistake. Thanks for your help in advance.
Thanks and Best regards
Barry

Ray Speth

unread,
Jan 20, 2022, 11:12:06 PM1/20/22
to Cantera Users' Group

Hi Barry,

Could you attach the complete YAML and Python files you’re using? I see one issue in your YAML file, which is that for both phases, you are specifying that both phases will read reactions from the same section (the default reactions section, but I think you should have separate sections for the gas phase and surface reactions. That’s not the source of the error you’re getting, though. From the short bit of code you included, I can’t tell what’s happening, since the sim2 object isn’t something that’s defined in the original version of the surf_pfr.py example.

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages