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

Coupled Propeller Movement in Aerostructural Case #322

Merged
merged 13 commits into from
Aug 30, 2022

Conversation

bernardopacini
Copy link
Contributor

Purpose

This PR adds functionality to carry out an aerostructural analysis (and optimization) considering propeller movement. When implemented, the propeller location is tied to the wingbox structure so that it moves with the wing as the wing deflects. This is done by adding structural nodes to the structural mesh, but adding / subtracting fictitious aerodynamic nodes that are used by MELD to transfer loads and displacements between the aerodynamic and structural analyses.

The exact case setup, including mesh generation, is a bit convoluted, so I will add documentation for how to set up this type of problem.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Other (please describe)

Testing

I have tested that the functionality, and gradients, work as intended, but I have not added automated testing. I can add a test for this before the PR is merged once we finalize the implementation.

Checklist

  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@bernardopacini bernardopacini added enhancement New feature or request discussion This needs to be discussed first labels Jul 11, 2022
@bernardopacini bernardopacini self-assigned this Jul 11, 2022
@bernardopacini bernardopacini changed the title Coupled prop motion Coupled Propeller Movement in Aerostructural Case Jul 11, 2022
@codecov
Copy link

codecov bot commented Jul 11, 2022

Codecov Report

Merging #322 (7560364) into main (3222738) will decrease coverage by 13.43%.
The diff coverage is 100.00%.

❗ Current head 7560364 differs from pull request most recent head d27732e. Consider uploading reports for the commit d27732e to get more accurate results

@@             Coverage Diff             @@
##             main     #322       +/-   ##
===========================================
- Coverage   84.21%   70.78%   -13.44%     
===========================================
  Files         298      250       -48     
  Lines       16330    15100     -1230     
===========================================
- Hits        13752    10688     -3064     
- Misses       2578     4412     +1834     
Impacted Files Coverage Δ
dafoam/pyDAFoam.py 84.05% <100.00%> (-8.24%) ⬇️
src/include/createAdjointSolid.H 0.00% <0.00%> (-100.00%) ⬇️
src/adjoint/DAObjFunc/DAObjFuncMass.C 0.00% <0.00%> (-100.00%) ⬇️
src/adjoint/DAStateInfo/DAStateInfoLaplacianFoam.C 0.00% <0.00%> (-100.00%) ⬇️
...joint/DAStateInfo/DAStateInfoScalarTransportFoam.C 0.00% <0.00%> (-100.00%) ⬇️
...int/DASolver/DALaplacianFoam/createRefsLaplacian.H 0.00% <0.00%> (-100.00%) ⬇️
...int/DAStateInfo/DAStateInfoSolidDisplacementFoam.C 0.00% <0.00%> (-100.00%) ⬇️
...t/DASolver/DALaplacianFoam/createFieldsLaplacian.H 0.00% <0.00%> (-100.00%) ⬇️
.../DAScalarTransportFoam/createRefsScalarTransport.H 0.00% <0.00%> (-100.00%) ⬇️
...AScalarTransportFoam/createFieldsScalarTransport.H 0.00% <0.00%> (-100.00%) ⬇️
... and 122 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bernardopacini
Copy link
Contributor Author

The failed test is due to missing functionality that is needed within MPHYS. A PR is already open to add these updates into MPHYS.

@bernardopacini bernardopacini marked this pull request as ready for review August 1, 2022 14:37
@bernardopacini bernardopacini requested a review from a team as a code owner August 1, 2022 14:37
@bernardopacini
Copy link
Contributor Author

I updated the pre-coupling group to add an error when the warper is requested in addition to masking. This should be ready to merge, though let me know if you have other comments / questions about it. I did not add a test, but I can if you'd like.

@friedenhe
Copy link
Collaborator

Great! Can you add some comments at the beginning of the new components and functions? Also, in some components, you have forward mode implementations like: if mode == 'fwd':. I suggest you add a comment there that mphys/dafoam does not support forward mode yet but the code is for future reference.

@friedenhe
Copy link
Collaborator

BTW: I think we should a add test for this new feature. Let me know if you need to update the test docker image and what version of dependencies you need.

@bernardopacini
Copy link
Contributor Author

BTW: I think we should a add test for this new feature. Let me know if you need to update the test docker image and what version of dependencies you need.

Would you prefer a new test, or simply add an actuator disk + movement to the current aerostructural test? In either case we will need an updated wingbox with RBE elements to the actuator disk.

@friedenhe
Copy link
Collaborator

BTW: I think we should a add test for this new feature. Let me know if you need to update the test docker image and what version of dependencies you need.

Would you prefer a new test, or simply add an actuator disk + movement to the current aerostructural test? In either case we will need an updated wingbox with RBE elements to the actuator disk.

I suggest we add the act movement to the current aerostruct test.

@bernardopacini
Copy link
Contributor Author

BTW: I think we should a add test for this new feature. Let me know if you need to update the test docker image and what version of dependencies you need.

Would you prefer a new test, or simply add an actuator disk + movement to the current aerostructural test? In either case we will need an updated wingbox with RBE elements to the actuator disk.

I suggest we add the act movement to the current aerostruct test.

I agree. I will modify the wingbox in the test and add a propeller. Since it is mostly a functionality test I won't refine the aerodynamic mesh for the actuator zone.

@bernardopacini
Copy link
Contributor Author

I updated the aerostructural case to include the propeller-wing coupling as well as a parent + child FFD setup. I removed the AOA variable to do this as it is more realistic. I also updated the file slightly to match the new MELD and pyGeo versions, so I think we will need to update those in the DAFoam Docker image. I expect the MPHYS tests on the PR to fail now until we update the image as well as the wing BDF file.

@bernardopacini
Copy link
Contributor Author

This PR is blocked by mdolab/pygeo#144. Once that one is merged we can update the Docker image, verify these tests, and merge in this PR.

@bernardopacini
Copy link
Contributor Author

The two upstream pyGeo PRs were merged in. I verified the functionality of the propeller motion with 1 and 2 propellers and I updated the MPHYS aerostructural test (sent offline). This PR should be good to go!

@friedenhe friedenhe merged commit fc34405 into mdolab:main Aug 30, 2022
@bernardopacini bernardopacini deleted the coupledPropMotion branch August 30, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This needs to be discussed first enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants