AS,
I’m not sure about your formula. What should go to a constant value at steady state is the heat release rate (in J/s), which is just:
sum(gas.partial_molar_enthalpies * gas.net_production_rates)
I’m not sure why it takes so long for your system to reach steady state. How large is your reaction mechanism? Are you still working with the single-step mechanism that you posted before? It definitely shouldn’t take hours to reach a steady-state solution with that mechanism and a system of 10 reactors. With a larger mechanism and system of reactors, things can get pretty slowly, as Cantera uses a dense solver for the stiff equations which scales as O(N^3) where N is the total number of state variables.
Your idea of only having one pair of valves connected to the reservoirs makes perfect sense to me.
Regards,
Ray
scons build optimize=n blas_lapack_libs=blas,lapack prefix=/opt/cantera
I put optimize=y and reran. It didn't seem to really make a difference, though. I may very well still not have optimizations enabled, and just not know what I am doing!
Also, all of my valves have coeffients of 1, which should be alright. I fooled around with them a bit, but this seems to make it run fastest. Not sure what else could be happening. I want a high pressure coefficient to keep the pressure constant, but I also don't want ti introduct stuffness...
Is there a good way to calcualte a "good" coefficient so that the pressure is constant but not very stiff??
-AS