-
Notifications
You must be signed in to change notification settings - Fork 298
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
Wrong result in Buildings.Fluid.HydronicConfigurations.PassiveNetworks.Examples.SingleMixing #10580
Comments
It turns out that this work-around gives the right result: |
That's kind of weird, the two formulations should be totally equivalent. |
…for C++) See e.g. Buildings.Fluid.HydronicConfigurations.PassiveNetworks.Examples.SingleMixing
See e.g. Buildings.Fluid.HydronicConfigurations.PassiveNetworks.Examples.SingleMixing
I am not a 100% sure yet but this seems to be an issue with the The library version in question is not available in the OpenModelica package manager (?) so I am working with a MWEs that I think are similar. It would be very helpful if you can provide a MWE for it. Otherwise I will check more and let you know. |
Yes it was annoying me as well 🙂. One thing I found that made the two (algorithm vs equation) behave different was to have I will check your MWE and will let you know. |
It's not such a big deal, it is basically just a copy of the original model, just set up so it depends on the installed version. |
- I am not sure why this is done the way it is now. However, it does not seem like it is correct. It takes a cref, replaces all variable subscripts (non-constant subscripts) with whole dims, expands the now array type cref (because of the new wholdims) to scalars, and returns them for potential replacement. I am not sure why this has worked so far. Maybe it is complemented by some other mechanism somewhere else but it does not look right. This fixes the issue in OpenModelica#10580.
- I am not sure why this is done the way it is now. However, it does not seem like it is correct. It takes a cref, replaces all variable subscripts (non-constant subscripts) with whole dims, expands the now array type cref (because of the new wholdims) to scalars, and returns them for potential replacement. I am not sure why this has worked so far. Maybe it is complemented by some other mechanism somewhere else but it does not look right. This fixes the issue in OpenModelica#10580.
Description
The model
Buildings.Fluid.HydronicConfigurations.PassiveNetworks.Examples.SingleMixing
(and others in this package that use similar constructs) have wrong results with OpenModelica.The result below is from Buildings, commit 9b4be2033c1765ad5f518352ee164b8c7d78e775
The error is in the instance
T2SetMod
:The OpenModelica results are as follows:
Note that
index
changes, but the outputy
does not.It looks like the line
https://github.com/lbl-srg/modelica-buildings/blob/9b4be2033c1765ad5f518352ee164b8c7d78e775/Buildings/Controls/OBC/CDL/Routing/RealExtractor.mo#L21
is not computed properly.
Steps to Reproduce
Download Buildings, commit 9b4be2033c1765ad5f518352ee164b8c7d78e775
Simulate
Buildings.Fluid.HydronicConfigurations.PassiveNetworks.Examples.SingleMixing
with dassl, 1E-6.Expected Behavior
See above.
Version and OS
The text was updated successfully, but these errors were encountered: