-
-
Notifications
You must be signed in to change notification settings - Fork 404
Open
Description
Problem description
My assumption was that the net_production_rates vector stored in ReactorSurface() under kinetics, would only store the surface species. However, this is not the case, instead both gas and surface species are stored in concatonated form. Is this behaviour intentional? For the partial_molar_enthalpies only the surface species are stored.
Steps to reproduce
import csv
import cantera as ct
# unit conversion factors to SI
cm = 0.01
minute = 60.0
#######################################################################
# Input Parameters
#######################################################################
tc = 800.0 # Temperature in Celsius
length = 0.3 * cm # Catalyst bed length
area = 1.0 * cm**2 # Catalyst bed area
cat_area_per_vol = 1000.0 / cm # Catalyst particle surface area per unit volume
velocity = 40.0 * cm / minute # gas velocity
porosity = 0.3 # Catalyst bed porosity
# input file containing the surface reaction mechanism
yaml_file = 'methane_pox_on_pt.yaml'
output_filename = 'surf_pfr2_output.csv'
#####################################################################
t = tc + 273.15 # convert to Kelvin
# import the model and set the initial conditions
surf = ct.Interface(yaml_file, 'Pt_surf')
surf.TP = t, ct.one_atm
gas = surf.adjacent['gas']
gas.TPX = t, ct.one_atm, 'CH4:1, O2:1.5, AR:0.1'
mass_flow_rate = velocity * gas.density * area * porosity
# create a new reactor
r = ct.FlowReactor(gas)
r.area = area
r.surface_area_to_volume_ratio = cat_area_per_vol * porosity
r.mass_flow_rate = mass_flow_rate
r.energy_enabled = False
# Add the reacting surface to the reactor
rsurf = ct.ReactorSurface(surf, r)
sim = ct.ReactorNet([r])
print(surf.n_species)
print(rsurf.kinetics.net_production_rates.shape)
print(rsurf.kinetics.partial_molar_enthalpies.shape)
print(gas.n_species)The ouput to terminal is:
11(18,)(11,)7System information
- Cantera version: 3.2.0a1 (dev)
- OS: Apple Silicon M4 (OS 15.3.2)
- Python/MATLAB/other software versions: Python
Reactions are currently unavailable