HydroDyn primary input file passing and parsing#756
Merged
andrew-platt merged 13 commits intoOpenFAST:devfrom Oct 29, 2021
Merged
HydroDyn primary input file passing and parsing#756andrew-platt merged 13 commits intoOpenFAST:devfrom
andrew-platt merged 13 commits intoOpenFAST:devfrom
Conversation
Input file data had originally been stored in InitInp so that it could be passed in directly. However, we are now migrating to a method of passing all the input file data as datatype FileInfo (basically a string array with some meta-data). This simplifies setting up to pass input file information from a different language (such as python through a c-bound library interface to HD -- which is needed for an ATLANTIS project). It is a little bit messier than I like at the moment -- the InputFile datatype contains some WAMIT, Waves, and other InitInput types. But right now I don't see a simpler option that won't require lots of work.
…ata structure The input parser no longer reads the file directly.
The Parse*Var routines only handled ReKi and DbKi --> this was a problem reading in SiKi vars when compiling in double precision Modified them so we can handle SiKi, R8Ki, and QuKi.
a few floating regression tests were failing -- incorrectly set ptfmRot values
… into f/HD_InputFileParsing
4 tasks
Codecov Report
@@ Coverage Diff @@
## dev #756 +/- ##
==========================================
- Coverage 11.30% 11.17% -0.14%
==========================================
Files 211 211
Lines 310787 310652 -135
Branches 178127 181332 +3205
==========================================
- Hits 35137 34714 -423
- Misses 231510 231806 +296
+ Partials 44140 44132 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0f64689 to
3c0d19e
Compare
3c0d19e to
45653d1
Compare
ebranlard
approved these changes
Oct 29, 2021
Contributor
ebranlard
left a comment
There was a problem hiding this comment.
This all looks good and a great addition!
My personal preference would be to put the if (failed()) return at the end of line to save space (I agree that multiple meaningful statements per line is not the best) , and not break the indentation. But that's a personal preference :)
This file contains hidden or 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
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.
This PR is not ready to mere yet!!
Feature or improvement description
The parsing of the primary input file is now handled using the
ProcessComFilesubroutine to populate theFileInfoTypedata structure. This is then read into theInputFileTypedata structure during initialization. The purpose of this is to allow passing the complete input file as theFileInfoTypedata structure into theHydroDyn_Initroutine (this data structure is essentially a string array with metadata). This greatly simplifies coupling the HydroDyn module into Python or Julia codes, such as WEIS or OpenTurbineCoDe, using C style bindings for the ATLANTIS projects.This is similar to how AD15, InflowWind, MoorDyn V2, and ServoDyn handle their input files.
Related issue, if one exists
Impacted areas of the software
Only the HydroDyn input file parsing has been changed.
Additional supporting information
This PR is needed for the ATLANTIS CCT2 and Rutgers projects, and will for the basis of the further HD linearization work within the ATLANTIS WEIS project.
Test results, if applicable
No test results change with this update (there are slight changes due to the PR's this depends upon). One input file change was required in
5MW_OC4Jckt_DLL_WTurb_WavesIrr_MGrowthtest case to remove an extra entry for theWaveDT.