Jump to content

Real Effects - An FX mod for Realism Overhaul[DEV]


Guest

Recommended Posts

Real_Effects.png

I'd like to present to you Real Effects. This was born out of an attempt at adding HotRockets support to Realism Overhaul, and ended up a whole new mod. It adds enhanced flame effects based on real nozzle thermodynamics. Each engine uses a flame effect corresponding to its primary fuel mix. Overexpansion and underexpansion are both modeled, you will even see flow separation on large expansion ratio nozzles. Where possible, the FX were based on real pictures. Also included sound FX from KW Rocketry, because they sound cool and go well with those effects.

Download:

http://www./download/kbl1vuq5m5cd89q/RealEffects.zip

Kerbalstuff Mirror (NOTE: might not always be up to date):

https://kerbalstuff.com/mod/375/Real%20Effects

Requires up to date Realism Overhaul version:

http://forum.kerbalspaceprogram.com/threads/99966-0-25-0-Realism-Overhaul-7-0-0

As well as all the associated prerequisites.

Currently supported mods:

FASA (partial, LES towers and Saturn separation motors are not yet supported).

Credits/acknowledgements:

Nazari1382: HotRockets. The inspiration for this mod, the effects, a lot of configuration, launch smoke effect. Indeed, could be considered a co-author by this point. :)

Ferram4: Crotchety Old Mod, An inspiration and a base for SRB and kerolox effects.

Kickasskyle and Winston: Sounds. Without them, the engines would still be sounding wimpy.

Sarbian: Smokescreen plugin. Without him, there would be neither HotRockets, COM, or RE.

Future plans:

FX changing when fuel is swapped (requires RealFuels update).

CoolRockets effects when a cryogenic fuel is used in an engine (once it's updated, might require RealFuels update as well).

Further fine-tuning of effects.

More engines support. LazTek is next on the list, and of course FASA needs finishing.

Better flow separation (gross underexpansion) modeling. Technically doesn't need RF update, but if RF was to simulate it (it can cause violent jolts in the engine), I'd need to make sure FX match up with the simulation.

Known issues:

Low FPS. It can and will bog down KSP on slower computers (or even on pretty good ones. You need a rather powerful rig for that one). Do not install if your computer is struggling with RSS alone, or even if it's merely on the weak side. The more engines you have, the worse the performance. Performance might improve later on, but I'm primarily concerned with looks. This is not, and never was, meant for weak computers.

Incompatible with HotRockets (do not install both this and HR).

FX look good but not perfect, that's why it's in here and not in addon release. There are things that are up for improvement (especially on kerolox/solids), but I already like it so much I wanted to share it. :)

Beside SRBs, sounds respond to global throttle instead of local (engine's own) one. Likely a KSP bug, need to confirm in stock and report to Squad.

Edited by Guest
Link to comment
Share on other sites

Get it to orbit, then try again. :) Those engines are tested without the nozzle IRL, precisely because of this happening. You can see that the gas doesn't follow the chamber walls; this is "gross underexpansion" and would damage your engine IRL.

Link to comment
Share on other sites

Cool! I kind of agree with Scarz, that does look particularly small. This makes me wonder what the actual throat area is for that particular engine, because for that small a jet to come out of it, the throat needs to be horribly tiny. Since that kind of gross overexpansion (aside: underexpansion would imply that the jet expanded further after leaving the nozzle, which generally does not happen at SL) implies that a normal shock should form somewhere inside the nozzle, I should be able to work the quasi-one dimensional compressible flow equations to figure out where the shock should be in the nozzle, and thus, how wide the jet after it should be. Unfortunately, it looks like it'll be one of those things that needs its own little program to calculate, because a few of the equations (notably, the Mach-Area relation) need to be solved numerically, but then those numbers can just be entered into tables at the end. I'll see what I can come up with.

Link to comment
Share on other sites

Cool! I kind of agree with Scarz, that does look particularly small. This makes me wonder what the actual throat area is for that particular engine, because for that small a jet to come out of it, the throat needs to be horribly tiny. Since that kind of gross overexpansion (aside: underexpansion would imply that the jet expanded further after leaving the nozzle, which generally does not happen at SL) implies that a normal shock should form somewhere inside the nozzle, I should be able to work the quasi-one dimensional compressible flow equations to figure out where the shock should be in the nozzle, and thus, how wide the jet after it should be. Unfortunately, it looks like it'll be one of those things that needs its own little program to calculate, because a few of the equations (notably, the Mach-Area relation) need to be solved numerically, but then those numbers can just be entered into tables at the end. I'll see what I can come up with.

This is the Apollo SPS. Nozzle expansion ratio is 60:1. The throat is very small, at 6.9 bar (0.69MPa) chamber pressure, I'd imagine that the jet almost completely ignores the presence of the nozzle by that point. Also, I used Mathematica for exit pressure calculations, and yeah, the equations actually managed to crash it when I tried to get it to include units in there. :) I came up with a monstrous-looking formula that evaluates for a while, but gives nice enough results.

The problem with shock detachment is that there is no real equation on when precisely it starts to happen. I've come across a decent-looking approximation, so maybe I'll feature that later on. If you've got something better, I'd welcome it (preferably in Mathematica-friendly form), but keep in mind that the shock separation is a very uneven phenomenon (which is why it's so dangerous), so it might be hard to predict or simulate. I've just came across information indicating that most engines actually go out of their way to prevent it (mostly in order to allow them to be ground tested without a vac chamber), so I might end up revising the effect to get rid of it on all but a few very high-altitude engines like the SPS (it doesn't happen on J-2, for example).

Oh, and regarding terminology, we're both right. :) It's a gross overexpansion of the nozzle, and gross underexpansion of the jet. I've seen both terms used.

Link to comment
Share on other sites

Hotrockets doesn't have stream expansion and similar. But if I'm right the stock engines are in RO, so when the configs for those will be out it will be a breeze to adapt them to the stock game.

Link to comment
Share on other sites

Hotrockets doesn't have stream expansion and similar. But if I'm right the stock engines are in RO, so when the configs for those will be out it will be a breeze to adapt them to the stock game.

Did you look at the post ?

EDIT- All Good was just pointing out that the cfg are pretty much the same as for the flames all you have to do is change

modelName = RealEffects/FX/ssmeflame2
as hotrockets has a couple to pick from
modelName = MP_Nazari/FX/flamenuke
or some make there own. Edited by Mecripp2
Link to comment
Share on other sites

Did you look at the post ?

My bad, but those don't look as good and precise (underexpansion) as this, since HR flames weren't really made to do that in the first place. I don't really see the problem in readapting this for the stock game when Dragon01 will make them for the stock engines (or a set with similar roles and shapes like KW)

Link to comment
Share on other sites

Very nice dragon, was starting on something like this for the shuttle, but glad you've taken it up properly, I could never really figure out what the in-game GUI energy values correlated to :/

I produced a real nice start up and running sound for RS-25D's, and did a little bit with the SSSRBs, if you're interested I could send you the files :) The audio was all taken from real launches and edited in AdobeAudition.

Got it sounding almost exactly like this in game (1:17)

Edited by pingopete
Link to comment
Share on other sites

I'll welcome any new sounds, FX, anything you can contribute. :) If you could do something like this for Saturn V, Falcon and anything else you can find, I'll be really thankful. I'd gladly replace KW configs where possible.

Are stock parts supported? I'd REALLY love to see this for stock vehicles. It would make my day.

I'm not really interested in doing neither stock or KW (or other such packs). The latter is a maybe, but most stock engines become redundant with mods. Indeed, I'm now re-releasing the Soviet Engines pack, which together with FASA and a few other mods cover almost all engines in other RO packs, giving them actual, realistic models.

And no, I'm not doing stock stock either. This is a strictly RO-based modification. I might expand the scope someday later, but it'll be far in the future. Rescaling and refitting effects is a nontrivial task.

Link to comment
Share on other sites

Cool! I kind of agree with Scarz, that does look particularly small. This makes me wonder what the actual throat area is for that particular engine, because for that small a jet to come out of it, the throat needs to be horribly tiny. Since that kind of gross overexpansion (aside: underexpansion would imply that the jet expanded further after leaving the nozzle, which generally does not happen at SL) implies that a normal shock should form somewhere inside the nozzle, I should be able to work the quasi-one dimensional compressible flow equations to figure out where the shock should be in the nozzle, and thus, how wide the jet after it should be. Unfortunately, it looks like it'll be one of those things that needs its own little program to calculate, because a few of the equations (notably, the Mach-Area relation) need to be solved numerically, but then those numbers can just be entered into tables at the end. I'll see what I can come up with.

SAcGnl3.jpg

....need help with that?

Link to comment
Share on other sites

As I said, any help would be appreciated. :) If you can use Mathematica to provide a handy notebook for calculating stuff, that'd be awesome. I've got a fine exit pressure formula, but detailed info on formulas that govern flow separation would be greatly appreciated. Also, if you provide insight on how jet afterburner plumes (for AJE) should behave, then I'd gladly implement that as well. :)

Link to comment
Share on other sites

Well, let's think for a second: what causes flow separation?

The answer is strong viscous effects near the wall combined with an adverse pressure gradient (dP/dx > 0). Now, for a rocket nozzle in ideal operation, the flow will accelerate through the diverging section, and the pressure will decrease along the way (read: favorable pressure gradient), so that means that a nozzle in ideal conditions can never suffer flow separation.

Okay, so what might cause an adverse pressure gradient in a nozzle? The most for a supersonic flow, that's going to be a shock, probably. In fact, if a shock forms inside a rocket nozzle, it creates a severe adverse pressure gradient that almost immediately results in flow separation. So, find the location of the normal shock and you find the location of flow separation. :) It was a fun little challenge, so I whipped up a little utility to do it for me. It'll return the area ratio (wrt the throat area) where the normal shock (and thus, flow separation) occur. It's up to you after that. Source is BSD-2 in case you're interested in making use of it.

Link to comment
Share on other sites

Nice utility. So far I think I've managed to bog it down. :) It just kept iterating. You should likely add some way of finding out when there's no solution (there's no separation).

Here's the test problem I used (data I have on hand). Atlas sustainer, high-alt kerolox engine, flow separation does not occur inside the nozzle (since it can function at SL).

Area ratio: 25

Gamma: 1.2

Chamber pressure: 4500kPa

Exterior pressure: 100kPa

Also, what kind of nozzle does it assume? Trickery with bell shape can be done to delay separation, for example SSME and J-2 seem to both utilize that.

That said, it is pretty well behaved once tested on AJ-10-137. With area ratio of 60, same gamma and chamber pressure of 690 kPa, it gave the area ratio of 10. For AJ-10-137, its waaay up the rapidly expanding section at the base. I might end up enlarging the effect somewhat, but first I'll need to find that "1:10 mark"...

Two more questions. Is the resulting function linear? Does the shock move linearly with pressure, or is the relationship more complex? Also, would that be possible to add a feature to find pressure at which the separation starts to occur?

Link to comment
Share on other sites

Yeah, I see what's happening. I added error checking for if the exit pressure was above the ambient pressure, but not one to check if the lower exit pressure needed a normal shock to be brought up to ambient; I just pushed and released a fix for that.

It actually doesn't assume a nozzle shape and calculates its properties on the assumption of quasi-1D inviscid compressible flow, which is why it doesn't need any geometry data besides area ratio; it should be accurate for most typical nozzle shapes, but things like the SSME are probably going to make it wrong, since their properties are heavily dependent on the 3D flowfield inside the nozzle. Unfortunately, calculating those is going to require a lot more data on the nozzle shape, as well as a much more complicated solver. Probably will need to be a finite difference grid, and likely will also need to resolve viscous effects. That's a lot of work. :P

The location of the shock likely isn't linear, the pressure, mach and area relationships are filled with exponents and squares and what not, so I'm likely going to add a function to let you graph it as a function of pressure. Probably give you a nice csv for it.

Edit: I did just that, v0.3 of it lets you sweep chamber and ambient pressure. From the way it looks, the area ratio at the shock position is a linear function of ambient back pressure, but is more of a quadratic function of chamber pressure; you might want to take this into account when handling throttling. It will also tell you when the shock isn't in the nozzle by dumping "NULL" to the text file when there is no shock and separation.

Edited by ferram4
Link to comment
Share on other sites

I expanded the scope of v0.4 of that thingy to handle some empirical methods I found; it predicts flow separation much, much earlier than the normal shock criteria I was using, and it makes a bit more sense, IMO. Still doesn't require any more geometry data though, which is necessary for the more complicated empirical methods that I found, which might be worth investigating.

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