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

Prevent body drag coeffs from being negative #206

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

AlexWKinley
Copy link
Contributor

@AlexWKinley AlexWKinley commented Apr 15, 2024

fixes #205

I think this should be a sufficient change to address the issue of getting negative drag coefficients in certain orientations.

The new body test fails without this change because its z drag coefficient is negative, causing the body to fly off the infinity. With the fix the test passes normally. Once others are happy with this change, I'll fix the merge conflict.

@RyanDavies19
Copy link
Collaborator

@AlexWKinley I have talked with Matt about this and I think there is a better approach. The translational and rotational drag coefficients should each be converted to a 3x3 matrix, and then multiplied by the orientation matrix and it's transform. This should yield a 3x3 drag matrix that then is multiplied by the velocity to give our drag force. We would do this for both the translational and rotational drag. coefficients, giving us an end result of a 6 DOF drag force vector:

$$F \\\ = 0.5 * \rho_w * \\\ OrMat\\\ \begin{bmatrix} CdA_x & 0 & 0 \\\ 0 & CdA_y & 0 \\\ 0 & 0 & CdA_z \\\ \end{bmatrix} OrMat^T *\\\ (\vec v_i * \\\ |\vec v_i |)$$

I'll put together a PR for this and have it up soon.

@RyanDavies19 RyanDavies19 merged commit 23340a1 into FloatingArrayDesign:dev Apr 16, 2024
5 checks passed
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 this pull request may close these issues.

2 participants