-
Notifications
You must be signed in to change notification settings - Fork 184
fix to #1217, nonlinFK and body block changed #1220
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
Conversation
This reverts commit 118f156.
…-Sim#1012) When MoorDyn is used in WEC-Sim design, it is called as an external DLL executable library, and it runs on a separate console.exe under MATLAB's main process, with its separate process-ID(PID) in the windows task manager. The issue is related to the following scenarios on the Windows platform: 1>> if the lines data text file has an error in it. 2>> MoorDyn fails to converge. 3>> MoorDyn is launched, but the model has some other error. Under such a scenario, MATLAB fails to terminate the MoorDyn Console and hangs instead, and either crash immediately or crashes if we press the close button on the MoorDyn console window. Either way, there seems to be no way the MATLAB session can recover from MoorDyn failure without crashing. It becomes a major issue if we are trying to tune mooring lines and want to try different lines configurations and stiffnesses, etc., to find an optimal mooring system because some configurations will not work, which will keep crashing MATLAB sessions during the test and trial. The goal is for MoorDyn's failure not to crash the MATLAB session but instead MoorDyn dll execution to close and the MoorDyn console to close. I've found a solution to that. For scenarios 1 and 2, the following Fix#01 seems to work on the Windows platform. And to cover scenario 3, an additional Fix#02 is needed. Fix#01 In the MoorDyn block's 'InitFcn' call, making the following suggested changes check for MoorDyn Initialization failure and terminates the MoorDyn.dll console without crashing the MATLAB Session. Fix#02 Suppose the MoorDyn console has been launched, but there is an error in the Simulink model. In that case, MATLAB throws an error and terminates the Simulink execution without terminating the MoorDyn console window. A try-catch statement in the wecsim file can address this issue. If a Simulink model error occurs, we can print the error and terminate the MoorDyn Console process.
* updates_docs_on_master * incorporating_kelleys_minor_edits
Save mooring library to R2020b
Fixes function parsing error
Change the subscript of the pitch dof from 3,3 to 5,5 in ystring.
* Update readNEMOH.m for compatibility with NEMOH v3.0 * Removing line 374 This capability is within Dev, but not currently pulled over to Master. A separate PR was submitted to Dev for this fix.
This reverts commit 9ea8d47.
|
This is ready to go. To avoid confusion for the reviewer note that:
|
|
Thanks for the PR @dforbush2 . Putting a note here for future reference. |
|
Hello, thanks so much for your response and clarification. If I want to use
UserDefinedEta and the multiple wave train feature (without considering the
nonlinear FK force), I need to define the waveclass as " waves = waveClass(
'elevationImport');", is my understanding correct? In addition, may I ask
what's the standard format for waves.elevationFile ='<elevationFile>.mat'
(how the elevation, which is a function of (x,y) and time. should be
stored)? Thanks.
Best,
Guangyao
…On Fri, Feb 9, 2024 at 5:11 PM dforbush2 ***@***.***> wrote:
This is ready to go. To avoid confusion for the reviewer note that:
1. elv input is from waveElevation and is a vector that is equal in
length to the center(:,3) from the STL file. This updates every time step.
This elv already accounts for a non-zero wave direction to solve for wave
elevation at [center(:,1), center(:,2)]. So Z= center(:,3)- elv accurately
reflects the difference in height between the body panel in Z and the free
surface at that same (x,y) point.
2. For regular waves it is possible to use elv as the input since it
is monochromatic. For irregular waves, the portion of the hydrostatic
pressure equation for elevation must be recalculated because the check for
deep water conditions happens every frequency. Recall that elv is elevation
due to all frequency components at the points (center(:,1), center(:,2)):
hence although it is a bit redundant to repeat this calculation here it is
necessary.
3. The whole nonFKForce only works with planar waves. UserDefinedEta
and the multiple wave train feature added recently is the only way
currently that a user could input non-planar waves. Please update
documentation related to this latter feature to indicate that non-linear
forcing will not work
—
Reply to this email directly, view it on GitHub
<#1220 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BF5QAKEGOO57SLAW742NN6TYS2NJXAVCNFSM6AAAAABC6XINH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWGY3TCNZTHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Hi @guangyaow, Yes, you are right. Cheers, |
|
@salhus @dforbush2 Was there any change to the mask in this PR? I'm having issues merging library updates on my variableHydro branch. The latest library commit is this PR. I likely am missing a mask change. Also please only squash and merge PRs into master/main/dev. The commit history on main is pretty messy now. |
|
To my knowledge there is not a mask change but there is a change to the noted library block to pull in wave direction to the function. This MAY have resulted in a subsequent mask change when multiple wave trains I.e. multiple possible wave directions were added, but I don’t think that had to happen here. |
|
Thanks @dforbush2. I'll keep digging around for the issue on #1248 |
|
Made some progress--my issue on #1248 was coming from a mask and Run From Simulink + WEC-Sim GUI which is hard to track, but is unrelated to any library changes here. |
Credit to @guangyaow on catching the error and proposing the fix.
This fix makes nonlinear froude krylov work for plane waves with non-zero directions. If the waves are not plane waves (e.g, there are a sum of wave trains from different directions) this will not work correctly. Capabilities will be expanded in a future PR.
Hotfix merge into master is intentional