partmor / ezaero

ezaero - Easy aerodynamics in Python :airplane:
https://ezaero.readthedocs.io
MIT License
30 stars 3 forks source link

Implement general wing geometry #20

Open jorgepiloto opened 3 years ago

jorgepiloto commented 3 years ago

Let me propose an interesting upgrade: imagine we want to carry out a simulation on a general wing geometry like the one shown below:

At the moment, ezaero is able to properly mesh and solve for trapezoidal lifting surfaces. This new feature would require a software refactoring, but any geometry could be generated!

I propose the following steps to achieve this new feature:

newplot (14)

Let me now what you think about this new feature when possible, @partmor :+1:

jorgepiloto commented 3 years ago

With previous presented approach, it is easy to model complex shapes:

wing_root = LiftingSurface(
    r_offset = np.array([0,0,0]),
    root_chord=1.5,
    tip_chord=0.5,
    planform_wingspan=4,
    sweep_angle=30 * np.pi / 180,
    dihedral_angle=15 * np.pi / 180,
)

wing_tip = LiftingSurface(
    r_offset = wing_root.LE_tip,
    root_chord=0.5,
    tip_chord=0.1,
    planform_wingspan=2,
    sweep_angle=75 * np.pi / 180,
    dihedral_angle=45 * np.pi / 180,
)

for part in [wing_root, wing_tip]:
    fig = part.plot(fig)

fig.show()

Which outputs the following:

newplot (15)

partmor commented 3 years ago

Hi @jorgepiloto!

I LOVE this proposal. You just aced one of the "that would be nice..." things I've had in my head for a while!

Please go ahead and open a PR whenever you like, and we can discuss together the needed refactors directly on the code ;)

Thank you again

jorgepiloto commented 3 years ago

This is looking good in my local machine. Still need to go through complete matrix solution but meshing and wake (which adapts to Uinf vector) are properly generated:

newplot (18)

jorgepiloto commented 3 years ago

In previous image, wake offset was reduced for a better visualization.

partmor commented 3 years ago

Great stuff!! Looking forward to seeing the final result! ^^

partmor commented 3 years ago

Hi @jorgepiloto just checking in; all good? if you need any help please reach out :)