ReactionMechanismGenerator / ReactionMechanismSimulator.jl

The amazing Reaction Mechanism Simulator for simulating large chemical kinetic mechanisms
https://reactionmechanismgenerator.github.io/ReactionMechanismSimulator.jl
MIT License
74 stars 33 forks source link

Efficient sensitivity trick for ignition delay times #65

Open jiweiqi opened 4 years ago

jiweiqi commented 4 years ago

There is a trick that can make the sensitivity analysis of ignition delay time super fast with reverse-model adjoint sensitivity analysis. By recognizing that the sensitivity (direction) is the same as the sensitivity of temperature at ignition point. Then one can take the loss g = u[index of ignition].

Hi @mjohnson541 Do you have large reaction mechanisms that have been tested in rms. I would like to try a mechanism with the size comparable to LLNL iso-octane mechanisms, that contain> 5 k reaction steps. Currently, the rms GitHub repo only contains an ethane mechanism. I can pull a Chemkin mechanism, but it will be great to have one that has been tested.

Reference: Ji, Weiqi, Zhuyin Ren, and Chung K. Law. "Evolution of sensitivity directions during autoignition." Proceedings of the Combustion Institute 37.1 (2019): 807-815.

mjohnson541 commented 4 years ago

So currently I don't think the adjoint sensitivity analysis is optimized enough to run something that big...I had difficulties with even with the ethane mechanism at Constant V. This could be implemented now perhaps on the H2 mechanism, but I think larger mechanisms will need #51.

jiweiqi commented 4 years ago

Got it. I will try the H2 mechanism and post the results here.

conp.jl

jiweiqi commented 4 years ago

I had difficulties with even with the ethane mechanism at Constant V

What are the challenges for the ethane mechanism?

mjohnson541 commented 4 years ago

It's just slow, I'm not sure about the H2 mechanism performance either for Constant V. Things should get a ton better with #51, currently we have to evaluate the full derivative function for every element of the gradients instead of a fraction of the involved reactions twice.

jiweiqi commented 4 years ago

For curious, where the test model "../src/testing/superminimal.rms" comes from?

mjohnson541 commented 4 years ago

It's the simplest RMG example, it's not an accurate mechanism, but it's fast to generate and simulate, which makes it great for testing things.

mayor-slash commented 4 months ago

@jiweiqi Do you have a minimal example of doing these sensitivitiy anlysis? What is the most efficent way to get "index of ignition"?