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

Refresh the API #202

Merged
merged 6 commits into from
May 6, 2024
Merged

Conversation

sanguinariojoe
Copy link
Collaborator

Well, this was not really a exciting task, but someone should do that...

I just added a bunch of methods to the C API, set the initial state of the coupled bodies (so calling to MoorDyn_GetBodyState() before MoorDyn_Init() is giving back the correct result) and updated the wrappers.

Tomorrow I am getting a new baby, so I will be unresponsive for a while. @RyanDavies19 feel free to merge/change whatever you need

@sanguinariojoe sanguinariojoe added this to the 2.3.0 milestone Apr 3, 2024
@sanguinariojoe sanguinariojoe self-assigned this Apr 3, 2024
@sanguinariojoe
Copy link
Collaborator Author

P.S. This should fix #193

@RyanDavies19
Copy link
Collaborator

@sanguinariojoe Congratulations on the new baby! I will review these and merge

@sanguinariojoe
Copy link
Collaborator Author

OK, I am merging this and let see if on the next release someone complains about something

@sanguinariojoe sanguinariojoe merged commit 17b4b44 into FloatingArrayDesign:dev May 6, 2024
5 checks passed
@RyanDavies19
Copy link
Collaborator

@sanguinariojoe I'm not entirely sure where things changed here but the fairlead output channel values are now different. See the attached input file as an example, and the image comparing outputs to MDF. I suspect it has to do with changing the getNodeTen function. I looked around a bit and changing the fairlead output written (at line 539 in Line.cpp) to Fnet[N].norm() still causes a difference, which seems like then the value of Fnet at the fairlead node has changed. I don't have time at the moment to find a fix for this, but it will need to be fixed at some point because the difference is not negligible. In the future it might be nice to have some regression tests set up to avoid this, or a github action that tests against MDF (which has regression tests).

Commit 08ed0e0 and earlier does not have this problem, MDC and MDF agreed exactly on values. Something in the changes in this PR broke the fairlead output values.

ten_diff

case1.txt

@sanguinariojoe
Copy link
Collaborator Author

sanguinariojoe commented May 9, 2024

Yeah, the former MoorDyn_GetLineNodeTen() and moordyn::Line::getNodeTen() have been renamed as MoorDyn_GetLineNodeForce() and moordyn::Line::getNodeForce().

Now MoorDyn_GetLineNodeTen() and moordyn::Line::getNodeTen() are giving the so called wall tension (axial stiffness plus axial damping).

That is consistent with some other instances, as well as some other codes in the wild.

The problem is that I have not updated the output channels.

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