Trying to simulate OCM reaction

33 views
Skip to first unread message

Koseku Buzugbe

unread,
Aug 13, 2026, 1:52:34 PM (12 days ago) Aug 13
to Cantera Users' Group
Hi, I am trying to run a simulation of the oxidative coupling of methane in a PFR. I am using an Mg catalyst and have been trying to simulate this phase block using the stoichsubstance thermal model but I keep receiving this error:

CanteraError thrown by Phase::assertCompressible:
Setter 'setConcentrations' is not available. Density is not an independent
variable for 'bulk' ('StoichSubstance')

I have also tried simulating it as an ideal solid instead and still get a density error. Here is my code for the bulk phase, could anyone please explain to me what might be going wrong ?

  </phase>

  <!-- phase catalyst_bulk -->
  <phase id="bulk" dim="3">
    <elementArray datasrc="elements.xml">Mg</elementArray>
    <speciesArray datasrc="#species_data">MG(B)</speciesArray>
    <state>
      <temperature units="K">1023.15</temperature>
      <pressure units="Pa">101325.0</pressure>
    </state>
    <thermo model="StoichSubstance">
    <density units="g/cm3">3.58</density>
    </thermo>
    <transport model="None"/>
    <kinetics model="none"/>
  </phase>

Ray Speth

unread,
Aug 13, 2026, 3:58:07 PM (12 days ago) Aug 13
to Cantera Users' Group
Hi,

Based on the use of the old XML format, you must be using a rather out of date version of Cantera (before 3.0 at least). There have been many significant changes since then, including some specifically to the PFR model, and I would in general recommend upgrading to the latest version.

Beyond that, it's hard to understand what's happening that leads to this error without seeing at least a portion of your code (not just the thermodynamic input data). The PFR itself should contain a gas phase, and it shouldn't be necessary in the case of a catalytic reaction mechanism to include the bulk substrate as part of the simulation. What is the role of this bulk Mg phase in your system?

Regards,
Ray

Koseku Buzugbe

unread,
Aug 13, 2026, 6:34:21 PM (11 days ago) Aug 13
to Cantera Users' Group
Thank you for the response, I will attempt to update my software. In this case the bulk phase is acting as the empty surface after the surface species have been absorbed onto the catalyst surface (it is further used in the reaction data for the surface reactions) am I able to send you the specific input file I am using so that would provide more insight ?

Ray Speth

unread,
Aug 15, 2026, 10:39:45 PM (9 days ago) Aug 15
to Cantera Users' Group

Hi,

You can attach the full mechanism file here if you like. What would be more useful to see is the code that sets up the reactor network, i.e. creating FlowReactor and ReactorSurface objects and adding them to a ReactorNet.

Usually, the surface mechanism itself includes a pseudo-species that represents and empty site. For example, in the case of ptcombust.yaml, this is the species PT(S), which appears as a “reactant” for any adsorption reaction and a “product” for any desorption reaction. There’s no need to represent the bulk phase at all unless you have non-catalytic reactions representing a deposition or ablation process. However, both catalytic and non-catalytic systems can be simulated using the FlowReactor class. See 1D_pfr_surfchem.py for an example.

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages