Page 1 of 10

A tool for JSBsim Airfoil Modelling

Posted: Fri Jun 05, 2020 7:25 pm
by bomber
There's been some talk on here recently and now on FG forum about a tool for flight modelling...

https://forum.flightgear.org/viewtopic.php?f=4&t=37544

Now I know a spreadsheet isn't the correct tool... my son tells me enough times, but I'd like to show you where I'm at in specifying a tool that works by using a spreadsheet...

https://docs.google.com/spreadsheets/d/ ... sp=sharing

It's a simple task... anything in green you can modify any other cell don't...

At the end of it you copy and paste from the worksheets into the relevant XML file and your flight model is written.

Not very elegant I know, clunky... yes... but it's better than nowt.. All you have to do is put numbers in for lengths, weights, areas etc and out pops 90% of the flight model.. no coding required.

Simon

Re: A tool for JSBsim Flight Modelling

Posted: Sat Jun 06, 2020 12:10 am
by IAHM-COL
Thanks @Bomber

It is very kind of you to share this with us.
I had look a bit at FDMs and so far I had only left confused, and with a brick of a plane

Your son might be right that using spreadsheets is a non-typical way of doing it, but it certainly works for you.

It differs from what is boiling in my mind, as you know, but I need time to set it in "paper" to look at something concrete.

Best,
IH-COL

Re: A tool for JSBsim Flight Modelling

Posted: Sat Jun 06, 2020 10:29 am
by bomber
The ultimate object would be to make YAsim redundant through making a tool that allows a developer to put in data that he can readily find through plane specifications or measuring... in the same way as YAsim works now.

This isn't because I've some zealous motivation against YAsim understand... It's simply to make JSBsim easier to use, which happens to be the same reason that YAsim exists.

The creation of a tool to make flight modeling easier is a laudable effort... and if I had a time machine I'd go back and try and convince YASim creator to instead of creating a separate flight model to use instead JSBsim with a front end user tool.

The problem with any tool that's supposed to be a 'fit all' is the differences between planes... even subtle things can make a difference, never mind the big things like a single wing and a bi-plane. For instance the above spreadsheet is for a Spitfire, it could reproduce a similar plane, say the hurricane. But out of the box it couldn't produce the bf109 because this plane has leading edge slats.. the versatility is just not there with this method. The devil is in the detail as they say and this method is as much a graphical recording of how the flight model is built as it is a tool for making one.

But if nothing else is gleaned from it other than having a better understanding of construction density and mass ballance, which frankly 98% of JSBsim planes in FG are pure guesswork... and as such pure bogus, something will have come of sharing.

regards

Simon

Re: A tool for JSBsim Flight Modelling

Posted: Mon Jun 08, 2020 9:52 am
by bomber
IH-COL,

One of the hardest parts of flight modeling is getting data... for instance

On some planes the wing has a different shape from the inner to the outer.... say the gottingen 535 to the gottingen 549 at the wingtip.
Representing the whole wing using a single airfoil shape would require understanding what the half way point morph shape would look like..

I'd like a tool that allows me to input the airfoil polars for the root and tip..

Code: Select all

gottingen 535
1.00000   0.00000
0.95000   0.01543
0.90000   0.02985
0.80000   0.05570
0.70000   0.07825
0.60000   0.09840
0.50000   0.11525
0.40000   0.12710
0.30000   0.13245
0.20000   0.12580
0.15000   0.11623
0.10000   0.10065
0.07500   0.08911
0.05000   0.07457
0.02500   0.05554
0.01250   0.04102
0.00000   0.00000
0.01250   -0.01948
0.02500   -0.02646
0.05000   -0.03293
0.07500   -0.03489
0.10000   -0.03585
0.15000   -0.03628
0.20000   -0.03470
0.30000   -0.02805
0.40000   -0.01490
0.50000   -0.00025
0.60000   0.01190
0.70000   0.01605
0.80000   0.01520
0.90000   0.00885
0.95000   0.00292
1.00000   0.00000

gottingen 549
1.000   0.000
0.95   0.012
0.9   0.024
0.8   0.047
0.7   0.069
0.6   0.087
0.5   0.103
0.4   0.113
0.3   0.114
0.2   0.104
0.15   0.093
0.1   0.076
0.075   0.065
0.05   0.052
0.025   0.034
0.0125   0.023
0.008   0.018
0.006   0.015
0.004   0.012
0.002   0.009
0.000   0.000
0.002   -0.006
0.004   -0.009
0.006   -0.011
0.008   -0.012
0.0125   -0.015
0.025   -0.018
0.05   -0.022
0.075   -0.024
0.1   -0.026
0.15   -0.027
0.2   -0.027
0.3   -0.024
0.4   -0.020
0.5   -0.014
0.6   -0.008
0.7   -0.004
0.8   -0.001
0.9   0.000
0.95   0.000
1.000   0.000


And that produces the polars for the number of wing sections that is required as it morphs from one shape to the other.... I'd want another 6, but others might only want another one..

I suspect one can't tackle the elephant that is flight modeling in one fits all tool, but instead in a series of tools to start with, built as modules that eventually could be brought into a single working tool that walks a user from start to finish.

regards

Simon

Re: A tool for JSBsim Flight Modelling

Posted: Mon Jun 08, 2020 9:58 am
by bomber
Just to clarify the above can be done by taking the polars into a 3d solid modeling package such as solid edge.... and morphing one shape into the other. You then take the resultant 3d solid and slice it up into the required sections.... you take these sections and import into Autocad and using a simple script pull out the polars in x and y co-ords into a CVS file.

This is what I did for the Spitfire... but it's beyond the skills and toolsets of most flight modelers, so it's not a viable solution.

Simon

Re: A tool for JSBsim Flight Modelling

Posted: Mon Jun 08, 2020 3:11 pm
by IAHM-COL
bomber wrote:I suspect one can't tackle the elephant that is flight modeling in one fits all tool, but instead in a series of tools to start with, built as modules that eventually could be brought into a single working tool that walks a user from start to finish.

regards

Simon


I am sure that is the case.
We can see if we can get a first module for wing to work.

I can give it a try, but I need to understand the problem at hand first. I'll ask a few questions below

Re: A tool for JSBsim Flight Modelling

Posted: Mon Jun 08, 2020 3:13 pm
by IAHM-COL
bomber wrote:IH-COL,

One of the hardest parts of flight modeling is getting data... for instance

On some planes the wing has a different shape from the inner to the outer.... say the gottingen 535 to the gottingen 549 at the wingtip.
Representing the whole wing using a single airfoil shape would require understanding what the half way point morph shape would look like..

I'd like a tool that allows me to input the airfoil polars for the root and tip..

Code: Select all

gottingen 535
1.00000   0.00000
0.95000   0.01543
ETC

gottingen 549
1.000   0.000
0.95   0.012
ETC



What are these two tables? I understand two different aircraft 535 and 549 wing definition

What is first column? what is second column?

[what is an airfoil polar, basically?]

Re: A tool for JSBsim Flight Modelling

Posted: Mon Jun 08, 2020 3:16 pm
by IAHM-COL
bomber wrote:Just to clarify the above can be done by taking the polars into a 3d solid modeling package such as solid edge.... and morphing one shape into the other. You then take the resultant 3d solid and slice it up into the required sections.... you take these sections and import into Autocad and using a simple script pull out the polars in x and y co-ords into a CVS file.

This is what I did for the Spitfire... but it's beyond the skills and toolsets of most flight modelers, so it's not a viable solution.

Simon


Do we know mathematically what is occurring?
What operations I could do to convert one series of data (in your code aboe) to the other series of data you expect the resultant to be? (polars x, y)

Once I figure out the operations (it can be differential calculus, no prob), at that point the N times we need to bootstrap does not matter. it could be 2 or 6 or thousands.

Re: A tool for JSBsim Flight Modelling

Posted: Mon Jun 08, 2020 3:30 pm
by bomber
These are airfoil polars... let me explain.

All airfoils points are drawn between a value of 0 and 1 on the x co-ord.... this is is the first value...
The second value is how far up or down this point is...

http://airfoiltools.com/airfoil/details ... =goe535-il

It's a 1 to 1 grid... and the size of the airfoil on the wing at this point is irrelevant as the air passing over it act the same way regardless of it's size.

Imagine a simple diamond airfoil..

1,0
0.5,0.5
0,0
0.5,-0.5
1,0

Don't know why the convention is to start at the trailing edge 1,0..... it just is.
now lets imagine we wish it to morph into a 'slimmer' diamond of only half it's height

1,0
0.5,0.25
0,0
0.5,-0.25
1,0

With this simple example it's easy to deduce that the shape of the diamond half way through the morphing would be.

1,0
0.5,0.375
0,0
0.5,-0.375
1,0

Hope this helps..

Simon

Re: A tool for JSBsim Flight Modelling

Posted: Mon Jun 08, 2020 4:08 pm
by bomber
Whilst we're talking available tools for everyone I'd like to share with you guys the tools I use...

I create an outline drawing of the plane to be flight modeled using Autocad... I use the web app version that works directly with google drive and yes it's free.

This allows me to find area's of the wings, any sections I split the wings up into the cross sectional areas of airfoils, lengths for weight armatures to help calculate the CoG and intertia values....

for 2d artwork (which I don't do a lot of) I'd advise using autodesk sketch pad..it's also free.

When I've got the polar co-ords for the airfoils I use java foil... I've downloaded the main program... it's also free
when creating a prop data xml file I use java prop... yes the main program and you've guessed it.

And to produce the XML files I use notepad++.... free again

Alongside google worksheets these work for me.

Simon