-
Notifications
You must be signed in to change notification settings - Fork 168
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
Fixes for #4424 #4547
Fixes for #4424 #4547
Conversation
… avoid index reduction with the fixed pressure boundary. Changed to explicit steady state initialization to avoid unspecified initial conditions Fixes modelica#4424
This works in Dymola but not in OpenModelica 😢 |
There is something fishy in the way the pressure loss models work, I'm getting much smaller pressure losse than I expected, which makes the model ill-posed. I'll investigate more. |
…Initial so it works both in Dymola and OMC
I think I accidentally found a bug in Fluid.Dissipation: ModelicaStandardLibrary/Modelica/Fluid/Dissipation.mo Lines 4618 to 4625 in 9e8b7fb
I guess the last line (the |
In the meantime, I changed the parametrization of the pressure losses to use a quadratic model and get about 0.1 bar pressure loss. I also switched to FixedInitial to avoid convergence problems. This works both in Dymola and OMC. @maltelenz could you please check if it also works in WSM? |
The new results do not match the previously suggested reference (I assume this is expected). There are still transients in the beginning, I don't know if this is expected. |
Good.
Yes, since I added some pressure losses the pressures are different. But that doesn't matter, since the point of this model is to run the asserts. I'll ask LTX to re-generate the reference results in #4424.
Yes, it is. I tried steady-state initialization but I got into numerical trouble with OMC, so I though we could keep the same default behaviour we had previously with Dymola (i.e., fix all the states to their initial values), only make it explicit. There is a relaxation transient, then the asserts are only applied at the end. This is also improved by PR #4555. So, you can approve this without problem. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works in System Modeler, and the results seem as expected per previous comment.
Added small pressure losses to avoid index reduction with fixed pressure boundaries. Changed to explicit steady state initialization to avoid unspecified initial conditions.
Fixes #4424