A tool for JSBsim Airfoil Modelling

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: A tool for JSBsim Flight Modelling

Postby IAHM-COL » Thu Jun 18, 2020 4:12 pm

about the 1/7 and 1/8 thingy

The way I build the wing-span deconstructor, it really allows me to add any arbitrary segmentation if we care

like I can use

Code: Select all

spandim=[0, 0.5,0.75,0.95,0.996, 0.9999,0.9999994,1]


if it has 0 and 1 an the borders it will just give me the linearly predicted shape as well.

or I could use somethink like

Code: Select all

spandim=list(np.linspace(0,1,500))


for something like 500 fragments evenly spaced

For this case, since we want 8 segments even, spandim is just

Code: Select all

spandim=list(np.linspace(0,1,8))



Not defining an spamdim gives me the every tenth scaling shown in my example yesterday
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

bomber
Posts: 1379
Joined: Mon Nov 30, 2015 3:40 pm

Re: A tool for JSBsim Flight Modelling

Postby bomber » Thu Jun 18, 2020 4:26 pm

Here's an image of the results from your polars

https://drive.google.com/file/d/1T7OaKo ... sp=sharing

green is the root airfoil and purple the tip

from this we can see how much more lift the root generates per AoA over the outer airfoils... how the roots stalls past 20degs yet the inner under 15degs... The root having a greater area carries the majority of the weight of the plane... whilst the tip with it's greater armature has greater moment effects
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

bomber
Posts: 1379
Joined: Mon Nov 30, 2015 3:40 pm

Re: A tool for JSBsim Flight Modelling

Postby bomber » Thu Jun 18, 2020 4:43 pm

So scaling the wing sections so as the centre of the root is at 0 and the centre of the tip is at 1 gives us these split dims

0
0.1331
0.288
0.4412
0.579
0.7249
0.8708
1
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: A tool for JSBsim Flight Modelling

Postby IAHM-COL » Thu Jun 18, 2020 4:57 pm

bomber wrote:Here's an image of the results from your polars

https://drive.google.com/file/d/1T7OaKo ... sp=sharing

green is the root airfoil and purple the tip

from this we can see how much more lift the root generates per AoA over the outer airfoils... how the roots stalls past 20degs yet the inner under 15degs... The root having a greater area carries the majority of the weight of the plane... whilst the tip with it's greater armature has greater moment effects



Ok. How does it look?
Did it work?
I see a pretty graph. Not a very educated judgment from me here.

[Edit]
Another question comes to mind, also; how is this method comparing to the current bechmark (aka autocad?)
[/Edit]
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: A tool for JSBsim Flight Modelling

Postby IAHM-COL » Thu Jun 18, 2020 4:58 pm

bomber wrote:So scaling the wing sections so as the centre of the root is at 0 and the centre of the tip is at 1 gives us these split dims

0
0.1331
0.288
0.4412
0.579
0.7249
0.8708
1



I don't understand.

The spandim is along the span axis. not along the chord axis. As in, how far from chord the transversal projections are.
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: A tool for JSBsim Flight Modelling

Postby IAHM-COL » Thu Jun 18, 2020 5:05 pm

After some of the testing I'll be pushing the actual python code used to generate the result

the code here below, is the minimal example of how it is currently working,

@Bomber,
let me know if this is clear too?

Code: Select all

#!/usr/bin/python
# copyright 2020, Israel Hernandez - IAHM-COL
# copyright 2020, Simon 'Bomber' Marley
# License, GPL version 3 or later

##This is a minimal example to produce the 3D projection of airfoils on
#CSV files given chord and tip specifications an presuming linear
#decay from chord to tip.

## For more detailed example of usage check
## wingTest.py

from airfoils import airfoil2D, airfoil3D
import numpy as np

# After importing the airfoil2D and airfoil3D above
#
# STEP 1
#
# Read the CSV files,
# as new instances of airfoil2D()

g535 = airfoil2D().csvLoader(file="G535.csv")
g549 = airfoil2D().csvLoader(file="G549.csv")

##STEP 2

## Here we construct an airfoil3D and extrapolate it
## so it contains information along the span

#Create an airfoil3D: we can use the chord and tip information as such

gottingen = airfoil3D(chord=g535, tip=g549)

##STEP 3

## Interpolation of the airfoil3D

gottingen = gottingen.interpolate(xdim=100, spandim=list(np.linspace(0,1,8)))

##STEP 4: write the result to a desired path

gottingen.csvWriter(path="output/")
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

bomber
Posts: 1379
Joined: Mon Nov 30, 2015 3:40 pm

Re: A tool for JSBsim Flight Modelling

Postby bomber » Thu Jun 18, 2020 5:07 pm

It looks great... but better than that is the speed of putting data in and getting useful data out..

Once you know what you're doing with the javafoil app, what to input, what to modify to show the control surfaces effect and the beta angle effect and I copy and paste it's output into a spreadsheet which then automatically produces the tables needed which are cut n pasted straight into the xml file.. a large chunk of really hard time consuming work is done... in minutes... not days or months... trust me it's been months.

If we can generate sufficient tools and a useable workflow flight modeling can be moved on exponentially...

Simon
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: A tool for JSBsim Flight Modelling

Postby IAHM-COL » Thu Jun 18, 2020 5:10 pm

sound good
I'm pushing the current code then


OTOH, I want us to see if we can incorporate the xfoil program so it actually works a bit of a blackbox

Input airfoils
Almost immediate output of JSBsim XMLs with the information of the polars produced.

If we can do it that way, then we are starting to get somewhere in terms of a tool to produce JSBsim
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: A tool for JSBsim Flight Modelling

Postby IAHM-COL » Thu Jun 18, 2020 5:15 pm

bomber wrote:If we can generate sufficient tools and a useable workflow flight modeling can be moved on exponentially...

Simon



Hopefully a proper tool also moves understanding on how to properly make real simulated fdms, exponentially.

I think the problem (at least for me) starts with not even knowing where to start.

Earlier this week I tried building a fuel systems for a little regional plane,
It took me lots of time debugging to figure out how it works, why it works, and start getting somewhere really

And its just switches and summers!

JSBsim can be powerful, but also it is certainly plenty of confusing in terms of how to write down specifications that actually are simulating something
(speaking out of my own ignorance, but I couldnt' find clearer documentation that did not send me on spins)

If you are curious this is the current WIP I came up with
https://github.com/JWocky/JH-Lineage1000/blob/master/Systems/fuel.xml

(if you have good suggestions I'm all ears, too)
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6455
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: A tool for JSBsim Flight Modelling

Postby IAHM-COL » Thu Jun 18, 2020 5:19 pm

https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?


Return to “JSBsim”

Who is online

Users browsing this forum: No registered users and 7 guests