Under 200K flame simulations

79 views
Skip to first unread message

Xavi de Bonis

unread,
May 21, 2024, 4:55:07 AMMay 21
to Cantera Users' Group
Hello there!

I am working as a fun-project on simulating rocket engine conditions in cantera with cryogenic propellants, which to no ones surprise, it is quite challenging. First of all, I have simplified the problem to a 1D counterflow H2/O2 diffusion flame and I have even implemented the Peng-Robinson equation of state. However, there is one major problem that I can get over with. The flames from the papers I have chosen to validate the real-gas model (Lacaze 2012 and Banuti 2018) both have inlet temperatures of 125K and cantera will not simulate under 200K.

I have looked at the source code. On one side, there is the polynomial parametrization of thermodynamic values in h2o2.yaml that are validated at temperatures upwards of 200K, but changing the lower limit does not seem to change anything. On the other side, I have tried to look other places where a hard cap at T=200K might have been implemented but it has not granted any result.

For this reason, I was wandering if anyone knows how can I sumilate such flames at temperatures lower than 200K and how I can do it.

Thanks in advance,

Xavi
Message has been deleted

Carlos García

unread,
Jun 4, 2024, 6:52:28 AMJun 4
to Cantera Users' Group

Hi!

The temperature limits for computing are not determined in the chemical mechanisms, but in the source code. These are specified in the following line from file  'src/oneD/StFlow.cpp':
  
      setBounds(c_offset_T, 200.0, 2*m_thermo->maxTemp());

So basically, you just need to change 200.0 to 100: 
     
      setBounds(c_offset_T, 100.0, 2*m_thermo->maxTemp()); 

Then recompile cantera, and enjoy simulating your rocket flames.

Regards,

Carlos

Ray Speth

unread,
Jun 10, 2024, 11:42:06 PMJun 10
to Cantera Users' Group

Hi all,

No need to modify the Cantera source code to fix this. You can modify the bounds from Python. If f is your CounterflowDiffusionFlame object, then just call

f.flame.set_bounds(T=(100, 10000))

before the first call to f.solve to set the lower and upper bounds to 100 K and 10,000 K, respectively.

A fix for this case where the inlet temperature is lower than the default temperature bound was just merged into the main branch, so this won’t be necessary after the next Cantera release.

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages