How to specify the reactor temperature profile

218 views
Skip to first unread message

Zachary Xiong

unread,
May 3, 2022, 2:37:51 PM5/3/22
to Cantera Users' Group
Hi all,

I'm trying to set the experimental temperature profile to the temperature value in a packed-bed reactor model. 

It can be described  as a brief question: How to specify the reactor temperature profile?

Someone thinks that  we can just make it isothermal and change the temperature manually at each timestep. 

But how to realize it? Are there any relevant examples?

Thanks for any help you can offer!

Zachary

Ray Speth

unread,
May 8, 2022, 12:32:34 PM5/8/22
to Cantera Users' Group
Hi Zachary,

What Cantera interface are you using? If you're using the Python interface, I would recommend trying the ExtensibleReactor class that was introduced in the recent release of Cantera 2.6.0. This model will let you replace/augment parts of the governing equation calculations with your own modifications. The custom2.py example uses this capability to add a variable to the system, and I think you could do something similar to effectively remove temperature from the state vector.

Changing the reactor state outside the control of the integrator, as you suggest is pretty error prone -- the multistep integrator (CVODES) used by Cantera needs the system to be consistent. Otherwise, you need to restart the integrator from scratch after making a change externally. The surf_pfr.py example shows how to do this correctly.

Regards,
Ray

Zachary Xiong

unread,
May 10, 2022, 5:06:45 AM5/10/22
to Cantera Users' Group
Thanks a lot for your response. I am using Python as the interface. 

Your idea is interesting and I am trying to use it in my work.

I hope there will be good results。

Regards,
Zachary

dylan rubini

unread,
Jun 3, 2022, 8:15:09 PM6/3/22
to Cantera Users' Group
Hi  Zachary,

Thanks for this discussion. Very useful !

Did you manage to get this working with the ExtensibleReactor class solution?

Best,

Dylan 

Reply all
Reply to author
Forward
0 new messages