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

Algebraic loops are solved with insufficient accuracy for Jacobian estimation by CVODE #1327

Open
rruusu opened this issue Oct 30, 2024 · 1 comment

Comments

@rruusu
Copy link

rruusu commented Oct 30, 2024

Description

When using CVODE, some state derivatives may be highly dependent on the solutions to algebraic loops between the components.

CVODE uses difference quotients to evaluate Jacobians between states and state derivatives, it uses very small steps for evaluating the difference quotients. When the state derivatives depend on algebraic loop solutions, the errors in these solutions may overwhelm the true effects of the difference quotient steps. This results in bad quality Jacobian estimates, which affects the error tolerance calculations performed by CVODE.

Unfortunately, the absolute tolerance that is provided to the algebraic loop solver is 100 greater than the absolute tolerance given the CVODE, which practically guarantees that the algebraic loop errors are too high for CVODE.

Expected behavior

When using CVODE, the algebraic loops should be solved to an accuracy that is sufficient for the difference quotient evaluations done by CVODE. (This is not so trivial.)

Version and OS

  • Version: OMSimulator v2.1.2.post5-gce342b6-mingw-notlm-debug
  • OS: not relevant
@rruusu
Copy link
Author

rruusu commented Oct 30, 2024

This might be considered more like a feature request rather than a bug report.

I will push some remedies for this to my fork shortly.

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

1 participant