-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VLM for trajectory optimization #81
Comments
Hey there, This is a good question! Apologies for the slow response. Essentially, the reason why is that In short, there are two quite-simple issues here that prevent this from happening as-is:
So, tl;dr is that this would be possible with not too much work! Tackle both these things (~40 lines of code), and |
Hi Peter, freestream_velocities = np.add(
wide(steady_freestream_velocity) , rotation_freestream_velocities
)
# Nx3, represents the freestream velocity at each panel collocation point (c) As CasADi MX not support n > 2 dimensions, how would you shape the matrix so that it accounts for this third "time" dimension (or the number of steps of the trajectory) ? The only quick workaround I see to solve this issue is to consider constant spanwise freestream velocity, so that the first dimension of the array is the number of steps of the simulation/optimization. But this can be limiting in some cases. Last, I am happy to work on it and share it as a PR when I'll do it. I am just interested in your point of view on this Thank you |
Easiest way here would be to split up the x, y, and z components here. Generally, you want to split across a) axes with known size (3), and b) small axes, as the loop overhead is minimized. The freestream_velocities_x = ...
freestream_velocities_y = ...
freestream_velocities_z = ... and then: freestream_dot_normal = (
freestream_velocities_x * normal_x +
freestream_velocities_y * normal_y +
freestream_velocities_z * normal_z +
) or, to do the exact same thing a shorthand, more extensible way: freestream_velocities = [
freestream_velocities_x,
freestream_velocities_y,
freestream_velocities_z
]
normal = [
normal_x,
...
]
import aerosandbox.numpy as np
freestream_dot_normal = np.dot(freestream_velocities, normal, manual=True) where the In retrospect, you're right - it definitely would be more than a 10-line code edit! Perhaps I was too optimistic haha :) It's doable, just with a bit more work than I had anticipated! Maybe a 200-line code edit? |
Hi,
I am trying to use vortex lattice methods for optimal control problems. I successfully used the AeroBuildup module for optimizing a trajectory, but optimizing the design with this module doesn't make sense because my design isn't to adapted to it.
When trying to switch to vortex lattice method with a number of variables > 1 using the following code:
I get this error:
I guess this
compute_rotation_matrix_wind_to_geometry
does not support mixed types. Is it a feature that is planned to be available any time soon ?Thank you
The text was updated successfully, but these errors were encountered: