Jump to content

[1.3.1] Ferram Aerospace Research: v0.15.9.1 "Liepmann" 4/2/18


ferram4

Recommended Posts

Here's how I think of it: The blue dot does indeed factor in all the aerodynamic forces. This is why fuel tanks change your CoL/Aerocenter (I like that. I'm using it now) in FAR. They don't produce lift, but they do produce drag in a crosswind.

As you're ascending, and lets say Jeb jumps out, and pushes your rocket off-center a bit. this motion will rotate around the CoM. In other words, the CoM won't move at all, but the opposite ends of the rocket will move quite a bit. If your aerocenter is above the CoM, once you go past 0 angle of attack, the drag caused by your speed through the air will want to increase your angle of attack further. If your aerocenter is behind the CoM, the drag forces will push it back into line, making the rocket self-stabilizing to an extent. This is how I've come to understand the workings through many single-stage-to-terra-firma designs. The same principles apply to spaceplanes, which is why huge, narrow delta wings and large canards don't work well. Once I started designing my planes to take advantage of that self-stabilization, I had much better luck.

Think of it this way: What's easier to do, balance a long pole by holding it at the bottom, or by holding it at the top? The directions are reversed, because your hand is serving as the thrust and not the drag, but the principles are the same. I can draw you some pictures with physics on them if you wish, but I think you've got the hang of it even without my post. I just find sometimes that people benefit from my weird style of explaining things.

Another example would be the historial ancestor of rockets: The arrow. We've had thousands of years* to sort out the arrow, and the design is pretty much a heavy thing at the front, and some wide things at the back.

*I have no idea

As to the metrics, here's my terrible explanation

On the "static" tab, set the upper bound to about 80, the mach number to .2, and click "sweep AOA"

This will show you various things and how they change as your angle of attack increases. The blue line, which is the coefficient of lift, will rise until the point of stall, and then fall off sharply. The yellow line, Cm, is the pitching moment, and this describes how much your plane/rocket wants to pitch. Ideally, you want this to be negative and decreasing: This means that as your angle of attack increases, it becomes more difficult to pitch the plane. What results from this is that the further you go from prograde, the more your craft wants to point itself back to prograde. The alternative, a positive and/or increasing Cm, causes plane/rocket to suddenly flip straight up and inevitably go into a flat spin for even the slightest divergence from 0 AoA. Of particular desirability is for the Cm to decrease further in a stall. This means that the plane naturally recovers from stalls very readily.

Next, do the same thing again, but set the mach number to 2, or 5, or whatever you'd like. This will show you how your craft will behave at supersonic speeds, where the characteristics change a bit. Many planes that are quite unstable at subsonic speeds will become much more well-behaved above mach 1.

Hope that helped!

Edited by Torminator
Link to comment
Share on other sites

Well, I got it working, and flawlessly too but the fix was so simple i'm almost ashamed to admit it.

It just needed payload fairings =P

I guess I should feel good though since it's a large, sophisticated rocket powerful enough to put a small moon into orbit. This makes it painfully obvious after Tormintors explanation:

Test payload

Production payload

Production payload w/ fairings

Actual rocket w/ specs

Link to comment
Share on other sites

@ferram, it's not that issue I'm afraid--these rockets were close to hand for the screenshots, but I've verified it with totally stock rockets too (and made sure the oscars have size-0 nodes, etc.). I can send you pure-stock craft files if you want.

Link to comment
Share on other sites

Regarding that idea about hotkeys for control systems, I wonder if adding buttons to indicate their state and toggle them to the main window would be a simpler and maybe even more useful improvement:

lGrlTQq.png

The full-sized window on the right is in my opinion too big to keep open constantly, unlike the main window which is small and contains some useful information.

Link to comment
Share on other sites

@NathanKell: Sure, that would be cool. Sorry about not realizing it was you with the rocket issue, it was very late when I made that post. :)

@a.g.: I really like that idea; probably keep some version of the larger window (slimmed down, of course) to allow people to access and modify the gains for each system. And keep a button that opens the help window, of course. Would you mind PMing me the code changes so I can implement them?

@Van Disaster: No, the Center of Pressure is a totally different thing that happens to be a lot less useful in stability and control than the Aerodynamic Center. The Center of Pressure is the location where all aerodynamic forces can be modeled as lift and drag forces (that vary with angle of attack) and no other forces or moments whatsoever. Any asymmetry in the vehicle's design that would cause a pitch-up or pitch-down moment to be produced (like a negative incidence angle on the tail to help pitch the plane up) will cause the location of the Center of Pressure to shift as a function of angle of attack, sometimes outside of the vehicle itself. The Aerodynamic Center does not move (at least not significantly) as a function of angle of attack (unless stalling occurs), making it much easier to use in aircraft design.

The Center of Pressure is a somewhat archaic aerodynamic property; I've only seen it used in old data from the time of Otto Lilienthal, Samuel Langley and the Wright Brothers back before most of the basic work in aerodynamics had been done.

Link to comment
Share on other sites

No problem! :)

Here you are.

Stock + Proc Fairings, which I trust is OK!

(I had remotetech antennae on when I tested it, but all were behind the fairing and have been stripped from the craft files I'm uploading.)

https://www.dropbox.com/s/r556i28o26k1gbo/625Test.zip

FTest0 is the 0.625m rocket. NOTE: I had to change the node size of the Oscar-Bs to 0 via an addition to your CFG, since stock KSP has them at 1. Also, the AC (CoL ;) ) problem is there with a vengeance--the upper stage is uncontrollable at low altitude due to the issue with what appears to be no drag for the engine (!). I had to mess with the balance between stages and my ascent path to make sure it only fired at high altitude.

FTest1 is something with close to identical staging, but to do that I had to use the mini radials in addition to the LV-909, which messes up drag (Cd at liftoff jumps from 1b's [below] 0.015 to 0.022 or so).

FTest1b is something with near-identical liftoff TWR, but different staging--there you really see the difference in drag!

Edited by NathanKell
Link to comment
Share on other sites

Ah, another question. How does FAR handle parts with multiple MODEL {} blocks? IMS you're calculating taper and width straight off the model, right? So do you just iterate over all vertices or something to get bounding boxes? Because otherwise I could see how multiple-model parts would be...problematic. Or do you just recurse over all models?

Link to comment
Share on other sites

@NathanKell: Okay I'll look at those.

It should take care of all of the MODEL {} blocks, unless "Part.FindModelComponents<Transform>()" doesn't actually return each and every model transform for all the models assigned to the part.

Link to comment
Share on other sites

Cool, thanks!

For parts that clip models together, do you calculate drag per model, or drag based on the (CSG) union of the parts? Because if the former...bad news for, e.g. the ReStock pack! (Example: Mk2 cockpit inside a Mk2 adapter is used for the Mk2b cockpit: it makes a nice, aerodynamic widebody cockpit great for lifting bodies...unless it suffers double the drag.)

Link to comment
Share on other sites

Do we know yet what causes the off-center aerocenter on planes with wings that have been placed with symmetry? Again, I can say for sure that that except for the central fuselage and middle engine, every piece was placed using symmetry.

YTpynhv.jpg

Strutted the bejeezus out of the wings, launched, then made sure that no parts were being shielded by the cargo bays, and yes, the plane did roll subtly to the left as the blue dot in SPH would indicate. I find I can sometimes fix this by undoing/redoing, or by re-placing each part, but sometimes that just makes it worse.

Edited by Torminator
Link to comment
Share on other sites

@NathanKell: It calculates drag for each part, not for each model.

The pictures don't show any issues as far as I can tell; that is the way the aerodynamic center is intended to be displayed for a rocket, with the vector pointing in the direction that the force will increase in with a tiny increase in angle of attack.

@Torminator: Honestly, I have no idea where the aerodynamic center bug comes from; it seems incredibly inconsistent and no one has been able to produce a simple design that suffers from the issue without it turning into a massive and complicated ship. I've also never seen a design where the source of the error couldn't definitively be said to not be the cause of some minor asymmetry either (not on the level that you would be able to notice, but as a result of floating point errors interfering with the design). I also can't separate out FAR's aerodynamics from KSP's asymmetric joint strength bug.

A fix for this probably isn't going to be in the works until whenever FAR 1.0 comes out, since that will include completely reworked aerodynamics (much better than what is there now) and in the course of rebuilding everything hopefully the bug won't reappear.

Link to comment
Share on other sites

Do we know yet what causes the off-center aerocenter on planes with wings that have been placed with symmetry? Again, I can say for sure that that except for the central fuselage and middle engine, every piece was placed using symmetry.

Does saving and reloading the craft affect this at all? If not, can you upload the actual craft file? Also, what is the red sphere for?

Link to comment
Share on other sites

Do we know yet what causes the off-center aerocenter on planes with wings that have been placed with symmetry? Again, I can say for sure that that except for the central fuselage and middle engine, every piece was placed using symmetry.

http://i.imgur.com/YTpynhv.jpg

Strutted the bejeezus out of the wings, launched, then made sure that no parts were being shielded by the cargo bays, and yes, the plane did roll subtly to the left as the blue dot in SPH would indicate. I find I can sometimes fix this by undoing/redoing, or by re-placing each part, but sometimes that just makes it worse.

One thing that might be worth trying, which has at least at one point worked for me (although this was in KSP 0.20.2), is to pick up a non-symmetric part close to the root (the S2->S2W adapter right behind the cockpit seems a good candidate, if the cockpit is your root), and then reattaching it. This has some times cleared up symmetry bugs for me. Please note: You need to do this any time you change anything symmetric. Also, stay away from 'Recalculate CoL'. Those will bring the problem back.

Link to comment
Share on other sites

Do we know yet what causes the off-center aerocenter on planes with wings that have been placed with symmetry? Again, I can say for sure that that except for the central fuselage and middle engine, every piece was placed using symmetry.

YTpynhv.jpg

Strutted the bejeezus out of the wings, launched, then made sure that no parts were being shielded by the cargo bays, and yes, the plane did roll subtly to the left as the blue dot in SPH would indicate. I find I can sometimes fix this by undoing/redoing, or by re-placing each part, but sometimes that just makes it worse.

may I ask you what is this red marker ? and the icons below your screen ?

Link to comment
Share on other sites

@NathanKell: It calculates drag for each part, not for each model.

The pictures don't show any issues as far as I can tell; that is the way the aerodynamic center is intended to be displayed for a rocket, with the vector pointing in the direction that the force will increase in with a tiny increase in angle of attack.

@Torminator: Honestly, I have no idea where the aerodynamic center bug comes from; it seems incredibly inconsistent and no one has been able to produce a simple design that suffers from the issue without it turning into a massive and complicated ship. I've also never seen a design where the source of the error couldn't definitively be said to not be the cause of some minor asymmetry either (not on the level that you would be able to notice, but as a result of floating point errors interfering with the design). I also can't separate out FAR's aerodynamics from KSP's asymmetric joint strength bug.

A fix for this probably isn't going to be in the works until whenever FAR 1.0 comes out, since that will include completely reworked aerodynamics (much better than what is there now) and in the course of rebuilding everything hopefully the bug won't reappear.

I understand. What is this Asymmetric joint strength bug, though? I have not heard of this, but it would explain some issues I've had.

Does saving and reloading the craft affect this at all? If not, can you upload the actual craft file? Also, what is the red sphere for?
One thing that might be worth trying, which has at least at one point worked for me (although this was in KSP 0.20.2), is to pick up a non-symmetric part close to the root (the S2->S2W adapter right behind the cockpit seems a good candidate, if the cockpit is your root), and then reattaching it. This has some times cleared up symmetry bugs for me. Please note: You need to do this any time you change anything symmetric. Also, stay away from 'Recalculate CoL'. Those will bring the problem back.
may I ask you what is this red marker ? and the icons below your screen ?

Reloading works sometimes, but has proven stubborn on this craft. I've also tried re-placing the first non-root part in the tree, as this has worked before, but again, no dice.

The red marker is part of the RCS build aid plugin, and as far as I am aware, displays your center of mass with all fuel drained. The icons on the bottom are part of the part catalog plugin, which organizes your parts menu and does nice things like letting you scroll with the scroll wheel instead of clicking arrows over and over.

If anyone's curious, I can upload the craft file. I just need to clean up the non-B9 mods first.

Saving, opening a new craft and reloading seems to fix the off-center bug for me.

Not sure it is caused by FAR.

To tell you the truth It's been so long since I've played without FAR that I can't say for certain, but I don't recall ever having this happen with stock, or at least, stock's mechanics never caused it to have an effect.

What is the difference?

For example, the re-stock pack uses .cfg edits to combine several stock models into a single new part.

Link to comment
Share on other sites

@p1t1o: It combines all the models for each part into one "super-model" to calculate the geometry and drag characteristics. If this weren't done, you could get strange effects if a part's model(s) includes multiple meshes, resulting in a part that would be relatively streamlined as a whole being considered to be a drag-heavy monster of a shape.

@Torminator: IIRC, the exact bug is that parts placed with symmetry do not have identical joint strengths; one part will flex more and break more easily than the other. A good way to see this would be to make a simple plane with long wings that aren't reinforced with struts; one should flex a great deal more than the other.

Link to comment
Share on other sites

A fix for this probably isn't going to be in the works until whenever FAR 1.0 comes out, since that will include completely reworked aerodynamics (much better than what is there now) and in the course of rebuilding everything hopefully the bug won't reappear.

May I ask why are you re-writing the aerodynamic code and how is the new approach different from the current one?

BTW how's the guide going?

Link to comment
Share on other sites

The code rewrite is for a couple of reasons. The first is that I think there are a great number of inefficient parts of the current FAR code that could be removed if it was rebuilt from the ground up. The second is the I have a better understanding of how C# works and how the code works with KSP, so rebuilding the code with that in mind will allow for greater efficiency. The third is that I want to switch from a part-based aerodynamic model to one that groups parts into bodies and wings and determines the aerodynamics of the aggregate instead, which should allow me to implement more features (like proper induced velocities, some multithreading and more real-life accurate simulations) while keeping the CPU workload down.

Basically, the idea is that if you have a 200-part plane, with a central fuselage, a wing, horizontal and vertical tail, FAR will only have to do the heavy math on 6 aerodynamic objects (fuselage, each half of the wing, each half of the horizontal tail, and the vertical tail) and then that will be put into temporary look-up tables used by the correct parts so that FAR doesn't cause as much physics-based lag. I also think that the analysis for the look-up tables can be done in a separate thread so that it doesn't cause any lag at all.

The guide is probably going to come with the new version, since I'll have a good opportunity to write it as I code so that everything is clear as day.

A revision is on the way for some bugs and should be out soonTM.

Link to comment
Share on other sites

Thank you very much for all the effort. You are really a treasure to the community.

So with the new approach are you going to make features like camber and airfoil thickness, or even a better model of lifting body?

Also i'm curious about whether a leading-edge flap is calculated correctly in the current version.

Link to comment
Share on other sites

Two things;

First, does anyone know where I could get a mod with half-size jet engines and fuel tanks? If I try to make an aircraft with the engines mounted underwing, in pods, using the huge stock one meter nacelles or fuel tanks looks really goofy. I don't want to download B9 (the massive number of extra parts annoys me), just want a simple half-size parts pack. Alternatively, if someone knows how to use the scaling factor to create the correct parts, that would be great.

Second, @ferram4, would it be possible to make CoL and CoM indicators appear in-flight? When I'm trying to re-enter my spaceplane, it's annoying to have to guess where my CoL is in relation to my CoM. If there was an indicator that helped me shift the CoM in preparation for re-entry, that would be incredible. it would make re-usable spaceplanes with heatshields much more viable. (and fun)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...