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

Simulink build for GNU compiler on Linux systems #545

Merged
merged 6 commits into from
Sep 23, 2020

Conversation

bjonkman
Copy link
Contributor

Feature or improvement description
Added code to allow gnu/linux combinations for Simulink builds.

Related issue, if one exists
#387 and others have used this to build with gnu/linux.

Impacted areas of the software
Simulink interface

Test results, if applicable
This doesn't change any code that affects the current tests.

Copy link
Collaborator

@andrew-platt andrew-platt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, especially since it is already in use by others.

@rafmudaf rafmudaf self-requested a review September 23, 2020 16:13
@andrew-platt andrew-platt merged commit 2037158 into OpenFAST:dev Sep 23, 2020
@bjonkman bjonkman deleted the f/SimulinkGNUlinux branch September 23, 2020 16:51
andrew-platt pushed a commit to andrew-platt/openfast that referenced this pull request Oct 20, 2020
* 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
@rafmudaf rafmudaf mentioned this pull request Jan 13, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants