Extensible Reactors use help

40 views
Skip to first unread message

francesco_sm64

unread,
Jul 29, 2025, 12:02:10 PMJul 29
to Cantera Users' Group
Dear Cantera users,
I am trying to develop custom reactors to manage heterogeneous combustion simulations through a reactor network. 
To be effective, these new reactors need to exchange information with their neighbouring reactors. Looking at the documentation, I found a useful function called eval_walls (see https://cantera.org/dev/python/zerodim.html) that should allow the exchange of the heat rate through the walls. However, I am not able to determine how this function must be called, if a proper prefix must be adopted (e.g. before_, after_, ...). I looked for examples, but I was unable to find a single example which used this function.
Please can you help me understand how this function can be used?

Thank you and best regards,

Francesco

Ray Speth

unread,
Aug 15, 2025, 9:25:37 AMAug 15
to Cantera Users' Group

Hi Francesco,

Like the other delegatable functions within ExtensibleReactor, an implementation of eval_walls should be have a before_, after_ or replace_ prefix. In this particular case, the “before” option is not effective, as the heat transfer and volume change rates will be overwritten by the base reactor class’s behavior, which you can see here.

If you implement a after_eval_walls method, then what it should do is set (or modify) the value of the heat_rate property of the reactor. This heat rate will then be used in the evaluation of the governing equations.

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages