Skip to content
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

Regarding Moments Estimation #17

Closed
dnsuman25 opened this issue Feb 18, 2020 · 12 comments
Closed

Regarding Moments Estimation #17

dnsuman25 opened this issue Feb 18, 2020 · 12 comments

Comments

@dnsuman25
Copy link

dnsuman25 commented Feb 18, 2020

Hi @peterdsharpe, I was validating the code with avl and I found that the moments estimated from this code is way off. Upon looking at vlm3.py I found the formula for moments are incorrect.
Could you please check and confirm with it.

@peterdsharpe
Copy link
Owner

peterdsharpe commented Feb 18, 2020

Hey @dnsuman,

Uh oh! Could you please post your code and AVL inputs?

I've done a few cases of moment validation against XFLR5 and AVL on my end and found them to all agree to within a percent or so on sensible geonetries - let's see if we can figure out where the issue is!

@dnsuman25
Copy link
Author

Hey @peterdsharpe,

I have added the image of the equation. The moment equation should contain the wing area, once I added the wing area to the equation I got the pitching moment coefficient to be overestimated by 6% when compared to AVL and lift coeficient was 5% below the estimated value from AVL, which is quite good. But the lateral and directional moment coefficient does'nt match up at all.

I have also attached an image of my output for a wing you can have a look.

asb_vlm3_output

vlm3_moments_eqn

@dnsuman25
Copy link
Author

I have attached the image of the corrected moments equation of vlm3
corrected_vlm3_moments_eqn

@peterdsharpe
Copy link
Owner

peterdsharpe commented Feb 18, 2020

Normalization

Ah - good catch! Yes, the normalization to s_ref was corrected in the latest (v1.0.0-beta) release:
image
Unfortunately I don't have a good way of fixing this in the v0.3.0 release (the one you likely have, as vlm3 has been superseded in v1.0.0-beta), but I can update it in the /aerosandbox_legacy_v0/ subdirectory that I plan to carry forward to help users with back-compatibility... I'll have to think about how to best handle this one! Thanks for bringing it up!
(Note: v1.0.0 is still in beta, so it may be wise to wait another week or two before updating)

Lateral & Directional moments

Regarding the lateral and directional moments: it looks like VLM3 is saying that the lateral and directional moments are basically 0 to within machine precision (-2.7e-16 and 1.09e-17, respectively). Is this not what you're finding with AVL?

@peterdsharpe
Copy link
Owner

peterdsharpe commented Feb 18, 2020

Also:
The latest (v1.0.0-beta) release has the nice feature of being able to take advantage of symmetry in the problem (reducing the matrix size by a factor of 2), so it will output true zeros for lateral/directional coefficients in symmetric cases (as opposed to tiny tiny nonzero values). Also, it's way, way faster (<100 milliseconds). Example output from a random symmetric case:
image

@dnsuman25
Copy link
Author

After some correction to the AVL inputs from my end I got near similar values for lateral and directional moment coefficients.
The Aerosandbox is really a good work you have done. I am currently trying to implement this for wing twist optimization and I will be validating it with AVL and later do CFD analysis to confirm the design of the wing.
Currently I would be using vlm3 but later on I will work with the beta version and work on that.
Also, I wanted to know in the beta version is the viscous part added to the vlm code?

@peterdsharpe
Copy link
Owner

I appreciate it - thanks!

The beta version replaces the old solvers with two new solvers: "CasVLM1" and "CasLL1". (The old solvers are still available through the aerosandbox_legacy_v0 folder, though things like geometry definition are not guaranteed to be cross-compatible.) There are a good number of benefits associated with the new solvers, namely; the methods are written to lend themselves nicely to a simultaneous-analysis-and-design (SAND)-like architecture.

Regarding viscous modeling: That's currently a feature in CasLL1, but not CasVLM1. CasLL1 is basically a fully-nonlinear lifting-line (LL) solver, as opposed to a vortex-lattice model (VLM). Because of this, CasLL1 lends itself to viscous analysis more easily. Honestly, in most of my personal research work (currently working on solar-electric aircraft design), I've been primarily using CasLL1!

For your twist optimization study, it sounds like you probably want to use something like this script from the beta version:
https://github.com/peterdsharpe/AeroSandbox/blob/master/examples/casll1_spanload_optimization_test.py

But again, the beta version is still under heavy development, so no promises on user-friendliness there just yet!

@dnsuman25
Copy link
Author

Yes, I want to implement something similar to the spanload optimization but instead of chord length as my design variable will be the twist at each stations on the wing. Also, in the previous version of vlm3 is it possible to extract the elemental force coefficients.
It will take some time for me to understand the beta version and if I find any issues I'll reach out.

@peterdsharpe
Copy link
Owner

Yes - in the code I linked, both chord and twist optimization are happening simultaneously. You can choose to just do twist optimization if you want by swapping the "#" on these two lines (roughly line 57 in the file I linked):

# chords = cas.linspace(0.2, 0.2, n)
chords = cas.vertcat(*[variable(0.1, 0.001, 1) for i in range(n)])

And yes - in VLM3, forces should be available at each point on the wing by using vlm3.Fi_geometry. You can get the location associated with each point using vlm3.vortex_centers.

@dnsuman25
Copy link
Author

Thank you. I'll look into that and update you if I find any issues.

@dnsuman25
Copy link
Author

Is it possible to get the local CL using vlm3?

@peterdsharpe
Copy link
Owner

Unfortunately no, though there's probably a way to back-calculate this! You can do this with CasLL1, though, via CasLL1.CL_locals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants