Hi everyone,
I am starting to create a reaction network C source code for combustion using some AD packages. But I have a few worries to CasADi:
1. a detailed reaction mechanism have more than 1000 species. a applicable reaction mechanism uses about 10 - 30 speices. I want to know the code generation and performance scaling of CasADi.
2. the thermodynamic properties of species are piecewise polynomials (usually two pieces, 300 -1000K ,1000 - 3000K, and the polynomial order is about 5 - 6, the continuity is not guaranteed). Will it be a problem for CasADi?
3. Most of operations can be expressed in matrix product. But the most complex part is the mass action law and Arrhenius law:
ROP = k * [H]^rh *[O]^ro [1]
k= A*T^b*exp(alpha*T). [2]
How to generate this kind of nonlinear operations on matrix form of data.
4. Some data are integers or zeros, especially for reaction order (rh, ro in formula [1]). Its optimization is important for performance ( a*a is much faster than pow(a,2) ). Is CasADi able to create an integer rather than floating literal for those data? Some compiler, such as C compiler for FPGA, may not be good enough at optimization.