-
Notifications
You must be signed in to change notification settings - Fork 460
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
New Linearization and Mode-Shape Capabilities (and more) #373
Conversation
- updated C2F copy routines to allow for skipping the pointers (in case of module initially defining the pointers in Fortran code in instead of C/C++ code) - updated pack/unpack routines to avoid putting entire arrays on the stack (OpenFAST#99) - updated extrap/interp routines to account for values that have a period of 2pi. This change requires additional routines in NWTC_Num.f90. - this also includes changes that were introduces in a not-yet-merged pull request for 2D airfoil interpolation
- Use less stack space in interpolation/extrapolation, pack, and unpack routines (fixes OpenFAST#99). - update auto-generated types files - update interp/extrap routines work on angles (over 2pi boundaries); this requires Angles_ExtrapInterp routines added to NWTC Library - NWTC Library + when reading real variables from file, check that they aren't Inf or NaN + remove unused code + add error handling to VTK read routines + check that size of scalars matches between meshes in transfer of data + add an (optional) reference node to mesh data structures
- continuous states are R8Ki (for VTK mode shapes) - Use ChanLen instead of hard-coded sizes
- use 2pi interpolation on a few inputs/outputs - add some init outputs for linear trim solution - modify input/output mesh packing routines for VTK visualization
- added nodal outputs ([optional] change in input file) -- CHECK value of ChanLen - placeholder for NeedWriteOutput - updated routine to compute AD_JacobianPInput (will not give error about being non-differentiable)
- nodal outputs (check length of channel name) - send optional flag to avoid calculating WriteOutputs if they won't be used in this step - minor changes to use log maps in mesh packing for linearization
- remove prev outputs from SrvD inputs (for DLL); store them in misc vars instead - move call to controller to UpdateStates instead of CalcOutput - rework some of the DLL capabilities (move data structures around) + HSSBrake can now use avrSWAP107 (or SrvD will implement a linear ramp--change comment in input files about this); - trim case logic for linearization
also sync some other subroutines + types file
The units on the YawMomCom write-output channel in the linearization matrices were wrong. This would only be noticeable if you requested the YawMomCom channel from ServoDyn along with linearization matrices that included the outputs.
Adds - trim solution - vtk mode-shape visualization - vtk file-name stored as parameter instead of recalculating each time - ED%Output(1) renamed to ED%y for consistency (Output now used in save OP for trim solution) - additional damping may or may not actually work - CHECK: length of channel names (file format?) - simulink interface now allows 4000 channels instead of 1000 (all blade node outputs can significantly increase number of channels generated) - added logic to avoid calculating WriteOutput array when it is not necessary
Someone should document these, too.
This is not used in OpenFAST, yet.
Also minor change on wording in AD error message
Reg test: Update the linearization output format
f/Linear -- documentation updates for nodal outputs
Hi Bonnie, I'm trying to view the documentation for the linearization mode shape visualization but when I click https://github.com/bjonkman/r-test/blob/pullrequest/bjonkman-linear/glue-codes/openfast/5MW_Land_ModeShapes/vtk-visualization.md I get a 404 page not found. Also, can you let me know which version of the matlab toolbox works with AnalyzeModeShapes.m? Thank you!!! |
@nickjohnson13 , that r-test branch got merged in. Here's an updated link: https://github.com/OpenFAST/r-test/blob/pullrequest/bjonkman-linear/glue-codes/openfast/5MW_Land_ModeShapes/vtk-visualization.md (and I fixed it in the comments above). The example should work with the current matlab-toolbox master branch, but it's been quite a while since I've run these. :) |
This functionality is replaced by the nodal outputs.
Remove DBG_OUTS from AD15
Removed duplicate nodal input sections from AD and BD example files.
This will reduce merge conflicts with PR OpenFAST#373
Documentation error.
Update r-test commit
Thanks, guys! |
Complete this sentence
THIS PULL REQUEST IS READY TO MERGE
Summary
This code is the result of the Envision-NREL 2019 collaboration on finding a trim solution for linearization and visualization of mode shapes.
As warned, this is a BIG pull request. In an ideal world, this would be broken up into several different pull requests. However, that was not possible given the current states of our respective code bases and time considerations.
I have not provided much in terms of updated documentation in the pull request because the original documentation is not in a place I can easily modify it. I can help update the documentation after the original documentation has been merged in.
Feature or improvement description
Trim Solution
Mode-Shape Visualization
-VTKLIN
command-line switch to indicate that OpenFAST is being restarted with the visualization option.Nodal Outputs on Blades
B#N###channel
, and AeroDyn's nodal output naming convention isAB#N###channel
. This allows the user to distinguish between aero and structural channels that may have the same name.Longer channel names
ChanLen
inNWTC_Base.f90
and rebuilding.ChanLenFF
variable and corresponding typeRegistry Improvements
Performance improvements
WriteOutput
variables in AeroDyn and BeamDyn are not computed if they will not be used at that step.Bug fixes
OutFileRoot
is now specified relative to the location of the driver input file instead of the current working directory.Related issue, if one exists
Impacted areas of the software
D
matrix in linearization (will not produce error about being non-differentiable between AeroDyn solution regions). Warning: There may be an issue with FrozenWake with this modification. It is not apparent in the cases I ran, but the logic seems a little off to me. This has been fixed in a future pull request for linearized aerodynamics from Envision.WriteOutputs
unless they are requiredWriteOutputs
unless they are requiredLOAD_DLL_TWICE_FOR_LOGGING_CHANNELS
to output logging channels from the DLL (including legacy version) in the OpenFAST output file. This, however, requires the DLL to be unloaded and loaded again.ElecPwr_prev
andGenTrq_prev
from ServoDyn's inputs. These are now stored in misc vars to send back to the Bladed DLL (and simplifies the glue code)Additional supporting information
Test results, if applicable