peterdsharpe / AeroSandbox

Aircraft design optimization made fast through modern automatic differentiation. Composable analysis tools for aerodynamics, propulsion, structures, trajectory design, and much more.
https://peterdsharpe.github.io/AeroSandbox/
MIT License
687 stars 111 forks source link

How to draw Cp distribution on 3D wing? #80

Closed HYB777 closed 1 year ago

HYB777 commented 1 year ago

Hello, I want to draw the Cp distribution on 3D wing , but it seem that it just can draw the vortex strength distribution?

peterdsharpe commented 1 year ago

Is this with asb.VortexLatticeMethod?

If so, the reason that Cp itself isn't plotted is because a VLM analysis doesn't accurately predict Cp in an absolute sense - it neglects thickness effects, so it will be way off. VLM analysis does, however, quite accurately predict delta-Cp - the difference between the upper- and lower-surface Cp. This difference is ultimately almost-exactly proportional to the local lift (neglecting LE suction).

Vortex strength (vlm.vortex_strengths) in an all-horseshoe VLM such as asb.VortexLatticeMethod is exactly equal to delta-Cp, so what you're seeing plotted with vlm.draw() is already the delta-Cp. For display purposes (e.g., if you're making charts), you could label it as such using vlm.draw(colorbar_label="Delta Cp"), or similar.

I hope this helps! Let me know if you have any other questions.

HYB777 commented 1 year ago

Thank you for your reply, it helps a lot!