Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyJac has high accracy, why? #48

Open
banyangtju opened this issue Jan 25, 2024 · 3 comments
Open

pyJac has high accracy, why? #48

banyangtju opened this issue Jan 25, 2024 · 3 comments

Comments

@banyangtju
Copy link

It can be found that pyJac has high accuracy compared with Standard in OpenFOAM. But why? Is the accumulated roundoff error ?

@kahilah
Copy link

kahilah commented Jan 25, 2024

Hi, accuracy has many levels. If you refer to the elementwise accuracy of the Jacobian matrix, pyjac provides an analytical expression for each element so it results in high accuracy. In the past openfoam did not use detailed analytical solution in each element which caused some deviation. In the latest OF-Foundation version, this has been revised though.

If you refer to some other aspect of accuracy, like overall solution of kinetics, then it's not only pyjac which plays a role but how you compute your RHS of the equations and which ODE integrator you use for the solution.

@banyangtju
Copy link
Author

Thanks for your explaination. I refer to the elementwise accuracy of the Jacobian matrix. It is well konwn that pyJac can provide accurate expressions of omega and Jacobian for a given mechanism. However, in OpenFOAM after v6, the fully analytic Jacobian is also provided. And there is a significant gap between OF6+Standard and CHEMKIN, while a small gap between OF6+pyJac and CHEMKIN is found although using the same ODE solver and tolerances.

Is the high accuracy of pyJac can be attributed to the accurate expressions leading to low roundoff error?

@kyleniemeyer
Copy link
Member

I can't really comment on why the built-in chemistry model in OF6 differ from Chemkin/pyJac - I haven't seen any sort of verification of that.

I would expect pyJac and Chemkin to agree closely, with some small numerical differences due to slight differences in the implementations - though the commercial version of Chemkin is closed source and therefore cannot really be checked. I would not treat Chemkin as the definitive version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants