-
Notifications
You must be signed in to change notification settings - Fork 25
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
Kinematics #63
Kinematics #63
Conversation
Closes #52 |
Tested with the WaveBot in heave and surge (uncoupled). Ran 5 different combination of WEC - PTO DOFs: s=surge, heave=h, WEC_PTO DOFs (e.g.
All cases match (WEC velocity, PTO force, PTO power) except for the WEC surge motion. Since there is no force that depends on WEC surge position (radiation & added mass surge forces depend on WEC surge velocity and acceleration), the mean surge position is arbitrary. |
Closes #54 |
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.
I think this looks great and OK to merge.
Only thought is that, given the extended discussion amongst our group, it would be good to explain the kinematic Jacobian in the docs and/or example(s). With the documents that you and @dtgaebe have prepared during our discussions (#52), this might not be too much work. I'll leave this up to you @cmichelenstrofer whether that should be part of this PR or another later on (if so make an Issue).
@ryancoe I'll add the documentation and merge. Note this doesn't test that the code is using the off-diagonal terms correctly or not. If we think of a good test for this we can add it later. |
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.
Approved pending the suggested fixes and @dtgaebe's concurrence.
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.
Looks good, just one minor clarification
docs/source/theory.rst
Outdated
f_w = K^T f_p \\ | ||
:label: conservation_energy | ||
|
||
Again, this represents a linearization of the function :math:`f_w(f_p)` about the mean :math:`f_p=0` with :math:`K^T` being the Jacobian of :math:`f_w(f_p)` at :math:`f_p=0`. |
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.
should this be (f_p=0
-> x=0
)
Again, this represents a linearization of the function :math:`f_w(f_p)` about the mean :math:`x=0` with :math:`K^T` being the Jacobian of :math:`f_w(f_p)` at :math:`x=0`.
the linearization of K
is based on position only, right
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.
@cmichelenstrofer will follow up with @dtgaebe on this
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.
Yes, if we want to linearize K it is based on position only and doesn't need extra treatment to relate the forces
@dtgaebe So.... I'm confused again. I am thinking about something you brought up. We define K as the best linearization for the motions and then conservation of energy requires K^T to relate the forces. But ... is K^T also the best linearization for the forces? I.e. if you linearized the force relation f_w(f_b) would you also get f_w = K^T f_b? Or is K^T some suboptimal linearization but required to conserve energy, given the linear assumption made for the motions |
@cmichelenstrofer Let's say we always use the instantaneous kinematic matrix K(x) defined as partial derivatives of dp/dx I think then the relation between the forces is not an approximation! Of course, if we linearize K(x) about (say the origin) everything else will be a linear approximation too. |
Description
Verified that the kinematics are implemented correctly. Changed names of kinematics functions to make them more explicit. Added a test for multiple WEC/PTO DOFs.
Type of PR
Checklist for PR