-
Notifications
You must be signed in to change notification settings - Fork 266
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
Buoyancy force appears to be calculated incorrectly #45
Comments
Have you been seeing any anomalies? The way you are presenting it is a different calculation. |
Buoyancy here is being calculated by multiplying the maximum buoyancy (volume times density) by the ratio between submerged volume and total volume. This ratio calculation on page 91 of the book is: |
I can see what you mean. Why not issue a pull request? |
I am just lazy I guess - wanted to report the issue without getting involved at this time :) |
Pull requests normally get much more attention than simply reporting the issue, as well as making it easier for the author to test. But it's up to you. :) |
I might do that... Meanwhile I am finding more issues: |
Ignore that last comment - it is only related to the book. The actual code is correct... |
But I uset that
because I want |
@xiangwei71 |
@lch32111 |
|
depth maxDepth both from center |
Hi, i might be wrong on this but looking at the book's formula i am pretty sure that the force for partial submersion should be: |
In my opinion the calculation of the buoyancy is incorrect (file pfgen.cpp lines 120 and 121).
I think the correct calculation should look like this:
Current code is missing the parentheses around "2 * maxDepth"
The text was updated successfully, but these errors were encountered: