-
Notifications
You must be signed in to change notification settings - Fork 458
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
B/simulink errors #641
Merged
Merged
B/simulink errors #641
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Simulink S-Function was overwritting error messages sent from the OpenFAST dll, so it was difficult to determine the reason the code stopped running.
Thanks for fixing this! |
Debugging is difficult when you have no error messages! .... (stupid global variables) |
michaelcdevin
added a commit
to michaelcdevin/openfast
that referenced
this pull request
Apr 8, 2021
Identical fix to commit OpenFAST#641 from NREL's main dev branch. Also fixed some minor typos in several files.
Merged
camirmas
added a commit
to camirmas/openfast
that referenced
this pull request
Oct 17, 2022
* Added Model files * added PhysData input routine, started work on PhysData initialization * started work on PhysMod initialization * modified predictor-corrector procedure to ignore measurements from physical model when interpolating * fixed text file import + misc syntax fixes * addressed misc code comment todos * added hybrid model interface output file * added TowerMotion%Position to PhysData * misc syntactical bug fixes * compilable build * Runtime errors resolved * fixed bug where PhysMod_Get_Physical_Motions didn't read displacements and velocities, causing inaccurate outputs * added Simulink mod allowing AD inputs * miscellaneous Simulink integrations, still not complete * modified ED_InputType to allow plfm/twr displacements * added OpenFAST-side integration for external ElastoDyn inputs * ElastoDyn-Simulink integration complete * functional Simulink-OpenFAST model with ElastoDyn inputs. Not corrected for hybridization * added hybrid subroutines to ElastoDyn * code functional, PtfmPitch still unstable * AD expansion fully functional for ptfm only cases * changed dependency for Simulink project to proper Matlab install * successful static lib compile with ad expansion * fixed memory leak in Simulink model * successful build with Simulink Coder * Fixed S-Func error message overwrite. Identical fix to commit OpenFAST#641 from NREL's main dev branch. Also fixed some minor typos in several files. * removed MAP references for hybrid build * Added switch between force and displacement control DispMode has been changed to HybridMode. Code allows the option to use the AD hack to use force control (returning AD outputs at the top of the tower), or displacement control using partitioning at the platform (so ElastoDyn is fully numerical, receiving force inputs to PlatformPtMesh from the physical model). * added SIMULINK_TIMESHIFT if statement for ED_SetExternalInputs in ED_InputSolve * Removed explicit kernel32 dependencies Parts of the FAST solution that require some use of the Windows API (mostly OrcaFlex and ServoDyn functionality to interface with DLLs) has been commented out in order to remove any remaining DLL dependencies to the model to get it running in Simulink Real-Time. However, some Intel Fortran and Intel MKL dependencies still require Windows API, so it has not reached this point yet. * added project config changes relevant to previous commit * Revert "added project config changes relevant to previous commit" This reverts commit fcb951e. * Revert to before the removal of DLL dependencies This includes adding MAP back. This is for the case where we do not run the numerical model on the target computer after all. * Revert to before DLLs are removed, pt 2 This reverts commit 178eb03. * Reverts to before DLL dependency removal, pt 3 This reverts commit ac35094. * Reverts before DLL dependency removal, pt 4 This reverts commit daed212. * re-added SIMULINK_TIMESHIFT call to ED_InputSolve This unintentionally got reverted as well in the previous commit despite being a needed fix. * re-added in commit ac35094 additions again I realized commit ac35094 was a crucial commit trapped in the middle of a bunch of DLL removal work, so I manually re-added all the changes made for this commit without anything from before or after it. That's what I get for not abiding by proper versioning practices and just making a new branch. * Fixed AD feedback in ED_InputSolve Blade and tower loads were previously not transferred from AeroDyn outputs to the ElastoDyn inputs. However, after further clarification of what the physical model will encapsulate, this is no longer correct. This feedback has been added back in via the modification of if-then statements in ED_InputSolve * Added explicit external velocity inputs Previously, the hybrid model operated with six inputs corresponding to the 6DOF displacements (or forces if using displacement control, though it was decided that we are using force control so that's no longer relevant). After confirmation that the Qualysis system to be used for the physical model can capture velocities in real time, this update allows for these velocities to be inputted directly into the Simulink S-Function instead of being approximated using backwards differencing from the extenral displacements. * Simulink build for GNU compiler on Linux systems (OpenFAST#545) * add Sys file for Matlab/Simulink/GNU combination * update cmake for new simulink/linux/gnu combination * update r-test to current dev * revert r-test to OpenFAST dev version * remove comment * Fix compile error; update SFunc params Co-authored-by: michaelcdevin <michaelcdevin@outlook.com> Co-authored-by: Bonnie Jonkman <bonnie.jonkman@envision-energy.com> Co-authored-by: Andy Platt <andrew-platt@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature or improvement description
The Simulink interface was overwriting the error message when OpenFAST ended with a fatal error, making it difficult to determine why the simulation ended.
Related issue, if one exists
#632
Impacted areas of the software
Simulink interface
Test results, if applicable
This won't affect any of the current testing suite.