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

Handling conservation laws via solver constraints #2329

Open
dweindl opened this issue Feb 28, 2024 · 3 comments
Open

Handling conservation laws via solver constraints #2329

dweindl opened this issue Feb 28, 2024 · 3 comments

Comments

@dweindl
Copy link
Member

dweindl commented Feb 28, 2024

The CVODES constraint handling (see also #2327) would also allow us to enforce conservation laws, and probably make our code quite a bit simpler.

To be discussed whether we'd want to keep the current conservation law handling anyways in order to support other solver at some point, but it seems rather unlikely that this will happen.

This would also solve the currently missing/difficult handling of non-negativity constraints in combination with conservation laws.

This will, however, first require upgrading SUNDIALS (#1565).

[1] Note: relevant memory leaks fixed in v6.4.0

@FFroehlich
Copy link
Member

Yes getting rid of the conservation laws would indeed be great. Is constraint handling also supported by the non-linear solvers? Moreover, we would have to figure out a way of applying the constraints when computing derivatives implicitly. Not an issue with positivity but more problematic with conservation laws.

@dweindl
Copy link
Member Author

dweindl commented Feb 28, 2024

Is constraint handling also supported by the non-linear solvers?

Yes Wait, no. Contraints are checked after the non-linear solve.

Moreover, we would have to figure out a way of applying the constraints when computing derivatives implicitly.

That I don't know.

@FFroehlich
Copy link
Member

Is constraint handling also supported by the non-linear solvers?

Yes Wait, no. Contraints are checked after the non-linear solve.

Moreover, we would have to figure out a way of applying the constraints when computing derivatives implicitly.

That I don't know.

Both would be issues for steadystate solvers.

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

No branches or pull requests

2 participants