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

bound inputs of valves #1223

Closed
Mathadon opened this issue Oct 19, 2019 · 4 comments · Fixed by #1242
Closed

bound inputs of valves #1223

Mathadon opened this issue Oct 19, 2019 · 4 comments · Fixed by #1242
Assignees

Comments

@Mathadon
Copy link
Member

Mathadon commented Oct 19, 2019

linked to #1221 : shouldn't we bound the inputs of valves to avoid non-physical situations? We have an assert now but it's set at -0.2, which is still quite large. I think it would be a better solution to guard the inputs using a phi=max(l, ...) expression?

@Mathadon Mathadon self-assigned this Oct 19, 2019
@mwetter
Copy link
Contributor

mwetter commented Oct 21, 2019

The rational of the previous implementation was to avoid a non-differentiability at the boundary of the feasible domain. Not sure what the max(1, ...) would cause if the solution to the upstream PI controller would be such that the input is 1.

@Mathadon
Copy link
Member Author

Ok, that's an argument, but a few thoughts:

  • Differentiability only matters when solving an algebraic loop, right? I.e. we need differentiability for avoiding that the Newton solver does not converge. The control signal should however not end up in an algebraic loop if the filter is used (default) since then the input is prescribed by a state value, meaning that the differentiability does not matter. Perhaps similar arguments can be made for the time integrator though, where we would need the differentiability..
  • I prefer a non-differentiability over a non-physical model where the valve acts as a pump.
  • We could use a smoothMax instead of max?

@mwetter
Copy link
Contributor

mwetter commented Nov 8, 2019

Try using a limiter at the valve input, and run benchmarks to see how computing time changes.
Don't use smoothMax because of overshoots of this function.

@Mathadon
Copy link
Member Author

Mathadon commented Nov 9, 2019

The model IBPSA.Fluid.Examples.FlowSystem.Basic has the same computation time after the change. This is the most complex fluid system using valves that we have in the library.

Mathadon added a commit that referenced this issue Nov 9, 2019
removed assert that checks phi > -0.2
see #1223
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.

2 participants