Skip to content

Conversation

@MShabara
Copy link
Contributor

@MShabara MShabara commented Aug 7, 2025

The calculation of the nonlinear Froude–Krylov (FK) force requires first computing both the linear and nonlinear forces, then subtracting the linear from the nonlinear. A formula for the wave elevation that accounts for wave directionality and spreading was recently added a previous commit in versuon 6.1.2, but this change affected the linear FK force calculation, leading to exaggerated responses and excitation forces.

This PR is related to Issue #1485 and Issue #1457

@jtgrasb jtgrasb changed the title Nonlinear FK force big Fix introduced in v6.1.2 Nonlinear FK force bug Fix introduced in v6.1.2 Aug 8, 2025
@jtgrasb
Copy link
Contributor

jtgrasb commented Aug 8, 2025

@MShabara Thank you for finding the source of this bug and resolving it.

As stated, the linear and nonlinear forces are added together then the linear are subtracted later in Simulink. The bug (caused by #1220) led to the elv term being applied entirely as zero for the linear calculation, which meant the linear term in nonFKForce was fully equal to zero. In this PR, the elvCorr term now is applied to all of the calculations of the z-location of the body, but not the force term. Thus, the linear force is still applied with respect to the mean free surface as intended.

To check this, I tested a few different versions and verified that this PR fixes the nonlinear case to match what we had in v5.0.
v6.1.2:
image
v5.0:
image

With bug fix from this PR:
image

Now correctly matches v5.0. Merging this PR now.

@jtgrasb jtgrasb merged commit 7c3623f into WEC-Sim:dev Aug 8, 2025
10 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