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

3D Panel method #83

Closed enricostragiotti closed 7 months ago

enricostragiotti commented 1 year ago

Hi Peter!

I want to use the panel method to evaluate the pressure field on the lower and the upper surfaces of an extruded NACA profile. The presence of the fuselage can be neglected and the profile considered as a cantilever beam fixed on one end. The resulting pressure field is then integrated to calculate the resultant at specific points.

Here is an example: {D00B17B5-8332-4707-98AE-E3A926380B2C} png

My question is, then, how can I use the AeroSandbox package to evaluate the pressure field? I saw this image (https://peterdsharpe.github.io/AeroSandbox/media/images/panel1_naca4412.png) on the package readme.md and I wanted to do the same. The problem is that I looked extensively at the package's code and tutorials and I didn't find any reference to the panel method. Is any sort of panel method implemented in your toolbox? Or I'm completely wrong and you calculated the pressure field in the image using the VLM?

Keep up with the wonderful work you're doing, the outcomes of AeroSandbox are really interesting.

fredvol commented 7 months ago

hello , I think the best way to start is the tutorial : https://github.com/peterdsharpe/AeroSandbox/tree/master/tutorial/06%20-%20Aerodynamics/01%20-%20AeroSandbox%203D%20Aerodynamics%20Tools

By the way i did a quick start for you base on the tutorial:

#%% import 
import aerosandbox as asb
import aerosandbox.numpy as np

#%% define wing
main_airfoil = asb.Airfoil("naca0010")

tuto_airplane = asb.Airplane(
    name="tuto-A",
    xyz_ref=[0, 0, 0],  # CG location
    wings=[
        asb.Wing(
            name="Main Wing",
            symmetric=True,  # Should this wing be mirrored across the XZ plane?
            xsecs=[  # The wing's cross ("X") sections
                asb.WingXSec(  # Root
                    xyz_le=[0, 0, 0],  # Coordinates of the XSec's leading edge, relative to the wing's leading edge.
                    chord=1.2,
                    twist=0,  # degrees
                    airfoil=main_airfoil,  # Airfoils are blended between a given XSec and the next one.
                ),
                asb.WingXSec(  # Mid
                    xyz_le=[0, 5, 0],
                    chord=1.2,
                    twist=0,
                    airfoil=main_airfoil,
                )
            ]
        ),
    ]

)
#%% draw it
tuto_airplane.draw_three_view()
#%% run analysis
vlm_analysis = asb.VortexLatticeMethod(
        chordwise_resolution=6,
        spanwise_resolution=1,
        airplane=tuto_airplane,
        op_point=asb.OperatingPoint(
            velocity=12,  # m/s
            alpha=3,  # degree
        ),
    )

vlm_analysis_result = vlm_analysis.run()
# display analysis
vlm_analysis.draw()

here the result:

image

ps: oops , I didn't see this topic was so old, anyway can be usefull to someone ! :-)