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

Supporting closed kinematic loops #23

Closed
baggepinnen opened this issue Apr 24, 2023 · 2 comments
Closed

Supporting closed kinematic loops #23

baggepinnen opened this issue Apr 24, 2023 · 2 comments

Comments

@baggepinnen
Copy link
Contributor

Modelica automatically detects loops and replaces the frame_a.R ~ frame_b.R resulting from connect(frame_a, frame_b) with the residual equation. Initially, we can require the user to do this manually by calling connect_loop instead of connect. By storing some metadata in the frame connector if it belongs to a loop opening, like this

function connect_loop(F1, F2)
    F1.metadata[:loop_opening] = true
    connect(F1, F2)
end

we could detect the loop opening when we expand the connections and emit

residue(F1, F2) .~ 0

instead of frame_a.R ~ frame_b.R. @YingboMa do you have a suggestion on how to modify connection2set! to accomplish this? It's not apparent to me where the equality constraints between the potential variables are introduced.

@baggepinnen
Copy link
Contributor Author

820073c models a fourbar mechanism with a closed loop
fourbar

@baggepinnen baggepinnen changed the title Supporting loops Supporting closed kinematic loops Mar 27, 2024
@baggepinnen
Copy link
Contributor Author

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

No branches or pull requests

1 participant