Hi Bryan:
Thank you for your suggestion.
However, even with the "advanceCoverages", the surface chemistry is still not accounted in the reactor simulation.
For example, the code below for the partial-oxidation of CH4 on Pt surface does not produce any CH4 conversion whereas its equivalent code in python shows a conversion. For example, CH4 is converted (i.e., changed from 60% to 45%) to other gaseous species due to the surface-induced oxidation in python whereas C++ code did not show any change in the gas composition (C++ and python files are attached). I am not sure what is missing in the C++ code to make this difference. I would appreciate any help to identify the missing piece in the C++ code, or any C++ example using surface chemistry for a reactor simulation.
//***Surface Reactor - C++ Example:
//inputs
string cti_file = "methane_pox_on_pt.cti";
string comp = "CH4:0.60, O2:0.30, AR:0.10";
double temp = 600.0;
double patm = 1.0;
double tfinal = 1.0;
// defining phases
auto gas_sol = newSolution(cti_file, "gas");
auto gas_ph = gas_sol->thermo();
auto gas_kin = gas_sol->kinetics();
gas_ph->setState_TPX(temp, patm*OneAtm, comp);
auto surf_sol = newSolution(cti_file, "Pt_surf", "None", {gas_sol});
auto surf_ph = std::dynamic_pointer_cast<SurfPhase>(surf_sol->thermo());
auto surf_kin = std::dynamic_pointer_cast<InterfaceKinetics>(surf_sol->kinetics());
surf_ph->setState_TP(temp, patm*OneAtm);
// advance surface coverage
surf_kin->advanceCoverages(10.);
// setting-up surface reactor
IdealGasReactor reactor;
reactor.insert(gas_sol);
reactor.setEnergy(0);
ReactorSurface react_surf;
react_surf.setReactor(&reactor);
react_surf.setKinetics(surf_kin.get());
// simulating reactor
ReactorNet sim;
sim.addReactor(reactor);
sim.advance(tfinal);
#***Surface Reactor - Python Example:
import cantera as ct
# inputs
cti_file = "methane_pox_on_pt.cti"
temp = 600.0
patm = 1.0
comp = "CH4:0.60, O2:0.30, AR:0.10"
tfinal = 1.0
# defining phases
gas_kin = ct.Solution(cti_file, 'gas')
gas_kin.TPX = temp, ct.one_atm*patm, comp
surf_kin = ct.Interface(cti_file,'Pt_surf', [gas_kin])
surf_kin.TP = temp, ct.one_atm*patm
# advance surface coverage
surf_kin.advance_coverages(10)
# setting-up surface reactor
r = ct.IdealGasReactor(gas_kin, energy='off')
rsurf = ct.ReactorSurface(surf_kin, r)
sim = ct.ReactorNet([r])
sim.advance(tfinal)