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

Reimplement der_spliceFunction #1531

Closed
mwetter opened this issue Oct 13, 2021 · 0 comments · Fixed by #1532
Closed

Reimplement der_spliceFunction #1531

mwetter opened this issue Oct 13, 2021 · 0 comments · Fixed by #1532
Assignees

Comments

@mwetter
Copy link
Contributor

mwetter commented Oct 13, 2021

Hubertus reported that the current implementation of spliceFunction_der in the MSL (or der_spliceFunction as it is called in the IBPSA library), the cosh function is used. But this causes an overflow if its argument is around 800 which can be very hard to diagnose if it happens in a solver. He provided another implementation with tanh that does not exhibit this potential problem.

This issue is to implement the new formulation.

@mwetter mwetter self-assigned this Oct 13, 2021
mwetter added a commit that referenced this issue Oct 13, 2021
thorade added a commit to thorade/ModelicaStandardLibrary that referenced this issue Oct 27, 2021
improve readability slightly
remove cosh, because cosh(800+) might return NaN
also see ibpsa/modelica-ibpsa#1531
beutlich pushed a commit to modelica/ModelicaStandardLibrary that referenced this issue Feb 1, 2022
* Improve readability slightly
* Remove cosh, because cosh(800+) might return NaN
* As reported by ibpsa/modelica-ibpsa#1531
mwetter pushed a commit that referenced this issue Sep 27, 2022
this is a follow-up for #1531 and #1532
there are two if-conditions that used a different value:
1 versus 0.9999999999
this PR makes sure the identical limit is used in
spliceFunction and corresponding derivative
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

Successfully merging a pull request may close this issue.

1 participant