-
Notifications
You must be signed in to change notification settings - Fork 167
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
Fix #4312 #4522
base: master
Are you sure you want to change the base?
Fix #4312 #4522
Conversation
Closes #4312 |
Using WSM, not only does this change not fix RoomCO2WithControls, it also breaks these (in either simulation or correctness checking) which work without the change:
I didn't dig closer (only ran our existing tests). I would be interested in OpenModelica effects (or any other tool) for all Fluid-related tests with this change. |
I can also see differences in the results for these models (as indicated I didn't test it that completely).
This seems to be causing the problems further down - in the original problem we had: Delta=0.001 and now we change c0 to 0.001005323 to allegedly avoid an ill-posed problem, causing rho to change from practically 1 to -1596. Basically we are trying to increase the difference between c and theta0 - but end up decreasing it! |
I changed to use a relative test, matching the fact that we do a relative decrease - and removed the other code. As far as I could see RoomCO2WithControls, and the three regressions all run with correct results - and the original problem causing the change is also gone. A potential down-side of using a relative test is that if c is zero it will never trigger, but:
However, I don't know if this (updated) test is actually useful, but it seems less harmful. |
Again running tests without digging deeply, for WSM, the newest iteration:
So looks more promising than the first round. |
This was just a sampling issue, so this also went from simulation being stuck to completely fixed. I don't know anything about the function being changed, nor do I have any experience in fluid modeling, but from the point of view of working tests in System Modeler, this change is great. Let me know if you want me to leave an approving review, although it would be better if the library officers did that. |
Avoid chattering in Modelica.Fluid.Examples.TraceSubstances.RoomCO2WithControls
This should correct the issue in #4312 while keeping the improvements.
It would be better if we could understand the original paper - a concern is that we are adding layer upon layers of extras.