Accessing information on upstream reactors/flow devices in Extensible Reactor in Python

25 views
Skip to first unread message

Turhan Eker

unread,
Oct 24, 2023, 4:58:52 AM10/24/23
to Cantera Users' Group
Dear Cantera users,

I am currently working with Extensible Reactor classes to  model particulate formation(soot) using reactor networks. Due to computational speed sake, I am using replace_eval to define the governing equation. By going through the documentation, I found a way to access the mass flow rates of the upstream(inlets) reactors and flow devices within the ExtensibleReactor but I couldn't find a way to call the composition of the upstream reactors/flow devices. I know the C++ version of Cantera has the outletSpeciesMassFlowRate() function to access the composition of the upstream reactors in terms of mass flow rate. I was wondering whether there is a function similar in the Python version as well or a work around to call the composition of the upstream reactors/flow devices. Thank you for your help in advance.

Kind regards,
Turhan


Ray Speth

unread,
Oct 24, 2023, 10:19:56 AM10/24/23
to Cantera Users' Group
Hi Turhan,

This information isn't currently available directly in the Python interface. I think your best bet is to add some member variables and methods to your ExtensibleReactor-derived class and store references to the upstream reactors as you're connecting the components of the reactor network. I do expect this situation to be improved in the next version of Cantera, thanks to a currently-open PR (#1624).

Regards,
Ray
Reply all
Reply to author
Forward
0 new messages