-
-
Notifications
You must be signed in to change notification settings - Fork 409
Closed
Description
Problem description
Trying to access heat_rate (and probably other stuff too) from a Wall connecting two empty Reactors (i.e. with no defined phase) crashes the interpreter.
Clearly, there should be no proper result without defined phases in the reactors, but an access violation seems a bit drastic to me.
Steps to reproduce
import cantera as ct
r1 = ct.Reactor()
r2 = ct.Reactor()
w = ct.Wall(r1,r2)
w.heat_rateBehavior
The result for me is
Windows fatal exception: access violation
I suppose there is just a check missing on the C++ side of the object, because the conceptually similar MassFlowController handles the same situation by throwing
CanteraError:
*******************************************************************************
CanteraError thrown by ReactorBase::contents:
Reactor contents not defined.
*******************************************************************************I suppose copying this behavior to the Wall object would be enough.
System information
- Cantera version: 3.1.0a1
- OS: Windows 10
- Python/MATLAB/other software versions: Python 3.11.5
Reactions are currently unavailable