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

CFD coupling to use AD15 mesh only #1324

Merged
merged 5 commits into from
Nov 22, 2022

Conversation

andrew-platt
Copy link
Collaborator

This PR is ready for merging

Feature or improvement description
The OpenFOAM module had been using both the ElastoDyn structural mesh (for loads) and the AeroDyn 15 mesh (for motions). After much in person discussions with @tonyinme, @gantech, @michaelasprague, @jjonkman, and @ebranlard
(see #1232), we settled on using only the AeroDyn 15 mesh.

This also allows BeamDyn to be used with CFD codes.

Related issue, if one exists

Impacted areas of the software
Glue code:

  • Pass tower and blade info from AD15 instead of ElastoDyn

OpenFOAM module:

  • remove all ElastoDyn information
  • remove unnecessary intermediate meshes in mapping (extra Line2 mesh)
  • Some code factoring (indentation mostly)
  • improved error handling

Additional supporting information
The original problem was a mismatch in location of motion points and force points passed to CFD. The velocity points were taken from the AD15 input mesh (interpolated to finer discretization), but the force points were set based on the ElastoDyn blade mesh (also refined discretization).

This PR is a short term fix for the mesh issue. The long term fix will involve modifications to AD15 and interface changes for SOWFA, NALU-Wind, and AMR-Wind:

  • AD15 interpolate points to refine the mesh
    • use nearest neighbor for polar
  • will require passing to CFD the point locations and number of points instead of receiving the number of points

Recommend squash merge for cleaner history.

Test results, if applicable
@tonyinme will post relevant info from AMR-Wind tests inline below

Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

I have not reviewed the source code changes (and don't intend to), but I agree with the solution as discussed.

Copy link
Contributor

@ebranlard ebranlard left a comment

Choose a reason for hiding this comment

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

I think the code is much cleaner this way.

I suggest to add more details in the description of the datatypes (just so that it's easier to get back to it in the future).

Optionally, maybe we can use InterpArray to shorten the code and make it more readable.

modules/openfoam/src/OpenFOAM.f90 Outdated Show resolved Hide resolved
modules/openfoam/src/OpenFOAM.f90 Show resolved Hide resolved
modules/openfoam/src/OpenFOAM.f90 Show resolved Hide resolved
modules/openfoam/src/OpenFOAM.f90 Show resolved Hide resolved
modules/openfoam/src/OpenFOAM_Registry.txt Outdated Show resolved Hide resolved
modules/openfoam/src/OpenFOAM_Registry.txt Show resolved Hide resolved
modules/openfoam/src/OpenFOAM_Registry.txt Outdated Show resolved Hide resolved
modules/openfoam/src/OpenFOAM_Registry.txt Show resolved Hide resolved
@andrew-platt
Copy link
Collaborator Author

Some updates from @tonyinme:

Overlay of the force and velocity measurement locations. The force positions are shown for 3 timesteps and the velocity positions are shown for one timestep. The latest timestep for force position overlaps with the velocity locations as expected.
MicrosoftTeams-image (5)
MicrosoftTeams-image (4)

@andrew-platt
Copy link
Collaborator Author

andrew-platt commented Nov 22, 2022

Comparison of tangential forces before and after the fixes in this PR (green is prior to fixes, red is with fixes):

MicrosoftTeams-image (6)

@andrew-platt andrew-platt removed the request for review from gantech November 22, 2022 20:25
@andrew-platt andrew-platt force-pushed the b/openfoam_mesh branch 3 times, most recently from b613b9f to ce957fd Compare November 22, 2022 20:45
AD14 will be deprecated, so there is no reason to finish linking it to OpFM
switch to AD15 for blade and tower properties passed to Init_OpFM
fix error handling, cleanup code formating and minor rearrangement
- ActForceMotions and ActForceLoads were unnecessary intermediate meshes
- fix bug with no tower nodes from Extern or AD15
- tower base height was not accounted for after removal of ED
@andrew-platt
Copy link
Collaborator Author

For anyone following this PR, I squashed down the commit history for a cleaner looking merge commit.

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