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

Fix nrel5MWactuatorLine test and ActuatorBulkFastTests unit test #1284

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

marchdf
Copy link
Contributor

@marchdf marchdf commented Aug 8, 2024

This is the fix to the segfault in nrel5MWactuatorLine. https://github.com/OpenFAST/openfast/blob/dev/glue-codes/openfast-cpp/src/OpenFAST.cpp#L2072 needs valid values in TurbineHubPos. Curious to get thoughts from people who know this stuff better: @psakievich and @gantech.

Not quite the end of the story because the input files have drifted from the dev openfast so I still need to fix

terminate called after throwing an instance of 'std::runtime_error'
  what():  FAST_InitializeAll:FAST_Init:FAST_ReadPrimaryFile:Invalid numerical input for file "nrel5mw.fst" occurred while trying to read MHK

But that's much easier to deal with ;)

@marchdf
Copy link
Contributor Author

marchdf commented Aug 8, 2024

actually I have no idea why it is complaining about MHK...

@marchdf
Copy link
Contributor Author

marchdf commented Aug 8, 2024

Ah it's missing sea state information.

@marchdf
Copy link
Contributor Author

marchdf commented Aug 8, 2024

Ok now dealing with:

 OpenFAST input file heading:
     FAST Certification Test #01: NREL 5.0 MW Baseline Wind Turbine (Onshore)

terminate called after throwing an instance of 'std::runtime_error'
  what():  FAST_InitializeAll:FAST_Init:ValidateInputData:DT_out must be at least DT (6.25000E-03 s).

@jrood-nrel
Copy link
Contributor

I updated openfast input files here which might help Exawind/exawind-cases#25

@marchdf marchdf changed the title Add hub pos to ActuatorBulkFast Fix nrel5MWactuatorLine test Aug 9, 2024
@marchdf
Copy link
Contributor Author

marchdf commented Aug 9, 2024

yeah I've been digging around the openfast site. It's tricky because everything is on the dev branch because that's what we use with +fsi.

This is a bit of a maddening exercise though. My two current issues:

  • I need to provide a dtDriver to the fast data. No idea what that should be so I hacked in a fixed value. But maybe it needs to be the nalu-wind time step? Not sure how to get that value where it is needed in the actuator parser.
  • Even if that is fixed, there is still the fact that it is failing at:
naluX: putget.m4:745: putNCvx_double_double: Assertion `value != NULL' failed.

(lldb) frame s 8
frame #8: 0x00007fffef77dac6 libopenfastcpplib.so`fast::OpenFAST::prepareOutputFile(this=0x0000000000709630, iTurbLoc=0) at OpenFAST.cpp:615:33
   612              }
   613          }
   614
-> 615          ierr = nc_put_var_double(ncid, ncOutVarIDs_["nac_ref_pos"],
   616                                   &brFSIData[iTurbLoc][3].nac_ref_pos[0]);
   617          ierr = nc_put_var_double(ncid, ncOutVarIDs_["nac_ref_orient"],
   618                                   &brFSIData[iTurbLoc][3].nac_ref_pos[3]);
(lldb)

Also should be noted that if this is all fixed, we still have a problem that these input files will only work with dev openfast, which means this test will only work with +fsi.

I will take anyone's suggestions on how to proceed. Ideally someone who has looked at openfast/nalu-wind coupling.

Tagging: @psakievich, @gantech, @lawrenceccheung, @neilmatula , @ndevelder

@marchdf
Copy link
Contributor Author

marchdf commented Aug 26, 2024

The above failed after this:

 OpenFAST input file heading:
     FAST Certification Test #01: NREL 5.0 MW Baseline Wind Turbine (Onshore)

  Running ElastoDyn.
 Nodal outputs section of ElastoDyn input file not found or improperly formatted.
  Running AeroDyn.
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 1, blade 1)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 1, blade 2)
 Warning: Turning off Unsteady Aerodynamics because polar has constant data. (node 1, blade 3)
 Using uniform blade force node clustering.
  Running ServoDyn.
  Running ServoDyn Interface for Bladed Controllers (using GNU Fortran for Linux).
 Using legacy Bladed DLL interface.
turbineData[iTurb].inflowType = 2
turbineData[iTurbLoc].inflowType 2
turbineData[iTurbLoc].numForcePtsTwr = 20
turbineData[iTurbLoc].numForcePtsBlade = 50
turbineData[iTurbLoc].numForcePts = 171
nvelpts = 35
nfpts = 171  50 20
nvelpts = 35
nfpts = 171  50 20
nvelpts = 35
nfpts = 171  50 20
nvelpts = 35
nfpts = 171  50 20
naluX: putget.m4:745: putNCvx_double_double: Assertion `value != NULL' failed.
[1]    409417 abort (core dumped)  ../../../naluX -i  -o nrel5MWactuatorLine.log

Not sure how to proceed next.

@marchdf marchdf closed this Sep 25, 2024
@marchdf marchdf deleted the fix-act-regtest branch September 25, 2024 15:34
@marchdf marchdf restored the fix-act-regtest branch September 25, 2024 18:04
@marchdf marchdf reopened this Sep 25, 2024
@marchdf
Copy link
Contributor Author

marchdf commented Sep 25, 2024

This actually solves broken ActuatorBulkFastTests unit tests so I might push for merging this.

@marchdf marchdf changed the title Fix nrel5MWactuatorLine test Fix nrel5MWactuatorLine and ActuatorBulkFastTests unit test Sep 25, 2024
@marchdf marchdf changed the title Fix nrel5MWactuatorLine and ActuatorBulkFastTests unit test Fix nrel5MWactuatorLine test and ActuatorBulkFastTests unit test Sep 25, 2024
@marchdf marchdf marked this pull request as ready for review September 26, 2024 15:50
@marchdf
Copy link
Contributor Author

marchdf commented Sep 26, 2024

Let's merge this and see if it fixes the tests. A debug run was successful. But it's unclear what happened to the segfault I was seeing... Maybe a different openfast version?

@marchdf marchdf merged commit c7ab879 into Exawind:master Sep 26, 2024
1 of 4 checks passed
@marchdf marchdf deleted the fix-act-regtest branch September 26, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants