Skip to content

Control surface deflection is not working in the analysis #134

@JurajCe

Description

@JurajCe

Bug Description / Observed Behavior

I am trying to simulate wing with deflected control surface. I tried to run both Cessna 152 example from airplane.py, and example of elevator from wing.py installed in AeroSandbox folder. It doesn't raise any exception or error. The problem is that deflection is not shown using .draw() function, and is not included in VLM analysis. I also tried my own geometry, but with no success.

Steps to Reproduce

import aerosandbox as asb

def control_surface_test():
    elevator = asb.ControlSurface(
                        name="Elevator",
                        deflection=30
                    )
    wing = asb.Wing(
        name="Horizontal Stabilizer",
        symmetric=True,
        xsecs=[
            asb.WingXSec(
                xyz_le=[0, 0, 0],
                chord=1,
                airfoil=asb.Airfoil("naca4412"),
                control_surfaces=[elevator]
            ),
            asb.WingXSec(
                xyz_le=[0.5, 2, 0],
                chord=0.5,
                airfoil=asb.Airfoil("naca4412"),
            )
        ]
    )
    
    wing.subdivide_sections(10).draw()

    op_point = asb.OperatingPoint(
        velocity=100,  # m/s
        alpha=0,  # degree
    )

    airplane = asb.Airplane(
        name="Elevator Test",
        xyz_ref=[0, 0, 0],
        wings=[wing]
    )

    print(asb.ControlSurface.__repr__(elevator))
    print(f'Control surface name: {wing.get_control_surface_names()}')
    print(f'Control surface area: {wing.control_surface_area()}')

    aero = asb.VortexLatticeMethod(
            airplane=airplane,
            op_point=op_point,
        ).run()
    print(f'CL: {aero["CL"]:.3f}, CD: {aero["CD"]:.4f}')

Expected Behavior

Airplane object is expected to have control surface deflected. Results are supposed to be different with different angle of control surface deflection.

My terminal output

ControlSurface (name=Elevator, symmetric=True, deflection=30, hinge_point=0.75)
Control surface name: ['Elevator']
Control surface area: 0.75
CL: 0.299, CD: 0.0051

System Information

  • Operating System: Windows 11
  • Python Version: 3.12.2
  • AeroSandbox Version: 4.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions