Closed CharlelieLrt closed 8 months ago
Is this for use with the ExtensibleReactor
model? This question was recently raised on the Users' Group (see this post), and the workaround I suggested was to add some member variables and methods to the ExtensibleReactor
-derived class and store references to the upstream reactors as you're connecting the components of the reactor network.
I think this will mostly be resolved as a side effect of #1624, which adds upstream
and downstream
properties to Python FlowDevice
objects.
Yes, it is for an ExtensibleReactor
for which the eval
method is overwritten by a replace_eval
.
Thank you for your suggestion, I think that is essentially what is done in the Porous media Burner example.
And yes, I believe #1624 will resolve this.
I am implementing a custom reactor network using Cantera's Python interface. This network comprises a
FlowDevice
(MassFlowController
orValve
). For example:My custom implementation requires to be able to access methods/attributes of the upstream and downstream reactors, from the
FlowDevice
F
. For example, something that would look like this:Many of these APIs seem to be implemented in the C++ interface. For example, in the
FlowDevice.cpp
, I can see:where
m_in
is the reactor upstream to theFlowDevice
. These APIs seem to be missing from the Python interface. In particular, I cannot find anyenthalphy_mass
oroutletSpeciesMassFlowRate
for the PythonFlowDevice
. Is there any way to achieve similar behavior using only the Python interface?More generally, is there any alternative to access the neighbors of a given reactor in a
ReactorNet
, at the level of the reactor itself. For example something like: