Jump to content

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


ferram4

Recommended Posts

Since this precludes the use of other mod parts (if you want to preserve the drag model properly) how difficult/easy is it for the average user to integrate these changes into their mods of choice?

Link to comment
Share on other sites

Wow. Okay, long list of answers:

@cardgame: Nose cones have done that since the drag fix was first implemented. Currently (because it's really simple) the parts add a fixed amount of drag based on the number of open stack nodes. Try building a plane with two fuel tanks on the wings. Now put nose cones on one, and none on the other. Start forward, and it'll start to yaw towards the one with nose cones (mass offset) until it gets up to speed, at which point it'll yaw the other way (more drag). Or try building a plane with no nose cones, and then add them and compare. If I remember correctly, the large nose cone is better for slower speeds, the combination of smaller nose cone with the adapter is better for supersonic stuff.

@theflyingfish: Request granted retroactively through all versions. :P

@Volt and Mariner: It doesn't automatically take effect because there are a large number of static quantities the need to be known about the wing before the lift can be properly calculated. There is a part.cfg template in the readme. You can look at the existing part.cfgs and try to extend that, it uses Prandtl's Lifting Line theory for most of the calculations, or you can read below at my answer to Xune, since he asked something similar.

@requimar: There is a large button at the top of the main control panel that should minimize it all. It also should save positions. I may have broken something by accident... I'll look into that.

You do not need the readout for anything other than the flaps to work (I should make that more robust). It does reduce the calculations though, since the wing parts can just grab the Mach number from the cockpit part.

@colmo: The reason everything has changed so much is that your wings are now calculating how their combined presences affect lift. CoM and CoL have to be almost right next to each other, which is much more realistic; the 747 had a length of ~70.6m, and the difference between CoL and CoM positions was ~1m at all times, accounting for fuel usage. I'm planning on adding a few tutorials once I can figure out how to do them in game, just to handle things like this.

@Xune: This is a long answer and gets into how it works, so bear with me. It actually isn't difficult to set any of this up at all, I just think an explanation is deserved for why it's set up this way:

The plugin is currently set up entirely through PartModules.

PartModules require the part to be active to constantly run code on them.

The drag model, therefore, requires a part to be active for that part to calculate its drag.

Engines are only active when they can draw fuel, and fuel tanks are only active when the get a fuel request. This means that an engine creates no drag if it is not activated or runs out of fuel. A fuel tank creates no drag until an engine or fuel tank asks it for fuel, and then creates no drag after it runs dry. (Very large DERP)

Aerodynamic and structural parts (wings, empty fuselages, nosecones) can be force-activated, as can the cockpit. So those can run the code.

The work around:

Declare one part a "controller" (actually an instance of the class BasicDragModel) that runs the calculations and applies them to all the parts that can't do it themselves. So the cockpit (for example) can run the drag calculations for the fuel tanks, the engines, the decouplers, etc. If the "controller" part is destroyed, the responsibility is transferred to another part to continue the job, but you need a part with that value to make it work. I would have changed the fuel tanks themselves, but I kept breaking something, so no go there.

So, that in mind, here's what to care about:

With fuel tanks and engines it figures out the necessary values based on mass (for not fuel tanks) and dry mass (for fuel tanks) to get an idea of the surface area, and it assumes that they are all cylinders (not an unreasonable assumption). You don't need to do anything at all.

For non-lifting aerodynamic parts, you need to add this to the end of the config file:

(copied from Mk1 Cockpit part.cfg)

MODULE

{

name = BasicDragModel

DragType = cone

S = 4

}

Where DragType can be cylinder, cone, nosecone, tail pylon, or commandpod. Make sure your case is right.

S is the surface are of the part. I used 4 for the Mk1 Cockpit and 16 for the Mk1-2 Pod for reference. If someone has more accurate numbers, I'll gladly implement them.

This is complicated and you need (almost) every value, so let's go:

(Copied from structural wing part.cfg)

MODULE

{

name = WingAerodynamicModel

S = 3.06

AoAmax = 30

MAC = 1.7

b_2 = 1.8

AR = 2.12

e = 0.7

MidChordSweep = 45

IsSmallCtrlSurf = 0

maxdeflect = 0

TaperRatio = 0

}

S is the surface area of the wing part. Calculate it from b_2 * MAC.

AoAmax is deprecated in this form. I just left it there because I'm lazy. :P

MAC is the mean aerodynamic chord (I apparently screwed up and this is actually Standard Mean Chord. Oops). This is the average front-to-back distance of the wing. (chord is the distance from an airfoil's leading edge to trailing edge)

b_2 is the semi-span. It is the distance from the root of the wing part to the tip of the wing part (remember: full wingspan requires two wing parts here, we're working with only 1)

AR is aspect ratio. Calculate it from S^2 / b_2.

e is oswald's efficiency. It increases drag. Theoretically varies from 0 - 1, making it zero will result in divide by zero.

MidChordSweep is the angle the wing is swept, measured at 50% of the chord. Imagine a line that splits the wing in half, splitting the wingtip chord in half and the wing root chord in half. Measure the angle between that and perpendicular, in degrees. As an example, the delta wing part has a value of 22.5, the swept wing has a value of 10, the wing connector has a value of 0.

IsSmallCtrlSurf takes 0, 1, 2 for control surfaces 0 indicates a normal wing part or something like the canards, where it sticks out from the fuselage or the end of a wing. 1 indicates something like the standard control surface which is stuck on the back of a wing. 2 is a bandaid fix for the small control surface part which otherwise would deflect backwards, but does produce the proper forces.

maxdeflect is the default deflection amount for a part. 0 for non-control surfaces, anything else for control surfaces.

TaperRatio is the ratio of tip chord to root chord. Swept wing has a value of 1, structural wing has value of 0, standard canard has value of 0.3. Pretty self explanatory.

I measured a large number of the wing values with the sciency climbing antics of Jeb, Bill and Bob, so they are straight from the game.

That in mind, it's easier to set up a non-lifting part than a lifting part, but it isn't that bad.

Edited by ferram4
Link to comment
Share on other sites

The deploy-able flaps are to help get your massive planes off the ground at lower speeds, before they go off the end of the runway. All real-life planes have this since we'd prefer to take off below Mach 0.4. :P You'll need one of the cockpits with the control panel to make it work, and by default, "9" increases the deflection and "0" decreases it. There are 3 levels of flap deflection, and by default it starts at 2 (with zero being no deflection).

Just remember that flaps create more lift where they are, so if they're placed too far behind the center of mass, the plane might not be able to pitch up.

Link to comment
Share on other sites

Thanks for the mod, much needed!

Just having some troubles, overall it seems that the engines are underpowered. But it might have just been me, so I tried a couple of the example aircraft. Some of them had wrong cg/col positioning and the control surfaces was not setup. Fixed those problems and tried flying them, but I could only fly the FAR Slothful Hummingbird and the FAR Javelin Racer II, with any success (didn't try all of them though). Got them up to 2.6 and 1.03 mach respectively. The others just didn't fly well or stalled way to easily, as in the case of the su-35 which just felt like it didn't have enough power and stalled when trying to take a turn.

So is it just me or is this just like it's designed to be like?

Link to comment
Share on other sites

Thanks for the mod, much needed!

Just having some troubles, overall it seems that the engines are underpowered. But it might have just been me, so I tried a couple of the example aircraft. Some of them had wrong cg/col positioning and the control surfaces was not setup. Fixed those problems and tried flying them, but I could only fly the FAR Slothful Hummingbird and the FAR Javelin Racer II, with any success (didn't try all of them though). Got them up to 2.6 and 1.03 mach respectively. The others just didn't fly well or stalled way to easily, as in the case of the su-35 which just felt like it didn't have enough power and stalled when trying to take a turn.

So is it just me or is this just like it's designed to be like?

Ferram changed the thrust values to be more realistic. The jet engine values were cut by about a third.

So, as an update on progress, I've figured out a way to override the original drag model on fuel tanks and engines and so next update all remnants of the old drag model should be gone. (HOORAY!!!) It'll be up today or tomorrow, since I'm trying to balance the engines and drag to something reasonable. So far, I've got the TurboJet engine making ~50 kN thrust (as opposed to the 150 kN default) and two of them can sustain a plane at Mach 2.8. I need to work on the airflow values so it isn't overpowered at ground level. I also want to tune the Basic Jet Engine so it can break the sound barrier, but only if you design and fly your plane just right.

TL;DR:

Next update is gonna be totally awesome! :D

Link to comment
Share on other sites

@Boojah:

Yep, it's designed to be that way. The jet engines were originally on-par with the rocket engines, which just isn't realistic--I'm sure you've seen people use them as first-stage engines for rockets, if you haven't done it yourself. Also, the Su-35 is very slightly unstable--as the real life one is--so if you want to fly it I would advise turning on the pitch damper and setting the gain value up to ~3. The Su-35 should benefit a great deal when I implement a leading-edge slat part so that it doesn't stall as easily.

So, for everyone interested:

I found a bug in the CoL calculation (which is used not only for the editor but is also used to place forces on the wings) where the CoL on the swept wing and tail fin would somehow be offset the wrong direction from the origin (and so not in the middle of the wing, as it should have been). This should make the lift and drag model more consistent (though it isn't game breaking, as no-one has complained yet). I've also been able to recreate the bug that narcillian found in this post, so I'm looking into what's wrong there. I'm also going to add some code in so that biplanes have their upper and lower wings interfere with each other. Which means that biplanes will not be as effective at lifting as they were before.

Link to comment
Share on other sites

I see!

However my opinion is still that they are too weak. For example, many fighter jets easily break the sound barrier at sea level, while I cant get more than mach 0.5 with the FAR Slothful Hummingbird. Also to note, 150kN thrust is very similar to the engine in sr-71 blackbird, so the value itself isn't unrealistic. Regardless of actual values, two engines and a lightweight airframe should do mach 3.2 like the blackbird, in my opinion :)

A question, does ksp simulate the exhaust velocity of the jet engines?

Because a "basic" engine could have more static thrust, but too low exhaust velocity to go much above mach 1, compared to a ramjet style engine that has less static thrust but keeps going past mach 3.

Actually to me, 3 types of engines are needed:

Turbofan (airliner engine), for heavy planes that are subsonic. High static thrust but low exhaust speed.

"normal" jet engine perhaps with afterburner, for lighter "fighter jet" style planes. Lower thrust but higher exhaust speed. Still viable in a wide range of operation from sea level to "pretty high" (unsure if the ksp atmospheric model is comparable to the earths, but like 16 000 m.)

Then the ramjet, which plain sucks a low altitudes and speeds, but has a very high exhaust velocity enabling speeds above mach 3.

Soo... One more suggestion :D

Was flying along trying to push the mach numbers ever higher, and realized all I did was trying to find the best altitude with full throttle all the time. Found that it was very sensitive and I didn't think it was all that fun. So my suggestion here to make things more interesting is adding overheating as a element. Basically trying to take of at 100% will blow your plane up, so you have to dial it back a bit and beware of the temperature and wait for some more speed for cooling. Only when in the correct altitude/speed range can you really floor it! But then if you are going too fast (over 3.5 or something) you start to heat up again, so that the speed limit isn't really how much thrust you have but your cooling capacity. In my mind, this will make pushing ever greater speeds more exiting because if you're not on top of it, the plane will blow to bits. Of course this is mostly only relevant to the ramjet category and perhaps a bit for the "normal" engines. The turbofans should be easy to fly.

Anyway just my 2 cents, and I'm no jet engine expert anyhow so I might just be plain wrong :)

Thanks!

Link to comment
Share on other sites

I see!

However my opinion is still that they are too weak. For example, many fighter jets easily break the sound barrier at sea level, while I cant get more than mach 0.5 with the FAR Slothful Hummingbird. Also to note, 150kN thrust is very similar to the engine in sr-71 blackbird, so the value itself isn't unrealistic. Regardless of actual values, two engines and a lightweight airframe should do mach 3.2 like the blackbird, in my opinion :)

Sorry, but wrong on both points.

1) Most fighters are incapable of supersonic flight at sea level unless extremely light on fuel and with nothing attached like weapons or drop tanks. They only become really supersonic capable at altitudes above 5,000 feet MSL, and then only marginally until well into the stratosphere (30,000+ feet MSL).

2) The SR-71's J-58 engines in full afterburner (which none of the KSP jet engines have afterburner) are capable of 151kN. Without afterburner, they produce 120kN. Additionally, their SFC to reach this is 0.4kg dry and 0.86kg wet, much higher than what the KSP turbojet consumes.

Link to comment
Share on other sites

Since it's being mentioned I'll just throw in that the SR-71 is incapable of supersonic level flight. To break the sound barrier it has to enter a dive under full power, then re-ascend once it has less drag and more thrust from being significantly above mach 1.

Link to comment
Share on other sites

A question, does ksp simulate the exhaust velocity of the jet engines?

Because a "basic" engine could have more static thrust, but too low exhaust velocity to go much above mach 1, compared to a ramjet style engine that has less static thrust but keeps going past mach 3.

Actually to me, 3 types of engines are needed:

Turbofan (airliner engine), for heavy planes that are subsonic. High static thrust but low exhaust speed.

"normal" jet engine perhaps with afterburner, for lighter "fighter jet" style planes. Lower thrust but higher exhaust speed. Still viable in a wide range of operation from sea level to "pretty high" (unsure if the ksp atmospheric model is comparable to the earths, but like 16 000 m.)

Then the ramjet, which plain sucks a low altitudes and speeds, but has a very high exhaust velocity enabling speeds above mach 3.

KSP's atmospheric flight is missing a ram/scramjet part. The turbofan and turbojet don't gain efficiency with speed the way a scramjet does.

Going off my paltry experience with the XR2 Ravenstar's scramjet orbital ascent, the scramjets should gain efficiency as the dynamic pressure increases, the higher the pressure the better. Their top speed was only limited by the maximum combustion chamber temperature. Their efficiency was awesome. I remember making Cape Canaveral-to-Wideawake global sub-orbital trips in 20 minutes at about mach 20, and gaining around 50% of orbital speed in-atmosphere. (this was two years ago, so I don't remember the figures very well.)

But because of Kerbin's extremely small size (and very skinny atmosphere), I don't think it will be able to support the scramjet-friendly environment we had in Orbiter. The planet is so small and it is so easy to reach orbit that a scramjet ascent isn't really justified.

Link to comment
Share on other sites

The way things are currently set up, I don't see the need for a ramjet part, and certainly not a SCRAMjet, since a SCRAMjet wouldn't be necessary until ~Mach 5-7, which is orbital re-entry / ascent territory, and I really think that rocket engines should be needed for that.

@Boojah: KSP does model exhaust velocity, and this is already appropriately set up for the engines in game. The basic jet engine acts as your "turbofan" engine already; it is capable of supersonic speeds if you really want to go that fast, but it won't be very efficient past Mach 0.8. The turbofan engine (which really should be labeled "turbojet") is already exactly like your "normal" jet engine. I don't want to add a ramjet engine until later though.

I also don't want to add an engine that overheats at full throttle since even though in real life there are engines that are set up like that the reason they're set up like that is so that the engine can always maintain a given level of static thrust regardless of outside temperature and altitude (which isn't too much of a problem here). Besides, too many people would be annoyed with their engines exploding when they're trying to take off.

Soon I'm going to take a look at implementing a version of an intake module and an atmospheric engine module that should help bring the thrust and exhaust velocity values closer to reality. I'll probably set it up like so:

Fuel tanks carry fuel, probably set up to use the specific energy values of Jet-A or Jet-A1

Intakes provide oxidizer, and the amount it can provide is based on ram pressure and the intake power provided by the engine

Engine nacelles burn fuel to the extent they can; this increases pressure inside and provides power to drive intake.

Nozzles actually provide thrust based on difference in pressure from engine part and air pressure.

This should make the actual engine nacelle parts useful and should allow for more varied types of engine design rather than the current "Do I use the small efficient engine or the large and stupid engine?" that we currently have. For example, I envision slapping two engine nacelles back-to-back as a way to increase engine pressure and thus create more thrust with one nozzle, but at the drawback of burning more fuel and increasing the temperature through the nozzle. At that point, the "TurboFan" and "Basic Jet" engines will become supersonic and subsonic jet nozzles, respectively, while the engine nacelles themselves will contain turbofan or turbojet engines.

Link to comment
Share on other sites

I've been playing around with the small control surface, trying to make a small deployable flap however no matter what I change the flap always points up when in use. Rotating it in the hanger doesn't affect it and a standard flap attached to the same craft and wing operates normally. I've compared my cfg to the small control surface and standard flap cfgs to make sure I haven't flipped an axis somewhere but nothing is standing out that shouldn't.

This may be related to the bug you're looking into from narcillian. I've uploaded the cfg file I'm using incase I'm missing something, but I think the problem may lay elsewhere.

http://dl.dropbox.com/u/4030375/part.cfg

Edited by Xune
Link to comment
Share on other sites

Glad you could clear up some of my misconceptions, thanks :D

Sorry, but wrong on both points.

1) Most fighters are incapable of supersonic flight at sea level unless extremely light on fuel and with nothing attached like weapons or drop tanks. They only become really supersonic capable at altitudes above 5,000 feet MSL, and then only marginally until well into the stratosphere (30,000+ feet MSL).

2) The SR-71's J-58 engines in full afterburner (which none of the KSP jet engines have afterburner) are capable of 151kN. Without afterburner, they produce 120kN. Additionally, their SFC to reach this is 0.4kg dry and 0.86kg wet, much higher than what the KSP turbojet consumes.

1) Interesting! I just assumed (shouldn't assume so much I guess :D) that since I've seen videos of f-14 and such do it, that most other jets can do it as well. Anyone have a .craft which can do this btw?

2) I don't really mind a high SFC, I don't have enough patience to fly very long anyway!

Since it's being mentioned I'll just throw in that the SR-71 is incapable of supersonic level flight. To break the sound barrier it has to enter a dive under full power, then re-ascend once it has less drag and more thrust from being significantly above mach 1.

Wow did not know! If you have proper sources I suggest you write something on the wiki page, read it all but it didn't say anything about that! (Not doubting you, did read about it on some other webpage)

So is there a .craft for a mach 3+ aswell, or perhaps just some pointers in constructing one?

@Boojah: KSP does model exhaust velocity, and this is already appropriately set up for the engines in game. The basic jet engine acts as your "turbofan" engine already; it is capable of supersonic speeds if you really want to go that fast, but it won't be very efficient past Mach 0.8. The turbofan engine (which really should be labeled "turbojet") is already exactly like your "normal" jet engine. I don't want to add a ramjet engine until later though.

I also don't want to add an engine that overheats at full throttle since even though in real life there are engines that are set up like that the reason they're set up like that is so that the engine can always maintain a given level of static thrust regardless of outside temperature and altitude (which isn't too much of a problem here). Besides, too many people would be annoyed with their engines exploding when they're trying to take off.

Soon I'm going to take a look at implementing a version of an intake module and an atmospheric engine module that should help bring the thrust and exhaust velocity values closer to reality. I'll probably set it up like so:

Fuel tanks carry fuel, probably set up to use the specific energy values of Jet-A or Jet-A1

Intakes provide oxidizer, and the amount it can provide is based on ram pressure and the intake power provided by the engine

Engine nacelles burn fuel to the extent they can; this increases pressure inside and provides power to drive intake.

Nozzles actually provide thrust based on difference in pressure from engine part and air pressure.

This should make the actual engine nacelle parts useful and should allow for more varied types of engine design rather than the current "Do I use the small efficient engine or the large and stupid engine?" that we currently have. For example, I envision slapping two engine nacelles back-to-back as a way to increase engine pressure and thus create more thrust with one nozzle, but at the drawback of burning more fuel and increasing the temperature through the nozzle. At that point, the "TurboFan" and "Basic Jet" engines will become supersonic and subsonic jet nozzles, respectively, while the engine nacelles themselves will contain turbofan or turbojet engines.

Ah so the ksp engines do behave like I thought they should :) Must fly some more and learn to fly them better I suppose! You guys talked about SFC and efficiency, aiding understanding of those things in flight would be a fuel rate meter or some other measurement of fuel consumption.

Good reasons on the heat issue! The fuel meter would be a better incentive to not just floor it all the time.

The plans on the different engine parts sounds excellent, really brings a lot of customization enabling planes of wider range of sizes! Making a long and extra powerful engine is great, I don't really like to have too many engines.

Link to comment
Share on other sites

Boojah: If you want to get to Mach 3, build a smallish craft, that is very sleek and aerodynamic looking and take time getting it up to speed. You need to slowly push the plane higher up into thinner atmosphere while trying to keep the engines getting enough air to run.

Xune: I looked into what you were doing, it turns out that the class FlapAndSlatModel was not set up to handle the fix for the deflecting backwards bug... so I went and rewrote it quick and made a more robust solution that doesn't require anything in the part.cfg. As a reward, you get a new small flap part. Oh, did I forget to mention that version 0.4.2 is out? :P

Link to comment
Share on other sites

I wish you could add an indicator while inside the hangar, to show which part is what, much like the greenish glow ORDA uses for his decouplers.

That would help people identify the parts for the different controls (pitch, yaw, rudder etc). Especially good for downloaded craft files, or when reloading a craft you build some time ago (unless you remembered to name the controls while building of course).

Another thing is that the control IDs confused me a bit. The R you have for roll made me think it was for rudder instead :)

Ah well , minor nuisances aside, the whole mod is just AWESOME... and YAY for the little flapper addition

Link to comment
Share on other sites

@Thourion: I did not know it was possible to do that. It was simple to implement, and thank you for pointing it out. I wish I had that earlier.

@Thobewill10: Yep! I believe there is a post I made earlier that goes over it in a little more detail.

Link to comment
Share on other sites

Okay, update for everyone.

I found a nasty bug that caused negative drag on wings at very high mach numbers (really only occurred during re-entry, but that's when we want aerobraking, so it's important), so I've fixed it and put the v0.4.2.1 revision up. This bug was probably due to the optimization of nonlinear supersonic flow, which probably needs some more tweaking. That said, if anyone else happens to like bringing space shuttles or winged missiles down from orbit, I would greatly appreciate any and all data that anyone can come up with this. Sorry to anyone who ran into this bug. :(

To make up for it, you get the feature Thourion brought up.

Edited by ferram4
Grammatical errors and clarity
Link to comment
Share on other sites

One of the most usefull thing in this mode is the dynamic control adjustment!

Also,here is a little advice:do NOT use the flaps when going on supersonic spedd,I have tried that for some... scientifics experiments on the spuersonic shockwave(in reality,it was just for the fun).You could face with some minor structurals damages.

Edited by goldenpeach
Link to comment
Share on other sites

Wow, this is a treasure.

I have a couple things to ask, but I'll wait until I have acquainted myself with this. Just one thing for now: you say that there isn't much room for ramjets or similar engines because the mach range is a bit constrained on Kerbin, and this is true. But, have you considered just lowering the speed of sound to, say, 250 m/s? Everything is "scaled" on Kerbin anyway...

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...