def test_conventional(): from aerosandbox.aerodynamics.aero_3D.test_aero_3D.geometries.conventional import airplane analysis = asb.VortexLatticeMethod( airplane=airplane, op_point=asb.OperatingPoint(alpha=10), ) return analysis.run()
def get_aero(alpha, taper_ratio): airplane = asb.Airplane(wings=[ asb.Wing(symmetric=True, xsecs=[ asb.WingXSec( xyz_le=[-0.25, 0, 0], chord=1, ), asb.WingXSec( xyz_le=[-0.25 * taper_ratio, 1, 0], chord=taper_ratio, ) ]) ]) op_point = asb.OperatingPoint( velocity=1, alpha=alpha, ) vlm = asb.VortexLatticeMethod( airplane, op_point, chordwise_resolution=6, spanwise_resolution=6, ) return vlm.run()
def test_flat_plate_mirrored(): from aerosandbox.aerodynamics.aero_3D.test_aero_3D.geometries.flat_plate_mirrored import airplane analysis = asb.VortexLatticeMethod( airplane=airplane, op_point=asb.OperatingPoint(alpha=10), spanwise_resolution=1, chordwise_resolution=3, ) return analysis.run()
def LD_from_alpha(alpha): op_point = asb.OperatingPoint( velocity=1, alpha=alpha, ) vlm = asb.VortexLatticeMethod(airplane, op_point, align_trailing_vortices_with_wind=True) aero = vlm.run() CD0 = 0.01 LD = aero["CL"] / (aero["CD"] + CD0) return LD
import aerosandbox.numpy as np for i, wing in enumerate(airplane.wings): for j, xsec in enumerate(wing.xsecs): af = xsec.airfoil af.generate_polars( cache_filename=f"cache/{af.name}.json", xfoil_kwargs=dict(xfoil_repanel="naca" in af.name.lower())) airplane.wings[i].xsecs[j].airfoil = af op_point = asb.OperatingPoint(velocity=25, alpha=3) vlm = asb.VortexLatticeMethod( airplane, op_point, align_trailing_vortices_with_wind=True, chordwise_resolution=12, spanwise_resolution=12, ) vlm_aero = vlm.run() ab = asb.AeroBuildup(airplane, op_point) ab_aero = ab.run() avl = asb.AVL( airplane, op_point, ) avl_aero = avl.run() for k, v in {"VLM": vlm_aero, "AVL": avl_aero, "AB": ab_aero}.items():
analysis = asb.VortexLatticeMethod( airplane=airplane, op_point=asb.OperatingPoint(alpha=10), ) return analysis.run() def test_flat_plate_mirrored(): from aerosandbox.aerodynamics.aero_3D.test_aero_3D.geometries.flat_plate_mirrored import airplane analysis = asb.VortexLatticeMethod( airplane=airplane, op_point=asb.OperatingPoint(alpha=10), spanwise_resolution=1, chordwise_resolution=3, ) return analysis.run() if __name__ == '__main__': # test_conventional() # test_vanilla() # test_flat_plate()['CL'] # test_flat_plate_mirrored() # pytest.main() from aerosandbox.aerodynamics.aero_3D.test_aero_3D.geometries.conventional import airplane analysis = asb.VortexLatticeMethod( airplane=airplane, op_point=asb.OperatingPoint(alpha=10), ) aero = analysis.run() analysis.draw()