ImperialCollegeLondon / sharpy

Simulation of High Aspect Ratio aeroplanes and wind turbines in Python: a nonlinear aeroelastic code
https://imperial.ac.uk/aeroelastics/sharpy
BSD 3-Clause "New" or "Revised" License
119 stars 58 forks source link

New Fuselage Model plus Minor Improvements #249

Closed sduess closed 9 months ago

sduess commented 11 months ago

Dear team,

As promised, this is the big pull request mainly including methods to model nonlifting bodies such as fuselages with SHARPy.

Nonlifting Body Model Capabilities The main changes are in the UVLM:

  1. Adding Source Panel Method (SPM) to the aerodynamic code
  2. Coupling of the UVLM with the Source Panel Method to allow computations of fuselage-wing configurations and introduction of phantom panels for junction modelling.
  3. I introduced structs in the aerodynamic code (see struct_utils.h) to avoid page-long function inputs, it has also increased the speed of the code. In SHARPy directly, the following c
  4. Classes for the nonlifting body grid, its loader, and data structure (similar to lifting surfaces) have been added. I have used parent classes as all classes for lifting and nonlifting surfaces share many similarities.
  5. The SHARPy-UVLM interface as well as the solvers have been extended to be able to start solely nonlifting body computations but also steady and unsteady coupled simulations for example fuselage-wing simulations.
  6. Postprocessors (most importantly AeroforcesCalculator and AerogridPlot) have been extended as well.
  7. Fuselage-wing template model has been added.

Unittest Unittest is successfully running and the following tests have been added to check the new capabilities:

Further all dynamic unittests have been speed up for quicker checks using coarser discretisation, and smaller fsi tolerances and substeps.

Documentation Besides the usual documentation of code, the SHARPy docs and Readme have been updated. For the UVLM, a code documentation has been started that covers 80 % of the code for now.

Additional Notes This branch has been successfully used to create plots for one of my journal papers as documented in this repository of mine https://github.com/sduess/Enhanced_UVLM_nonlinear_aeroelastic.

codecov-commenter commented 11 months ago

Codecov Report

Merging #249 (f1c9f15) into develop (362cd33) will increase coverage by 0.48%. Report is 45 commits behind head on develop. The diff coverage is 86.23%.

@@             Coverage Diff             @@
##           develop     #249      +/-   ##
===========================================
+ Coverage    67.20%   67.69%   +0.48%     
===========================================
  Files          156      166      +10     
  Lines        25924    26709     +785     
===========================================
+ Hits         17423    18081     +658     
- Misses        8501     8628     +127     
Files Coverage Δ
sharpy/aero/utils/mapping.py 100.00% <100.00%> (ø)
sharpy/cases/templates/flying_wings.py 89.92% <100.00%> (-0.02%) :arrow_down:
.../templates/fuselage_wing_configuration/__init__.py 100.00% <ø> (ø)
...rpy/linear/assembler/lincontrolsurfacedeflector.py 85.18% <100.00%> (ø)
sharpy/linear/assembler/linearaeroelastic.py 86.54% <100.00%> (ø)
sharpy/linear/assembler/linearuvlm.py 93.30% <100.00%> (ø)
sharpy/postproc/liftdistribution.py 100.00% <100.00%> (+57.14%) :arrow_up:
sharpy/solvers/aerogridloader.py 100.00% <100.00%> (ø)
sharpy/solvers/nonliftingbodygridloader.py 100.00% <100.00%> (ø)
sharpy/solvers/nonlineardynamiccoupledstep.py 94.91% <ø> (-0.09%) :arrow_down:
... and 29 more

... and 1 file with indirect coverage changes

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