PDA

View Full Version : Inertia in Aerofly5/AFPD and the InertiaLength parameter: we're getting there



MikeHoulder
July 12th, 2010, 21:05
It's a theorem!

O frabjous day! Callooh! Callay!"
He chortled in his joy. ('The Jabberwock' by Lewis Carroll)


My intention is to derive a reasonably accurate method for deriving the mass moment of inertia for airframe components in Aerofly5/AFPD. This is needed to allow the simulator to calculate the effect of aerodynamic forces and also for the modeller to calculate the correct torsion spring values for the spring-damper joint of the component.

But the first job was to understand the InertiaLength parameter on a rigorous basis. It is, actually, a splendid idea on the part of the Aerofly team. The parameter asks the modeller to give his/her intuitive idea of how difficult it is to twist the component by giving an equivalent rectangular block which looks to have the same resistance.

Being me, of course; intuition is insufficient. Anyway, I've proved the key theorem.

Assume a constant frame of reference and fixed axes:
Definition: Equivalent Rectangular Block
A rectangular block is a equivalent to any 3D object or combination of such objects if it has the same moments about the three axes and the same centroid as the object/combination of objects.

Theorem:
For any member or combination of members of a given set of primitive objects, there exists a unique rectangular block which is equivalent to the member or combination of members.

Here is the current set of primitives:

http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/Primitives.jpg

Proof:
All primitives have a rectangular equivalent. Any two rectangular blocks may be combined as in the first image in the primitives. Hence, by a simple induction, the theorem is proved.

I want to extend the primitives by including a truncated cone, a triangular beam and a slanted rectangular beam.

The method of calculating the moment of inertia and the equivalent rectangular block is not going to be easy. In fact, it will be pretty gruesome. The use of MS Excel will be vital. But it works and does allow the modeller to choose a level of approximation. It should really be programmed and, one day perhaps, I'll write the program.

Of course, people with big bucks who can afford the latest version of Autocad will find a menu item for calculating moments of inertia. There are other software programs available as well; but as far as I know, none are cheap.

As I develop the method, I will add further notes to this post.

My best wishes to all
Mike

Marc Borchers
July 16th, 2010, 21:40
Mike,

actually there is a cheaper software for calculating moments of inertia - Aerofly. There is a function in AF5 that computes the inertia matrix given a closed mesh and assuming the body has constant density. I will make the output available as soon as we release the exporters for the different 3d modelling applications, so you will able to get the values for your objects like wings and fuselage.
Anyway, most bodies don't have constant density over their entire volume (think of a lightweight fuselage including a heavy motor and battery), so the InertiaLength parameters give a certain degree of freedom for the designer.
I hope I will not take away the joy of developing the spreadsheet or program by yourself

Marc

MikeHoulder
July 17th, 2010, 12:23
That's very good news, Marc. It saves me from trying to solve endless triple integrals.

My method would certainly involve a long sequence of detailed calculations managed by hand in MS Excel without much protection against errors. As such, without a proper program, there would be very little use made of the method. And I can't justify the commitment and time required to produce such a program.

That being said, my method does allow for variable density. So there does seem to be a use for the method at the simplest and crudest level.

The InertiaLength parameter allows adjustment to the Aerofly generated inertia value. So I think my method could be used to calculate an inertia rectangular block for a very crude and simple representation of the airframe component first with constant density. Then it could produce a second block with variable density to compare with the first. This would give perhaps a better idea of how the InertiaLength values should be adjusted.

By the way, I talk of my method; but there is nothing I can claim as my own. All I'm doing is following other people's work.

Now, thanks to Aerofly and Marc, I can spend much less time on Moments of Inertia and move on to sort out resonance and vibration in the spring-damper component joints. Any day now, a great thick book "Principles of Vibration" by Benson H. Tongue will be arriving here with a thud.

Best wishes to all and bless your cotton socks, Marc.
Mike

MikeHoulder
July 20th, 2010, 21:51
The automatic generation of the equivalent rectangular block with the Inertialength parameter looks to be an absolute godsend. But it does suffer one important defect. The moments of inertia are calculated using the volumes with a constant density to give the mass or weight of the component.

As Marc says, the engine in a fuselage component is much heavier than the fuselage structure. The automatic generation of the Inertialength parameter does not take account of this. Does it make a significant difference?

While preparing a tutorial on all this, I thought I would try and find out.
Here is a Lancaster wing component: 690
and here is a very crude block representation of that wing with two equivalent blocks superimposed: 691 The green rectangular block shows the equivalent to the wing with constant density as per the automatic generation. The blue block shows the equivalent with a variable density. The inner and outer engine pods have a density 5 times that of the wing part itself.

These two blocks each have the weights of the wing and engines and have moments of inertia equal to the whole component about its centre of gravity taking account of the density.

I must admit that the result surprised me. It is perhaps counter-intuitive. The blue equivalent block is substantially smaller in dimension than the green one. But it does weigh twice as much and the greater part of the mass is concentrated in the region of the engines. Hence with a perhaps exaggerated variable density, the equivalent block is significantly smaller.

The implication is that it is possible to adjust the automatically generated Inertialength value using some sort of factor derived from a similar comparison of the green and blue blocks.

I'll have to think on that. I'll probably need an emergency supply of that gorgeous nectar of the gods, Tetleys beer from Yorkshire.

My best to all
Mike

MikeHoulder
July 21st, 2010, 11:49
If anyone wants to see them, here are the Metasequoia and MS Excel XLS files used to produce the above result
694
695
Mike

MikeHoulder
July 22nd, 2010, 15:11
Here I am using the standard Aerofly5 PT-40 model. The wing has a 5 degree dihedral. I wanted to test my calculated value for both the moment of inertia and centre of gravity of the wing.

The original values for these are:
InertiaLength: 0.25, 0.77, 0.02
R0: -0.04, 0.41, 0.13

My calculated values are:
InertiaLength: 0.27, 1.19, 0.15
R0: -0.13, 0.39, 0.04

The equivalent rectangular block is green over the grey wing block
http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/Aerofly5PT-40LeftWing.jpg

The original InertiaLength value appears to be the actual dimensions without dihedral of the wing. Fair enough! Everything is approximate. But my value is substantially different.

Marc, what is this original value? Is it the value automatically generated by Aerofly5 that you promised? Or is it a value set by the author of the model?

I sweated blood to calculate the moment of inertia of an inclined block; inclined to take account of dihedral. My calculations could be very wrong. In the hope that someone will be able to confirm them, I have attached an MS Excel file with three worksheets: the calculations for the wing itself, those for a right-angled triangular block and those for the inclined rectangular block.

One further question, Marc. Is the x coordinate of R0, centre of gravity of the component, the distance from its leading edge?

I did not change the mass value for the wing which remained at 0.3 kg.

How did it fly with the changed values? My completely subjective feeling was that the model was more stable and easier to control, particularly with the ailerons.

My best to all
Mike

MikeHoulder
July 25th, 2010, 14:37
I should have done this before writing my last post. But I was dreading the work of re-thinking my value for the inertia of an inclined block, should it go wrong. My apologies.
Actually, no problem! So, frabjous joy etc, I'm much more confident now of my work on an inclined block inertia.

The density used in the previous post used a value 1. The mass of the wing is 0.2 kg. This gives a density value of 63.21 kg/m^3. This gives the following values calculated using my work:

InertiaLength: 0.25, 0.78, 0.08
R0: -0.13, 0.39, 0.04

These are much closer to the Aerofly generated values of:

InertiaLength: 0.25, 0.77, 0.02
R0: -0.04, 0.41, 0.13

The main difference for InertiaLength is the Z value of 0.08 as opposed to 0.02. I explain this by my taking account of dihedral. Here is a new image of the equivalent block: http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/Aerofly5PT-40LeftWingv2.jpg
There are significant differences between the two R0 values (component centre of gravity). But I don't know what base value was used for the original R0 (Marc?). My value takes R0 relative to the wing leading edge.

Best wishes
Mike

MikeHoulder
July 28th, 2010, 15:00
The issue is the lack of correspondence between my calculated inertia block equivalent of the left wing of the standard PT-40 model and the InertiaLength value automatically generated by Aerofly. (Marc, I assume the value is that generated by Aerofly)

Here is an image showing the left wing itself, my latest approximation to the wing using 4 primitive rectangular blocks and the equivalent inertia block:
http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/EquivalentPT-40Wing.jpg

In my last post I assumed the difference between my value and the original was due to my taking account of dihedral. Overnight, I realised that airfoil section of my approximation was very crude and that maybe the differences were due to that.

So I produced the equivalent inertia blocks for two more approximations to the actual airfoil and hoped that my values would be that much closer to the original as I improved the approximation. Here are my three approximations, No.1 is that referred to in the previous post, 2 and 3 are new:
http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/Comparisonairfoils.jpg

No.1 has a simple single rectangle which superimposed over the actual airfoil. No. 2 has three simple rectangles. No.3 has four rectangles and is closer to the actual airfoil than the others. I was hoping to see that my values gave a sequence with a decreasing difference to the original. Sadly no!

The values are:
original 0.25, 0.77, 0.02 (from the InertiaLength value of the original model)
No.1 0.24, 0.78, 0.08
No.2 0.24, 0.78, 0.07
No.3 0.19, 0.78, 0.07

No.3 shows an increasing difference to the original, particularly in the X value.

My equivalent inertia block shown in the first image above is intuitively justifiable. So I don't think there is an error in my mathematics. The maths calculations are sufficiently complex so that finding a solution which is not intuitively absurd is a guarantee of their correctness.

So, on my assumptions, I am not taking account of some factor or other. The only other thing I can think of at the moment is the wing incidence. The Aerofly model editor gives the incidence as 0 degrees. But the model image does show some incidence. Unfortunately, putting an angle of incidence into my calculations will increase the difference to the original. The Z value will increase.

So, I am lost at the moment. Please, comments and contributions are needed.

The thing is important as I need the difference between the original and the approximation as giving the cost of approximation. Knowing this cost, I can vary the density of various parts of the approximation and add/subtract the difference minus the cost to the original InertiaLength value. This would overcome the limitation that Aerofly calculates InertiaLength with constant density.

Best wishes
Mike

PS: the XLS file attached below is better organised and easier to follow. Of course, much more improvement is possible.

MikeHoulder
July 28th, 2010, 18:36
Look at the original InertiaLength block drawn centred on the airfoil and to the same scale:
http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/OriginalPT-40InertiaLength.jpg

It looks very much as if it was drawn simply round the airfoil and does not represent any calculated value generated by Aerofly.

Mike

MikeHoulder
July 28th, 2010, 19:39
Yikes, doing the summation of the four primitive blocks into the composite, I forgot to include the fourth and final one. I shall now do penance!

Here is the corrected image:
http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/EquivalentPT-40Wing-1.jpg

And the correct value for No.3 in the previous post is:
No.3 0.21, 0.78, 0.07
The X value is not quite so far from the original; but it's still bad enough.

I have attached the corrected XLS file

MikeHoulder
August 2nd, 2010, 19:36
Deriving the moments of inertia and applying them to a model is not easy. So why do it?
First, I believe they can make a difference to the simulation. I believe the appallingly bad flight characteristics of my half-scale A10 in AFPD were due to my failure to take account of inertia and weight distribution. But this is belief only, I will have to see when I have some models flying in AF5. The second reason is the need is to be able to calculate the spring strengths for the torsion spring-damper joints and to be able to solve resonance problems with them. The linear spring-damper joints don't need this.

As I understand the InertiaLength AF5 parameter we need two things. We need the inertia itself of the component for the torsion spring-damper joints and we need the equivalent rectangular block under inertia of the component for the InertiaLength value.

Once we have the inertia about all three axes, a simple solution to three simultaneous equations will give the dimensions of the inertia equivalent rectangular block. So how do we find the inertia value?

One approach would be the use of a formula derived from 'first principles'. This would require the integration of the deceptively simple-looking triple integral:

http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/FirstPrinciples.jpg

The problem is that, for any other than the simplest symmetric shapes, the limit values of integration (x2,x1,y2,y1,z2,z1) are coordinate geometry equations of lines and with the second and third stages of integration the term to integrate becomes unacceptably complex. Leave this alone and forget about it!

Another solution to the problem is a software program that does basically a summation of inertia values at very many points in the component or, at least that is how I understand it. We have been promised a function in AF5 to do this in an earlier post by Marc Borchers:
"There is a function in AF5 that computes the inertia matrix given a closed mesh and assuming the body has constant density. I will make the output available as soon as we release the exporters for the different 3d modelling applications, so you will able to get the values for your objects like wings and fuselage."

But the AF5 development team have an extremely heavy workload so this function can only appear some considerable time in the future. Sad, but we must be patient!

And anyway, there is a problem with the AF5 function; it calculates inertia using a constant or uniform density (density * volume = mass/weight). Every bit that has the same volume as another bit weighs the same. But think of my Lancaster wing; it has two heavy engines and undercarriage units stuck out in front of a light structured wing. The density is very variable. Again, my A10, with two heavy jet engines stuck on the back of the fuselage, we have the same problem. I think there is a way round this with a slight(?) additional stage to the use of the AF5 function.

Since we don't yet have the AF5 function for calculating inertia. And even when we do have it, we will need to be able to modify the result. So let's look at another method which I have been working with throughout this topic.

It is vitally important to remember that the value for inertia for a component has no meaning unless it is related to a set of axes positioned somewhere in or around the component. Inertia is resistance to change in rotation. There has to be an axis around which the rotation occurs.

That being said, we have two absolutely brilliant theorems that apply to inertia: the Parallel Axes theorem and the Composition theorem. Inertia relates to axes. If you want to know what happens if you change the axes to a different position, the Parallel Axes theorem tells you how to change the inertia value to compensate for the change in axes. All you need to know is the perpendicular distances from the old axes to the new ones and then apply this formula to each new axis individually:

http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/ParallelAxesTheorem6.jpg

Here we are talking about one axis of the three like the axle of a wheel. Best if the axle passes through the wheel centre, CG or centre of gravity. If it does, resistance to rotation will be the minimum. But it doesn’t have to; the axle could pass through the wheel somewhere else, making an eccentric rotation. These equations tell us how the resistance to rotation changes if we change the location of the axle.

xc, x1 and x2 are three different parallel axes or axles with xc passing through the CG. m is the mass/weight of the component. d is the perpendicular distance between the xc and x1 axes, d2 between xc and x2. Ixc, Ix1, Ix2 are the respective inertia values.

The first equation says that if you know Ixc, the mass m and the perpendicular distance d then you can calculate the inertia value about x1. What happens if you know Ix1, m and d? Well, the second equation show you how to calculate Ixc; but notice the sign is minus. The third equation shows that you must always pass through xc using the reference to Ixc if you want to calculate Ix2 knowing Ix1.

But remember you have to do this for all the three axes, X, Y and Z.

The Composition theorem allows you to craft a component carefully so that it is composed of simpler shapes for which you know the inertia. Then the inertia of the whole is just the sum of the various inertias of the simpler shapes. But, be careful. Normally you know the inertia of a simple shape about axes through its CG. For the Composition theorem to work, every thing must be calculated about the same axes. So you have to use the Parallel Axes theorem first to calculate the inertias of the simple shapes all about the same axes.

The theorem allows you to decompose in certain circumstances too. Why? You might have an awkwardly shaped component. But with luck you might be able to add a couple or so of simple standard shapes to your component to make it easy to calculate the inertia of the whole object. Then, of course, knowing the inertias of the simple objects, all you have to do is subtract those from the composed object to get the inertia of your awkward component. An example would be a good idea here.

The wing of the PZL-104 Wilga is a good one. It does not have any dihedral. So, forgetting about the tricky wing tips, it can be modelled with a simple rectangular block for the inertia calculation which has the standard formulas:
Ixc = 1/12*m*(a^2+b^2)
Iyc = 1/12*m*(a^2+c^2)
Izc = 1/12*m*(b^2+c^2)
But wait a minute! The wing has a positive incidence of 1.146 degrees. So it is an inclined rectangular block which has a much nastier set of formulas if only we could derive them.

But if we add two equal triangular sections above and below the wing rectangular block, the composed shape returns to the simple rectangular shape where we can use the above formulas. Knowing now the inertias of the whole, we can use the Composition theorem to take away the inertia values for the triangular sections and we are left with what we want, the inertias of the inclined block which models better the Wilga wing.

http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/PZL-104wing.jpg

That would be fine if only we knew what the inertias were for the triangular sections. You see, they are not standard with published formulas. So what to do?

Well, if you stick the two triangular sections together, forgetting about the wing block for a minute, you get another rectangular block. It’s thinner; but has a standard shape with the standard published inertia formulas shown above. So we can re-use the Composition theorem.

Let’s get serious now. To see how it’s done, look at this section of an MS Excel spreadsheet which was used to calculate the inertias for the whole wing. This bit with a border acts as a sort of sub-routine just to calculate the inertias using composition/decomposition of a right angled triangular section.


http://i648.photobucket.com/albums/uu207/MikeHoulder/Aerofly%20Parameters/TriangularXLS2.jpg

Column A has the names of variable and constants. Column B has their calculated values; each variable on a different line is a different variable even if it has the same name as an earlier line. Column C gives the dimensions of the variables. Note the ‘m’ here is an indication of a metric length dimension. The actual length values are given in centimetres. Column E has the text of the calculation applied on each line in column B.

The first part (lines 47 – 56) calculates the inertias and centroid (CG) of the two triangles composed as a rectangular block. I shouldn’t really use the word ‘centroid’; it applies strictly to shapes without mass. But it’s a short and snappy word.

The two triangular sections are equal. And rotating about the centroid of the rectangular block, their inertias must also be equal. So, just halving the rectangular values gives the values for a single triangular section. This done in lines 59-63. But half the inertia of the rectangular block could be any shape. It is the re-calculation of the inertia about the centroid of the triangular section that makes it distinct. So lines 64-67 calculate the centroid of the upper triangular section.

Now with lines 68-71, we are calculating using Pythagoras the perpendicular distance between the rectangular centroid and the triangular one. Great, now we can just apply the Parallel Axes theorem to derive the triangular section inertias as in lines 72-75. Notice the sign is minus as we are returning to the triangular centroid.

The triangular sections composed into a rectangular block could have been drawn anywhere with any origin, provided that the dimensions were the same. So these inertias values apply to any triangular section of these dimensions provided they relate to axes which pass through the centroid of the section.

So these values can be used to calculate the inertias of the PZL-104 wing itself, using decomposition, as shown in the attached MS XLS file.

I got myself all fussed up because the values I was calculating did not produce any sort of correspondence with the actual InertiaLength values for the aircraft models as shown in the model editor. But Marc Borchers’ post quoted above clearly indicates that the InertiaLength parameter values are not automatically generated by AF5.

In the two models I have studied, the actual values given by the authors appear to be the enclosing rectangular block for the wing without dihedral and without any real evaluation of the inertias. Fair enough, this parameter was designed to allow authors or users to adjust their estimate of the inertias. I just think that, for me and the models I want to make, getting a better value is important.

I’ve tried to make my maths arguments as clear as possible. I hope they are correct. I’ve stared at them for a great amount of time and have not found any (more) errors. It will be great when Marc’s AF5 inertia function is available and I can compare my values with his. I hope my face will not be very red.

When Marc’s function is available, I will continue to produce a system which will compensate for the lack of variable density in his function. For the moment though, I think I’ve finished this work.

My best wishes to all
Mike