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

Fixed incorrect computation of wing aspect ratio #848

Merged
merged 7 commits into from
Nov 12, 2021

Conversation

rainman110
Copy link
Collaborator

Description

The computation of the aspect ratio need to project the wing to a planform . The plane to be projected is typically the x-y plane. In cpacs however, users have the freedom to build the aircraft in another (rotated) way, so using the x-y plane is too restrictive.

The bug occured, because a wrong projection plane was selected. This led to a very small wing surface area and hence a large aspect ratio.

This code change fixes the issue by improving the selection of the projection plane. The code was back-ported from CPACS Creator, were the issue was already fixed before.

Closes #827

How Has This Been Tested?

A system test was added checking roughly the correct AR value.

Checklist:

  • A test for the new functionality was added.
  • All tests run without failure.
  • The new code complies with the TiGL style guide.
  • New classes have been added to the Python interface.

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2021

Codecov Report

Merging #848 (5872465) into master (8e1b13d) will increase coverage by 0.07%.
The diff coverage is 66.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #848      +/-   ##
==========================================
+ Coverage   62.51%   62.58%   +0.07%     
==========================================
  Files         291      292       +1     
  Lines       24527    24621      +94     
==========================================
+ Hits        15332    15408      +76     
- Misses       9195     9213      +18     
Impacted Files Coverage Δ
src/math/tiglmathfunctions.h 100.00% <ø> (ø)
src/wing/CCPACSWing.h 100.00% <ø> (ø)
src/wing/CCPACSWingSegment.h 50.00% <ø> (ø)
src/wing/TiglWingHelperFunctions.cpp 63.23% <63.23%> (ø)
src/wing/CCPACSWing.cpp 76.59% <66.66%> (+1.42%) ⬆️
src/geometry/CTiglAbstractGeometricComponent.cpp 81.81% <100.00%> (ø)
src/math/tiglmathfunctions.cpp 95.65% <100.00%> (+0.04%) ⬆️
src/wing/CCPACSWingSegment.cpp 84.09% <100.00%> (+1.04%) ⬆️

@rainman110 rainman110 force-pushed the 827_fix_wing_aspect_ratio branch from 7f26587 to e0811e4 Compare November 10, 2021 15:07
@rainman110 rainman110 force-pushed the 827_fix_wing_aspect_ratio branch from 3df83f1 to 3f8831e Compare November 11, 2021 11:16
src/wing/TiglWingHelperFunctions.cpp Outdated Show resolved Hide resolved
src/wing/TiglWingHelperFunctions.cpp Outdated Show resolved Hide resolved
src/wing/TiglWingHelperFunctions.cpp Outdated Show resolved Hide resolved
src/wing/TiglWingHelperFunctions.cpp Outdated Show resolved Hide resolved
src/wing/TiglWingHelperFunctions.cpp Outdated Show resolved Hide resolved
@rainman110
Copy link
Collaborator Author

This whole code in TiglWingHelperFunctions.cpp is actually the cpacs creator code from Malo. But I agree, we should look more into it.

I also made the code more const correct

Addresses #827
I backported the code from cpacs creator,
which already solved the problem.

Fixes #827
Added copyright header to winghelpers.

Closes #827
I also added unit tests for the TiglWingHelperFunctions.

Addresses #827
@rainman110 rainman110 force-pushed the 827_fix_wing_aspect_ratio branch from 5872465 to 5be9f9f Compare November 12, 2021 15:47
@rainman110 rainman110 merged commit 66271dd into master Nov 12, 2021
@rainman110 rainman110 deleted the 827_fix_wing_aspect_ratio branch November 12, 2021 20:31
@rainman110 rainman110 restored the 827_fix_wing_aspect_ratio branch November 12, 2021 20:31
@rainman110 rainman110 deleted the 827_fix_wing_aspect_ratio branch November 12, 2021 20:31
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.

Wing aspect ratio value seems not correct
3 participants