Sign in to follow this  
ferram4

[0.90]NEAR: A Simpler Aerodynamics Model v1.3.1 12/16/14

Recommended Posts

The real kicker is that in KSP, drag decreases with density, but jet thrust does not. That is the key problem with KSP's jets.

Someone should make a counterpart to AJE as NEAR is to FAR: SJE. Simple Jet Engines. It would simply vary jet engine thrust based on density.

Share this post


Link to post
Share on other sites

@camlost: The new AJE solver should allow more accurate determination of efficiency and thrust at not-full-throttle thrust, and will also simulate transient effects inside the engine. As a result, the spooling up won't be done from outside, it will be an intrinsic part of the engine simulation. As a nice consequence of that, multiple spool engines can be simulated as well. A further consequence of modelling transient effects is that compressor stall / surging is a thing that can happen, which should make for a fun time for users. Probably also going to include a realistic startup sequence as well, so engines that get shut down will either need to draw ElectricCharge to run a starter to get them running or will need a sufficient amount of air being rammed in the front to get it going.

The plan (that I have so far) is that this will allow procedurally generated jet engines rather than requiring purely outside definitions.

I've done stuff similar to this for school, at least on the scale of what AJE currently does. I found a paper talking about using a transient model to model the performance of a J85, so I'm going to look into rebuilding their model and use that, but probably with some changes to make it easier to use / less accurate, but faster / less likely to explode if given bad inputs.

@Renegrade: Get something around stock-ish performance, I guess, though err on the side of working better with larger vehicles. I'd prefer the basic jet to kind of be useless above ~300 m/s though, since it's not really a supersonic engine, but I suppose to balance that it should have much better static thrust.

Share this post


Link to post
Share on other sites

I think you might have done it again - and I might be able to built planes again!

Where is that rep button?! There it is!!

Also: Does KIDS not take care of the jet thrust issue?

Share this post


Link to post
Share on other sites
What it doesn't do, that FAR does:

--Changes in physics with Mach number

--Complicated changes in wing lift and drag due to other parts around them

I've been using FAR for about a week and I'm liking it, but I'm considering switching to NEAR (mostly for performance). I've almost exclusively built delta-wing planes while using FAR, and I haven't really noticed any complicated physics. For the uninitiated, would you mind providing a few examples of what behaviors I would be missing out on if I switch to NEAR?

Share this post


Link to post
Share on other sites
I've been using FAR for about a week and I'm liking it, but I'm considering switching to NEAR (mostly for performance). I've almost exclusively built delta-wing planes while using FAR, and I haven't really noticed any complicated physics. For the uninitiated, would you mind providing a few examples of what behaviors I would be missing out on if I switch to NEAR?

Honestly I've found the first post pretty much sums up the differences well. If you don't notice changes in behavior as you fly your planes with FAR, you probably have a very stable aircraft to start off with. If anything you might notice that you use a little less fuel with NEAR than the similar plane in FAR, but that's probably up to the design of the craft itself.

The biggest thing I've noticed thus far is that NEAR doesn't include tools for simulating aircraft performance in the SPH, or the stats readouts during flight. You also don't get instability at the Mach barrier (although I only noticed this with smaller craft, not the B9 monsters I typically build.)

Share this post


Link to post
Share on other sites
You also don't get instability at the Mach barrier

Which most likely broke my neck regularly - crossing mach 1 only seconds after take-off is crazy! :confused:

Share this post


Link to post
Share on other sites
Which most likely broke my neck regularly - crossing mach 1 only seconds after take-off is crazy! :confused:

What is your TWR man?!

Share this post


Link to post
Share on other sites

I've noticed that this mod and pwings don't play nice together on my x64 windows .24 install. Resizing the wings works fine, but you can't attach the control surfaces when NEAR is installed. Removing NEAR or using FAR instead of NEAR fixes the issue.

Share this post


Link to post
Share on other sites

Dont know, Usually I have 1-2 turbo jets on a 20-40 parts plane. But 333m/s is mach 1 and that is easily reached in the first minute (not 3-6 seconds as it might have been read above :wink: ) after take-off.

Usually my planes either yaw (usually left) of the runway, do not readily pitch up (canards help), pitch down at high speeds even in thinner 15km air, loose wings that are attached to wings ... all happening although I try hard to follow tutorials etc. I could fill my own thread with problems I encountered.

Sometimes I just get it right and the thing flies - I think it were older, less realistic versions of FAR I had been using - sometimes I manage to get an SSTO into orbit, but usually have to fight my way up and tumbling during reentry/landing is almost a given.

Share this post


Link to post
Share on other sites

Also: Does KIDS not take care of the jet thrust issue?

I haven't checked that out but um, I think KIDS only applies to non-airbreathers? Last time I used it, I didn't test jets at all heh.

Also the jets peak in Isp around 4km altitude ...

What is your TWR man?!

The light turbojet test platform (ET-Turbo) takes a whole 10 seconds to reach Mach 1... it tops out at 809m/sec at 185 altitude heh... and does something like 60G in turns.. I wonder if Jeb minds feeling like he weighs 5.4 tonnes?

...

Anyhoo, before I get distracted in trying to make an ion-powered plane again, here's the light experimental/test turbojet (ET-Turbo, 3.5 ton, sleek) flying in stock and NEAR respectively:


TurboJet/Light -
1k - 239 - 128kn stock
4k - 341 - 142kn
8k - 587 - 183.2kn
12K - 1003.4 - 225.0kn
16K - 1406.7 - 184kn
20K - 1746.2 - 130.5kn

1K - 889 - 199.9kn NEAR
4K - 1130.7 - 175.9kn
8K - 1368.6 - 116.7kn
12K - 1537.3 - 67.0kn
16k - 1653.5 - 34.3kn
20k - 1720.8 - 17.3kn

Rapier/Light -
1k - 218.8m - 106.7kn stock
4k - 309.0m - 116.7kn
8k - 512.8m - 144.3kn
12k - 884.5m - 186.5kn
16k - 1285.9m - 171.1kn
20k - 1640.6m - 123.0kn

1k - 730.8 167.0kn NEAR
4K - 1046.0 189.4kn
8k - 1330.0 137.8kn
12k - 1475.3 76.3kn
16k - 1568.9 38.1kn
20k - 1627.3 18.1kn

( Altitude / Speed / Thrust )

Those speeds were the speeds it more or less stabilized at, at a given altitude, so presumably the thrust is (more-or-less) equal to the drag, giving us both the performance curve for the engine, as well as the target performance we want to match...

I'm going to finish the NEAR tests for the Rapier-based light jet (I don't expect them to be significantly different, the stock values are just a bit below what we see there), but does anybody have any idea of what a medium or heavy should be? My idea of a heavy plane is about 12-16 tonnes... that's probably on the very small side for some people, based on the flying monstrosities I've seen..

Edited by Renegrade
RAPIER data

Share this post


Link to post
Share on other sites

Some tinkering later and....I love it. NEAT is everything I wanted in an aero mod. Planes work logically but they're not hard for hardness' sake. I can derp around all day long in straight wing planes that go Mach 4.5, I can peg the G-meter in a sustained turn without it disassembling itself...it's wonderful.

Can we have a speed unit changer?

Share this post


Link to post
Share on other sites
Honestly I've found the first post pretty much sums up the differences well.

Just one question here: Can I forget anything about how wings are attached (angled in any axis, put low or high onto the plane etc.)?

Share this post


Link to post
Share on other sites

I've updated the RAPIER table, and it's as expected, just a few percent below the Turbojet in both stock and NEAR.

The "basic" engine is probably working as intended, I usually make my science-y planes with just plain old basic engines and they're still in the barely-transsonic envelope...

Now um, here's the tricky bit.. as Nathan pointed out, KSP doesn't care about the air density when doing jet engines (and yeah I think a simple version of that jet engine mod to go with NEAR is probably the best solution), we're going to have to adjust the curve for the high performance jets fairly drastically I think.

Here's the existing curve:


@maxThrust = 200
@velocityCurve
{
@key,0 = 0 0.7 0 -0.00098

@key,1 = 140 0.63 0 0

@key,2 = 400 0.7 0.00049 0.00049
@key,3 = 900 1 0 0

key = 1800 0 -0.00098 0
}

I understand this is cubic interpolation and that the 'extra numbers' are tangents..I've never worked directly with cubic interpolation, but I gather it's rather like linear interpolation with smoothing. And tangents.

Anyhow it looks like it starts at (ignoring smoothing) 70% thrust, falls to 63% at 140m/sec, and then returns to 70% by 400, then 100% at 900, tapering slowly off down to zero at 1800. Given that the light plane can go past the target speed with only 21.3kn, we're probably going to need a dip at the second point down to like.. 10%? :S

Maybe we DO need to like.. third or quarter the raw thrust? heh.

FYI - Here's a quick and dirty table for the "basic" engine in NEAR:


Basic/Light
1k - 275.6 21.3kn NEAR
4k - 297.4 14.0kn
8k - 311.7 7.5kn
12k - 321 4.3kn
16k - 327.7 2.4kn

I think that's in line with what Ferram wants.

(NB: All three planes are made out of the exact same components, except the engines)

Additional info:

To make the craft fly like stock, here's the following thrust requirements (bonus atmospheric pressure readings for the test altitudes):


To match stock ET-Turbo:

1k - 17kn - 0.82atm
4K - 20kn - 0.45atm
8k - 26kn - 0.20atm
12k - 37kn - 0.09atm
16K - 32KN - 0.04atm
20K - 18KN - 0.02atm

(Airplanes can be found at http://alpha.renegrade.net/NEAR/NEAR-TestPlanes.zip and look like http://alpha.renegrade.net/NEAR/images/NEAR-FAR-ET_Turbo.jpg)

NOTE: I've tested the ET Turbo plane with FAR, and I'm also getting crazy speeds (863m/sec at 253 with a single turbojet; see the 'look like' screenshot in previous line). I don't seem to remember that from previous versions of FAR..?

Update to above NOTE: a reconstructed version of that craft does only 355m/sec at 275m in FAR 0.12.5.2 :S

Some tinkering later and....I love it. NEAT is everything I wanted in an aero mod. Planes work logically but they're not hard for hardness' sake. I can derp around all day long in straight wing planes that go Mach 4.5, I can peg the G-meter in a sustained turn without it disassembling itself...it's wonderful.

It's actually a little out of whack right now in terms of engine vs. drag, you might see some slowdown in future versions. They'll still pull 60g and won't have mach tuck though heh.

Edited by Renegrade

Share this post


Link to post
Share on other sites

Just curious, does this also have a lower performance impact than FAR?

Share this post


Link to post
Share on other sites

I'm pulling my hair out on this engine stuff. As far as I can tell, something has greatly reduced drag on the newest versions of FAR and NEAR.

- The sleek ET-light plane is fast on classic versions of FAR, but not Mach 2.5 at sea level fast (like 1.5, tops)

- In current NEAR and FAR, it's like there's half (a third? a quarter?) the drag, and the plane goes Mach 2.5.

In order to approximate the TurboJet performance of the stock aircraft, I found that simply setting the TurboJet thrust to 40 mostly did it (it was still a bit fast at 1km, and slightly slow at 16km and noticeably slower at 20km). A setting of 60 would probably approximate classic FAR (untested).

Similar settings would work for the RAPIER (maxThrust=38). The "basic" engine's power curve pretty much keeps it subsonic anyhow, so it's fine.

Using somewhat higher settings like 50/47.5 would probably approximate classic FAR performance.

Caveat: Reducing thrust reduces both fuel and air consumption.

Anyhow these settings are in the NEAR.cfg file, around line 238 or so


@PART[turboFanEngine]:FOR[NEAR]
{
@MODULE[ModuleEngines*]
{
@maxThrust = 40

For anybody who wants to try that.

Now all I have to do is figure out what sort of large test models I should make... :/

Share this post


Link to post
Share on other sites

@KerbMav: You can ignore the planform shape, high / low, and sweep angle. You can't ignore angle of attack, dihedral angle, or any other angles between the flat surface and the flow.

@Ruedii: It is, but not by that much.

@Renegrade: Heh. Supersonic drag almost doubles the drag on the vehicle. Yeah, this is a difficult balance to do. Maybe I should just increase the reference area for NEAR and see how many people complain about rockets flipping.

On the other hand, it's a good data point that you really can't ignore supersonic effects without things getting stupid.

Share this post


Link to post
Share on other sites

With 64 bit, I feel like a guy on a car lot kickin' tires.

Love the idea and the hard work. I'm afraid if I use NEAR, the Djin is out of the bottleand there's no way to get it back in. I could never play stock drag again. I guess I have abandonment issues.

Sure wish there was something someone could say, to put me in this brand new mod, today.

Share this post


Link to post
Share on other sites

@Renegrade: Heh. Supersonic drag almost doubles the drag on the vehicle. Yeah, this is a difficult balance to do. Maybe I should just increase the reference area for NEAR and see how many people complain about rockets flipping.

On the other hand, it's a good data point that you really can't ignore supersonic effects without things getting stupid.

Actually, FAR has the same issue now it seems. At least, newer versions. Older versions, while faster than stock, are a little more sane.

Setting the power to 40 and leaving the curve alone seemed to bring it in line with stock but that's pretty extreme... It's not 3x nerf, it's 5x nerf! :S

By the way - How would one calculate overall drag from the FAR Flight Data panel? Is it something like Cd*RefArea* ......Q?

Love the idea and the hard work. I'm afraid if I use NEAR, the Djin is out of the bottleand there's no way to get it back in. I could never play stock drag again. I guess I have abandonment issues.

FAR/NEAR can be very aggravating (aero isn't easy!), but once you're used to it, the stock air feels so soupy.

Also stock doesn't care about neat tricks like this:

NEAR-AeroRocket.jpg

The space portion is a small asparagus, but it's mated to the top of the launch asparagus. It's pointless in stock (my stock version of that would have the upper tanks unattached to the lower ones), but not having tanks sticking out randomly in the air saves on drag with NEAR/FAR.

Edited by Renegrade

Share this post


Link to post
Share on other sites

@Aethon: Consider all the reasons that you are afraid you won't be able to go back to stock; the root cause of all your fears is also the thing that tells you to install NEAR. Take your mouse pointer; download this mod. Strike down the stock drag with all of your hatred, and your journey towards the dark side will be complete! (Okay, not really. This is NEAR, not FAR we're talking about.)

@Renegrade: Do you know what the maximum static thrust of a J79 is? It's 79 kN (with afterburner) and that drops off quickly as it accelerates (due to ram drag). It comes back later when the ram pressure increases the power of the engine, but that's the real-life max thrust of the engine that powered the F-104 and the F-4. This game's stuff is really overpowered. :P

D = Cd * RefArea * Q. Technically, the definition of Cd is Cd = D / (RefArea * Q), so you're just using the rearranged definition.

Share this post


Link to post
Share on other sites

@Renegrade: Do you know what the maximum static thrust of a J79 is? It's 79 kN (with afterburner) and that drops off quickly as it accelerates (due to ram drag). It comes back later when the ram pressure increases the power of the engine, but that's the real-life max thrust of the engine that powered the F-104 and the F-4. This game's stuff is really overpowered. :P

Ah , good point. So maybe 40 to 60-ish is actually a good figure? I haven't been able to come up with a medium or large size plane to test with... my instinct is always to try to build as small as possible, and it's hard to overcome!

Come to think of it, the 180+kn thrust features are probably mostly there to overcome the mass=drag nonsense and make it possible for a stock spaceplane to reach orbit...

By the way, I've always loved the F-104. It looks like a missile! :)

Wouldn't want to fly one though..it looks like a missile... :(

D = Cd * RefArea * Q. Technically, the definition of Cd is Cd = D / (RefArea * Q), so you're just using the rearranged definition.

Yay! Actually, one other question about that (I learn so much aero in FAR/NEAR places!) -- the graphs in FAR* ONLY show Cd, without any respect to Reference Area, right? Thus a part that increases the Cd doesn't necessarily make the craft draggier, as the reference area may be less than with an alternate part that has a slightly lower Cd but adds a lot to the reference area.. right?

* = I'm actually one of the people who finds them a bit complicated and kinda scary, but I do like having them. The internal documentation is actually pretty good, I think it just needs a bit of tweaking and layman-izing for those of us who haven't been in a physics course in the last twenty years ;)

Share this post


Link to post
Share on other sites

Technically, 57 kN is the max non-afterburning thrust of the J79, so it is a pretty good figure.

I always preferred the F-4, because adding more engine always makes things better.

And the graphs in only show Cd, not ref Area, though that can be calculated on the next tab (and I should bring it over to the graph tab as well).

Share this post


Link to post
Share on other sites

Since the graph is there to show the relation of the coefficient, it makes sense that ref area isn't multiplied in.

Renegade: you've convinced me it's time for someone to make SJE. I can't right now, but I will in a week or so if no one has by then.

Meanwhile, 40kN base, ~70 at maximum velocity sounds fine to me; that will put it in J79 range, although it'll be underpowered at high speed at sea level, and overpowered at low speed at altitude.

Share this post


Link to post
Share on other sites
I always preferred the F-4, because adding more engine always makes things better.

Is that the airplane kerbal version of 'moar boosters'? Hehe

And the graphs in only show Cd, not ref Area, though that can be calculated on the next tab (and I should bring it over to the graph tab as well).

Eh? In the stability tab? Oh.. maybe you meant on the third tab? The simulation one? I'm actually the least familiar with that one. I'm going to have to explore it now..

Since the graph is there to show the relation of the coefficient, it makes sense that ref area isn't multiplied in.

Sorta; but I do like to get a .. numeric feeling for how aerodynamic something is. Especially when I make a change to make it sleeker.. having numeric or graph-y verification would be good, because it's not always what it seems. Ex. comparing the inline cockpit to the pointy-nosed one.

Renegade: you've convinced me it's time for someone to make SJE. I can't right now, but I will in a week or so if no one has by then.

Grade; There's prograde, retrograde, and then Renegrade... (It's the word for the direction you're burning in when you're burning the wrong way)

Anyhow, SJE sounds like a great idea :)

Meanwhile, 40kN base, ~70 at maximum velocity sounds fine to me; that will put it in J79 range, although it'll be underpowered at high speed at sea level, and overpowered at low speed at altitude.

Well, um, I think the existing curse sorta matches that, just need to cap the thrust.. although like I said, that makes the engine require a lot less fuel and air... might have to tone down the Isp? Or maybe not.. the fully powered one eats an entire 1.25m fuel tank in like.. 5 minutes at maximum thrust at 1k altitude..

Either that, or decrease the Isp, but then change the air:fuel mix (which is 15:1 I think? 16:1?) if we want to allow the reduced fuel consumption but keep the air intake requirements as is.

Share this post


Link to post
Share on other sites

Well, for one, with a SJE, we can have thrust drop with altitude. It's not just about the mass that could be brought in through the inlet, it's about the pressure rise in the compressor. In order to keep thrust constant with decreasing air pressure the pressure ratio would have to increase as the plane gained altitude; to maintain the same thrust at 15 km as you can get at sea level would require a 20 fold increase in compression ratio. Considering that most realistic high-speed jets already have a compression ratio of 13:1, you'd boost that to 260:1, and the best we have in real life is around 40:1, for commercial turbofans that have very limited operating conditions.

We can also have fuel consumption handled properly.

Share this post


Link to post
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.

Sign in to follow this